5 Real H = geomdata.ProbHi()[2];
13 const auto prob_lo = geomdata.ProbLo();
14 const auto dx = geomdata.CellSize();
17 Real z = 0.25 * (z_nd(i,j,k) + z_nd(i,j+1,k) + z_nd(i,j,k+1) + z_nd(i,j+1,k+1));
22 Real fac = std::cosh(
kp * (
z -
H) ) / std::sinh(
kp *
H);
24 x_vel_pert(i, j, k) = -
Ampl *
omega * fac * std::sin(
kp *
x);
30 const auto dx = geomdata.CellSize();
33 Real z = 0.25 * ( z_nd(i,j,k) + z_nd(i+1,j,k) + z_nd(i,j+1,k) + z_nd(i+1,j+1,k) );
37 Real fac = std::sinh(
kp * (
z -
H) ) / std::sinh(
kp *
H);
39 z_vel_pert(i, j, k) =
Ampl *
omega * fac * std::cos(
kp *
x);
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:21
Real Ampl
Definition: ERF_InitCustomPertVels_MovingTerrain.H:2
Real g
Definition: ERF_InitCustomPertVels_MovingTerrain.H:7
ParmParse pp_prob("prob")
Real H
Definition: ERF_InitCustomPertVels_MovingTerrain.H:5
Real wavelength
Definition: ERF_InitCustomPertVels_MovingTerrain.H:3
Real omega
Definition: ERF_InitCustomPertVels_MovingTerrain.H:8
ParallelFor(xbx, [=] 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 *dx[0];Real z=0.25 *(z_nd(i, j, k)+z_nd(i, j+1, k)+z_nd(i, j, k+1)+z_nd(i, j+1, k+1));Real z_base=Ampl *std::sin(kp *x);z -=z_base;Real fac=std::cosh(kp *(z - H))/std::sinh(kp *H);x_vel_pert(i, j, k)=-Ampl *omega *fac *std::sin(kp *x);})
Real kp
Definition: ERF_InitCustomPertVels_MovingTerrain.H:6
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
amrex::Real Real
Definition: ERF_ShocInterface.H:19