1 #ifndef TERMINALVELOCITY_H
2 #define TERMINALVELOCITY_H
8 template <
typename RT >
14 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
17 static const RT
k1 = 1.233e8;
18 return (
k1 * a_r * a_r);
22 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
25 static const RT a = 3.778;
26 static const RT b = 0.67;
28 return a*(std::exp(b*std::log(D)));
42 const RT a_T )
const noexcept
49 RT P_hPa = a_P / 100.0;
50 RT T_degC = a_T - 273.15;
51 RT diameter_cm = 2.0*a_r*100.0;
52 RT rho_mat_cgs =
m_rho/1000.0;
53 RT rho_air_cgs = a_rho/1000.0;
56 RT gxdrow = grav_cgs * ( rho_mat_cgs - rho_air_cgs );
60 viscosity = (1.7180 + 4.9e-3*T_degC) * 1.0e-4;
62 viscosity = ( 1.7180 + 4.9e-3*T_degC
63 - 1.2e-5*T_degC*T_degC ) * 1.0e-4;
67 if (diameter_cm < 1.9e-3) {
69 RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
70 RT
c1 = gxdrow / (18.0*viscosity);
71 RT csc = 1.0 + 2.510 * (sd_l/diameter_cm);
72 v_terminal =
c1 * csc * diameter_cm * diameter_cm;
73 }
else if (diameter_cm < 1.07e-1) {
75 RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
76 RT
c2 = rho_air_cgs * (4.0*gxdrow)/(3.0*viscosity*viscosity);
77 RT nda =
c2 * diameter_cm * diameter_cm * diameter_cm;
78 RT csc = 1.0 + 2.510 * ( sd_l / diameter_cm );
79 RT nre = csc * std::exp(
vz_b_x(std::log(nda)));
80 v_terminal = (viscosity*nre)/(rho_air_cgs*diameter_cm);
83 RT tau = 1.0 - a_T/647.0960;
84 RT sigma = 0.2358 * std::exp( 1.2560*std::log(tau) )
85 * ( 1.0 - 0.6250*tau );
87 tau = std::tanh( (a_T-243.9)/35.35 );
88 sigma = sigma - 2.854E-3 * tau + 1.666E-3;
90 sigma = sigma * 1.E+3;
91 RT c3 = (4.0*gxdrow)/(3.0*sigma);
92 RT bond = c3 * diameter_cm * diameter_cm;
93 RT npp = (rho_air_cgs*rho_air_cgs) * (sigma*sigma*sigma)
94 / (gxdrow*viscosity*viscosity*viscosity*viscosity);
95 npp = std::exp( std::log(npp)/6.0 );
96 RT nre = npp * std::exp(
vz_c_x(std::log(bond*npp)));
97 v_terminal = (viscosity*nre)/(rho_air_cgs*diameter_cm);
107 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
108 RT
vz_b_x (
const RT a_x )
const noexcept
117 - 0.578878e-3 * x2*x2
118 + 0.855176E-4 * x3*x2
119 - 0.327815E-5 * x3*x3;
124 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
125 RT
vz_c_x (
const RT a_x )
const noexcept
134 - 0.542819E-1 * x2*x2
135 + 0.238449E-2 * x3*x2;
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:21
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
Definition: ERF_TerminalVelocity.H:10
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:108
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT RogersYau(const RT a_r) const noexcept
Terminal velocity - Rogers & Yau, 1989.
Definition: ERF_TerminalVelocity.H:15
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:125
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:39
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT AtlasUlbrich(const RT a_r) const noexcept
Terminal velocity - Atlas & Ulbrich, 1977.
Definition: ERF_TerminalVelocity.H:23
RT m_rho
Definition: ERF_TerminalVelocity.H:11