37 ParallelForRNG(xbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const amrex::RandomEngine& engine) noexcept
40 const Real*
dx = geomdata.CellSize();
46 x_vel_pert(i, j, k) =
U_0;
49 Real rand_double = amrex::Random(engine);
51 x_vel_pert(i, j, k) += x_vel_prime;
58 x_vel_pert(i, j, k) +=
ufac * damp * z_agl * std::cos(
aval * yl);
63 ParallelForRNG(ybx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const amrex::RandomEngine& engine) noexcept
66 const Real*
dx = geomdata.CellSize();
72 y_vel_pert(i, j, k) =
V_0;
75 Real rand_double = amrex::Random(engine);
77 y_vel_pert(i, j, k) += y_vel_prime;
84 y_vel_pert(i, j, k) +=
vfac * damp * z_agl * std::cos(
bval *
xl);
89 ParallelForRNG(zbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const amrex::RandomEngine& engine) noexcept
91 const int dom_lo_z = geomdata.Domain().smallEnd()[2];
92 const int dom_hi_z = geomdata.Domain().bigEnd()[2];
95 if (k == dom_lo_z || k == dom_hi_z+1)
97 z_vel_pert(i, j, k) =
zero;
101 z_vel_pert(i, j, k) =
W_0;
104 Real rand_double = amrex::Random(engine);
106 z_vel_pert(i, j, k) += z_vel_prime;
const bool use_z_phys
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:4
Real bval
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:31
Real aval
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:30
Real W_0_Pert_Mag
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:15
Real pert_ref_height
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:23
Real prob_hi_x
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:27
Real prob_lo_y
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:26
ParmParse pp_prob("prob")
Real U_0_Pert_Mag
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:13
Real pert_periods_V
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:21
Real vfac
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:34
Real pert_deltaV
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:18
Real U_0
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:8
ParallelForRNG(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *prob_lo=geomdata.ProbLo();const Real *dx=geomdata.CellSize();const Real y=prob_lo[1]+(j+myhalf) *dx[1];const Real z=use_z_phys ? erf_prob_heights::z_xface(i, j, k, z_nd) :prob_lo[2]+(k+myhalf) *dx[2];const Real z_agl=z - erf_prob_heights::z_ground_xface(i, j, z_sfc_nd);x_vel_pert(i, j, k)=U_0;if((z_agl<=pert_ref_height) &&(U_0_Pert_Mag !=zero)) { Real rand_double=amrex::Random(engine);Real x_vel_prime=(rand_double *two - one) *U_0_Pert_Mag;x_vel_pert(i, j, k)+=x_vel_prime;} if(pert_deltaU !=zero) { const amrex::Real yl=y - prob_lo[1];const amrex::Real zl=z_agl/pert_ref_height;const amrex::Real damp=std::exp(-myhalf *zl *zl);x_vel_pert(i, j, k)+=ufac *damp *z_agl *std::cos(aval *yl);} })
Real ufac
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:33
Real V_0
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:9
Real pert_deltaU
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:17
Real pert_periods_U
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:20
Real prob_lo_x
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:25
Real W_0
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:10
Real V_0_Pert_Mag
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:14
Real prob_hi_y
Definition: ERF_InitCustomPertVels_SDMCongestus3D.H:28
const Real dx
Definition: ERF_InitCustomPert_ABL.H:44
const GpuArray< Real, AMREX_SPACEDIM > prob_lo
Definition: ERF_InitCustomPert_CloudChamber.H:33
constexpr amrex::Real two
Definition: ERF_NumericalConstants.H:38
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real zero
Definition: ERF_NumericalConstants.H:36
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ xl
Definition: ERF_WSM6.H:345
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_ground_xface(int i, int j, amrex::Array4< amrex::Real const > const &z_sfc_nd) noexcept
Height of the ground under x-face (i,j)
Definition: ERF_ProbHeights.H:58
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
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real z_ground_yface(int i, int j, amrex::Array4< amrex::Real const > const &z_sfc_nd) noexcept
Height of the ground under y-face (i,j)
Definition: ERF_ProbHeights.H:66