27 #ifndef ERF_SAT_METHOD_H_
28 #define ERF_SAT_METHOD_H_
41 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
50 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
52 amrex::Real &es, amrex::Real &qs,
const int idx = 1) {
65 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
67 amrex::Real &es, amrex::Real &qs,
const int idx = 1) {
80 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
82 amrex::Real &es, amrex::Real &qs,
const int idx = 1) {
96 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
113 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
130 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
150 es = weight*esice + (1.0 - weight)*es;
157 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
160 return pow(10., (-7.90298*(
tboil/t-1.)+
161 5.02808*std::log10(
tboil/t)-
162 1.3816e-7*(pow(10., (11.344*(1.-t/
tboil)))-1.)+
163 8.1328e-3*(pow(10., (-3.49149*(
tboil/t-1.)))-1.)+
164 std::log10(1013.246)))*100.;
167 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
170 return pow(10., (-9.09718*(
h2otrip/t-1.)-3.56654*
172 log10(6.1071)))*100.;
176 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
179 return exp(54.842763 - (6763.22 / t) - (4.210 * log(t)) +
180 (0.000367 * t) + (tanh(0.0415 * (t - 218.8)) *
181 (53.878 - (1331.22 / t) - (9.44523 * log(t)) +
185 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
188 return exp(9.550426 - (5723.265 / t) + (3.53068 * log(t))
206 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
209 auto e1 = 11.344*(1.0 - t/
tboil);
210 auto e2 = -3.49149*(
tboil/t - 1.0);
211 auto f1 = -7.90298*(
tboil/t - 1.0);
212 auto f2 = 5.02808*log10(
tboil/t);
213 auto f3 = -1.3816*(pow(10.0, e1) - 1.0)/10000000.0;
214 auto f4 = 8.1328*(pow(10.0, e2) - 1.0)/1000.0;
216 auto f = f1 + f2 + f3 + f4 + f5;
217 return (pow(10.0, f))*100.0;
220 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
222 auto term1 = 2.01889049/(
tmelt/t);
223 auto term2 = 3.56654*log(
tmelt/t);
224 auto term3 = 20.947031*(
tmelt/t);
225 return 575.185606e10*exp(-(term1 + term2 + term3));
236 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
238 constexpr
auto c1 = 611.2;
239 constexpr
auto c2 = 17.67;
240 constexpr
auto c3 = 243.5;
241 return c1*exp( (c2*(t -
tmelt))/((t -
tmelt)+c3) );
constexpr amrex::Real tboil
Definition: ERF_Constants.H:90
constexpr amrex::Real epsilo
Definition: ERF_Constants.H:92
constexpr amrex::Real tmelt
Definition: ERF_Constants.H:88
constexpr amrex::Real ttrice
Definition: ERF_Constants.H:91
constexpr amrex::Real omeps
Definition: ERF_Constants.H:93
constexpr amrex::Real h2otrip
Definition: ERF_Constants.H:89
Definition: ERF_Sat_methods.H:37
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_trans(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Definition: ERF_Sat_methods.H:81
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real Bolton_svp_water(const amrex::Real &t)
Definition: ERF_Sat_methods.H:237
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real OldGoffGratch_svp_ice(const amrex::Real &t)
Definition: ERF_Sat_methods.H:221
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_water(const amrex::Real &t, const int idx=1)
Definition: ERF_Sat_methods.H:97
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_to_qsat(const amrex::Real &es, const amrex::Real &p)
Definition: ERF_Sat_methods.H:42
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real GoffGratch_svp_water(const amrex::Real &t)
Definition: ERF_Sat_methods.H:158
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_water(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Definition: ERF_Sat_methods.H:51
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_ice(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Definition: ERF_Sat_methods.H:66
Type
Definition: ERF_Sat_methods.H:247
@ MurphyKoop
Definition: ERF_Sat_methods.H:251
@ Invalid
Definition: ERF_Sat_methods.H:248
@ Bolton
Definition: ERF_Sat_methods.H:252
@ GoffGratch
Definition: ERF_Sat_methods.H:250
@ OldGoffGratch
Definition: ERF_Sat_methods.H:249
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real OldGoffGratch_svp_water(const amrex::Real &t)
Definition: ERF_Sat_methods.H:207
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real MurphyKoop_svp_ice(const amrex::Real &t)
Definition: ERF_Sat_methods.H:186
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real GoffGratch_svp_ice(const amrex::Real &t)
Definition: ERF_Sat_methods.H:168
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real MurphyKoop_svp_water(const amrex::Real &t)
Definition: ERF_Sat_methods.H:177
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_trans(const amrex::Real &t, const int idx=1)
Definition: ERF_Sat_methods.H:131
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_ice(const amrex::Real &t, const int idx=1)
Definition: ERF_Sat_methods.H:114