ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InitRayleighDamping.H File Reference
#include <ERF_ParFunctions.H>
#include <AMReX_ParmParse.H>
Include dependency graph for ERF_InitRayleighDamping.H:

Go to the source code of this file.

Functions

void erf_init_rayleigh (amrex::Vector< amrex::Vector< amrex::Real > > &rayleigh_ptrs, amrex::Geometry const &geom, std::unique_ptr< amrex::MultiFab > &, amrex::Real) override
 

Function Documentation

◆ erf_init_rayleigh()

void erf_init_rayleigh ( amrex::Vector< amrex::Vector< amrex::Real > > &  rayleigh_ptrs,
amrex::Geometry const &  geom,
std::unique_ptr< amrex::MultiFab > &  ,
amrex::Real   
)
override

Initialize a Rayleigh damping layer with the same structure as in WRF, based on Durran and Klemp 1983

13 {
14  amrex::ParmParse pp_prob("prob");
15  amrex::Real U_0 = 0.0; pp_prob.query("rayleigh_U_0", U_0);
16  amrex::Real V_0 = 0.0; pp_prob.query("rayleigh_V_0", V_0);
17  amrex::Real W_0 = 0.0; pp_prob.query("rayleigh_W_0", W_0);
18  amrex::Real T_0 = 300.0; pp_prob.query("rayleigh_T_0", T_0);
19 
20  const int khi = geom.Domain().bigEnd()[2];
21 
22  for (int k = 0; k <= khi; k++)
23  {
24  rayleigh_ptrs[Rayleigh::ubar][k] = U_0;
25  rayleigh_ptrs[Rayleigh::vbar][k] = V_0;
26  rayleigh_ptrs[Rayleigh::wbar][k] = W_0;
27  rayleigh_ptrs[Rayleigh::thetabar][k] = T_0;
28  }
29 
30  amrex::ParmParse pp("erf");
31  std::string prob_name; pp.get("prob_name",prob_name);
32  if (prob_name == "Moving Terrain") {
33  for (int k = 60; k <= khi; k++)
34  {
35  rayleigh_ptrs[Rayleigh::ubar][k] = 2.0;
36  rayleigh_ptrs[Rayleigh::vbar][k] = 1.0;
37  rayleigh_ptrs[Rayleigh::wbar][k] = 0.0;
38  rayleigh_ptrs[Rayleigh::thetabar][k] = T_0;
39  }
40  }
41 }
@ ubar
Definition: ERF_DataStruct.H:98
@ wbar
Definition: ERF_DataStruct.H:98
@ vbar
Definition: ERF_DataStruct.H:98
@ thetabar
Definition: ERF_DataStruct.H:98
ParmParse pp("prob")
Real T_0
Definition: ERF_InitCustomPert_ABL.H:5
const int khi
Definition: ERF_InitCustomPert_Bubble.H:21
ParmParse pp_prob("prob")
Real V_0
Definition: ERF_InitCustomPert_TaylorGreenVortex.H:6
Real U_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:13
Real W_0
Definition: ERF_InitCustomPert_TurbulentInflow.H:15
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Here is the call graph for this function: