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

#include <ERF_MOSTStress.H>

Collaboration diagram for adiabatic_donelan:

Public Member Functions

 adiabatic_donelan (amrex::Real zref, amrex::Real flux)
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux (const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
 

Private Attributes

most_data mdata
 
similarity_funs sfuns
 
const amrex::Real tol = 1.0e-5
 
const amrex::Real WSMIN = 0.1
 

Detailed Description

Adiabatic with Donelan roughness

Constructor & Destructor Documentation

◆ adiabatic_donelan()

adiabatic_donelan::adiabatic_donelan ( amrex::Real  zref,
amrex::Real  flux 
)
inline
273  {
274  mdata.zref = zref;
275  mdata.surf_temp_flux = flux;
276  }
most_data mdata
Definition: ERF_MOSTStress.H:319
amrex::Real zref
Reference height (m)
Definition: ERF_MOSTStress.H:15
amrex::Real surf_temp_flux
Heat flux.
Definition: ERF_MOSTStress.H:19

Member Function Documentation

◆ iterate_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void adiabatic_donelan::iterate_flux ( const int &  i,
const int &  j,
const int &  k,
const int &  max_iters,
const amrex::Array4< amrex::Real > &  z0_arr,
const amrex::Array4< const amrex::Real > &  umm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  u_star_arr,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  t_star_arr,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  olen_arr,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &  ,
const amrex::Array4< amrex::Real > &   
) const
inline
300  {
301  int iter = 0;
302  amrex::Real umm = std::max(umm_arr(i,j,k), WSMIN);
303  amrex::Real ustar = 0.0;
304  amrex::Real z0 = 0.0;
305  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0_arr(i,j,k));
306  do {
307  ustar = u_star_arr(i,j,k);
308  z0 = Donelan_roughness(ustar);
309  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0);
310  ++iter;
311  } while ((std::abs(u_star_arr(i,j,k) - ustar) > tol) && iter <= max_iters);
312 
313  t_star_arr(i,j,k) = 0.0;
314  olen_arr(i,j,k) = 1.0e16;
315  z0_arr(i,j,k) = z0;
316  }
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Donelan_roughness(amrex::Real ustar)
Definition: ERF_MOSTRoughness.H:29
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:322
const amrex::Real tol
Definition: ERF_MOSTStress.H:321
amrex::Real kappa
von Karman constant
Definition: ERF_MOSTStress.H:17
Here is the call graph for this function:

Member Data Documentation

◆ mdata

most_data adiabatic_donelan::mdata
private

Referenced by adiabatic_donelan(), and iterate_flux().

◆ sfuns

similarity_funs adiabatic_donelan::sfuns
private

◆ tol

const amrex::Real adiabatic_donelan::tol = 1.0e-5
private

Referenced by iterate_flux().

◆ WSMIN

const amrex::Real adiabatic_donelan::WSMIN = 0.1
private

Referenced by iterate_flux().


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