ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SlowRhsPreUtils.H File Reference
#include <AMReX_Array4.H>
#include <ERF_Constants.H>
Include dependency graph for ERF_SlowRhsPreUtils.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real slow_rhs_pre_z_pressure_buoyancy (const amrex::Array4< const amrex::Real > &qt_arr, int i, int j, int k, bool use_moisture, amrex::Real gpz, amrex::Real abl_pressure_grad_z, amrex::Real buoyancy)
 

Function Documentation

◆ slow_rhs_pre_z_pressure_buoyancy()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real slow_rhs_pre_z_pressure_buoyancy ( const amrex::Array4< const amrex::Real > &  qt_arr,
int  i,
int  j,
int  k,
bool  use_moisture,
amrex::Real  gpz,
amrex::Real  abl_pressure_grad_z,
amrex::Real  buoyancy 
)

Return the pressure and buoyancy contribution to the vertical momentum RHS.

The moisture inertia is face-centered from the two adjacent cell values, matching the z-momentum staggering in erf_slow_rhs_pre. In a dry run the moisture array is not read.

22 {
24  ? myhalf * (qt_arr(i,j,k) + qt_arr(i,j,k-1))
25  : zero;
26  return (-gpz - abl_pressure_grad_z + buoyancy) / (one + q);
27 }
const bool use_moisture
Definition: ERF_InitCustomPert_ABL.H:71
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ gpz
Definition: ERF_IndexDefines.H:229
@ q
Definition: ERF_WSM6.H:273

Referenced by erf_slow_rhs_pre().

Here is the caller graph for this function: