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

#include <ERF_DiffStruct.H>

Collaboration diagram for DiffChoice:

Public Member Functions

void init_params (std::string pp_prefix)
 
void display ()
 

Public Attributes

MolecDiffType molec_diff_type = MolecDiffType::Constant
 
amrex::Real alpha_T = 0.0
 
amrex::Real alpha_C = 0.0
 
amrex::Real rho0_trans = 1.0
 
amrex::Real rhoAlpha_T = 0.0
 
amrex::Real rhoAlpha_C = 0.0
 
amrex::Real dynamic_viscosity = 0.0
 
bool eb_diff_constraint_x = false
 
bool eb_diff_constraint_y = false
 
bool eb_diff_constraint_z = false
 

Detailed Description

Container holding diffusion-related choices

Member Function Documentation

◆ display()

void DiffChoice::display ( )
inline
68  {
69  amrex::Print() << "Diffusion choices: " << std::endl;
70  amrex::Print() << " rho0_trans : " << rho0_trans << std::endl;
71  amrex::Print() << " alpha_T : " << alpha_T << std::endl;
72  amrex::Print() << " alpha_C : " << alpha_C << std::endl;
73  amrex::Print() << " dynamic_viscosity : " << dynamic_viscosity << std::endl;
74 
76  amrex::Print() << "Using constant molecular diffusivity (relevant for DNS)" << std::endl;
77  } else if (molec_diff_type == MolecDiffType::None) {
78  amrex::Print() << "Not using any molecular diffusivity, i.e. using the modeled turbulent diffusivity"
79  << std::endl;
80  }
81  }
amrex::Real rho0_trans
Definition: ERF_DiffStruct.H:91
amrex::Real alpha_T
Definition: ERF_DiffStruct.H:87
amrex::Real alpha_C
Definition: ERF_DiffStruct.H:88
MolecDiffType molec_diff_type
Definition: ERF_DiffStruct.H:84
amrex::Real dynamic_viscosity
Definition: ERF_DiffStruct.H:96

Referenced by SolverChoice::display().

Here is the caller graph for this function:

◆ init_params()

void DiffChoice::init_params ( std::string  pp_prefix)
inline
22  {
23  amrex::ParmParse pp(pp_prefix);
24 
25  static std::string molec_diff_type_string = "None";
26  pp.query("molec_diff_type",molec_diff_type_string);
27 
28  if (!molec_diff_type_string.compare("Constant")) {
30  } else if (!molec_diff_type_string.compare("ConstantAlpha")) {
32  } else if (!molec_diff_type_string.compare("None")) {
34  } else {
35  amrex::Error("Don't know this molec_diff_type");
36  }
37 
39  pp.query("alpha_T", alpha_T);
40  pp.query("alpha_C", alpha_C);
41  pp.query("dynamic_viscosity", dynamic_viscosity);
42  pp.query("rho0_trans", rho0_trans);
43  pp.query("eb_diff_constraint_x", eb_diff_constraint_x);
44  pp.query("eb_diff_constraint_y", eb_diff_constraint_y);
45  pp.query("eb_diff_constraint_z", eb_diff_constraint_z);
46  }
47 
48  // Compute relevant forms of diffusion parameters
51 
53  amrex::Print() << "Using constant kinematic diffusion coefficients" << std::endl;
54  amrex::Print() << " momentum : " << dynamic_viscosity/rho0_trans << " m^2/s" << std::endl;
55  amrex::Print() << " temperature : " << alpha_T << " m^2/s" << std::endl;
56  amrex::Print() << " scalar : " << alpha_C << " m^2/s" << std::endl;
57  }
59  amrex::Print() << "Using constant dynamic diffusion coefficients" << std::endl;
60  amrex::Print() << " momentum : " << dynamic_viscosity << " kg/(m-s)" << std::endl;
61  amrex::Print() << " temperature : " << rhoAlpha_T << " kg/(m-s)" << std::endl;
62  amrex::Print() << " scalar : " << rhoAlpha_C << " kg/(m-s)" << std::endl;
63  }
64 
65  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real pp(amrex::Real y)
Definition: ERF_MicrophysicsUtils.H:230
bool eb_diff_constraint_z
Definition: ERF_DiffStruct.H:99
amrex::Real rhoAlpha_C
Definition: ERF_DiffStruct.H:95
amrex::Real rhoAlpha_T
Definition: ERF_DiffStruct.H:94
bool eb_diff_constraint_x
Definition: ERF_DiffStruct.H:97
bool eb_diff_constraint_y
Definition: ERF_DiffStruct.H:98

Referenced by SolverChoice::init_params().

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

Member Data Documentation

◆ alpha_C

amrex::Real DiffChoice::alpha_C = 0.0

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

◆ alpha_T

amrex::Real DiffChoice::alpha_T = 0.0

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

◆ dynamic_viscosity

amrex::Real DiffChoice::dynamic_viscosity = 0.0

◆ eb_diff_constraint_x

bool DiffChoice::eb_diff_constraint_x = false

◆ eb_diff_constraint_y

bool DiffChoice::eb_diff_constraint_y = false

◆ eb_diff_constraint_z

bool DiffChoice::eb_diff_constraint_z = false

◆ molec_diff_type

◆ rho0_trans

◆ rhoAlpha_C

amrex::Real DiffChoice::rhoAlpha_C = 0.0

Referenced by init_params().

◆ rhoAlpha_T

amrex::Real DiffChoice::rhoAlpha_T = 0.0

Referenced by init_params().


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