/home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/LES/OneEqKsgs.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/LES/OneEqKsgs.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
OneEqKsgs.H
Go to the documentation of this file.
1#ifndef ONEEQKSGS_H
2#define ONEEQKSGS_H
3
4#include <string>
6
7namespace amr_wind::turbulence {
8
12template <typename Transport>
13class OneEqKsgs : public TurbModelBase<Transport>
14{
15public:
16 explicit OneEqKsgs(CFDSim& sim);
17
18 ~OneEqKsgs() override;
19
20protected:
22
28
29 Field* m_tke{nullptr};
30
32 amrex::Real m_Ce{0.1};
33 amrex::Real m_Ceps{0.93};
34};
35
43template <typename Transport>
44class OneEqKsgsM84 : public OneEqKsgs<Transport>
45{
46public:
47 static std::string identifier()
48 {
49 return "OneEqKsgsM84-" + Transport::identifier();
50 }
51
52 explicit OneEqKsgsM84(CFDSim& sim);
53
54 ~OneEqKsgsM84() override;
55
56 std::string model_name() const override { return "OneEqKsgsM84"; }
57
60 const FieldState fstate, const DiffusionType /*unused*/) override;
61
63 void post_advance_work() override;
64
66 void update_alphaeff(Field& alphaeff) override;
67
69 void update_scalar_diff(Field& deff, const std::string& name) override;
70
72 void parse_model_coeffs() override;
73
76
77private:
79
81 amrex::Vector<amrex::Real> m_gravity{0.0, 0.0, -9.81};
82
84 amrex::Real m_ref_theta{300.0};
85
87 bool m_hybrid_rl{false};
89};
90
98template <typename Transport>
99class OneEqKsgsS94 : public OneEqKsgs<Transport>
100{
101public:
102 static std::string identifier()
103 {
104 return "OneEqKsgsS94-" + Transport::identifier();
105 }
106
107 explicit OneEqKsgsS94(CFDSim& sim);
108
109 ~OneEqKsgsS94() override;
110
111 std::string model_name() const override { return "OneEqKsgsS94"; }
112
115 const FieldState fstate,
116 const DiffusionType diff_type /*unused*/) override;
117
119 void post_advance_work() override {}
120
122 void update_scalar_diff(Field& deff, const std::string& name) override;
123
125 void parse_model_coeffs() override;
126
129};
130
131} // namespace amr_wind::turbulence
132
133#endif /* ONEEQKSGS_H */
Definition CFDSim.H:47
Definition Field.H:116
Definition OneEqKsgs.H:14
Field & m_shear_prod
Definition OneEqKsgs.H:24
Field & m_dissip
Definition OneEqKsgs.H:26
amrex::Real m_Ceps
Definition OneEqKsgs.H:33
Field & m_turb_lscale
Definition OneEqKsgs.H:23
OneEqKsgs(CFDSim &sim)
Definition OneEqKsgs.cpp:16
Field & m_rho
Definition OneEqKsgs.H:27
amrex::Real m_Ce
Turbulence constant.
Definition OneEqKsgs.H:32
Field & m_vel
Definition OneEqKsgs.H:21
Field & m_buoy_prod
Definition OneEqKsgs.H:25
Field * m_tke
Definition OneEqKsgs.H:29
Definition OneEqKsgs.H:45
amrex::Real m_ref_theta
Reference temperature (Kelvin)
Definition OneEqKsgs.H:84
amrex::Vector< amrex::Real > m_gravity
Gravity vector (m/s^2)
Definition OneEqKsgs.H:81
void update_turbulent_viscosity(const FieldState fstate, const DiffusionType) override
Update the turbulent viscosity field.
Definition OneEqKsgs.cpp:89
bool m_hybrid_rl
Hybrid RANS-LES with Nalu-wind.
Definition OneEqKsgs.H:87
static std::string identifier()
Definition OneEqKsgs.H:47
Field * m_sdr
Definition OneEqKsgs.H:88
OneEqKsgsM84(CFDSim &sim)
Definition OneEqKsgs.cpp:34
void post_advance_work() override
Do any post advance work.
Definition OneEqKsgs.cpp:224
void parse_model_coeffs() override
Parse turbulence model coefficients.
Definition OneEqKsgs.cpp:71
void update_scalar_diff(Field &deff, const std::string &name) override
Update the effective scalar diffusivity field.
Definition OneEqKsgs.cpp:205
void update_alphaeff(Field &alphaeff) override
Update the effective thermal diffusivity field.
Definition OneEqKsgs.cpp:165
std::string model_name() const override
String representation of this turbulence model for I/O.
Definition OneEqKsgs.H:56
TurbulenceModel::CoeffsDictType model_coeffs() const override
Return turbulence model coefficients.
Definition OneEqKsgs.cpp:80
Field & m_temperature
Definition OneEqKsgs.H:78
Definition OneEqKsgs.H:100
void post_advance_work() override
No post advance work for this model.
Definition OneEqKsgs.H:119
void update_turbulent_viscosity(const FieldState fstate, const DiffusionType diff_type) override
Update the turbulent viscosity field.
Definition OneEqKsgs.cpp:289
void update_scalar_diff(Field &deff, const std::string &name) override
Update the effective scalar diffusivity field.
Definition OneEqKsgs.cpp:299
TurbulenceModel::CoeffsDictType model_coeffs() const override
Return turbulence model coefficients.
Definition OneEqKsgs.cpp:283
std::string model_name() const override
String representation of this turbulence model for I/O.
Definition OneEqKsgs.H:111
OneEqKsgsS94(CFDSim &sim)
Definition OneEqKsgs.cpp:264
void parse_model_coeffs() override
Parse turbulence model coefficients.
Definition OneEqKsgs.cpp:275
static std::string identifier()
Definition OneEqKsgs.H:102
Definition TurbModelBase.H:96
Field & alphaeff() override
Return the effective thermal diffusivity field.
Definition TurbModel.H:53
std::unordered_map< std::string, amrex::Real > CoeffsDictType
Default identifier used by factor methods.
Definition TurbulenceModel.H:35
FieldState
Definition FieldDescTypes.H:14
DiffusionType
Definition incflo_enums.H:4
Definition CFDSim.H:23