ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TurbChoice Struct Reference

#include <ERF_TurbStruct.H>

Collaboration diagram for TurbChoice:

Public Member Functions

void init_params (int lev, int max_level, std::string pp_prefix)
 
void check_params (amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &phys_bc_type)
 
void display (int lev)
 
bool uses_eamxx_shoc () const noexcept
 
bool uses_native_shoc () const noexcept
 
bool uses_shoc_family () const noexcept
 
bool pbl_requires_surface_layer () const noexcept
 
bool pbl_suppresses_microphysics_condensation () const noexcept
 

Public Attributes

LESType les_type = LESType::None
 
amrex::Real Pr_t = one / three
 
amrex::Real Pr_t_inv = three
 
amrex::Real Sc_t = one
 
amrex::Real Sc_t_inv = one
 
amrex::Real Cs = zero
 
bool smag2d = false
 
amrex::Real Ce = amrex::Real(0.93)
 
amrex::Real Ce_wall = zero
 
amrex::Real Ck = amrex::Real(0.1)
 
amrex::Real Cmu0 = amrex::Real(0.5562)
 
amrex::Real Cb = amrex::Real(0.35)
 
amrex::Real Rt_crit = -one
 
amrex::Real Rt_min = -three
 
amrex::Real l_g_max = amrex::Real(30.0)
 
amrex::Real sigma_k = amrex::Real(0.5)
 
amrex::Real theta_ref = zero
 
StratType strat_type = StratType::theta
 
bool mix_isotropic = true
 
bool use_Ri_correction = true
 
amrex::Real Ri_crit = fourth
 
RANSType rans_type = RANSType::None
 
bool dirichlet_k = false
 
PBLType pbl_type = PBLType::None
 
MYNNLevel25 pbl_mynn
 
MYNNLevel2 pbl_mynn_level2
 
bool use_kturb = false
 
bool use_keqn
 
bool use_pbl_tke
 
bool use_tke = false
 
bool init_tke_from_ustar = false
 
amrex::Real tke_min = amrex::Real(1.e-6)
 
amrex::Real pbl_ysu_coriolis_freq
 
bool pbl_ysu_use_consistent_coriolis
 
bool pbl_ysu_force_over_water
 
amrex::Real pbl_ysu_land_Ribcr
 
amrex::Real pbl_ysu_unst_Ribcr
 
amrex::Real pbl_mrf_coriolis_freq = amrex::Real(1.0e-4)
 
amrex::Real pbl_mrf_Ribcr = amrex::Real(0.5)
 
amrex::Real pbl_mrf_const_b = amrex::Real(7.8)
 
amrex::Real pbl_mrf_sf = amrex::Real(0.1)
 
bool mrf_moistvars = false
 
bool advect_tke = true
 
bool diffuse_tke_3D = true
 

Detailed Description

Container holding quantities related to turbulence parametrizations

Member Function Documentation

◆ check_params()

void TurbChoice::check_params ( amrex::GpuArray< ERF_BC, AMREX_SPACEDIM *2 > &  phys_bc_type)
inline
294  {
295  // BC compatibility
297  phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::surface_layer ) {
298  amrex::Abort("The selected PBL model requires MOST at lower boundary");
299  }
300  if ( (les_type == LESType::Deardorff) && (Ce_wall > 0) &&
301  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::surface_layer) &&
302  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::slip_wall) &&
303  (phys_bc_type[amrex::Orientation(amrex::Direction::z,amrex::Orientation::low)] != ERF_BC::no_slip_wall) )
304  {
305  amrex::Warning("Deardorff LES assumes wall at zlo when applying Ce_wall");
306  }
307  }
@ no_slip_wall
@ surface_layer
amrex::Real Ce_wall
Definition: ERF_TurbStruct.H:447
LESType les_type
Definition: ERF_TurbStruct.H:431
bool pbl_requires_surface_layer() const noexcept
Definition: ERF_TurbStruct.H:495
Here is the call graph for this function:

◆ display()

void TurbChoice::display ( int  lev)
inline
310  {
311  amrex::Print() << "Turbulence Settings at level " << lev << std::endl;
312 
313  if (
314  les_type == LESType::None && rans_type == RANSType::None &&
315  pbl_type == PBLType::None) {
316  amrex::Print() << " Using DNS model at level " << lev << std::endl;
317  } else if (les_type == LESType::Smagorinsky) {
318  if (smag2d) {
319  amrex::Print() << " Using 2D Smagorinsky LES model at level " << lev << std::endl;
320  } else {
321  amrex::Print() << " Using Smagorinsky LES model at level " << lev << std::endl;
322  }
323  if (use_Ri_correction) {
324  amrex::Print() << " Smagorinsky uses Richardson number correction with Ri_crit = "
325  << Ri_crit << std::endl;
326  }
327  } else if (les_type == LESType::Deardorff) {
328  amrex::Print() << " Using Deardorff LES model at level " << lev << std::endl;
329  } else if (rans_type == RANSType::kEqn) {
330  amrex::Print()
331  << " Using Axell & Liungman one-equation RANS k model at level " << lev
332  << std::endl;
333  } else if (pbl_type == PBLType::MYJ) {
334  amrex::Print() << " Using MYJ PBL model at level " << lev << std::endl;
335  } else if (pbl_type == PBLType::MYNN25) {
336  amrex::Print() << " Using MYNN2.5 PBL model at level " << lev << std::endl;
337  } else if (pbl_type == PBLType::MYNNEDMF) {
338  amrex::Print() << " Using MYNNEDMF PBL model at level " << lev << std::endl;
339  } else if (pbl_type == PBLType::YSU) {
340  amrex::Print() << " Using YSU PBL model at level " << lev << std::endl;
341  } else if (pbl_type == PBLType::MRF) {
342  amrex::Print() << " Using MRF PBL model at level " << lev << std::endl;
343  } else if (pbl_type == PBLType::EAMXX_SHOC) {
344  amrex::Print() << " Using EAMxx SHOC PBL model at level " << lev << std::endl;
345  } else if (pbl_type == PBLType::NATIVE_SHOC) {
346  amrex::Print() << " Using native SHOC PBL model at level " << lev << std::endl;
347  } else {
348  amrex::Error("Unknown turbulence model");
349  }
350 
351  if (les_type != LESType::None) {
352  if (les_type == LESType::Smagorinsky) {
353  amrex::Print() << " Cs : " << Cs << std::endl;
354  }
355  if (les_type == LESType::Deardorff) {
356  amrex::Print() << " Ce : " << Ce << std::endl;
357  amrex::Print() << " Ce at wall : " << Ce_wall << std::endl;
358  amrex::Print() << " Ck : " << Ck << std::endl;
359  amrex::Print() << " sigma_k : " << sigma_k << std::endl;
360 
361  // Sullivan et al 1994, Eqn 14
362  amrex::Real Cs_equiv = std::sqrt(Ck * std::sqrt(Ck / Ce));
363  amrex::Print() << " equivalent Cs : " << Cs_equiv
364  << std::endl;
365  }
366  amrex::Print() << " isotropic mixing : " << mix_isotropic
367  << std::endl;
368  }
369 
370  if (rans_type != RANSType::None) {
371  if (rans_type == RANSType::kEqn) {
372  amrex::Print() << "Cmu0 : " << Cmu0 << std::endl;
373  amrex::Print() << "sigma_k : " << sigma_k << std::endl;
374  amrex::Print() << "Cb : " << Cb << std::endl;
375  amrex::Print() << "Rt_crit : " << Rt_crit << std::endl;
376  amrex::Print() << "Rt_min : " << Rt_min << std::endl;
377  amrex::Print() << "max_geom_lscale : " << l_g_max << std::endl;
378  }
379  }
380 
381  if ((les_type == LESType::Deardorff) ||
382  (rans_type == RANSType::kEqn)) {
383  if (theta_ref > 0) {
384  amrex::Print() << " reference theta : " << theta_ref << std::endl;
385  } else {
386  amrex::Print() << " reference theta : n/a" << std::endl;
387  }
388  }
389 
390  if ((les_type != LESType::None) || (rans_type != RANSType::None)) {
391  amrex::Print() << " Pr_t : " << Pr_t << std::endl;
392  amrex::Print() << " Sc_t : " << Sc_t << std::endl;
393  }
394 
395  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
396  amrex::Print() << " pbl_mynn_A1 : " << pbl_mynn.A1 << std::endl;
397  amrex::Print() << " pbl_mynn_A2 : " << pbl_mynn.A2 << std::endl;
398  amrex::Print() << " pbl_mynn_B1 : " << pbl_mynn.B1 << std::endl;
399  amrex::Print() << " pbl_mynn_B2 : " << pbl_mynn.B2 << std::endl;
400  amrex::Print() << " pbl_mynn_C1 : " << pbl_mynn.C1 << std::endl;
401  amrex::Print() << " pbl_mynn_C2 : " << pbl_mynn.C2 << std::endl;
402  amrex::Print() << " pbl_mynn_C3 : " << pbl_mynn.C3 << std::endl;
403  amrex::Print() << " pbl_mynn_C4 : " << pbl_mynn.C4 << std::endl;
404  amrex::Print() << " pbl_mynn_C5 : " << pbl_mynn.C5 << std::endl;
405  } else if (pbl_type == PBLType::YSU) {
406  amrex::Print() << " pbl_ysu_coriolis_freq : "
407  << pbl_ysu_coriolis_freq << std::endl;
408  amrex::Print() << " pbl_ysu_use_consistent_coriolis : "
409  << pbl_ysu_use_consistent_coriolis << std::endl;
410  amrex::Print() << " pbl_ysu_force_over_water : "
411  << pbl_ysu_force_over_water << std::endl;
412  amrex::Print() << " pbl_ysu_land_Ribcr : "
413  << pbl_ysu_land_Ribcr << std::endl;
414  amrex::Print() << " pbl_ysu_unst_Ribcr : "
415  << pbl_ysu_unst_Ribcr << std::endl;
416  } else if (pbl_type == PBLType::MRF) {
417  amrex::Print() << " pbl_mrf_coriolis_freq : " << pbl_mrf_coriolis_freq
418  << std::endl;
419  amrex::Print() << " pbl_mrf_Ribcr : " << pbl_mrf_Ribcr
420  << std::endl;
421  amrex::Print() << " pbl_mrf_const_b : " << pbl_mrf_const_b
422  << std::endl;
423  amrex::Print() << " pbl_mrf_sf : " << pbl_mrf_sf
424  << std::endl;
425  amrex::Print() << " mrf_moistvars : " << mrf_moistvars
426  << std::endl;
427  }
428  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19
amrex::Real C4
Definition: ERF_MYNNStruct.H:50
amrex::Real C1
Definition: ERF_MYNNStruct.H:47
amrex::Real C3
Definition: ERF_MYNNStruct.H:49
amrex::Real C2
Definition: ERF_MYNNStruct.H:48
amrex::Real A2
Definition: ERF_MYNNStruct.H:44
amrex::Real B1
Definition: ERF_MYNNStruct.H:45
amrex::Real B2
Definition: ERF_MYNNStruct.H:46
amrex::Real C5
Definition: ERF_MYNNStruct.H:51
amrex::Real A1
Definition: ERF_MYNNStruct.H:43
bool smag2d
Definition: ERF_TurbStruct.H:443
amrex::Real sigma_k
Definition: ERF_TurbStruct.H:459
MYNNLevel25 pbl_mynn
Definition: ERF_TurbStruct.H:509
PBLType pbl_type
Definition: ERF_TurbStruct.H:478
amrex::Real pbl_mrf_const_b
Definition: ERF_TurbStruct.H:547
amrex::Real Rt_min
Definition: ERF_TurbStruct.H:454
amrex::Real pbl_mrf_coriolis_freq
Definition: ERF_TurbStruct.H:545
amrex::Real Ri_crit
Definition: ERF_TurbStruct.H:470
RANSType rans_type
Definition: ERF_TurbStruct.H:473
amrex::Real pbl_mrf_Ribcr
Definition: ERF_TurbStruct.H:546
amrex::Real Ck
Definition: ERF_TurbStruct.H:448
amrex::Real Cmu0
Definition: ERF_TurbStruct.H:451
bool pbl_ysu_use_consistent_coriolis
Definition: ERF_TurbStruct.H:534
amrex::Real Cb
Definition: ERF_TurbStruct.H:452
amrex::Real pbl_mrf_sf
Definition: ERF_TurbStruct.H:548
bool use_Ri_correction
Definition: ERF_TurbStruct.H:469
amrex::Real pbl_ysu_land_Ribcr
Definition: ERF_TurbStruct.H:540
bool mrf_moistvars
Definition: ERF_TurbStruct.H:549
amrex::Real Cs
Definition: ERF_TurbStruct.H:442
amrex::Real Ce
Definition: ERF_TurbStruct.H:446
amrex::Real pbl_ysu_coriolis_freq
Definition: ERF_TurbStruct.H:531
bool pbl_ysu_force_over_water
Definition: ERF_TurbStruct.H:537
amrex::Real Pr_t
Definition: ERF_TurbStruct.H:434
amrex::Real theta_ref
Definition: ERF_TurbStruct.H:462
amrex::Real Sc_t
Definition: ERF_TurbStruct.H:438
amrex::Real Rt_crit
Definition: ERF_TurbStruct.H:453
amrex::Real pbl_ysu_unst_Ribcr
Definition: ERF_TurbStruct.H:542
bool mix_isotropic
Definition: ERF_TurbStruct.H:467
amrex::Real l_g_max
Definition: ERF_TurbStruct.H:455

◆ init_params()

void TurbChoice::init_params ( int  lev,
int  max_level,
std::string  pp_prefix 
)
inline
85  {
86  amrex::ParmParse pp(pp_prefix);
87 
88  // Which LES closure?
89  query_one_or_per_level(pp, "les_type", les_type, lev, max_level);
90 
91  // Handle 2-D Smag
92  if (les_type == LESType::Smagorinsky2D) {
93  les_type = LESType::Smagorinsky;
94  smag2d = true;
95  }
96 
97  // Which RANS closure?
98  query_one_or_per_level(pp, "rans_type", rans_type, lev, max_level);
99 
100  if ((rans_type != RANSType::None) && (les_type != LESType::None)) {
101  amrex::Error("Hybrid RANS-LES not implemented");
102  }
103 
104  // Which PBL Closure
105  query_one_or_per_level_enum_case_insensitive(pp, "pbl_type", pbl_type, lev, max_level);
106  if (pbl_type == PBLType::SHOC) {
107  static bool warned_legacy_shoc = false;
108  if (!warned_legacy_shoc) {
109  amrex::Warning("erf.pbl_type = SHOC is deprecated; use erf.pbl_type = EAMXX_SHOC");
110  warned_legacy_shoc = true;
111  }
112  pbl_type = PBLType::EAMXX_SHOC;
113  }
114 
115  // Do some more stuff for PBL Modeling
116  if (pbl_type != PBLType::None) {
117  // Check for compatibility between PBL, LES, Molec Transport
118  if (les_type != LESType::None) {
119  amrex::Print() << "Selected a PBL model and an LES model: "
120  << "Using PBL for vertical transport, LES for horizontal"
121  << std::endl;
122  }
123  if (les_type == LESType::Smagorinsky) {
124  if (!smag2d)
125  amrex::Error("If using Smagorinsky with a PBL model, the 2-D "
126  "formulation should be used");
127  } else if (les_type == LESType::Deardorff) {
128  amrex::Error(
129  "It is not recommended to use Deardorff LES and a PBL model");
130  }
131 
132  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
133  query_one_or_per_level(pp, "pbl_mynn_A1", pbl_mynn.A1, lev, max_level);
134  query_one_or_per_level(pp, "pbl_mynn_A2", pbl_mynn.A2, lev, max_level);
135  query_one_or_per_level(pp, "pbl_mynn_B1", pbl_mynn.B1, lev, max_level);
136  query_one_or_per_level(pp, "pbl_mynn_B2", pbl_mynn.B2, lev, max_level);
137  query_one_or_per_level(pp, "pbl_mynn_C1", pbl_mynn.C1, lev, max_level);
138  query_one_or_per_level(pp, "pbl_mynn_C2", pbl_mynn.C2, lev, max_level);
139  query_one_or_per_level(pp, "pbl_mynn_C3", pbl_mynn.C3, lev, max_level);
140  query_one_or_per_level(pp, "pbl_mynn_C4", pbl_mynn.C4, lev, max_level);
141  query_one_or_per_level(pp, "pbl_mynn_C5", pbl_mynn.C5, lev, max_level);
146  pp, "pbl_mynn_diffuse_moistvars", pbl_mynn.diffuse_moistvars, lev,
147  max_level);
149  pp, "pbl_mynn_SMmin", pbl_mynn.SMmin, lev, max_level);
151  pp, "pbl_mynn_SMmax", pbl_mynn.SMmax, lev, max_level);
153  pp, "pbl_mynn_SHmin", pbl_mynn.SHmin, lev, max_level);
155  pp, "pbl_mynn_SHmax", pbl_mynn.SHmax, lev, max_level);
157  pp, "pbl_mynn_SQfactor", pbl_mynn.SQfac, lev, max_level);
158  } else if (pbl_type == PBLType::YSU) {
160  pp, "pbl_ysu_coriolis_freq", pbl_ysu_coriolis_freq, lev, max_level);
162  pp, "pbl_ysu_use_consistent_coriolis",
163  pbl_ysu_use_consistent_coriolis, lev, max_level);
165  pp, "pbl_ysu_force_over_water", pbl_ysu_force_over_water, lev,
166  max_level);
168  pp, "pbl_ysu_land_Ribcr", pbl_ysu_land_Ribcr, lev, max_level);
170  pp, "pbl_ysu_unst_Ribcr", pbl_ysu_unst_Ribcr, lev, max_level);
171  } else if (pbl_type == PBLType::MRF) {
173  pp, "pbl_mrf_coriolis_freq", pbl_mrf_coriolis_freq, lev, max_level);
175  pp, "pbl_mrf_Ribcr", pbl_mrf_Ribcr, lev, max_level);
177  pp, "pbl_mrf_const_b", pbl_mrf_const_b, lev, max_level);
178  query_one_or_per_level(pp, "pbl_mrf_sf", pbl_mrf_sf, lev, max_level);
180  pp, "mrf_moistvars", mrf_moistvars, lev, max_level);
181  }
182 
183  if (uses_eamxx_shoc()) {
184 #ifndef ERF_USE_EAMXX_SHOC
185  amrex::Abort("PBLType::EAMXX_SHOC requested, but ERF was not built with ERF_ENABLE_EAMXX_SHOC=ON");
186 #endif
187  }
188 
189  if (uses_native_shoc()) {
190 #ifndef ERF_USE_NATIVE_SHOC
191  amrex::Abort("PBLType::NATIVE_SHOC requested, but ERF was not built with native SHOC enabled");
192 #endif
193  }
194 
196  std::string zlo_bc = "none";
197  amrex::ParmParse pp_bc("zlo");
198  pp_bc.get("type",zlo_bc);
199  if (amrex::toLower(zlo_bc) != "surface_layer") {
200  amrex::Abort("You must use the surface_layer BC at zlo with the selected PBL.");
201  }
202  }
203  }
204 
205  // Flags for QKE/TKE equation
206  if (pbl_type == PBLType::MYJ || pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
207  // Add sources/sinks to QKE/TKE? (MYJ does this inline)
208  if (pbl_type == PBLType::MYNN25 || pbl_type == PBLType::MYNNEDMF) {
209  use_pbl_tke = true;
210  }
211  // Advect QKE/TKE?
212  query_one_or_per_level(pp, "advect_tke" , advect_tke , lev, max_level);
213  // Apply numerical diffusion to QKE/TKE?
214  query_one_or_per_level(pp, "diffuse_tke_3D", diffuse_tke_3D, lev, max_level);
215  }
216 
217  // There is a default value of 1e-6 but the user can override the value here,
218  // and in addition can add perturbational values. and in addition can add perturbational values.
219  pp.query("tke_min",tke_min);
220 
221  // LES constants...
222  query_one_or_per_level(pp, "Cs", Cs, lev, max_level);
223 
224  query_one_or_per_level(pp, "Pr_t", Pr_t, lev, max_level);
225  query_one_or_per_level(pp, "Sc_t", Sc_t, lev, max_level);
226 
227  // Compute relevant forms of diffusion parameters
228  Pr_t_inv = one / Pr_t;
229  Sc_t_inv = one / Sc_t;
230 
231  if (les_type == LESType::Deardorff) {
232  query_one_or_per_level(pp, "Ck", Ck, lev, max_level);
233  query_one_or_per_level(pp, "Ce", Ce, lev, max_level);
234  query_one_or_per_level(pp, "Ce_wall", Ce_wall, lev, max_level);
235  }
236 
237  // To quantify atmospheric stability for subgrid modeling
238  query_one_or_per_level(pp, "thermal_stratification", strat_type, lev, max_level);
239  if (strat_type == StratType::theta) {
240  amrex::Print() << "Thermal stratification based on gradient of potential temperature" << std::endl;
241  } else if (strat_type == StratType::thetav) {
242  amrex::Print() << "Thermal stratification based on gradient of virtual potential temperature" << std::endl;
243  } else if (strat_type == StratType::thetal) {
244  amrex::Print() << "Thermal stratification based on gradient of linearized liquid-water potential temperature" << std::endl;
245  }
246 
247  // k-eqn constants
248  query_one_or_per_level(pp, "Cmu0", Cmu0, lev, max_level);
249  query_one_or_per_level(pp, "Cb", Cb, lev, max_level);
250  query_one_or_per_level(pp, "Rt_crit", Rt_crit, lev, max_level);
251  query_one_or_per_level(pp, "Rt_min", Rt_min, lev, max_level);
252  query_one_or_per_level(pp, "max_geom_lscale", l_g_max, lev, max_level);
253  query_one_or_per_level(pp, "dirichlet_k", dirichlet_k, lev, max_level);
254 
255  // Common inputs (LES or RANS)
256  if (!query_one_or_per_level(pp, "sigma_k", sigma_k, lev, max_level) && rans_type == RANSType::kEqn) {
257  amrex::Print() << "Overriding default sigma_k for k-eqn RANS" << std::endl;
258  sigma_k = one;
259  };
260  query_one_or_per_level(pp, "theta_ref", theta_ref, lev, max_level);
261 
262  query_one_or_per_level(pp, "mix_isotropic", mix_isotropic, lev, max_level);
263  query_one_or_per_level(pp, "use_Ri_correction", use_Ri_correction, lev, max_level);
264  query_one_or_per_level(pp, "Ri_crit", Ri_crit, lev, max_level);
265 
266  // Set common flags
267  use_kturb =
268  ((les_type != LESType::None) || (rans_type != RANSType::None) ||
269  (pbl_type != PBLType::None));
270  use_keqn =
271  ((les_type == LESType::Deardorff) || (rans_type == RANSType::kEqn));
272  use_tke =
273  ((les_type == LESType::Deardorff) || (rans_type == RANSType::kEqn) ||
274  (pbl_type == PBLType::MYJ) || (pbl_type == PBLType::MYNN25) ||
275  (pbl_type == PBLType::MYNNEDMF) || uses_shoc_family());
276 
277  if (use_tke) {
278  query_one_or_per_level(pp, "init_tke_from_ustar", init_tke_from_ustar, lev, max_level);
279  }
280 
281  // Validate inputs
282  if (les_type == LESType::Smagorinsky) {
283  if (Cs == 0) {
284  amrex::Error("Need to specify Cs for Smagorsinky LES");
285  }
286  if (smag2d && mix_isotropic) {
287  amrex::Print() << "Turning off mix_isotropic for 2-D Smagorinsky" << std::endl;
288  mix_isotropic = false;
289  }
290  }
291  }
constexpr amrex::Real one
Definition: ERF_Constants.H:9
ParmParse pp("prob")
int query_one_or_per_level_enum_case_insensitive(const amrex::ParmParse &pp, const char *query_string, T &query_var, const int lev, const int maxlev)
Definition: ERF_TurbStruct.H:48
int query_one_or_per_level(const amrex::ParmParse &pp, const char *query_string, T &query_var, const int lev, const int maxlev)
Definition: ERF_TurbStruct.H:16
@ theta
Definition: ERF_MM5.H:20
amrex::Real SMmax
Definition: ERF_MYNNStruct.H:58
amrex::Real SHmax
Definition: ERF_MYNNStruct.H:60
amrex::Real SQfac
Definition: ERF_MYNNStruct.H:54
amrex::Real SHmin
Definition: ERF_MYNNStruct.H:59
amrex::Real SMmin
Definition: ERF_MYNNStruct.H:57
bool diffuse_moistvars
Definition: ERF_MYNNStruct.H:65
void init_coeffs(amrex::Real A1_lvl25, amrex::Real A2_lvl25, amrex::Real B1, amrex::Real B2, amrex::Real C1, amrex::Real C2, amrex::Real C3, amrex::Real, amrex::Real C5)
Definition: ERF_MYNNStruct.H:69
amrex::Real tke_min
Definition: ERF_TurbStruct.H:527
bool use_pbl_tke
Definition: ERF_TurbStruct.H:517
amrex::Real Sc_t_inv
Definition: ERF_TurbStruct.H:439
bool use_keqn
Definition: ERF_TurbStruct.H:514
MYNNLevel2 pbl_mynn_level2
Definition: ERF_TurbStruct.H:510
StratType strat_type
Definition: ERF_TurbStruct.H:464
bool uses_eamxx_shoc() const noexcept
Definition: ERF_TurbStruct.H:480
bool dirichlet_k
Definition: ERF_TurbStruct.H:475
bool advect_tke
Definition: ERF_TurbStruct.H:552
bool uses_shoc_family() const noexcept
Definition: ERF_TurbStruct.H:490
bool uses_native_shoc() const noexcept
Definition: ERF_TurbStruct.H:485
bool init_tke_from_ustar
Definition: ERF_TurbStruct.H:524
bool use_tke
Definition: ERF_TurbStruct.H:519
bool diffuse_tke_3D
Definition: ERF_TurbStruct.H:554
amrex::Real Pr_t_inv
Definition: ERF_TurbStruct.H:435
bool use_kturb
Definition: ERF_TurbStruct.H:513
Here is the call graph for this function:

◆ pbl_requires_surface_layer()

bool TurbChoice::pbl_requires_surface_layer ( ) const
inlinenoexcept
496  {
497  return (pbl_type == PBLType::MYNN25) ||
498  (pbl_type == PBLType::MYNNEDMF) ||
499  (pbl_type == PBLType::YSU) ||
500  (pbl_type == PBLType::MRF) ||
502  }

Referenced by check_params(), and init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pbl_suppresses_microphysics_condensation()

bool TurbChoice::pbl_suppresses_microphysics_condensation ( ) const
inlinenoexcept
505  {
506  return uses_shoc_family();
507  }
Here is the call graph for this function:

◆ uses_eamxx_shoc()

bool TurbChoice::uses_eamxx_shoc ( ) const
inlinenoexcept
481  {
482  return pbl_type == PBLType::EAMXX_SHOC;
483  }

Referenced by erf_slow_rhs_post(), erf_slow_rhs_pre(), init_params(), and uses_shoc_family().

Here is the caller graph for this function:

◆ uses_native_shoc()

bool TurbChoice::uses_native_shoc ( ) const
inlinenoexcept
486  {
487  return pbl_type == PBLType::NATIVE_SHOC;
488  }

Referenced by erf_slow_rhs_post(), erf_slow_rhs_pre(), init_params(), and uses_shoc_family().

Here is the caller graph for this function:

◆ uses_shoc_family()

bool TurbChoice::uses_shoc_family ( ) const
inlinenoexcept
491  {
492  return uses_eamxx_shoc() || uses_native_shoc();
493  }

Referenced by ComputeTurbulentViscosity(), init_params(), pbl_requires_surface_layer(), and pbl_suppresses_microphysics_condensation().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ advect_tke

bool TurbChoice::advect_tke = true

Referenced by erf_slow_rhs_post(), and init_params().

◆ Cb

amrex::Real TurbChoice::Cb = amrex::Real(0.35)

◆ Ce

amrex::Real TurbChoice::Ce = amrex::Real(0.93)

◆ Ce_wall

◆ Ck

◆ Cmu0

amrex::Real TurbChoice::Cmu0 = amrex::Real(0.5562)

◆ Cs

◆ diffuse_tke_3D

bool TurbChoice::diffuse_tke_3D = true

Referenced by init_params(), and make_sources().

◆ dirichlet_k

bool TurbChoice::dirichlet_k = false

Referenced by init_params().

◆ init_tke_from_ustar

bool TurbChoice::init_tke_from_ustar = false

Referenced by init_params().

◆ l_g_max

amrex::Real TurbChoice::l_g_max = amrex::Real(30.0)

◆ les_type

◆ mix_isotropic

bool TurbChoice::mix_isotropic = true

◆ mrf_moistvars

bool TurbChoice::mrf_moistvars = false

Referenced by display(), and init_params().

◆ pbl_mrf_const_b

amrex::Real TurbChoice::pbl_mrf_const_b = amrex::Real(7.8)

◆ pbl_mrf_coriolis_freq

amrex::Real TurbChoice::pbl_mrf_coriolis_freq = amrex::Real(1.0e-4)

Referenced by display(), and init_params().

◆ pbl_mrf_Ribcr

amrex::Real TurbChoice::pbl_mrf_Ribcr = amrex::Real(0.5)

◆ pbl_mrf_sf

amrex::Real TurbChoice::pbl_mrf_sf = amrex::Real(0.1)

◆ pbl_mynn

◆ pbl_mynn_level2

MYNNLevel2 TurbChoice::pbl_mynn_level2

◆ pbl_type

◆ pbl_ysu_coriolis_freq

amrex::Real TurbChoice::pbl_ysu_coriolis_freq
Initial value:
=
amrex::Real(1.0e-4)

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_force_over_water

bool TurbChoice::pbl_ysu_force_over_water
Initial value:
=
false

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_land_Ribcr

amrex::Real TurbChoice::pbl_ysu_land_Ribcr
Initial value:
=
constexpr amrex::Real fourth
Definition: ERF_Constants.H:14

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_unst_Ribcr

amrex::Real TurbChoice::pbl_ysu_unst_Ribcr
Initial value:
=
constexpr amrex::Real zero
Definition: ERF_Constants.H:8

Referenced by ComputeDiffusivityYSU(), display(), and init_params().

◆ pbl_ysu_use_consistent_coriolis

bool TurbChoice::pbl_ysu_use_consistent_coriolis
Initial value:
=
false

Referenced by display(), and init_params().

◆ Pr_t

amrex::Real TurbChoice::Pr_t = one / three

Referenced by display(), and init_params().

◆ Pr_t_inv

◆ rans_type

◆ Ri_crit

◆ Rt_crit

amrex::Real TurbChoice::Rt_crit = -one

◆ Rt_min

amrex::Real TurbChoice::Rt_min = -three

◆ Sc_t

amrex::Real TurbChoice::Sc_t = one

Referenced by display(), and init_params().

◆ Sc_t_inv

◆ sigma_k

◆ smag2d

bool TurbChoice::smag2d = false

◆ strat_type

StratType TurbChoice::strat_type = StratType::theta

◆ theta_ref

◆ tke_min

amrex::Real TurbChoice::tke_min = amrex::Real(1.e-6)

Referenced by init_params().

◆ use_keqn

bool TurbChoice::use_keqn
Initial value:
=
false

Referenced by erf_slow_rhs_pre(), and init_params().

◆ use_kturb

◆ use_pbl_tke

bool TurbChoice::use_pbl_tke
Initial value:
=
false

Referenced by init_params().

◆ use_Ri_correction

bool TurbChoice::use_Ri_correction = true

◆ use_tke

bool TurbChoice::use_tke = false

The documentation for this struct was generated from the following file: