42 amrex::Print() <<
"Adding divergence-free perturbations "
47 amrex::Print() <<
"Adding random x-velocity perturbations" << std::endl;
50 amrex::Print() <<
"Adding random y-velocity perturbations" << std::endl;
54 amrex::Print() <<
"Adding random rho*theta perturbations" << std::endl;
56 amrex::Print() <<
"Adding random theta perturbations" << std::endl;
61 ParallelForRNG(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k,
const amrex::RandomEngine& engine) noexcept
63 const Real*
dx = geomdata.CellSize();
66 const Real z = z_cc(i,j,k);
77 Real rand_double = amrex::Random(engine);
#define RhoScalar_comp
Definition: ERF_IndexDefines.H:40
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define RhoKE_comp
Definition: ERF_IndexDefines.H:38
const auto dx
Definition: ERF_InitCustomPertVels_ParticleTests.H:15
amrex::Real yc
Definition: ERF_InitCustomPert_IsentropicVortex.H:20
amrex::Real xc
Definition: ERF_InitCustomPert_IsentropicVortex.H:19
ParallelForRNG(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k, const amrex::RandomEngine &engine) noexcept { const Real *dx=geomdata.CellSize();const Real x=prob_lo[0]+(i+0.5) *dx[0];const Real y=prob_lo[1]+(j+0.5) *dx[1];const Real z=z_cc(i, j, k);const Real xc=0.5 *(prob_lo[0]+prob_hi[0]);const Real yc=0.5 *(prob_lo[1]+prob_hi[1]);const Real zc=0.5 *(prob_lo[2]+prob_hi[2]);const Real r=std::sqrt((x-xc) *(x-xc)+(y-yc) *(y-yc)+(z-zc) *(z-zc));if((z<=pert_ref_height) &&(T_0_Pert_Mag !=0.0)) { Real rand_double=amrex::Random(engine);state_pert(i, j, k, RhoTheta_comp)=(rand_double *2.0 - 1.0) *T_0_Pert_Mag;if(!pert_rhotheta) { state_pert(i, j, k, RhoTheta_comp) *=r_hse(i, j, k);} } state_pert(i, j, k, RhoScalar_comp)=A_0 *exp(-10.*r *r);if(state_pert.nComp() > RhoKE_comp) { state_pert(i, j, k, RhoKE_comp)=r_hse(i, j, k) *KE_0;if(KE_decay_height > 0) { state_pert(i, j, k, RhoKE_comp) *=max(std::pow(1 - min(z/KE_decay_height, 1.0), KE_decay_order), 1e-12);} } })
Real W_0_Pert_Mag
Definition: ERF_InitCustomPert_TurbulentInflow.H:20
Real T_0_Pert_Mag
Definition: ERF_InitCustomPert_TurbulentInflow.H:21
Real pert_ref_height
Definition: ERF_InitCustomPert_TurbulentInflow.H:29
Real KE_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:8
const Real * prob_lo
Definition: ERF_InitCustomPert_TurbulentInflow.H:31
Real rho_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:4
Real U_0_Pert_Mag
Definition: ERF_InitCustomPert_TurbulentInflow.H:18
Real pert_periods_V
Definition: ERF_InitCustomPert_TurbulentInflow.H:28
Real T_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:5
Real pert_deltaV
Definition: ERF_InitCustomPert_TurbulentInflow.H:26
Real U_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:13
Real KE_decay_order
Definition: ERF_InitCustomPert_TurbulentInflow.H:11
Real V_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:14
Real pert_deltaU
Definition: ERF_InitCustomPert_TurbulentInflow.H:25
const Real * prob_hi
Definition: ERF_InitCustomPert_TurbulentInflow.H:32
Real pert_periods_U
Definition: ERF_InitCustomPert_TurbulentInflow.H:27
Real KE_decay_height
Definition: ERF_InitCustomPert_TurbulentInflow.H:10
bool pert_rhotheta
Definition: ERF_InitCustomPert_TurbulentInflow.H:22
Real W_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:15
Real A_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:7
Real V_0_Pert_Mag
Definition: ERF_InitCustomPert_TurbulentInflow.H:19
amrex::Real Real
Definition: ERF_ShocInterface.H:19