30 ParallelForRNG(
xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
33 const Real*
dx = geomdata.CellSize();
38 x_vel_pert(i, j, k) =
U_0;
41 Real rand_double = amrex::Random(engine);
43 x_vel_pert(i, j, k) += x_vel_prime;
50 x_vel_pert(i, j, k) +=
ufac * damp *
z * std::cos(
aval * yl);
55 ParallelForRNG(
ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
58 const Real*
dx = geomdata.CellSize();
63 y_vel_pert(i, j, k) =
V_0;
66 Real rand_double = amrex::Random(engine);
68 y_vel_pert(i, j, k) += y_vel_prime;
75 y_vel_pert(i, j, k) +=
vfac * damp *
z * std::cos(
bval * xl);
80 ParallelForRNG(
zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
82 const int dom_lo_z = geomdata.Domain().smallEnd()[2];
83 const int dom_hi_z = geomdata.Domain().bigEnd()[2];
85 if (k == dom_lo_z || k == dom_hi_z+1)
87 z_vel_pert(i, j, k) = 0.0;
91 Real rand_double = amrex::Random(engine);
93 z_vel_pert(i, j, k) =
W_0 + z_vel_prime;
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
Real bval
Definition: ERF_InitCustomPertVels_Bomex.H:25
Real aval
Definition: ERF_InitCustomPertVels_Bomex.H:24
Real W_0_Pert_Mag
Definition: ERF_InitCustomPertVels_Bomex.H:11
Real pert_ref_height
Definition: ERF_InitCustomPertVels_Bomex.H:19
ParallelForRNG(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=prob_lo[2]+(k+0.5) *dx[2];x_vel_pert(i, j, k)=U_0;if((z<=pert_ref_height) &&(U_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);Real x_vel_prime=(rand_double *2.0 - 1.0) *U_0_Pert_Mag;x_vel_pert(i, j, k)+=x_vel_prime;} if(pert_deltaU !=0.0) { const amrex::Real yl=y - prob_lo[1];const amrex::Real zl=z/pert_ref_height;const amrex::Real damp=std::exp(-0.5 *zl *zl);x_vel_pert(i, j, k)+=ufac *damp *z *std::cos(aval *yl);} })
auto probhi
Definition: ERF_InitCustomPertVels_Bomex.H:22
ParmParse pp_prob("prob")
Real U_0_Pert_Mag
Definition: ERF_InitCustomPertVels_Bomex.H:9
Real pert_periods_V
Definition: ERF_InitCustomPertVels_Bomex.H:18
Real vfac
Definition: ERF_InitCustomPertVels_Bomex.H:27
Real pert_deltaV
Definition: ERF_InitCustomPertVels_Bomex.H:16
Real U_0
Definition: ERF_InitCustomPertVels_Bomex.H:4
Real ufac
Definition: ERF_InitCustomPertVels_Bomex.H:26
Real V_0
Definition: ERF_InitCustomPertVels_Bomex.H:5
Real pert_deltaU
Definition: ERF_InitCustomPertVels_Bomex.H:15
Real pert_periods_U
Definition: ERF_InitCustomPertVels_Bomex.H:17
Real W_0
Definition: ERF_InitCustomPertVels_Bomex.H:6
Real V_0_Pert_Mag
Definition: ERF_InitCustomPertVels_Bomex.H:10
auto problo
Definition: ERF_InitCustomPertVels_Bomex.H:21
Real qv_0_Pert_Mag
Definition: ERF_InitCustomPertVels_Bomex.H:12
const Real dx
Definition: ERF_InitCustomPert_ABL.H:23
const amrex::Real * prob_lo
Definition: ERF_InitCustomPert_IsentropicVortex.H:16
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