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
105  {
106  if (zeta > 0) {
107  return -beta_h * zeta;
108  } else {
109  amrex::Real x = std::sqrt(one - gamma_h * zeta);
110  return two * std::log(myhalf * (one + x));
111  }
112  }
constexpr amrex::Real two
Definition: ERF_Constants.H:8
constexpr amrex::Real one
Definition: ERF_Constants.H:7
constexpr amrex::Real myhalf
Definition: ERF_Constants.H:11
amrex::Real Real
Definition: ERF_ShocInterface.H:19
amrex::Real beta_h
https://doi.org/amrex::Real(10.1007)/BF00240838
Definition: ERF_MOSTStress.H:116
amrex::Real gamma_h
Definition: ERF_MOSTStress.H:118

Referenced by 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(), 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
68  {
69  if (zeta > 0) {
70  amrex::Real x = std::pow(one + std::pow(zeta, amrex::Real(1.1)), one/amrex::Real(1.1));
71  return ( -amrex::Real(6.1)*std::log(zeta + x) );
72  } else {
73  amrex::Real x = std::sqrt(one - amrex::Real(16.0)*zeta);
74  amrex::Real psi_k_h = two * std::log(myhalf * (one + x));
75  amrex::Real y = std::pow(one - amrex::Real(34.0)*zeta, one/three);
76  amrex::Real psi_c_h = (three/two)*std::log((y*y + y + one)/three)
77  - std::sqrt(three)*std::atan((two*y + one)/std::sqrt(three))
78  + PI/std::sqrt(three);
79  return ( (psi_k_h + zeta*zeta*psi_c_h) / (one + zeta*zeta) );
80  }
81  }
constexpr amrex::Real three
Definition: ERF_Constants.H:9
constexpr amrex::Real PI
Definition: ERF_Constants.H:16

Referenced by surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), and surface_temp::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
91  {
92  if (zeta > 0) {
93  return -beta_m * zeta;
94  } else {
95  amrex::Real x = std::sqrt(std::sqrt(one - gamma_m * zeta));
96  return two * std::log(myhalf * (one + x)) + log(myhalf * (one + x * x)) -
97  two * std::atan(x) + PIoTwo;
98  }
99  }
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:17
amrex::Real beta_m
Constants from Dyer, BLM, 1974.
Definition: ERF_MOSTStress.H:115
amrex::Real gamma_m
Definition: ERF_MOSTStress.H:117

Referenced by 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(), 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
48  {
49  if (zeta > 0) {
50  amrex::Real x = std::pow(one + std::pow(zeta, amrex::Real(2.5)), one/amrex::Real(2.5));
51  return ( -amrex::Real(6.1)*std::log(zeta + x) );
52  } else {
53  amrex::Real x = std::pow(one - amrex::Real(16.0)*zeta, fourth);
54  amrex::Real psi_k_m = two * std::log(myhalf * (one + x)) + log(myhalf * (one + x * x)) -
55  two * std::atan(x) + PIoTwo;
56  amrex::Real y = std::pow(one - amrex::Real(10.0)*zeta, one/three);
57  amrex::Real psi_c_m = (three/two)*std::log((y*y + y + one)/three)
58  - std::sqrt(three)*std::atan((two*y + one)/std::sqrt(three))
59  + PI/std::sqrt(three);
60  return ( (psi_k_m + zeta*zeta*psi_c_m) / (one + zeta*zeta) );
61  }
62  }
constexpr amrex::Real fourth
Definition: ERF_Constants.H:12

Referenced by surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), and surface_temp::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: