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

Go to the source code of this file.

Functions

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

Variables

Real advection_heating_rate = 0.0
 
Real cutoff = 500.0
 
Real cutoff_transition = 50.0
 

Function Documentation

◆ for()

for ( MFIter mfi(*,  TilingIfNotGPU)
8  {
9  const auto &box = mfi.tilebox();
10  const Array4<Real>& src_arr = src->array(mfi);
11  if (box.length(0) != 1)
12  {
13  src->setVal(0.0);
14  } else {
15  ParallelFor(box, [=] AMREX_GPU_DEVICE (int i, int j, int k) {
16  const Real z_cc = d_zlevels_arr[k];
17  if (z_cc < cutoff) {
18  src_arr(i, j, k) = advection_heating_rate;
19  } else if (z_cc < cutoff+cutoff_transition) {
21  src_arr(i, j, k) = (z_cc-cutoff) * slope + advection_heating_rate;
22  } else {
23  src_arr(i, j, k) = 0.0;
24  }
25  });
26  }
27  }
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo=geomdata.ProbLo();const auto dx=geomdata.CellSize();const Real x=(prob_lo[0]+(i+0.5) *dx[0])/mf_m(i, j, 0);const Real z=z_cc(i, j, k);Real L=std::sqrt(std::pow((x - x_c)/x_r, 2)+std::pow((z - z_c)/z_r, 2));if(L<=1.0) { Real dT=T_pert *(std::cos(PI *L)+1.0)/2.0;Real Tbar_hse=p_hse(i, j, k)/(R_d *r_hse(i, j, k));Real theta_perturbed=(Tbar_hse+dT) *std::pow(p_0/p_hse(i, j, k), rdOcp);Real theta_0=(Tbar_hse) *std::pow(p_0/p_hse(i, j, k), rdOcp);if(const_rho) { state_pert(i, j, k, RhoTheta_comp)=r_hse(i, j, k) *(theta_perturbed - theta_0);} else { state_pert(i, j, k, Rho_comp)=getRhoThetagivenP(p_hse(i, j, k))/theta_perturbed - r_hse(i, j, k);} } })
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Real cutoff_transition
Definition: ERF_UpdateRhoThetaSources_SineMassFlux.H:5
Real advection_heating_rate
Definition: ERF_UpdateRhoThetaSources_SineMassFlux.H:3
Real cutoff
Definition: ERF_UpdateRhoThetaSources_SineMassFlux.H:4
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 = 0.0

Referenced by for().

◆ cutoff

Real cutoff = 500.0

Referenced by for().

◆ cutoff_transition

Real cutoff_transition = 50.0

Referenced by for().