|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| ParmParse | pp ("prob") |
| pp | query ("rho_0", rho_0) |
| pp | query ("T_0", T_0) |
| pp | query ("A_0", A_0) |
| pp | query ("KE_0", KE_0) |
| pp | query ("KE_decay_height", KE_decay_height) |
| pp | query ("KE_decay_order", KE_decay_order) |
| pp | query ("U_0", U_0) |
| pp | query ("V_0", V_0) |
| pp | query ("W_0", W_0) |
| pp | query ("U_0_Pert_Mag", U_0_Pert_Mag) |
| pp | query ("V_0_Pert_Mag", V_0_Pert_Mag) |
| pp | query ("W_0_Pert_Mag", W_0_Pert_Mag) |
| pp | query ("T_0_Pert_Mag", T_0_Pert_Mag) |
| pp | query ("pert_rhotheta", pert_rhotheta) |
| pp | query ("pert_deltaU", pert_deltaU) |
| pp | query ("pert_deltaV", pert_deltaV) |
| pp | query ("pert_periods_U", pert_periods_U) |
| pp | query ("pert_periods_V", pert_periods_V) |
| pp | query ("pert_ref_height", pert_ref_height) |
| if (KE_decay_height > 0) | |
| if (pert_ref_height > 0) | |
| 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);} } }) | |
Variables | |
| Real | rho_0 = 1.0 |
| Real | T_0 = 300.0 |
| Real | A_0 = 1.0 |
| Real | KE_0 = 0.1 |
| Real | KE_decay_height = -1 |
| Real | KE_decay_order = 1 |
| Real | U_0 = 0.0 |
| Real | V_0 = 0.0 |
| Real | W_0 = 0.0 |
| Real | U_0_Pert_Mag = 0.0 |
| Real | V_0_Pert_Mag = 0.0 |
| Real | W_0_Pert_Mag = 0.0 |
| Real | T_0_Pert_Mag = 0.0 |
| bool | pert_rhotheta = true |
| Real | pert_deltaU = 0.0 |
| Real | pert_deltaV = 0.0 |
| Real | pert_periods_U = 5.0 |
| Real | pert_periods_V = 5.0 |
| Real | pert_ref_height = 100.0 |
| const Real * | prob_lo = geomdata.ProbLo() |
| const Real * | prob_hi = geomdata.ProbHi() |
| if | ( | KE_decay_height | , |
| 0 | |||
| ) |
| if | ( | pert_ref_height | , |
| 0 | |||
| ) |
| 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);} } } | |||
| ) |
Referenced by ERF::create_random_perturbations(), and TurbulentPerturbation::pseudoRandomPert().

| ParmParse pp | ( | "prob" | ) |
| pp query | ( | "KE_decay_height" | , |
| KE_decay_height | |||
| ) |
| pp query | ( | "KE_decay_order" | , |
| KE_decay_order | |||
| ) |
| pp query | ( | "pert_deltaU" | , |
| pert_deltaU | |||
| ) |
| pp query | ( | "pert_deltaV" | , |
| pert_deltaV | |||
| ) |
| pp query | ( | "pert_periods_U" | , |
| pert_periods_U | |||
| ) |
| pp query | ( | "pert_periods_V" | , |
| pert_periods_V | |||
| ) |
| pp_for_pert_vels query | ( | "pert_ref_height" | , |
| pert_ref_height | |||
| ) |
| pp query | ( | "pert_rhotheta" | , |
| pert_rhotheta | |||
| ) |
| pp query | ( | "T_0_Pert_Mag" | , |
| T_0_Pert_Mag | |||
| ) |
| pp query | ( | "U_0_Pert_Mag" | , |
| U_0_Pert_Mag | |||
| ) |
| pp query | ( | "V_0_Pert_Mag" | , |
| V_0_Pert_Mag | |||
| ) |
| pp query | ( | "W_0_Pert_Mag" | , |
| W_0_Pert_Mag | |||
| ) |
| Real A_0 = 1.0 |
Referenced by ParallelForRNG().
| Real KE_0 = 0.1 |
Referenced by ParallelForRNG().
| Real KE_decay_height = -1 |
Referenced by if(), and ParallelForRNG().
| Real KE_decay_order = 1 |
Referenced by if(), and ParallelForRNG().
| Real pert_periods_U = 5.0 |
| Real pert_periods_V = 5.0 |
| Real pert_ref_height = 100.0 |
Referenced by ParallelForRNG().
| bool pert_rhotheta = true |
Referenced by if(), and ParallelForRNG().
| const Real* prob_hi = geomdata.ProbHi() |
Referenced by ParallelForRNG().
| const Real* prob_lo = geomdata.ProbLo() |
Referenced by ParallelForRNG().
| Real rho_0 = 1.0 |
| Real T_0 = 300.0 |
| Real T_0_Pert_Mag = 0.0 |
Referenced by if(), and ParallelForRNG().
| Real U_0 = 0.0 |
Referenced by erf_init_rayleigh().
| Real V_0 = 0.0 |
| Real W_0 = 0.0 |
Referenced by erf_init_rayleigh().
| Real W_0_Pert_Mag = 0.0 |