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

Go to the source code of this file.

Functions

ParmParse pp_for_pert_vels ("prob")
 
pp_for_pert_vels query ("U_0", U_0)
 
pp_for_pert_vels query ("V_0", V_0)
 
pp_for_pert_vels query ("W_0", W_0)
 
pp_for_pert_vels get ("prob_type", prob_type)
 
 AMREX_ALWAYS_ASSERT (prob_type==1||prob_type==10||prob_type==11||prob_type==20||prob_type==21)
 
pp_for_pert_vels query ("pert_periods_u", pert_periods_u)
 
pp_for_pert_vels query ("pert_periods_v", pert_periods_v)
 
pp_for_pert_vels query ("pert_delta_u", pert_delta_u)
 
pp_for_pert_vels query ("pert_delta_u", pert_delta_v)
 
pp_for_pert_vels query ("pert_lo", pert_lo)
 
pp_for_pert_vels query ("pert_hi", pert_hi)
 
 if (prob_type==1)
 

Variables

Real U_0 = zero
 
Real V_0 = zero
 
Real W_0 = zero
 
int prob_type
 
Real pert_periods_u = amrex::Real(5.0)
 
Real pert_periods_v = amrex::Real(5.0)
 
Real pert_delta_u = zero
 
Real pert_delta_v = zero
 
Real pert_lo = -1e34
 
Real pert_hi = 1e34
 
auto problo = geomdata.ProbLo()
 
auto probhi = geomdata.ProbHi()
 
Real aval = pert_periods_u * two * PI / (probhi[1] - problo[1])
 
Real bval = pert_periods_v * two * PI / (probhi[0] - problo[0])
 

Function Documentation

◆ AMREX_ALWAYS_ASSERT()

AMREX_ALWAYS_ASSERT ( prob_type  = =1||prob_type==10||prob_type==11||prob_type==20||prob_type==21)

◆ get()

pp_for_pert_vels get ( "prob_type"  ,
prob_type   
)

◆ if()

else if ( prob_type  = = 1)
35  {
36 
37  ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
38  const auto *const prob_hi = geomdata.ProbHi();
39  const auto *const dx = geomdata.CellSize();
40  const Real z = (k + myhalf) * dx[2];
41  x_vel_pert(i, j, k) = U_0 * z / prob_hi[2];
42  });
43 
44  ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
45  const auto *const prob_hi = geomdata.ProbHi();
46  const auto *const dx = geomdata.CellSize();
47  const Real z = (k + myhalf) * dx[2];
48  y_vel_pert(i, j, k) = V_0 * z / prob_hi[2];
49  });
50 
51  ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
52  z_vel_pert(i, j, k) = W_0;
53  });
54 
55  // Poiseuille flow
56  } else if (prob_type == 10 || prob_type == 11) {
constexpr amrex::Real myhalf
Definition: ERF_Constants.H:11
Real U_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:1
Real V_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:2
int prob_type
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:11
Real W_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:3
const Real dx
Definition: ERF_InitCustomPert_ABL.H:23
const amrex::Real * prob_hi
Definition: ERF_InitCustomPert_DataAssimilation_ISV.H:17
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));})
const Box zbx
Definition: ERF_SetupDiff.H:9
const Box xbx
Definition: ERF_SetupDiff.H:7
const Box ybx
Definition: ERF_SetupDiff.H:8
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Here is the call graph for this function:

◆ pp_for_pert_vels()

ParmParse pp_for_pert_vels ( "prob"  )

◆ query() [1/9]

pp_for_pert_vels query ( "pert_delta_u"  ,
pert_delta_u   
)

◆ query() [2/9]

pp_for_pert_vels query ( "pert_delta_u"  ,
pert_delta_v   
)

◆ query() [3/9]

pp_for_pert_vels query ( "pert_hi"  ,
pert_hi   
)

◆ query() [4/9]

pp_for_pert_vels query ( "pert_lo"  ,
pert_lo   
)

◆ query() [5/9]

pp_for_pert_vels query ( "pert_periods_u"  ,
pert_periods_u   
)

◆ query() [6/9]

pp_for_pert_vels query ( "pert_periods_v"  ,
pert_periods_v   
)

◆ query() [7/9]

pp_for_pert_vels query ( "U_0"  ,
U_0   
)

◆ query() [8/9]

pp_for_pert_vels query ( "V_0"  ,
V_0   
)

◆ query() [9/9]

pp_for_pert_vels query ( "W_0"  ,
W_0   
)

Variable Documentation

◆ aval

Real aval = pert_periods_u * two * PI / (probhi[1] - problo[1])

◆ bval

Real bval = pert_periods_v * two * PI / (probhi[0] - problo[0])

◆ pert_delta_u

Real pert_delta_u = zero

◆ pert_delta_v

Real pert_delta_v = zero

◆ pert_hi

Real pert_hi = 1e34

◆ pert_lo

Real pert_lo = -1e34

◆ pert_periods_u

Real pert_periods_u = amrex::Real(5.0)

◆ pert_periods_v

Real pert_periods_v = amrex::Real(5.0)

◆ prob_type

int prob_type

◆ probhi

auto probhi = geomdata.ProbHi()

◆ problo

auto problo = geomdata.ProbLo()

◆ U_0

Real U_0 = zero

Referenced by if().

◆ V_0

Real V_0 = zero

Referenced by if().

◆ W_0

Real W_0 = zero

Referenced by if().