1 #ifndef TERMINALVELOCITY_H
2 #define TERMINALVELOCITY_H
12 template <
typename RT >
19 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
22 RT T_degC = a_T - RT(273.15);
23 RT viscosity = RT(0.0);
24 if (T_degC >= RT(0)) {
25 viscosity = (RT(1.7180) + RT(4.9e-3)*T_degC) * RT(1.0e-4);
27 viscosity = ( RT(1.7180) + RT(4.9e-3)*T_degC
28 - RT(1.2e-5)*T_degC*T_degC ) * RT(1.0e-4);
34 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
37 static const RT
k1 = RT(1.233e8);
38 return (
k1 * a_r * a_r);
42 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
45 static const RT a = RT(3.778);
46 static const RT b = RT(0.67);
47 RT D = RT(2)*a_r*RT(1000);
48 return a*(std::exp(b*std::log(D)));
62 const RT a_T )
const noexcept
64 RT lb4l = RT(6.62E-6);
65 RT visb4l = RT(1.818E-4);
66 RT pb4l = RT(1013.25);
69 RT P_hPa = a_P / RT(100.0);
70 RT diameter_cm = RT(2.0)*std::min(a_r,RT(0.004))*RT(100.0);
71 RT rho_mat_cgs =
m_rho_w/RT(1000.0);
72 RT rho_air_cgs = a_rho/RT(1000.0);
75 RT gxdrow = grav_cgs * ( rho_mat_cgs - rho_air_cgs );
78 RT v_terminal = RT(0.0);
79 if (diameter_cm < RT(1.9e-3)) {
81 RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
82 RT
c1 = gxdrow / (RT(18.0)*viscosity);
83 RT csc = RT(1.0) + RT(2.510) * (sd_l/diameter_cm);
84 v_terminal =
c1 * csc * diameter_cm * diameter_cm;
85 }
else if (diameter_cm < RT(1.07e-1)) {
87 RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
88 RT
c2 = rho_air_cgs * (RT(4.0)*gxdrow)/(RT(
three)*viscosity*viscosity);
89 RT nda =
c2 * diameter_cm * diameter_cm * diameter_cm;
90 RT csc = RT(1.0) + RT(2.510) * ( sd_l / diameter_cm );
91 RT nre = csc * std::exp(
vz_b_x(std::log(nda)));
92 v_terminal = (viscosity*nre)/(rho_air_cgs*diameter_cm);
95 RT tau = RT(1.0) - a_T/RT(647.0960);
96 RT
sigma = RT(0.2358) * std::exp( RT(1.2560)*std::log(tau) )
97 * ( RT(1.0) - RT(0.6250)*tau );
99 tau = std::tanh( (a_T-RT(243.9))/RT(35.35) );
100 sigma =
sigma - RT(2.854E-3) * tau + RT(1.666E-3);
104 RT bond = c3 * diameter_cm * diameter_cm;
106 / (gxdrow*viscosity*viscosity*viscosity*viscosity);
107 npp = std::exp( std::log(npp)/RT(6.0) );
108 RT nre = npp * std::exp(
vz_c_x(std::log(bond*npp)));
109 v_terminal = (viscosity*nre)/(rho_air_cgs*diameter_cm);
112 v_terminal /= RT(100.0);
119 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
120 RT
vz_b_x (
const RT a_x )
const noexcept
125 RT
y = - RT(0.318657E+1)
127 - RT(0.153193E-2) * x2
128 - RT(0.987059E-3) * x3
129 - RT(0.578878e-3) * x2*x2
130 + RT(0.855176E-4) * x3*x2
131 - RT(0.327815E-5) * x3*x3;
136 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
137 RT
vz_c_x (
const RT a_x )
const noexcept
142 RT
y = - RT(0.500015E+1)
143 + RT(0.523778E+1) * x1
144 - RT(0.204914E+1) * x2
145 + RT(0.47529400) * x3
146 - RT(0.542819E-1) * x2*x2
147 + RT(0.238449E-2) * x3*x2;
162 AMREX_GPU_HOST_DEVICE
168 const RT a_T )
const noexcept
172 auto phi = a_c / a_a;
173 auto d = RT(2.0) * a_a;
174 auto q = std::exp( std::exp(-phi) * std::log(a_rhoi/
m_rho_i) );
177 auto t3 = RT(
PI) *
mu*
mu * std::max(phi,RT(1.0)) * std::max(std::sqrt(std::sqrt(
q)),
q);
178 auto X = (RT(8.0)*a_m*RT(
CONST_GRAV)*a_rho) / t3;
179 auto Xp = X * (RT(1.0) + (X/X0)*(X/X0)) / (RT(1.0) + RT(1.6)*(X/X0)*(X/X0));
181 auto k = std::min( std::max(RT(0.82)+RT(0.18)*phi, RT(0.85)),
182 std::min( RT(0.37) + RT(0.63)/std::sqrt(phi),
183 RT(1.33)/(std::max(std::log(phi),RT(0.0))+RT(1.19)) ));
185 auto phi_poly = RT(3.76)-RT(8.41)*phi+RT(9.18)*phi*phi-RT(3.53)*phi*phi*phi;
186 auto TVGamma = std::max( RT(1.0), std::min(RT(1.98), phi_poly) );
188 auto C_DPS = std::max(RT(0.292)*k*TVGamma, RT(0.492) - RT(0.2)/std::sqrt(phi));
189 auto C_DP = std::max(RT(1.0),
q*(RT(1.46)*
q-RT(0.46))) * C_DPS;
190 auto C_DO = RT(4.5) * k*k * std::max(phi, RT(1.0));
192 auto t2 = RT(1.0) + C_DP/(RT(6.0)*k) * std::sqrt(Xp/C_DP);
193 auto beta = std::sqrt(t2) - RT(1.0);
194 auto TVgamma = (C_DO-C_DP) / (RT(4.0)*C_DP);
195 auto t1 = RT(1.0) + (RT(2.0)*
beta*std::exp(-
beta*TVgamma)) / ((RT(2.0)+
beta)*(RT(1.0)+
beta));
196 auto N_Re = (RT(6.0)*k/C_DP) *
beta*
beta * t1;
198 auto vterm = (
mu*N_Re)/(a_rho*d);
205 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
208 return RT(0.246)*a_ell + RT(0.754)*a_ell*a_ell*a_ell*a_ell*a_ell*a_ell*a_ell;
214 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
217 const RT a_ell )
const noexcept
constexpr amrex::Real three
Definition: ERF_Constants.H:11
constexpr amrex::Real PI
Definition: ERF_Constants.H:42
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:64
amrex::Real sigma
Definition: ERF_InitCustomPert_DataAssimilation_ISV.H:11
amrex::Real beta
Definition: ERF_InitCustomPert_DataAssimilation_ISV.H:10
@ mu
Definition: ERF_AdvanceMorrison.cpp:92
@ q
Definition: ERF_WSM6.H:184
real(c_double), parameter c2
Definition: ERF_module_model_constants.F90:35
real(c_double), private k1
Definition: ERF_module_mp_morr_two_moment.F90:213
real(c_double), private c1
Definition: ERF_module_mp_morr_two_moment.F90:212
Provide terminal velocity calculations for atmospheric particles.
Definition: ERF_TerminalVelocity.H:14
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT MeltBlendWeight(const RT a_ell) const noexcept
Frick et al. (2013, Geosci. Model Dev. 6, Eq. 15) liquid-water-fraction weight for the fall speed of ...
Definition: ERF_TerminalVelocity.H:206
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT vz_b_x(const RT a_x) const noexcept
Compute vz_b(x)
Definition: ERF_TerminalVelocity.H:120
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT RogersYau(const RT a_r) const noexcept
Terminal velocity - Rogers & Yau, 1989.
Definition: ERF_TerminalVelocity.H:35
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT vz_c_x(const RT a_x) const noexcept
Compute vc_b(x)
Definition: ERF_TerminalVelocity.H:137
RT m_rho_w
Definition: ERF_TerminalVelocity.H:15
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT MixedPhaseVterm(const RT a_v_ice, const RT a_v_rain, const RT a_ell) const noexcept
Terminal velocity of a melting (mixed) ice-water particle, interpolated between the dry-ice (Bohm) fa...
Definition: ERF_TerminalVelocity.H:215
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto viscCoeff(const RT a_T) const noexcept
Compute viscosity coefficient - Pruppacher & Klett, 1997.
Definition: ERF_TerminalVelocity.H:20
AMREX_GPU_HOST_DEVICE RT IceBohm(const RT a_m, const RT a_a, const RT a_c, const RT a_rhoi, const RT a_rho, const RT a_T) const noexcept
Terminal velocity - ice particles (Bohm's theory) Ref: Shima et al., 2020, "Predicting the morphology...
Definition: ERF_TerminalVelocity.H:163
AMREX_GPU_HOST_DEVICE RT CloudRainShima(const RT a_r, const RT a_rho, const RT a_P, const RT a_T) const noexcept
Terminal velocity - cloud/rain droplets Shima et al., 2009, "The super-droplet method for the numeric...
Definition: ERF_TerminalVelocity.H:59
RT m_rho_i
Definition: ERF_TerminalVelocity.H:16
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT AtlasUlbrich(const RT a_r) const noexcept
Terminal velocity - Atlas & Ulbrich, 1977.
Definition: ERF_TerminalVelocity.H:43