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)
 Read diffusion options from the input parameter database. More...
 
void display ()
 Print the configured diffusion options. More...
 

Public Attributes

MolecDiffType molec_diff_type = MolecDiffType::Constant
 Selected molecular transport model. More...
 
amrex::Real alpha_T = zero
 Kinematic temperature diffusivity [m2/s]. More...
 
amrex::Real alpha_C = zero
 Kinematic scalar diffusivity [m2/s]. More...
 
amrex::Real rho0_trans = one
 Reference density used to compute dynamic diffusion coefficients [kg/m3]. More...
 
amrex::Real rhoAlpha_T = zero
 Dynamic temperature diffusion coefficient [kg/(m-s)]. More...
 
amrex::Real rhoAlpha_C = zero
 Dynamic scalar diffusion coefficient [kg/(m-s)]. More...
 
amrex::Real dynamic_viscosity = zero
 Dynamic viscosity for momentum diffusion [kg/(m-s)]. More...
 
bool eb_diff_constraint_x = false
 Whether to constrain EB diffusion in the x direction. More...
 
bool eb_diff_constraint_y = false
 Whether to constrain EB diffusion in the y direction. More...
 
bool eb_diff_constraint_z = false
 Whether to constrain EB diffusion in the z direction. More...
 

Detailed Description

Container holding diffusion-related choices

Member Function Documentation

◆ display()

void DiffChoice::display ( )
inline

Print the configured diffusion options.

78  {
79  amrex::Print() << "Diffusion choices: " << std::endl;
80  amrex::Print() << " rho0_trans : " << rho0_trans << std::endl;
81  amrex::Print() << " alpha_T : " << alpha_T << std::endl;
82  amrex::Print() << " alpha_C : " << alpha_C << std::endl;
83  amrex::Print() << " dynamic_viscosity : " << dynamic_viscosity << std::endl;
84 
86  amrex::Print() << "Using constant molecular diffusivity (relevant for DNS)" << std::endl;
87  } else if (molec_diff_type == MolecDiffType::None) {
88  amrex::Print() << "Not using any molecular diffusivity, i.e. using the modeled turbulent diffusivity"
89  << std::endl;
90  }
91  }
MolecDiffType molec_diff_type
Selected molecular transport model.
Definition: ERF_DiffStruct.H:94
amrex::Real alpha_C
Kinematic scalar diffusivity [m2/s].
Definition: ERF_DiffStruct.H:98
amrex::Real dynamic_viscosity
Dynamic viscosity for momentum diffusion [kg/(m-s)].
Definition: ERF_DiffStruct.H:106
amrex::Real rho0_trans
Reference density used to compute dynamic diffusion coefficients [kg/m3].
Definition: ERF_DiffStruct.H:101
amrex::Real alpha_T
Kinematic temperature diffusivity [m2/s].
Definition: ERF_DiffStruct.H:97

Referenced by SolverChoice::display().

Here is the caller graph for this function:

◆ init_params()

void DiffChoice::init_params ( std::string  pp_prefix)
inline

Read diffusion options from the input parameter database.

Parameters
pp_prefixParmParse prefix for the ERF input namespace.
29  {
30  amrex::ParmParse pp(pp_prefix);
31 
32  static std::string molec_diff_type_string = "None";
33  pp.query("molec_diff_type",molec_diff_type_string);
34 
35  if (!molec_diff_type_string.compare("Constant")) {
37  } else if (!molec_diff_type_string.compare("ConstantAlpha")) {
39  } else if (!molec_diff_type_string.compare("None")) {
41  } else {
42  amrex::Error("Don't know this molec_diff_type");
43  }
44 
46  pp.query("alpha_T", alpha_T);
47  pp.query("alpha_C", alpha_C);
48  pp.query("dynamic_viscosity", dynamic_viscosity);
49  pp.query("rho0_trans", rho0_trans);
50  pp.query("eb_diff_constraint_x", eb_diff_constraint_x);
51  pp.query("eb_diff_constraint_y", eb_diff_constraint_y);
52  pp.query("eb_diff_constraint_z", eb_diff_constraint_z);
53  }
54 
55  // Compute relevant forms of diffusion parameters
58 
60  amrex::Print() << "Using constant kinematic diffusion coefficients" << std::endl;
61  amrex::Print() << " momentum : " << dynamic_viscosity/rho0_trans << " m^2/s" << std::endl;
62  amrex::Print() << " temperature : " << alpha_T << " m^2/s" << std::endl;
63  amrex::Print() << " scalar : " << alpha_C << " m^2/s" << std::endl;
64  }
66  amrex::Print() << "Using constant dynamic diffusion coefficients" << std::endl;
67  amrex::Print() << " momentum : " << dynamic_viscosity << " kg/(m-s)" << std::endl;
68  amrex::Print() << " temperature : " << rhoAlpha_T << " kg/(m-s)" << std::endl;
69  amrex::Print() << " scalar : " << rhoAlpha_C << " kg/(m-s)" << std::endl;
70  }
71 
72  }
ParmParse pp("prob")
bool eb_diff_constraint_z
Whether to constrain EB diffusion in the z direction.
Definition: ERF_DiffStruct.H:109
amrex::Real rhoAlpha_T
Dynamic temperature diffusion coefficient [kg/(m-s)].
Definition: ERF_DiffStruct.H:104
bool eb_diff_constraint_y
Whether to constrain EB diffusion in the y direction.
Definition: ERF_DiffStruct.H:108
bool eb_diff_constraint_x
Whether to constrain EB diffusion in the x direction.
Definition: ERF_DiffStruct.H:107
amrex::Real rhoAlpha_C
Dynamic scalar diffusion coefficient [kg/(m-s)].
Definition: ERF_DiffStruct.H:105

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

DiffChoice::alpha_C = zero

Kinematic scalar diffusivity [m2/s].

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

◆ alpha_T

DiffChoice::alpha_T = zero

Kinematic temperature diffusivity [m2/s].

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

◆ dynamic_viscosity

DiffChoice::dynamic_viscosity = zero

◆ eb_diff_constraint_x

DiffChoice::eb_diff_constraint_x = false

Whether to constrain EB diffusion in the x direction.

Referenced by DiffusionSrcForMom_EB(), and init_params().

◆ eb_diff_constraint_y

DiffChoice::eb_diff_constraint_y = false

Whether to constrain EB diffusion in the y direction.

Referenced by DiffusionSrcForMom_EB(), and init_params().

◆ eb_diff_constraint_z

DiffChoice::eb_diff_constraint_z = false

Whether to constrain EB diffusion in the z direction.

Referenced by DiffusionSrcForMom_EB(), and init_params().

◆ molec_diff_type

◆ rho0_trans

DiffChoice::rho0_trans = one

Reference density used to compute dynamic diffusion coefficients [kg/m3].

Referenced by DiffusionSrcForMom_EB(), display(), erf_make_tau_terms(), ImplicitDiffForMomLU_N(), ImplicitDiffForMomLU_S(), ImplicitDiffForMomLU_T(), init_params(), and ERF::InitData_post().

◆ rhoAlpha_C

DiffChoice::rhoAlpha_C = zero

Dynamic scalar diffusion coefficient [kg/(m-s)].

Referenced by init_params().

◆ rhoAlpha_T

DiffChoice::rhoAlpha_T = zero

Dynamic temperature diffusion coefficient [kg/(m-s)].

Referenced by init_params().


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