ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InitCustomPert_IsentropicVortex.H File Reference

Go to the source code of this file.

Functions

ParmParse pp ("prob")
 
pp query ("p_inf", p_inf)
 
pp query ("T_inf", T_inf)
 
pp query ("M_inf", M_inf)
 
pp query ("alpha", alpha)
 
pp query ("gamma", gamma)
 
pp query ("beta", beta)
 
pp query ("sigma", sigma)
 
pp query ("R", R)
 
pp query ("xc", xc_frac)
 
pp query ("yc", yc_frac)
 
 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));})
 

Variables

amrex::Real p_inf = p_0
 
amrex::Real T_inf = 300.0
 
amrex::Real M_inf = 0.2
 
amrex::Real alpha = 0.0
 
amrex::Real gamma = Gamma
 
amrex::Real beta = 0.01
 
amrex::Real sigma = 1.0
 
amrex::Real R = 2.0
 
amrex::Real xc_frac = 0.5
 
amrex::Real yc_frac = 0.5
 
const amrex::Realprob_lo = geomdata.ProbLo()
 
const amrex::Realprob_hi = geomdata.ProbHi()
 
amrex::Real xc = xc_frac * (prob_hi[0] - prob_lo[0])
 
amrex::Real yc = yc_frac * (prob_hi[1] - prob_lo[1])
 
amrex::Real inv_gm1 = 1.0 / (gamma - 1.0)
 
amrex::Real rho_0 = p_inf / (R_d * T_inf)
 
amrex::Real a_inf = std::sqrt(gamma * R_d * T_inf)
 
const amrex::Real rdOcp = sc.rdOcp
 

Function Documentation

◆ ParallelFor()

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));}   
)
Here is the call graph for this function:

◆ pp()

ParmParse pp ( "prob"  )

◆ query() [1/10]

pp query ( "alpha"  ,
alpha   
)

◆ query() [2/10]

pp query ( "beta"  ,
beta   
)

◆ query() [3/10]

pp query ( "gamma"  ,
gamma   
)

◆ query() [4/10]

pp query ( "M_inf"  ,
M_inf   
)

◆ query() [5/10]

pp query ( "p_inf"  ,
p_inf   
)

◆ query() [6/10]

pp query ( "R"  ,
R   
)

◆ query() [7/10]

pp query ( "sigma"  ,
sigma   
)

◆ query() [8/10]

pp query ( "T_inf"  ,
T_inf   
)

◆ query() [9/10]

pp query ( "xc"  ,
xc_frac   
)

◆ query() [10/10]

pp query ( "yc"  ,
yc_frac   
)

Variable Documentation

◆ a_inf

amrex::Real a_inf = std::sqrt(gamma * R_d * T_inf)

Referenced by ParallelFor().

◆ alpha

◆ beta

◆ gamma

◆ inv_gm1

amrex::Real inv_gm1 = 1.0 / (gamma - 1.0)

Referenced by ParallelFor().

◆ M_inf

amrex::Real M_inf = 0.2

◆ p_inf

amrex::Real p_inf = p_0

◆ prob_hi

const amrex::Real* prob_hi = geomdata.ProbHi()

Referenced by if(), ParallelFor(), and writeNCPlotFile().

◆ prob_lo

◆ R

amrex::Real R = 2.0

Referenced by erf_vortex_Gaussian(), and ParallelFor().

◆ rdOcp

const amrex::Real rdOcp = sc.rdOcp

Referenced by ParallelFor().

◆ rho_0

◆ sigma

◆ T_inf

amrex::Real T_inf = 300.0

Referenced by ParallelFor().

◆ xc

◆ xc_frac

amrex::Real xc_frac = 0.5

◆ yc

◆ yc_frac

amrex::Real yc_frac = 0.5