ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_UpdateRhoThetaSources_Bomex.H File Reference

Go to the source code of this file.

Functions

ParmParse pp_prob ("prob")
 
pp_prob query ("source_cutoff", cutoff)
 
pp_prob query ("source_cutoff_transition", cutoff_transition)
 
pp_prob query ("advection_heating_rate", advection_heating_rate)
 
 for (MFIter mfi(*src, TilingIfNotGPU());mfi.isValid();++mfi)
 

Variables

Real cutoff = amrex::Real(500.0)
 
Real cutoff_transition = amrex::Real(50.0)
 
Real advection_heating_rate = zero
 

Function Documentation

◆ for()

for ( MFIter mfi(*,  TilingIfNotGPU)
9  {
10  const auto &box = mfi.tilebox();
11  const Array4<Real>& src_arr = src->array(mfi);
12  if (box.length(0) != 1)
13  {
14  src->setVal(0.0);
15  } else {
16  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) {
17  const Real z_cc = d_zlevels_arr[k];
18  if (z_cc < cutoff) {
19  src_arr(i, j, k) = advection_heating_rate;
20  } else if (z_cc < cutoff+cutoff_transition) {
22  src_arr(i, j, k) = (z_cc-cutoff) * slope + advection_heating_rate;
23  } else {
24  src_arr(i, j, k) = zero;
25  }
26  });
27  }
28  }
constexpr amrex::Real zero
Definition: ERF_Constants.H:6
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+0.5) *dx[0];const Real y=(j+0.5) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - 1.0)/(2.0 *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(1.0+deltaT, inv_gm1);const Real T=(1.0+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=0.25 *(1.0+std::cos(PI *std::min(r2d_xy, R)/R));})
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Real cutoff_transition
Definition: ERF_UpdateRhoThetaSources_Bomex.H:4
Real advection_heating_rate
Definition: ERF_UpdateRhoThetaSources_Bomex.H:5
Real cutoff
Definition: ERF_UpdateRhoThetaSources_Bomex.H:3
Here is the call graph for this function:

◆ pp_prob()

ParmParse pp_prob ( "prob"  )

◆ query() [1/3]

pp_prob query ( "advection_heating_rate"  ,
advection_heating_rate   
)

◆ query() [2/3]

pp_prob query ( "source_cutoff"  ,
cutoff   
)

◆ query() [3/3]

pp_prob query ( "source_cutoff_transition"  ,
cutoff_transition   
)

Variable Documentation

◆ advection_heating_rate

Real advection_heating_rate = zero

Referenced by for().

◆ cutoff

Real cutoff = amrex::Real(500.0)

Referenced by for().

◆ cutoff_transition

Real cutoff_transition = amrex::Real(50.0)

Referenced by for().