5 #ifndef ERF_EULERIANMICROPHYSICS_H
6 #define ERF_EULERIANMICROPHYSICS_H
26 const MoistureType& a_model_type )
30 if (a_model_type == MoistureType::SAM ||
31 a_model_type == MoistureType::SAM_NoIce ||
32 a_model_type == MoistureType::SAM_NoPrecip_NoIce) {
34 }
else if (a_model_type == MoistureType::Kessler ||
35 a_model_type == MoistureType::Kessler_NoRain) {
37 }
else if (a_model_type == MoistureType::None) {
38 SetModel<NullMoist>();
40 amrex::Abort(
"EulerianMicrophysics: Dont know this moisture_type!") ;
53 const amrex::MultiFab& cons_in,
54 const amrex::BoxArray& grids,
55 const amrex::Geometry& geom,
56 const amrex::Real& dt_advance,
57 std::unique_ptr<amrex::MultiFab>& z_phys_nd,
58 std::unique_ptr<amrex::MultiFab>& detJ_cc )
override
66 const amrex::Real& dt_advance,
70 amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
71 const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& )
override
78 amrex::MultiFab& cons_in )
override
85 amrex::MultiFab& cons_in )
override
92 const int& varIdx )
override
113 std::vector<int>& a_idx,
114 std::vector<std::string>& a_names )
const override
116 m_moist_model[a_lev]->Qmoist_Restart_Vars( a_sc, a_idx, a_names );
122 template<
class NewMoistModel>
Contains the base class for microphysics.
Eulerian microphysics interface.
Definition: ERF_EulerianMicrophysics.H:14
void Get_Qmoist_Restart_Vars(const int a_lev, const SolverChoice &a_sc, std::vector< int > &a_idx, std::vector< std::string > &a_names) const override
get the indices and names of moisture model variables for restart at a given level
Definition: ERF_EulerianMicrophysics.H:111
void Update_Micro_Vars_Lev(const int &lev, amrex::MultiFab &cons_in) override
update microphysics variables from ERF state variables
Definition: ERF_EulerianMicrophysics.H:77
EulerianMicrophysics(const int &nlev, const MoistureType &a_model_type)
Constructor: create the moisture model.
Definition: ERF_EulerianMicrophysics.H:25
~EulerianMicrophysics()=default
default destructor
amrex::Vector< std::unique_ptr< NullMoist > > m_moist_model
Definition: ERF_EulerianMicrophysics.H:131
int Get_Qstate_Size() override
get the number of moisture-model-related conserved state variables
Definition: ERF_EulerianMicrophysics.H:104
amrex::MultiFab * Get_Qmoist_Ptr(const int &lev, const int &varIdx) override
get pointer to a moisture variable
Definition: ERF_EulerianMicrophysics.H:91
void Define(const int &lev, SolverChoice &sc) override
Define the moisture model.
Definition: ERF_EulerianMicrophysics.H:45
void Advance(const int &lev, const amrex::Real &dt_advance, const int &, const amrex::Real &, const SolverChoice &solverChoice, amrex::Vector< amrex::Vector< amrex::MultiFab >> &, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> &) override
Advance the moisture model for one time step.
Definition: ERF_EulerianMicrophysics.H:65
void Update_State_Vars_Lev(const int &lev, amrex::MultiFab &cons_in) override
update ERF state variables from microphysics variables
Definition: ERF_EulerianMicrophysics.H:84
void SetModel()
Create and set the specified moisture model.
Definition: ERF_EulerianMicrophysics.H:123
void Init(const int &lev, const amrex::MultiFab &cons_in, const amrex::BoxArray &grids, const amrex::Geometry &geom, const amrex::Real &dt_advance, std::unique_ptr< amrex::MultiFab > &z_phys_nd, std::unique_ptr< amrex::MultiFab > &detJ_cc) override
Initialize the moisture model.
Definition: ERF_EulerianMicrophysics.H:52
int Get_Qmoist_Size(const int &) override
get the number of moisture model variables
Definition: ERF_EulerianMicrophysics.H:98
EulerianMicrophysics()
Null constructor.
Definition: ERF_EulerianMicrophysics.H:19
Base class for microphysics interface.
Definition: ERF_Microphysics.H:13
static MoistureModelType modelType(const MoistureType a_moisture_type)
query if a specified moisture model is Eulerian or Lagrangian
Definition: ERF_Microphysics.H:64
Definition: ERF_DataStruct.H:78