ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TerminalVelocity< RT > Struct Template Reference

#include <ERF_TerminalVelocity.H>

Collaboration diagram for TerminalVelocity< RT >:

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT RogersYau (const RT a_r) const noexcept
 Terminal velocity - Rogers & Yau, 1989. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT AtlasUlbrich (const RT a_r) const noexcept
 Terminal velocity - Atlas & Ulbrich, 1977. More...
 
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 numerical simulation of clouds and precipitation: A particle-based and probabilistic microphysics model coupled with a non- hydrostatic model." Quart. J. Roy. Meteorol. Soc., 135: 1307-1320 https://github.com/Shima-Lab/SCALE-SDM_BOMEX_Sato2018/blob/master/contrib/SDM/sdm_motion.f90. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT vz_b_x (const RT a_x) const noexcept
 Compute vz_b(x) More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT vz_c_x (const RT a_x) const noexcept
 Compute vc_b(x) More...
 

Public Attributes

RT m_rho
 

Member Function Documentation

◆ AtlasUlbrich()

template<typename RT >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT TerminalVelocity< RT >::AtlasUlbrich ( const RT  a_r) const
inlinenoexcept

Terminal velocity - Atlas & Ulbrich, 1977.

24  {
25  static const RT a = amrex::Real(3.778);
26  static const RT b = amrex::Real(0.67);
27  RT D = 2*a_r*1000; // meter -> mm
28  return a*(std::exp(b*std::log(D)));
29  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19

◆ CloudRainShima()

template<typename RT >
AMREX_GPU_HOST_DEVICE RT TerminalVelocity< RT >::CloudRainShima ( const RT  a_r,
const RT  a_rho,
const RT  a_P,
const RT  a_T 
) const
inlinenoexcept

Terminal velocity - cloud/rain droplets Shima et al., 2009, "The super-droplet method for the numerical simulation of clouds and precipitation: A particle-based and probabilistic microphysics model coupled with a non- hydrostatic model." Quart. J. Roy. Meteorol. Soc., 135: 1307-1320 https://github.com/Shima-Lab/SCALE-SDM_BOMEX_Sato2018/blob/master/contrib/SDM/sdm_motion.f90.

Parameters
a_rradius
a_rhodensity
a_Ppressure
a_Ttemperature
43  {
44  RT lb4l = amrex::Real(6.62E-6); // base length[cm] for mean free path of air molecules
45  RT visb4l = amrex::Real(1.818E-4); // base dynamic viscosity[g/(cm*s)] for mean free path of air molecules
46  RT pb4l = amrex::Real(1013.25); // base pressure[hPa] for mean free path of air molecules
47  RT tb4l = amrex::Real(293.15); // base temperature[20C] for mean free path of air molecules
48 
49  RT P_hPa = a_P / amrex::Real(100.0); // [Pa] -> [hPa]
50  RT T_degC = a_T - amrex::Real(273.15); // [K] -> [deg Celsius]
51  RT diameter_cm = two*a_r*amrex::Real(100.0); // [m] -> [cm]
52  RT rho_mat_cgs = m_rho/amrex::Real(1000.0); // [kg/m^3] -> [g/cm^3]
53  RT rho_air_cgs = a_rho/amrex::Real(1000.0); // [kg/m^3] -> [g/cm^3]
54  RT grav_cgs = CONST_GRAV * 100; // [m/s^2] -> [cm/s^2]
55 
56  RT gxdrow = grav_cgs * ( rho_mat_cgs - rho_air_cgs );
57 
58  RT viscosity = zero;
59  if (T_degC >= 0) {
60  viscosity = (amrex::Real(1.7180) + amrex::Real(4.9e-3)*T_degC) * amrex::Real(1.0e-4);
61  } else {
62  viscosity = ( amrex::Real(1.7180) + amrex::Real(4.9e-3)*T_degC
63  - amrex::Real(1.2e-5)*T_degC*T_degC ) * amrex::Real(1.0e-4);
64  }
65 
66  RT v_terminal = zero;
67  if (diameter_cm < amrex::Real(1.9e-3)) {
68  // small cloud droplets
69  RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
70  RT c1 = gxdrow / (amrex::Real(18.0)*viscosity);
71  RT csc = one + amrex::Real(2.510) * (sd_l/diameter_cm);
72  v_terminal = c1 * csc * diameter_cm * diameter_cm;
73  } else if (diameter_cm < amrex::Real(1.07e-1)) {
74  // large cloud droplets and small raindrops
75  RT sd_l = lb4l * (viscosity/visb4l) * (pb4l/P_hPa) * std::sqrt(a_T/tb4l);
76  RT c2 = rho_air_cgs * (amrex::Real(4.0)*gxdrow)/(three*viscosity*viscosity);
77  RT nda = c2 * diameter_cm * diameter_cm * diameter_cm;
78  RT csc = one + amrex::Real(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);
81  } else {
82  // large raindrops
83  RT tau = one - a_T/amrex::Real(647.0960);
84  RT sigma = amrex::Real(0.2358) * std::exp( amrex::Real(1.2560)*std::log(tau) )
85  * ( one - amrex::Real(0.6250)*tau );
86  if( a_T<amrex::Real(267.5) ) {
87  tau = std::tanh( (a_T-amrex::Real(243.9))/amrex::Real(35.35) );
88  sigma = sigma - amrex::Real(2.854E-3) * tau + amrex::Real(1.666E-3);
89  }
90  sigma = sigma * amrex::Real(1.E+3); // N/m => g/s^2
91  RT c3 = (amrex::Real(4.0)*gxdrow)/(three*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)/amrex::Real(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);
98  }
99 
100  v_terminal /= amrex::Real(100.0); // [cm/s] -> [m/s]
101  return v_terminal;
102  }
constexpr amrex::Real three
Definition: ERF_Constants.H:9
constexpr amrex::Real two
Definition: ERF_Constants.H:8
constexpr amrex::Real one
Definition: ERF_Constants.H:7
constexpr amrex::Real zero
Definition: ERF_Constants.H:6
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:31
amrex::Real sigma
Definition: ERF_InitCustomPert_IsentropicVortex.H:11
real(c_double), parameter c2
Definition: ERF_module_model_constants.F90:35
real(c_double), private c1
Definition: ERF_module_mp_morr_two_moment.F90:212
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 vz_c_x(const RT a_x) const noexcept
Compute vc_b(x)
Definition: ERF_TerminalVelocity.H:125
RT m_rho
Definition: ERF_TerminalVelocity.H:11
Here is the call graph for this function:

◆ RogersYau()

template<typename RT >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT TerminalVelocity< RT >::RogersYau ( const RT  a_r) const
inlinenoexcept

Terminal velocity - Rogers & Yau, 1989.

16  {
17  static const RT k1 = amrex::Real(1.233e8); // m^{-1} s^{-1}
18  return (k1 * a_r * a_r);
19  }
real(c_double), private k1
Definition: ERF_module_mp_morr_two_moment.F90:213

◆ vz_b_x()

template<typename RT >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT TerminalVelocity< RT >::vz_b_x ( const RT  a_x) const
inlinenoexcept

Compute vz_b(x)

Parameters
a_xx
109  {
110  RT x1 = a_x;
111  RT x2 = x1 * x1;
112  RT x3 = x1 * x2;
113  RT y = - amrex::Real(0.318657E+1)
114  + amrex::Real(0.9926960) * x1
115  - amrex::Real(0.153193E-2) * x2
116  - amrex::Real(0.987059E-3) * x3
117  - amrex::Real(0.578878e-3) * x2*x2
118  + amrex::Real(0.855176E-4) * x3*x2
119  - amrex::Real(0.327815E-5) * x3*x3;
120  return y;
121  }

Referenced by TerminalVelocity< RT >::CloudRainShima().

Here is the caller graph for this function:

◆ vz_c_x()

template<typename RT >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RT TerminalVelocity< RT >::vz_c_x ( const RT  a_x) const
inlinenoexcept

Compute vc_b(x)

Parameters
a_xx
126  {
127  RT x1 = a_x;
128  RT x2 = x1 * x1;
129  RT x3 = x1 * x2;
130  RT y = - amrex::Real(0.500015E+1)
131  + amrex::Real(0.523778E+1) * x1
132  - amrex::Real(0.204914E+1) * x2
133  + amrex::Real(0.47529400) * x3
134  - amrex::Real(0.542819E-1) * x2*x2
135  + amrex::Real(0.238449E-2) * x3*x2;
136  return y;
137  }

Referenced by TerminalVelocity< RT >::CloudRainShima().

Here is the caller graph for this function:

Member Data Documentation

◆ m_rho

template<typename RT >
RT TerminalVelocity< RT >::m_rho

The documentation for this struct was generated from the following file: