52 ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
54 const Real*
dx = geomdata.CellSize();
57 const Real x = (i + 0.5) *
dx[0];
58 const Real y = (j + 0.5) *
dx[1];
65 const Real rho_norm = std::pow(1.0 + deltaT,
inv_gm1);
66 state_pert(i, j, k,
Rho_comp) = rho_norm *
rho_0 - r_hse(i,j,k);
76 state_pert(i, j, k,
RhoScalar_comp) = 0.25 * (1.0 + std::cos(
PI * std::min(r2d_xy,
R) /
R));
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
constexpr amrex::Real p_0
Definition: ERF_Constants.H:18
constexpr amrex::Real R_d
Definition: ERF_Constants.H:10
constexpr amrex::Real Gamma
Definition: ERF_Constants.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getRhoThetagivenP(const amrex::Real p, const amrex::Real qv=0.0)
Definition: ERF_EOS.H:172
#define RhoScalar_comp
Definition: ERF_IndexDefines.H:40
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
const auto dx
Definition: ERF_InitCustomPertVels_ParticleTests.H:15
static AMREX_GPU_DEVICE amrex::Real erf_vortex_Gaussian(amrex::Real x, amrex::Real y, amrex::Real xc, amrex::Real yc, amrex::Real R, amrex::Real beta, amrex::Real sigma)
Definition: ERF_InitCustomPert.H:31
amrex::Real gamma
Definition: ERF_InitCustomPert_IsentropicVortex.H:9
const amrex::Real * prob_lo
Definition: ERF_InitCustomPert_IsentropicVortex.H:16
ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real *dx=geomdata.CellSize();const Real x=(i+0.5) *dx[0];const Real y=(j+0.5) *dx[1];const Real Omg=erf_vortex_Gaussian(x, y, xc, yc, R, beta, sigma);const Real deltaT=-(gamma - 1.0)/(2.0 *sigma *sigma) *Omg *Omg;const Real rho_norm=std::pow(1.0+deltaT, inv_gm1);state_pert(i, j, k, Rho_comp)=rho_norm *rho_0 - r_hse(i, j, k);const Real T=(1.0+deltaT) *T_inf;const Real p=std::pow(rho_norm, Gamma)/Gamma *rho_0 *a_inf *a_inf;const Real rho_theta=rho_0 *rho_norm *(T *std::pow(p_0/p, rdOcp));state_pert(i, j, k, RhoTheta_comp)=rho_theta - getRhoThetagivenP(p_hse(i, j, k));const Real r2d_xy=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc));state_pert(i, j, k, RhoScalar_comp)=0.25 *(1.0+std::cos(PI *std::min(r2d_xy, R)/R));})
amrex::Real R
Definition: ERF_InitCustomPert_IsentropicVortex.H:12
amrex::Real yc
Definition: ERF_InitCustomPert_IsentropicVortex.H:20
amrex::Real a_inf
Definition: ERF_InitCustomPert_IsentropicVortex.H:38
amrex::Real p_inf
Definition: ERF_InitCustomPert_IsentropicVortex.H:5
amrex::Real rho_0
Definition: ERF_InitCustomPert_IsentropicVortex.H:33
amrex::Real sigma
Definition: ERF_InitCustomPert_IsentropicVortex.H:11
const amrex::Real rdOcp
Definition: ERF_InitCustomPert_IsentropicVortex.H:50
amrex::Real alpha
Definition: ERF_InitCustomPert_IsentropicVortex.H:8
amrex::Real xc_frac
Definition: ERF_InitCustomPert_IsentropicVortex.H:13
const amrex::Real * prob_hi
Definition: ERF_InitCustomPert_IsentropicVortex.H:17
amrex::Real beta
Definition: ERF_InitCustomPert_IsentropicVortex.H:10
amrex::Real M_inf
Definition: ERF_InitCustomPert_IsentropicVortex.H:7
amrex::Real inv_gm1
Definition: ERF_InitCustomPert_IsentropicVortex.H:27
amrex::Real yc_frac
Definition: ERF_InitCustomPert_IsentropicVortex.H:14
amrex::Real T_inf
Definition: ERF_InitCustomPert_IsentropicVortex.H:6
amrex::Real xc
Definition: ERF_InitCustomPert_IsentropicVortex.H:19
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ T
Definition: ERF_IndexDefines.H:110