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 = 0.0
 
Real V_0 = 0.0
 
Real W_0 = 0.0
 
int prob_type
 
Real pert_periods_u = 5.0
 
Real pert_periods_v = 5.0
 
Real pert_delta_u = 0.0
 
Real pert_delta_v = 0.0
 
Real pert_lo = -1e34
 
Real pert_hi = 1e34
 
auto problo = geomdata.ProbLo()
 
auto probhi = geomdata.ProbHi()
 
Real aval = pert_periods_u * 2.0 * PI / (probhi[1] - problo[1])
 
Real bval = pert_periods_v * 2.0 * 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()

◆ 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 + 0.5) * 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 + 0.5) * 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) {
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 auto dx
Definition: ERF_InitCustomPertVels_ParticleTests.H:15
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);} } })
const amrex::Real * prob_hi
Definition: ERF_InitCustomPert_IsentropicVortex.H:17
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

◆ bval

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

◆ pert_delta_u

Real pert_delta_u = 0.0

◆ pert_delta_v

Real pert_delta_v = 0.0

◆ pert_hi

Real pert_hi = 1e34

◆ pert_lo

Real pert_lo = -1e34

◆ pert_periods_u

Real pert_periods_u = 5.0

◆ pert_periods_v

Real pert_periods_v = 5.0

◆ prob_type

int prob_type

◆ probhi

auto probhi = geomdata.ProbHi()

◆ problo

auto problo = geomdata.ProbLo()

◆ U_0

Real U_0 = 0.0

Referenced by if().

◆ V_0

Real V_0 = 0.0

Referenced by if().

◆ W_0

Real W_0 = 0.0

Referenced by if().