29 ParallelForRNG(
xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
32 const Real*
dx = geomdata.CellSize();
37 x_vel_pert(i, j, k) =
U_0;
40 Real rand_double = amrex::Random(engine);
42 x_vel_pert(i, j, k) += x_vel_prime;
49 x_vel_pert(i, j, k) +=
ufac * damp *
z * std::cos(
aval * yl);
54 ParallelForRNG(
ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
57 const Real*
dx = geomdata.CellSize();
62 y_vel_pert(i, j, k) =
V_0;
65 Real rand_double = amrex::Random(engine);
67 y_vel_pert(i, j, k) += y_vel_prime;
74 y_vel_pert(i, j, k) +=
vfac * damp *
z * std::cos(
bval * xl);
79 ParallelForRNG(
zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const RandomEngine& engine) noexcept
81 const int dom_lo_z = geomdata.Domain().smallEnd()[2];
82 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
const Real prob_lo_y
Definition: ERF_InitCustomPertVels_RICO.H:19
Real bval
Definition: ERF_InitCustomPertVels_RICO.H:23
Real aval
Definition: ERF_InitCustomPertVels_RICO.H:22
Real W_0_Pert_Mag
Definition: ERF_InitCustomPertVels_RICO.H:9
Real T_0_Pert_Mag
Definition: ERF_InitCustomPertVels_RICO.H:10
Real pert_ref_height
Definition: ERF_InitCustomPertVels_RICO.H:17
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);} })
ParmParse pp_prob("prob")
Real U_0_Pert_Mag
Definition: ERF_InitCustomPertVels_RICO.H:7
const Real prob_lo_x
Definition: ERF_InitCustomPertVels_RICO.H:19
Real pert_periods_V
Definition: ERF_InitCustomPertVels_RICO.H:16
Real vfac
Definition: ERF_InitCustomPertVels_RICO.H:26
Real pert_deltaV
Definition: ERF_InitCustomPertVels_RICO.H:14
const Real prob_hi_y
Definition: ERF_InitCustomPertVels_RICO.H:20
Real U_0
Definition: ERF_InitCustomPertVels_RICO.H:3
const Real prob_hi_x
Definition: ERF_InitCustomPertVels_RICO.H:20
Real ufac
Definition: ERF_InitCustomPertVels_RICO.H:25
Real V_0
Definition: ERF_InitCustomPertVels_RICO.H:4
Real pert_deltaU
Definition: ERF_InitCustomPertVels_RICO.H:13
Real pert_periods_U
Definition: ERF_InitCustomPertVels_RICO.H:15
Real W_0
Definition: ERF_InitCustomPertVels_RICO.H:5
Real V_0_Pert_Mag
Definition: ERF_InitCustomPertVels_RICO.H:8
Real qv_0_Pert_Mag
Definition: ERF_InitCustomPertVels_RICO.H:11
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