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

#include <DiffStruct.H>

Collaboration diagram for DiffChoice:

Public Member Functions

void init_params ()
 
void display ()
 

Public Attributes

std::string pp_prefix {"erf"}
 
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 dynamicViscosity = 0.0
 

Detailed Description

Container holding diffusion-related choices

Member Function Documentation

◆ display()

void DiffChoice::display ( )
inline
57  {
58  amrex::Print() << "Diffusion choices: " << std::endl;
59  amrex::Print() << "rho0_trans : " << rho0_trans << std::endl;
60  amrex::Print() << "alpha_T : " << alpha_T << std::endl;
61  amrex::Print() << "alpha_C : " << alpha_C << std::endl;
62  amrex::Print() << "dynamicViscosity : " << dynamicViscosity << std::endl;
63 
65  amrex::Print() << "Using constant molecular diffusivity (relevant for DNS)" << std::endl;
66  } else if (molec_diff_type == MolecDiffType::None) {
67  amrex::Print() << "Not using any molecular diffusivity, i.e. using the modeled turbulent diffusivity"
68  << std::endl;
69  }
70  }
amrex::Real rho0_trans
Definition: DiffStruct.H:83
amrex::Real alpha_T
Definition: DiffStruct.H:79
amrex::Real alpha_C
Definition: DiffStruct.H:80
amrex::Real dynamicViscosity
Definition: DiffStruct.H:88
MolecDiffType molec_diff_type
Definition: DiffStruct.H:76

Referenced by SolverChoice::display().

Here is the caller graph for this function:

◆ init_params()

void DiffChoice::init_params ( )
inline
22  {
23  amrex::ParmParse pp(pp_prefix);
24 
25  // Diffusive constants...
26  pp.query("alpha_T", alpha_T);
27  pp.query("alpha_C", alpha_C);
28  pp.query("dynamicViscosity", dynamicViscosity);
29  pp.query("rho0_trans", rho0_trans);
30 
31  static std::string molec_diff_type_string = "None";
32  pp.query("molec_diff_type",molec_diff_type_string);
33 
34  if (!molec_diff_type_string.compare("Constant")) {
36  } else if (!molec_diff_type_string.compare("ConstantAlpha")) {
38  } else if (!molec_diff_type_string.compare("None")) {
40  } else {
41  amrex::Error("Don't know this molec_diff_type");
42  }
43 
45  amrex::Print() << "Using constant kinematic diffusion coefficients" << std::endl;
46  amrex::Print() << " momentum : " << dynamicViscosity/rho0_trans << " m^2/s" << std::endl;
47  amrex::Print() << " temperature : " << alpha_T << " m^2/s" << std::endl;
48  amrex::Print() << " scalar : " << alpha_C << " m^2/s" << std::endl;
49  }
50 
51  // Compute relevant forms of diffusion parameters
54  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real pp(amrex::Real y)
Definition: Microphysics_Utils.H:183
amrex::Real rhoAlpha_C
Definition: DiffStruct.H:87
amrex::Real rhoAlpha_T
Definition: DiffStruct.H:86
std::string pp_prefix
Definition: DiffStruct.H:73

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

◆ alpha_T

amrex::Real DiffChoice::alpha_T = 0.0

◆ dynamicViscosity

amrex::Real DiffChoice::dynamicViscosity = 0.0

◆ molec_diff_type

◆ pp_prefix

std::string DiffChoice::pp_prefix {"erf"}

Referenced by init_params().

◆ rho0_trans

amrex::Real DiffChoice::rho0_trans = 1.0

◆ rhoAlpha_C

amrex::Real DiffChoice::rhoAlpha_C = 0.0

◆ rhoAlpha_T

amrex::Real DiffChoice::rhoAlpha_T = 0.0

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