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

#include <ERF_MOSTStress.H>

Public Member Functions

 donelan_flux ()
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_flux (const int &, const int &, const int &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_t_flux (const int &i, const int &j, const int &k, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &t_surf_arr) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_u_flux (const int &i, const int &j, const int &k, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_flux (const int &i, const int &j, const int &k, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &) const
 

Detailed Description

Donelan flux formulation

Constructor & Destructor Documentation

◆ donelan_flux()

donelan_flux::donelan_flux ( )
inline
1934 {}

Member Function Documentation

◆ compute_q_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real donelan_flux::compute_q_flux ( const int &  ,
const int &  ,
const int &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &   
) const
inline
1950  {
1951  // NOTE: this is rho*<q'w'> = -K dqdz
1952  amrex::Real moflux = 0.0;
1953 
1954  return moflux;
1955  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19

◆ compute_t_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real donelan_flux::compute_t_flux ( const int &  i,
const int &  j,
const int &  k,
const amrex::Array4< const amrex::Real > &  cons_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  umm_arr,
const amrex::Array4< const amrex::Real > &  tm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  t_surf_arr 
) const
inline
1971  {
1972  amrex::Real Ch = 0.0012;
1973  amrex::Real rho = cons_arr(i,j,k,Rho_comp);
1974  amrex::Real theta_surf = t_surf_arr(i,j,k);
1975  amrex::Real theta_mean = tm_arr(i,j,k);
1976  amrex::Real wsp_mean = umm_arr(i,j,k);
1977 
1978  // NOTE: this is rho*<T'w'> = -K dTdz
1979  amrex::Real moflux = -rho * Ch * wsp_mean * (theta_mean - theta_surf);
1980 
1981  return moflux;
1982  }
#define Rho_comp
Definition: ERF_IndexDefines.H:36
@ rho
Definition: ERF_Kessler.H:22

◆ compute_u_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real donelan_flux::compute_u_flux ( const int &  i,
const int &  j,
const int &  k,
const amrex::Array4< const amrex::Real > &  cons_arr,
const amrex::Array4< const amrex::Real > &  velx_arr,
const amrex::Array4< const amrex::Real > &  vely_arr,
const amrex::Array4< const amrex::Real > &  umm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &   
) const
inline
1996  {
1997  amrex::Real velx = velx_arr(i,j,k);
1998  amrex::Real vely = 0.25 * ( vely_arr(i ,j,k) + vely_arr(i ,j+1,k)
1999  + vely_arr(i-1,j,k) + vely_arr(i-1,j+1,k) );
2000  amrex::Real rho = 0.5 * ( cons_arr(i-1,j,k,Rho_comp) + cons_arr(i,j,k,Rho_comp) );
2001 
2002  amrex::Real Cd = 0.001;
2003  const amrex::Real c = 7e-5;
2004  amrex::Real wsp = sqrt(velx*velx+vely*vely);
2005  amrex::Real wsp_mean = 0.5 * ( umm_arr(i-1,j,k) + umm_arr(i,j,k) );
2006  if (wsp_mean <= 5.0) {
2007  Cd = 0.001;
2008  } else if (wsp_mean < 25.0 && wsp_mean > 5.0) {
2009  Cd = 0.001 + c * (wsp_mean - 5.0);
2010  } else {
2011  Cd = 0.0024;
2012  }
2013 
2014  // NOTE: this is rho*<u'w'> = -K dudz
2015  amrex::Real stressx = -rho * Cd * velx * wsp;
2016 
2017  return stressx;
2018  }

◆ compute_v_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real donelan_flux::compute_v_flux ( const int &  i,
const int &  j,
const int &  k,
const amrex::Array4< const amrex::Real > &  cons_arr,
const amrex::Array4< const amrex::Real > &  velx_arr,
const amrex::Array4< const amrex::Real > &  vely_arr,
const amrex::Array4< const amrex::Real > &  umm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &   
) const
inline
2032  {
2033  amrex::Real velx = 0.25 * ( velx_arr(i,j ,k) + velx_arr(i+1,j ,k)
2034  + velx_arr(i,j-1,k) + velx_arr(i+1,j-1,k) );
2035  amrex::Real vely = vely_arr(i,j,k);
2036  amrex::Real rho = 0.5 * ( cons_arr(i,j-1,k,Rho_comp) + cons_arr(i,j,k,Rho_comp) );
2037 
2038  amrex::Real Cd = 0.001;
2039  const amrex::Real c = 7e-5;
2040  amrex::Real wsp = sqrt(velx*velx+vely*vely);
2041  amrex::Real wsp_mean = 0.5 * ( umm_arr(i,j-1,k) + umm_arr(i,j,k) );
2042  if (wsp_mean <= 5.0) {
2043  Cd = 0.001;
2044  } else if (wsp_mean < 25.0 && wsp_mean > 5.0) {
2045  Cd = 0.001 + c * (wsp_mean - 5.0);
2046  } else {
2047  Cd = 0.0024;
2048  }
2049 
2050  // NOTE: this is rho*<v'w'> = -K dvdz
2051  amrex::Real stressy = -rho * Cd * vely * wsp;
2052 
2053  return stressy;
2054  }

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