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

#include <ERF_MOSTStress.H>

Collaboration diagram for adiabatic_wave_coupled:

Public Member Functions

 adiabatic_wave_coupled (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 > &Hwave_arr, const amrex::Array4< amrex::Real > &Lwave_arr, const amrex::Array4< amrex::Real > &eta_arr) const
 

Private Attributes

most_data mdata
 
similarity_funs sfuns
 
const amrex::Real tol = 1.0e-5
 
const amrex::Real eps = 1e-15
 
const amrex::Real z0_eps = 1.0e-6
 
const amrex::Real z0_max = 0.1
 
const amrex::Real WSMIN = 0.1
 

Detailed Description

Adiabatic with wave-coupled roughness

Constructor & Destructor Documentation

◆ adiabatic_wave_coupled()

adiabatic_wave_coupled::adiabatic_wave_coupled ( amrex::Real  zref,
amrex::Real  flux 
)
inline
333  {
334  mdata.zref = zref;
335  mdata.surf_temp_flux = flux;
336  }
most_data mdata
Definition: ERF_MOSTStress.H:385
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_wave_coupled::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 > &  Hwave_arr,
const amrex::Array4< amrex::Real > &  Lwave_arr,
const amrex::Array4< amrex::Real > &  eta_arr 
) const
inline
360  {
361  int iter = 0;
362  amrex::Real umm = std::max(umm_arr(i,j,k), WSMIN);
363  amrex::Real ustar = 0.0;
364  amrex::Real z0 = 0.0;
365  int ie, je;
366  ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
367  je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
368  ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
369  je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
370  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0_arr(i,j,k));
371  do {
372  ustar = u_star_arr(i,j,k);
373  z0 = std::min( std::max(1200.0 * Hwave_arr(i,j,k) * std::pow( Hwave_arr(i,j,k)/(Lwave_arr(i,j,k)+eps), 4.5 )
374  + 0.11 * eta_arr(ie,je,k,EddyDiff::Mom_v) / ustar, z0_eps), z0_max );
375  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0);
376  ++iter;
377  } while ((std::abs(u_star_arr(i,j,k) - ustar) > tol) && iter <= max_iters);
378 
379  t_star_arr(i,j,k) = 0.0;
380  olen_arr(i,j,k) = 1.0e16;
381  z0_arr(i,j,k) = z0;
382  }
@ Mom_v
Definition: ERF_IndexDefines.H:156
const amrex::Real eps
Definition: ERF_MOSTStress.H:388
const amrex::Real z0_eps
Definition: ERF_MOSTStress.H:389
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:391
const amrex::Real tol
Definition: ERF_MOSTStress.H:387
const amrex::Real z0_max
Definition: ERF_MOSTStress.H:390
amrex::Real kappa
von Karman constant
Definition: ERF_MOSTStress.H:17

Member Data Documentation

◆ eps

const amrex::Real adiabatic_wave_coupled::eps = 1e-15
private

Referenced by iterate_flux().

◆ mdata

most_data adiabatic_wave_coupled::mdata
private

◆ sfuns

similarity_funs adiabatic_wave_coupled::sfuns
private

◆ tol

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

Referenced by iterate_flux().

◆ WSMIN

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

Referenced by iterate_flux().

◆ z0_eps

const amrex::Real adiabatic_wave_coupled::z0_eps = 1.0e-6
private

Referenced by iterate_flux().

◆ z0_max

const amrex::Real adiabatic_wave_coupled::z0_max = 0.1
private

Referenced by iterate_flux().


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