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 {5.0}
 Constants from Dyer, BLM, 1974. More...
 
amrex::Real beta_h {5.0}
 https://doi.org/10.1007/BF00240838 More...
 
amrex::Real gamma_m {16.0}
 
amrex::Real gamma_h {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
106  {
107  if (zeta > 0) {
108  return -beta_h * zeta;
109  } else {
110  amrex::Real x = std::sqrt(1.0 - gamma_h * zeta);
111  return 2.0 * std::log(0.5 * (1.0 + x));
112  }
113  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19
amrex::Real beta_h
https://doi.org/10.1007/BF00240838
Definition: ERF_MOSTStress.H:117
amrex::Real gamma_h
Definition: ERF_MOSTStress.H:119

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
69  {
70  if (zeta > 0) {
71  amrex::Real x = std::pow(1.0 + std::pow(zeta, 1.1), 1.0/1.1);
72  return ( -6.1*std::log(zeta + x) );
73  } else {
74  amrex::Real x = std::sqrt(1.0 - 16.0*zeta);
75  amrex::Real psi_k_h = 2.0 * std::log(0.5 * (1.0 + x));
76  amrex::Real y = std::pow(1.0 - 34.0*zeta, 1.0/3.0);
77  amrex::Real psi_c_h = (3.0/2.0)*std::log((y*y + y + 1.0)/3.0)
78  - std::sqrt(3.0)*std::atan((2.0*y + 1.0)/std::sqrt(3.0))
79  + PI/std::sqrt(3.0);
80  return ( (psi_k_h + zeta*zeta*psi_c_h) / (1. + zeta*zeta) );
81  }
82  }
constexpr amrex::Real PI
Definition: ERF_Constants.H:6

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
92  {
93  if (zeta > 0) {
94  return -beta_m * zeta;
95  } else {
96  amrex::Real x = std::sqrt(std::sqrt(1.0 - gamma_m * zeta));
97  return 2.0 * std::log(0.5 * (1.0 + x)) + log(0.5 * (1.0 + x * x)) -
98  2.0 * std::atan(x) + PIoTwo;
99  }
100  }
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:7
amrex::Real beta_m
Constants from Dyer, BLM, 1974.
Definition: ERF_MOSTStress.H:116
amrex::Real gamma_m
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_m2()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real similarity_funs::calc_psi_m2 ( amrex::Real  zeta) const
inline
49  {
50  if (zeta > 0) {
51  amrex::Real x = std::pow(1.0 + std::pow(zeta, 2.5), 1.0/2.5);
52  return ( -6.1*std::log(zeta + x) );
53  } else {
54  amrex::Real x = std::pow(1.0 - 16.0*zeta, 0.25);
55  amrex::Real psi_k_m = 2.0 * std::log(0.5 * (1.0 + x)) + log(0.5 * (1.0 + x * x)) -
56  2.0 * std::atan(x) + PIoTwo;
57  amrex::Real y = std::pow(1.0 - 10.0*zeta, 1.0/3.0);
58  amrex::Real psi_c_m = (3.0/2.0)*std::log((y*y + y + 1.0)/3.0)
59  - std::sqrt(3.0)*std::atan((2.0*y + 1.0)/std::sqrt(3.0))
60  + PI/std::sqrt(3.0);
61  return ( (psi_k_m + zeta*zeta*psi_c_m) / (1. + zeta*zeta) );
62  }
63  }

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 {5.0}
private

◆ beta_m

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

Constants from Dyer, BLM, 1974.

Referenced by calc_psi_m().

◆ gamma_h

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

Referenced by calc_psi_h().

◆ gamma_m

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

Referenced by calc_psi_m().


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