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

#include <ERF_MYNNStruct.H>

Collaboration diagram for MYNNLevel2:

Public Member Functions

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)
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_Rf (const amrex::Real GM, const amrex::Real GH) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_SH (const amrex::Real Rf) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_SM (const amrex::Real Rf) const
 

Public Attributes

bool initialized {false}
 
amrex::Real A1
 
amrex::Real A2
 
amrex::Real F1
 
amrex::Real F2
 
const amrex::Real gam1 = 0.235
 
amrex::Real gam2
 
amrex::Real Rf1
 
amrex::Real Rf2
 
amrex::Real Rfc
 
amrex::Real Ri1
 
amrex::Real Ri2
 
amrex::Real Ri3
 
const amrex::Real eps = std::numeric_limits<amrex::Real>::epsilon()
 

Member Function Documentation

◆ calc_Rf()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real MYNNLevel2::calc_Rf ( const amrex::Real  GM,
const amrex::Real  GH 
) const
inline
92  {
93  AMREX_ASSERT(initialized);
94  amrex::Real Ri = -GH/(GM + eps);
95  return Ri1*(Ri + Ri2 - std::sqrt(Ri*Ri - Ri3*Ri + Ri2*Ri2));
96  }
const amrex::Real eps
Definition: ERF_MYNNStruct.H:123
amrex::Real Ri3
Definition: ERF_MYNNStruct.H:121
amrex::Real Ri2
Definition: ERF_MYNNStruct.H:121
amrex::Real Ri1
Definition: ERF_MYNNStruct.H:121
bool initialized
Definition: ERF_MYNNStruct.H:114

◆ calc_SH()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real MYNNLevel2::calc_SH ( const amrex::Real  Rf) const
inline
101  {
102  AMREX_ASSERT(initialized);
103  return 3.0*A2*(gam1+gam2)*(Rfc-Rf)/(1.0-Rf);
104  }
amrex::Real A2
Definition: ERF_MYNNStruct.H:116
const amrex::Real gam1
Definition: ERF_MYNNStruct.H:118
amrex::Real Rfc
Definition: ERF_MYNNStruct.H:120
amrex::Real gam2
Definition: ERF_MYNNStruct.H:119

Referenced by calc_SM().

Here is the caller graph for this function:

◆ calc_SM()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real MYNNLevel2::calc_SM ( const amrex::Real  Rf) const
inline
109  {
110  AMREX_ASSERT(initialized);
111  return A1*F1/(A2*F2) * (Rf1-Rf) / (Rf2-Rf) * calc_SH(Rf);
112  }
amrex::Real F2
Definition: ERF_MYNNStruct.H:117
amrex::Real Rf1
Definition: ERF_MYNNStruct.H:120
amrex::Real Rf2
Definition: ERF_MYNNStruct.H:120
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 A1
Definition: ERF_MYNNStruct.H:116
Here is the call graph for this function:

◆ init_coeffs()

void MYNNLevel2::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 
)
inline
73  {
74  A1 = A1_lvl25;
75  A2 = A2_lvl25;
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);
78  F2 = B1*(gam1+gam2) - 3.0*A1*(1.0-C2);
79  Rf1 = B1*(gam1-C1) / F1;
80  Rf2 = B1*gam1 / F2;
81  Rfc = gam1 / (gam1 + gam2);
82  Ri1 = 0.5*A2*F2/(A1*F1);
83  Ri2 = 0.5*Rf1/Ri1;
84  Ri3 = (2.0*Rf2-Rf1)/Ri1;
85 
86  initialized = true;
87  }

Referenced by TurbChoice::init_params().

Here is the caller graph for this function:

Member Data Documentation

◆ A1

amrex::Real MYNNLevel2::A1

Referenced by calc_SM(), and init_coeffs().

◆ A2

amrex::Real MYNNLevel2::A2

Referenced by calc_SH(), calc_SM(), and init_coeffs().

◆ eps

const amrex::Real MYNNLevel2::eps = std::numeric_limits<amrex::Real>::epsilon()

Referenced by calc_Rf().

◆ F1

amrex::Real MYNNLevel2::F1

Referenced by calc_SM(), and init_coeffs().

◆ F2

amrex::Real MYNNLevel2::F2

Referenced by calc_SM(), and init_coeffs().

◆ gam1

const amrex::Real MYNNLevel2::gam1 = 0.235

Referenced by calc_SH(), and init_coeffs().

◆ gam2

amrex::Real MYNNLevel2::gam2

Referenced by calc_SH(), and init_coeffs().

◆ initialized

bool MYNNLevel2::initialized {false}

Referenced by calc_Rf(), calc_SH(), calc_SM(), and init_coeffs().

◆ Rf1

amrex::Real MYNNLevel2::Rf1

Referenced by calc_SM(), and init_coeffs().

◆ Rf2

amrex::Real MYNNLevel2::Rf2

Referenced by calc_SM(), and init_coeffs().

◆ Rfc

amrex::Real MYNNLevel2::Rfc

Referenced by calc_SH(), and init_coeffs().

◆ Ri1

amrex::Real MYNNLevel2::Ri1

Referenced by calc_Rf(), and init_coeffs().

◆ Ri2

amrex::Real MYNNLevel2::Ri2

Referenced by calc_Rf(), and init_coeffs().

◆ Ri3

amrex::Real MYNNLevel2::Ri3

Referenced by calc_Rf(), and init_coeffs().


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