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_v", pert_delta_v)
 
 if (prob_type==1)
 

Variables

const bool use_z_phys = use_physical_z()
 
const Real phys_z_lo = phys_zlo(geomdata, lev)
 
const Real phys_z_hi = phys_zhi(geomdata, lev)
 
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
 
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()

◆ if()

if ( prob_type  = = 1)
38  {
39 
40  ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
41  const auto *const dx = geomdata.CellSize();
42  const Real z = use_z_phys ? erf_prob_heights::z_xface(i,j,k,z_nd) - phys_z_lo : (k + myhalf) * dx[2];
43  x_vel_pert(i, j, k) = U_0 * z / (phys_z_hi - phys_z_lo);
44  });
45 
46  ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
47  const auto *const dx = geomdata.CellSize();
48  const Real z = use_z_phys ? erf_prob_heights::z_yface(i,j,k,z_nd) - phys_z_lo : (k + myhalf) * dx[2];
49  y_vel_pert(i, j, k) = V_0 * z / (phys_z_hi - phys_z_lo);
50  });
51 
52  ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
53  z_vel_pert(i, j, k) = W_0;
54  });
55 
56  // Poiseuille flow
57  } else if (prob_type == 10 || prob_type == 11) {
const bool use_z_phys
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:3
const Real phys_z_hi
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:5
Real U_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:7
Real V_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:8
int prob_type
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:17
Real W_0
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:9
const Real phys_z_lo
Definition: ERF_InitCustomPertVels_CouettePoiseuille.H:4
const Real dx
Definition: ERF_InitCustomPert_ABL.H:44
ParallelFor(fab_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_yface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of y-face (i,j,k)
Definition: ERF_ProbHeights.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_xface(int i, int j, int k, amrex::Array4< amrex::Real const > const &z_nd) noexcept
Height of the centre of x-face (i,j,k)
Definition: ERF_ProbHeights.H:21
Here is the call graph for this function:

◆ pp_for_pert_vels()

ParmParse pp_for_pert_vels ( "prob"  )

◆ query() [1/7]

pp_for_pert_vels query ( "pert_delta_u"  ,
pert_delta_u   
)

◆ query() [2/7]

pp_for_pert_vels query ( "pert_delta_v"  ,
pert_delta_v   
)

◆ query() [3/7]

pp_for_pert_vels query ( "pert_periods_u"  ,
pert_periods_u   
)

◆ query() [4/7]

pp_for_pert_vels query ( "pert_periods_v"  ,
pert_periods_v   
)

◆ query() [5/7]

pp_for_pert_vels query ( "U_0"  ,
U_0   
)

◆ query() [6/7]

pp_for_pert_vels query ( "V_0"  ,
V_0   
)

◆ query() [7/7]

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_periods_u

Real pert_periods_u = amrex::Real(5.0)

◆ pert_periods_v

Real pert_periods_v = amrex::Real(5.0)

◆ phys_z_hi

const Real phys_z_hi = phys_zhi(geomdata, lev)

Referenced by if().

◆ phys_z_lo

const Real phys_z_lo = phys_zlo(geomdata, lev)

Referenced by if().

◆ prob_type

int prob_type

◆ probhi

auto probhi = geomdata.ProbHi()

◆ problo

auto problo = geomdata.ProbLo()

◆ U_0

Real U_0 = zero

Referenced by if().

◆ use_z_phys

const bool use_z_phys = use_physical_z()

Referenced by if().

◆ V_0

Real V_0 = zero

Referenced by if().

◆ W_0

Real W_0 = zero

Referenced by if().