2 #include <application/application.hpp>
5 #include <configure.hpp>
15 Application::Logger app(
"microphysics");
16 app->Log(
"Initialize Kessler94 Scheme for " + name);
20 Application::Logger app(
"microphysics");
21 app->Log(
"Destroy Kessler94 Scheme for " +
GetName());
33 Real k1 = GetPar<Real>(
"autoconversion");
34 Real k2 = GetPar<Real>(
"accretion");
35 Real k3 = GetPar<Real>(
"evaporation");
38 auto rates = pthermo->TryEquilibriumTP_VaporCloud(air, iv, 0.,
true);
46 rate_(0) += -k3 * air.
w[ip] * dqv;
47 rate_(2) += k3 * air.
w[ip] * dqv;
48 jacb_(0, 0) += -k3 * air.
w[ip];
49 jacb_(0, 2) += -k3 * dqv;
50 jacb_(2, 0) += k3 * air.
w[ip];
51 jacb_(2, 2) += k3 * dqv;
55 rate_(1) += -k1 * air.
w[ic];
56 rate_(2) += k1 * air.
w[ic];
61 rate_(1) += -k2 * air.
w[ic] * air.
w[ip];
62 rate_(2) += k2 * air.
w[ic] * air.
w[ip];
63 jacb_(1, 1) += -k2 * air.
w[ip];
64 jacb_(1, 2) += -k2 * air.
w[ic];
65 jacb_(2, 1) += k2 * air.
w[ip];
66 jacb_(2, 2) += k2 * air.
w[ic];
82 air->
c[jbuf] += sol(0);
87 Hydro
const *phydro,
int kl,
int ku,
88 int jl,
int ju,
int il,
int iu) {
90 Real vel = GetPar<Real>(
"sedimentation");
92 for (
int k = kl; k <= ku; ++k)
93 for (
int j = jl;
j <= ju; ++
j)
94 for (
int i = il; i <= iu; ++i) {
95 vsed[0](ip, k,
j, i) = vel;
T1 solveTRBDF2Blend(T2 const &Rate, T3 const &Jac, Real dt, Real const c[], int const indx[])
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
base class for all microphysical schemes
Eigen::Matrix< Real, D, 1 > rate_
rate and jacobian
Eigen::Matrix< Real, D, D > jacb_
Eigen::Matrix< Real, D, 1 > RealVector
std::string GetName() const
int GetSpeciesIndex(int n) const
int GetCloudIndex(int n) const
std::vector< int > const & GetSpeciesIndexArray() const
static Thermodynamics const * GetInstance()
Return a pointer to the one and only instance of Thermodynamics.