1 #ifndef ERF_MYNN_STRUCT_H_
2 #define ERF_MYNN_STRUCT_H_
22 const amrex::Real alphac = 1.0)
const
24 amrex::Real alphac2 = alphac * alphac;
27 amrex::Real Phi1 = 1.0 - alphac2*3.0*
A2*
B2*(1-
C3)*GH;
28 amrex::Real Phi2 = 1.0 - alphac2*9.0*
A1*
A2*(1-
C2)*GH;
29 amrex::Real Phi3 = Phi1 + alphac2*9.0*
A2*
A2*(1-
C2)*(1-
C5)*GH;
30 amrex::Real Phi4 = Phi1 - alphac2*12.0*
A1*
A2*(1-
C2)*GH;
31 amrex::Real Phi5 = 6.0*alphac*
A1*
A1*GM;
34 amrex::Real D = Phi2*Phi4 + Phi5*Phi3;
35 SM = alphac *
A1 * (Phi3 - 3*
C1*Phi4) / D;
36 SH = alphac *
A2 * (Phi2 + 3*
C1*Phi5) / D;
41 amrex::Real
A1 = 1.18;
42 amrex::Real
A2 = 0.665;
43 amrex::Real
B1 = 24.0;
44 amrex::Real
B2 = 15.0;
45 amrex::Real
C1 = 0.137;
46 amrex::Real
C2 = 0.75;
47 amrex::Real
C3 = 0.352;
76 gam2 = (2.0*
A1*(3.0-2.0*C2) + B2*(1.0-C3)) / B1;
77 F1 = B1*(
gam1-C1) + 2.0*
A1*(3.0-2.0*C2) + 3.0*
A2*(1.0-C2)*(1.0-C5);
91 amrex::Real
calc_Rf (
const amrex::Real GM,
const amrex::Real GH)
const
94 amrex::Real Ri = -GH/(GM +
eps);
100 amrex::Real
calc_SH (
const amrex::Real Rf)
const
108 amrex::Real
calc_SM(
const amrex::Real Rf)
const
118 const amrex::Real
gam1 = 0.235;
123 const amrex::Real
eps = std::numeric_limits<amrex::Real>::epsilon();
MYNNConfigType
Definition: ERF_MYNNStruct.H:4
Definition: ERF_MYNNStruct.H:9
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void calc_stability_funcs(amrex::Real &SM, amrex::Real &SH, amrex::Real &SQ, const amrex::Real GM, const amrex::Real GH, const amrex::Real alphac=1.0) const
Definition: ERF_MYNNStruct.H:17
amrex::Real SMmax
Definition: ERF_MYNNStruct.H:53
amrex::Real SHmax
Definition: ERF_MYNNStruct.H:55
amrex::Real C4
Definition: ERF_MYNNStruct.H:48
amrex::Real C1
Definition: ERF_MYNNStruct.H:45
MYNNConfigType config
Definition: ERF_MYNNStruct.H:57
amrex::Real C3
Definition: ERF_MYNNStruct.H:47
amrex::Real C2
Definition: ERF_MYNNStruct.H:46
amrex::Real A2
Definition: ERF_MYNNStruct.H:42
amrex::Real SHmin
Definition: ERF_MYNNStruct.H:54
amrex::Real B1
Definition: ERF_MYNNStruct.H:43
amrex::Real B2
Definition: ERF_MYNNStruct.H:44
amrex::Real C5
Definition: ERF_MYNNStruct.H:49
amrex::Real SMmin
Definition: ERF_MYNNStruct.H:52
amrex::Real A1
Definition: ERF_MYNNStruct.H:41
bool diffuse_moistvars
Definition: ERF_MYNNStruct.H:60
Definition: ERF_MYNNStruct.H:63
amrex::Real A2
Definition: ERF_MYNNStruct.H:116
amrex::Real F2
Definition: ERF_MYNNStruct.H:117
amrex::Real Rf1
Definition: ERF_MYNNStruct.H:120
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_Rf(const amrex::Real GM, const amrex::Real GH) const
Definition: ERF_MYNNStruct.H:91
amrex::Real Rf2
Definition: ERF_MYNNStruct.H:120
const amrex::Real eps
Definition: ERF_MYNNStruct.H:123
amrex::Real Ri3
Definition: ERF_MYNNStruct.H:121
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_SM(const amrex::Real Rf) const
Definition: ERF_MYNNStruct.H:108
const amrex::Real gam1
Definition: ERF_MYNNStruct.H:118
amrex::Real Ri2
Definition: ERF_MYNNStruct.H:121
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_SH(const amrex::Real Rf) const
Definition: ERF_MYNNStruct.H:100
amrex::Real F1
Definition: ERF_MYNNStruct.H:117
amrex::Real Ri1
Definition: ERF_MYNNStruct.H:121
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:64
amrex::Real A1
Definition: ERF_MYNNStruct.H:116
bool initialized
Definition: ERF_MYNNStruct.H:114
amrex::Real Rfc
Definition: ERF_MYNNStruct.H:120
amrex::Real gam2
Definition: ERF_MYNNStruct.H:119