ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
similarity_funs Struct Reference

#include <ERF_MOSTStress.H>

Collaboration diagram for similarity_funs:

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_m2 (amrex::Real zeta) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_h2 (amrex::Real zeta) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_m (amrex::Real zeta) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_h (amrex::Real zeta) const
 

Private Attributes

amrex::Real beta_m {amrex::Real(5.0)}
 Constants from Dyer, BLM, 1974. More...
 
amrex::Real beta_h {amrex::Real(5.0)}
 https://doi.org/amrex::Real(10.1007)/BF00240838 More...
 
amrex::Real gamma_m {amrex::Real(16.0)}
 
amrex::Real gamma_h {amrex::Real(16.0)}
 

Detailed Description

Structure of similarity functions for Moeng formulation

Member Function Documentation

◆ calc_psi_h()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real similarity_funs::calc_psi_h ( amrex::Real  zeta) const
inline

Compute the Businger-Dyer heat stability correction.

Parameters
[in]zetastability coordinate z/L
125  {
126  if (zeta > 0) {
127  return -beta_h * zeta;
128  } else {
129  amrex::Real x = std::sqrt(one - gamma_h * zeta);
130  return two * std::log(myhalf * (one + x));
131  }
132  }
constexpr amrex::Real two
Definition: ERF_Constants.H:10
constexpr amrex::Real one
Definition: ERF_Constants.H:9
constexpr amrex::Real myhalf
Definition: ERF_Constants.H:13
amrex::Real Real
Definition: ERF_ShocInterface.H:19
amrex::Real beta_h
https://doi.org/amrex::Real(10.1007)/BF00240838
Definition: ERF_MOSTStress.H:136
amrex::Real gamma_h
Definition: ERF_MOSTStress.H:138

Referenced by compute_if_most_target_vel(), near_surface_diagnostics::evaluate_most_factor(), surface_flux_charnock::iterate_flux(), surface_flux_mod_charnock::iterate_flux(), surface_flux_donelan::iterate_flux(), surface_temp_donelan::iterate_flux(), surface_flux_wave_coupled::iterate_flux(), surface_temp_wave_coupled::iterate_flux(), surface_flux::iterate_flux(), surface_flux_eb::iterate_flux(), make_mom_sources(), and make_sources().

Here is the caller graph for this function:

◆ calc_psi_h2()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real similarity_funs::calc_psi_h2 ( amrex::Real  zeta) const
inline

Compute the Jimenez heat stability correction.

Parameters
[in]zetastability coordinate z/L
78  {
79  if (zeta > 0) {
80  amrex::Real x = std::pow(one + std::pow(zeta, amrex::Real(1.1)), one/amrex::Real(1.1));
81  return ( -amrex::Real(5.3)*std::log(zeta + x) );
82  } else {
83  amrex::Real x = std::sqrt(one - amrex::Real(16.0)*zeta);
84  amrex::Real psi_k_h = two * std::log(myhalf * (one + x));
85  amrex::Real y = std::pow(one - amrex::Real(34.0)*zeta, one/three);
86  amrex::Real psi_c_h = (three/two)*std::log((y*y + y + one)/three)
87  - std::sqrt(three)*std::atan((two*y + one)/std::sqrt(three))
88  + PI/std::sqrt(three);
89  return ( (psi_k_h + zeta*zeta*psi_c_h) / (one + zeta*zeta) );
90  }
91  }
constexpr amrex::Real three
Definition: ERF_Constants.H:11
constexpr amrex::Real PI
Definition: ERF_Constants.H:42

Referenced by surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), surface_temp::iterate_flux(), and surface_temp_eb::iterate_flux().

Here is the caller graph for this function:

◆ calc_psi_m()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real similarity_funs::calc_psi_m ( amrex::Real  zeta) const
inline

Compute the Businger-Dyer momentum stability correction.

Parameters
[in]zetastability coordinate z/L
106  {
107  if (zeta > 0) {
108  return -beta_m * zeta;
109  } else {
110  amrex::Real x = std::sqrt(std::sqrt(one - gamma_m * zeta));
111  return two * std::log(myhalf * (one + x)) + std::log(myhalf * (one + x * x)) -
112  two * std::atan(x) + PIoTwo;
113  }
114  }
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:43
amrex::Real beta_m
Constants from Dyer, BLM, 1974.
Definition: ERF_MOSTStress.H:135
amrex::Real gamma_m
Definition: ERF_MOSTStress.H:137

Referenced by compute_if_most_target_vel(), surface_flux_charnock::iterate_flux(), surface_flux_mod_charnock::iterate_flux(), surface_flux_donelan::iterate_flux(), surface_temp_donelan::iterate_flux(), surface_flux_wave_coupled::iterate_flux(), surface_temp_wave_coupled::iterate_flux(), surface_flux::iterate_flux(), surface_flux_eb::iterate_flux(), make_mom_sources(), and make_sources().

Here is the caller graph for this function:

◆ calc_psi_m2()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real similarity_funs::calc_psi_m2 ( amrex::Real  zeta) const
inline

Compute the Jimenez momentum stability correction.

Parameters
[in]zetastability coordinate z/L
53  {
54  if (zeta > 0) {
55  amrex::Real x = std::pow(one + std::pow(zeta, amrex::Real(2.5)), one/amrex::Real(2.5));
56  return ( -amrex::Real(6.1)*std::log(zeta + x) );
57  } else {
58  amrex::Real x = std::pow(one - amrex::Real(16.0)*zeta, fourth);
59  amrex::Real psi_k_m = two * std::log(myhalf * (one + x)) + std::log(myhalf * (one + x * x)) -
60  two * std::atan(x) + PIoTwo;
61  amrex::Real y = std::pow(one - amrex::Real(10.0)*zeta, one/three);
62  amrex::Real psi_c_m = (three/two)*std::log((y*y + y + one)/three)
63  - std::sqrt(three)*std::atan((two*y + one)/std::sqrt(three))
64  + PI/std::sqrt(three);
65  return ( (psi_k_m + zeta*zeta*psi_c_m) / (one + zeta*zeta) );
66  }
67  }
constexpr amrex::Real fourth
Definition: ERF_Constants.H:14

Referenced by surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), surface_temp::iterate_flux(), and surface_temp_eb::iterate_flux().

Here is the caller graph for this function:

Member Data Documentation

◆ beta_h

amrex::Real similarity_funs::beta_h {amrex::Real(5.0)}
private

◆ beta_m

amrex::Real similarity_funs::beta_m {amrex::Real(5.0)}
private

Constants from Dyer, BLM, 1974.

Referenced by calc_psi_m().

◆ gamma_h

amrex::Real similarity_funs::gamma_h {amrex::Real(16.0)}
private

Referenced by calc_psi_h().

◆ gamma_m

amrex::Real similarity_funs::gamma_m {amrex::Real(16.0)}
private

Referenced by calc_psi_m().


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