5 #include <AMReX_IntVect.H>
6 #include <AMReX_MFIter.H>
17 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
18 amrex::Real
getThgivenPandT(
const amrex::Real
T,
const amrex::Real P,
const amrex::Real rdOcp)
20 return T * std::pow(
p_0/P, rdOcp);
31 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
32 amrex::Real
getTgivenPandTh(
const amrex::Real P,
const amrex::Real th,
const amrex::Real rdOcp)
34 return th / std::pow(
p_0/P, rdOcp);
45 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
66 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
67 amrex::Real
getThgivenRandT(
const amrex::Real
rho,
const amrex::Real
T,
const amrex::Real rdOcp,
const amrex::Real
qv=0.0)
73 return T * std::pow((
p_0/p_loc),rdOcp);
83 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
84 amrex::Real
getPgivenRTh(
const amrex::Real rhotheta,
const amrex::Real
qv = 0.)
98 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
99 amrex::Real
getRhogivenThetaPress (
const amrex::Real th,
const amrex::Real p,
const amrex::Real rdOcp,
const amrex::Real
qv=0.0)
103 return std::pow(
p_0, rdOcp) * std::pow(p,
iGamma) / (
R_d * th * (amrex::Real(1.0) +
R_v/
R_d*
qv) );
115 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
118 return p / (
R_d *
T * (amrex::Real(1.0) + (
R_v/
R_d)*
qv) );
129 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
143 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
147 return std::pow(P *
ip_0, rdOcp);
158 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
159 amrex::Real
getExnergivenRTh(
const amrex::Real rhotheta,
const amrex::Real rdOcp,
const amrex::Real
qv=0.0 )
174 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
183 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
constexpr amrex::Real R_v
Definition: ERF_Constants.H:11
constexpr amrex::Real iR_d
Definition: ERF_Constants.H:25
constexpr amrex::Real ip_0
Definition: ERF_Constants.H:24
constexpr amrex::Real p_0
Definition: ERF_Constants.H:18
constexpr amrex::Real iGamma
Definition: ERF_Constants.H:26
constexpr amrex::Real R_d
Definition: ERF_Constants.H:10
constexpr amrex::Real Gamma
Definition: ERF_Constants.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=0.)
Definition: ERF_EOS.H:84
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getExnergivenRTh(const amrex::Real rhotheta, const amrex::Real rdOcp, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:159
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real compute_vapor_pressure(const amrex::Real p_s, const amrex::Real RH)
Definition: ERF_EOS.H:184
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getRhoThetagivenP(const amrex::Real p, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:175
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=0.0)
Definition: ERF_EOS.H:99
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getTgivenRandRTh(const amrex::Real rho, const amrex::Real rhotheta, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:46
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getdPdRgivenConstantTheta(const amrex::Real rho, const amrex::Real theta, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:130
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getExnergivenP(const amrex::Real P, const amrex::Real rdOcp)
Definition: ERF_EOS.H:144
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getThgivenPandT(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 getThgivenRandT(const amrex::Real rho, const amrex::Real T, const amrex::Real rdOcp, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:67
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getRhogivenTandPress(const amrex::Real T, const amrex::Real p, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:116
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getTgivenPandTh(const amrex::Real P, const amrex::Real th, const amrex::Real rdOcp)
Definition: ERF_EOS.H:32
@ theta
Definition: ERF_MM5.H:20
@ rho
Definition: ERF_Kessler.H:30
@ qv
Definition: ERF_Kessler.H:36
@ T
Definition: ERF_IndexDefines.H:99