1 #ifndef SRC_MICROPHYSICS_MICROPHYSICAL_SCHEMES_HPP_
2 #define SRC_MICROPHYSICS_MICROPHYSICAL_SCHEMES_HPP_
11 #include <yaml-cpp/yaml.h>
14 #include <Eigen/Dense>
17 #include <athena/athena.hpp>
18 #include <athena/mesh/mesh.hpp>
56 Hydro
const *phydro,
int kl,
int ku,
int jl,
57 int ju,
int il,
int iu) = 0;
76 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
85 if (node[
"parameters"])
SetRealsFrom(node[
"parameters"]);
87 if (node[
"dependent-species"]) {
88 auto species = node[
"dependent-species"].as<std::vector<std::string>>();
101 int kl,
int ku,
int jl,
int ju,
int il,
104 for (
int k = kl; k <= ku; ++k)
105 for (
int j = jl;
j <= ju; ++
j)
106 for (
int i = il; i <= iu; ++i) {
107 vsed[0](n, k,
j, i) = 0.0;
108 vsed[1](n, k,
j, i) = 0.0;
109 vsed[2](n, k,
j, i) = 0.0;
126 Kessler94(std::string name, YAML::Node
const &node);
135 int kl,
int ku,
int jl,
int ju,
int il,
Kessler (1994) microphysical scheme.
void AssembleReactionMatrix(AirParcel const &air, Real time) override
functions
Kessler94(std::string name, YAML::Node const &node)
constructor and destructor
void EvolveOneStep(AirParcel *air, Real time, Real dt) override
Evolve the air parcel one time step.
void SetVsedFromConserved(AthenaArray< Real > vsed[3], Hydro const *phydro, int kl, int ku, int jl, int ju, int il, int iu) override
inbound functions
ChemistrySolver< Size > solver_
chemistry solver
virtual base class for all microphysical schemes
virtual void AssembleReactionMatrix(AirParcel const &air, Real time)=0
Assemble the reaction matrix.
MicrophysicalSchemeBase(std::string name)
constructor and destructor
virtual void EvolveOneStep(AirParcel *air, Real time, Real dt)=0
Evolve the air parcel one time step.
virtual ~MicrophysicalSchemeBase()
virtual void SetVsedFromConserved(AthenaArray< Real > vsed[3], Hydro const *phydro, int kl, int ku, int jl, int ju, int il, int iu)=0
Set the sedimentation velocity from the conserved variables.
base class for all microphysical schemes
Real const * GetJacobianPtr() const
Eigen::Matrix< Real, D, 1 > rate_
rate and jacobian
MicrophysicalScheme(std::string name, YAML::Node const &node)
constructor and destructor
virtual ~MicrophysicalScheme()
Eigen::Matrix< Real, D, D > RealMatrix
Real const * GetRatePtr() const
member functions
Eigen::Matrix< Real, D, D > jacb_
Eigen::Matrix< Real, D, 1 > RealVector
void SetVsedFromConserved(AthenaArray< Real > vsed[3], Hydro const *phydro, int kl, int ku, int jl, int ju, int il, int iu) override
inbound functions
factory class for contructing microphysical schemes
static AllMicrophysicalSchemes Create(MeshBlock *pmb, ParameterInput *pin)
void SetRealsFrom(YAML::Node const &node)
void SetSpeciesIndex(std::vector< std::string > const &species_names)
Set species index based on species names.
std::vector< int > const & GetCloudIndexArray() const
std::vector< MicrophysicalSchemePtr > AllMicrophysicalSchemes
std::shared_ptr< MicrophysicalSchemeBase > MicrophysicalSchemePtr