1 #ifndef ERF_MOIST_PERTURBATION_H_
2 #define ERF_MOIST_PERTURBATION_H_
12 #include <AMReX_GpuQualifiers.H>
13 #include <AMReX_REAL.H>
37 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
40 const amrex::Real rhoqv,
const amrex::Real dT,
41 const amrex::Real dqv,
const bool perturb_T,
42 const bool moist,
const amrex::Real
rdOcp,
43 amrex::Real& drho, amrex::Real& drhoqv) noexcept
45 const amrex::Real
qv = moist ? rhoqv /
rho : amrex::Real(0.0);
46 const amrex::Real qv_new = moist ?
qv + dqv : amrex::Real(0.0);
48 amrex::Real rho_new =
rho;
57 drhoqv = moist ? rho_new * qv_new -
rho *
qv : amrex::Real(0.0);
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getRhogivenThetaPress(const amrex::Real th, const amrex::Real p, const amrex::Real rdOcp, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:96
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getTgivenRandRTh(const amrex::Real rho, const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:46
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getThgivenTandP(const amrex::Real T, const amrex::Real P, const amrex::Real rdOcp)
Definition: ERF_EOS.H:18
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:81
const Real rdOcp
Definition: ERF_InitCustomPert_ABL.H:128
@ P
Definition: ERF_IndexDefines.H:221
@ rho
Definition: ERF_Kessler.H:25
@ qv
Definition: ERF_Kessler.H:31
Definition: ERF_MoistPerturbation.H:17
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void perturb_temperature_and_vapour(const amrex::Real rho, const amrex::Real rhotheta, const amrex::Real rhoqv, const amrex::Real dT, const amrex::Real dqv, const bool perturb_T, const bool moist, const amrex::Real rdOcp, amrex::Real &drho, amrex::Real &drhoqv) noexcept
Definition: ERF_MoistPerturbation.H:39