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

#include <ERF_MOSTStress.H>

Collaboration diagram for rotate_flux:

Public Member Functions

 rotate_flux ()
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_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 > &, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &q_star_arr, const amrex::Array4< const amrex::Real > &q_surf_arr) 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 > &, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &t_star_arr, 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 > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &u_star_arr) const
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_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
 

Private Attributes

const amrex::Real eps = amrex::Real(1e-15)
 

Detailed Description

Rotate flux formulation

Constructor & Destructor Documentation

◆ rotate_flux()

rotate_flux::rotate_flux ( )
inline

Construct the rotated-flux calculator.

2914 {}

Member Function Documentation

◆ compute_q_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real rotate_flux::compute_q_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 > &  ,
const amrex::Array4< const amrex::Real > &  qvm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  q_star_arr,
const amrex::Array4< const amrex::Real > &  q_surf_arr 
) const
inline

Compute moisture flux for one surface point.

Calling sequence
i, j, k, cons_arr, velx_arr, vely_arr, umm_arr, qvm_arr, u_star_arr, q_star_arr, q_surf_arr.
2937  {
2938  // NOTE: this is the total stress
2939  amrex::Real qv_mean = qvm_arr(i,j,0);
2940  amrex::Real qv_surf = q_surf_arr(i,j,0);
2941  amrex::Real rho = cons_arr(i,j,k,Rho_comp);
2942  amrex::Real qstar = q_star_arr(i,j,0);
2943  amrex::Real moflux = (std::abs(qstar) > eps) ? -rho * qstar * (qv_mean-qv_surf): zero;
2944 
2945  return moflux;
2946  }
constexpr amrex::Real zero
Definition: ERF_Constants.H:8
#define Rho_comp
Definition: ERF_IndexDefines.H:36
rho
Definition: ERF_InitCustomPert_Bubble.H:107
amrex::Real Real
Definition: ERF_ShocInterface.H:19
const amrex::Real eps
Definition: ERF_MOSTStress.H:3038

◆ compute_t_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real rotate_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 > &  ,
const amrex::Array4< const amrex::Real > &  tm_arr,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  t_star_arr,
const amrex::Array4< const amrex::Real > &  t_surf_arr 
) const
inline

Compute heat flux for one surface point.

Calling sequence
i, j, k, cons_arr, velx_arr, vely_arr, umm_arr, tm_arr, u_star_arr, t_star_arr, t_surf_arr.
2969  {
2970  // NOTE: this is the total stress
2971  amrex::Real theta_mean = tm_arr(i,j,0);
2972  amrex::Real theta_surf = t_surf_arr(i,j,0);
2973  amrex::Real rho = cons_arr(i,j,k,Rho_comp);
2974  amrex::Real tstar = t_star_arr(i,j,0);
2975  amrex::Real moflux = (std::abs(tstar) > eps) ? -rho * tstar * (theta_mean-theta_surf) : zero;
2976 
2977  return moflux;
2978  }

◆ compute_u_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real rotate_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 > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  ,
const amrex::Array4< const amrex::Real > &  u_star_arr 
) const
inline

Compute x-momentum flux for one surface face.

Calling sequence
i, j, k, cons_arr, velx_arr, vely_arr, umm_arr, um_arr, u_star_arr.
2999  {
3000  // NOTE: this is the total stress
3001  amrex::Real rho = myhalf *( cons_arr(i-1,j,k,Rho_comp) + cons_arr(i ,j,k,Rho_comp) );
3002  amrex::Real ustar = myhalf * ( u_star_arr(i-1,j,0) + u_star_arr(i,j,0) );
3003  amrex::Real stressx = -rho * ustar * ustar;
3004 
3005  return stressx;
3006  }
constexpr amrex::Real myhalf
Definition: ERF_Constants.H:13

◆ compute_v_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real rotate_flux::compute_v_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
inline

Compute y-momentum flux for one surface face.

Calling sequence
i, j, k, cons_arr, velx_arr, vely_arr, umm_arr, vm_arr, u_star_arr.
3027  {
3028  // NOTE: this is the total stress
3029  amrex::Real stressy = zero;
3030 
3031  return stressy;
3032  }

Member Data Documentation

◆ eps

const amrex::Real rotate_flux::eps = amrex::Real(1e-15)
private

Referenced by compute_q_flux(), and compute_t_flux().


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