ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
DampingChoice Struct Reference

#include <ERF_DampingStruct.H>

Collaboration diagram for DampingChoice:

Public Member Functions

void init_params (std::string pp_prefix)
 
void display ()
 

Public Attributes

bool rayleigh_damp_U = false
 
bool rayleigh_damp_V = false
 
bool rayleigh_damp_W = false
 
bool rayleigh_damp_T = false
 
amrex::Real rayleigh_dampcoef = 0.2
 
amrex::Real rayleigh_zdamp = 500.0
 
amrex::Real rayleigh_ztop
 
bool w_damping = false
 
amrex::Real w_damping_cfl = 1.0
 
amrex::Real w_damping_const = -1
 
amrex::Real w_damping_coeff = -1
 
RayleighDampingType rayleigh_damping_type = RayleighDampingType::SlowExplicit
 

Detailed Description

Container holding damping-related choices

Member Function Documentation

◆ display()

void DampingChoice::display ( )
inline
62  {
63  amrex::Print() << "Rayleigh damping :";
65  if (rayleigh_damp_U) amrex::Print() << " U";
66  if (rayleigh_damp_V) amrex::Print() << " V";
67  if (rayleigh_damp_W) amrex::Print() << " W";
68  if (rayleigh_damp_T) amrex::Print() << " T";
69  amrex::Print() << " (coef=" << rayleigh_dampcoef << " 1/s,"
70  << " depth=" << rayleigh_zdamp << " m)"
71  << std::endl;
72  } else {
73  amrex::Print() << " None" << std::endl;
74  }
75 
76  amrex::Print() << "w damping : " << w_damping;
77  if (w_damping_const > 0) {
78  amrex::Print() << " (coeff = " << w_damping_const << ")" << std::endl;
79  } else {
80  amrex::Print() << " (coeff = " << w_damping_coeff << " * dz/dt**2)" << std::endl;
81  }
82  }
bool rayleigh_damp_V
Definition: ERF_DampingStruct.H:85
amrex::Real w_damping_coeff
Definition: ERF_DampingStruct.H:98
bool rayleigh_damp_T
Definition: ERF_DampingStruct.H:87
amrex::Real rayleigh_dampcoef
Definition: ERF_DampingStruct.H:88
bool rayleigh_damp_W
Definition: ERF_DampingStruct.H:86
bool rayleigh_damp_U
Definition: ERF_DampingStruct.H:84
bool w_damping
Definition: ERF_DampingStruct.H:92
amrex::Real rayleigh_zdamp
Definition: ERF_DampingStruct.H:89
amrex::Real w_damping_const
Definition: ERF_DampingStruct.H:95

Referenced by SolverChoice::display().

Here is the caller graph for this function:

◆ init_params()

void DampingChoice::init_params ( std::string  pp_prefix)
inline
22  {
23  amrex::ParmParse pp(pp_prefix);
24 
25  static std::string rayleigh_type_string = "SlowExplicit";
26  pp.query("rayleigh_damping_type",rayleigh_type_string);
27 
28  if (!rayleigh_type_string.compare("SlowExplicit")) {
30  } else if (!rayleigh_type_string.compare("FastExplicit")) {
32  } else if (!rayleigh_type_string.compare("FastImplicit")) {
34  } else {
35  amrex::Error("Don't know this rayleigh_damping_type");
36  }
37 
38  // Include Rayleigh damping (separate flags for each variable)
39  pp.query("rayleigh_damp_U", rayleigh_damp_U);
40  pp.query("rayleigh_damp_V", rayleigh_damp_V);
41  pp.query("rayleigh_damp_W", rayleigh_damp_W);
42  pp.query("rayleigh_damp_T", rayleigh_damp_T);
43  pp.query("rayleigh_dampcoef", rayleigh_dampcoef);
44  pp.query("rayleigh_zdamp", rayleigh_zdamp);
45 
46  if (pp.countval("rayleigh_damp_substep") > 0) {
47  amrex::Abort("The input rayleigh_damp_substep is deprecated. Set rayleigh_damping_type instead.");
48  }
49 
50  // Include vertical-velocity damping to improve robustness
51  pp.query("w_damping", w_damping);
52  pp.query("w_damping_cfl", w_damping_cfl);
53  pp.query("w_damping_const", w_damping_const);
54  pp.query("w_damping_coeff", w_damping_coeff);
55 
56  if (w_damping && (w_damping_const < 0 && w_damping_coeff < 0)) {
57  amrex::Abort("Need to specify vertical damping coefficient w_damping_const (like WRF) or w_damping_coeff (~ dz/dt**2)");
58  }
59  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real pp(amrex::Real y)
Definition: ERF_MicrophysicsUtils.H:233
RayleighDampingType rayleigh_damping_type
Definition: ERF_DampingStruct.H:101
amrex::Real w_damping_cfl
Definition: ERF_DampingStruct.H:93

Referenced by SolverChoice::init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ rayleigh_damp_T

bool DampingChoice::rayleigh_damp_T = false

Referenced by display(), init_params(), and make_sources().

◆ rayleigh_damp_U

bool DampingChoice::rayleigh_damp_U = false

◆ rayleigh_damp_V

bool DampingChoice::rayleigh_damp_V = false

◆ rayleigh_damp_W

bool DampingChoice::rayleigh_damp_W = false

◆ rayleigh_dampcoef

amrex::Real DampingChoice::rayleigh_dampcoef = 0.2

◆ rayleigh_damping_type

RayleighDampingType DampingChoice::rayleigh_damping_type = RayleighDampingType::SlowExplicit

◆ rayleigh_zdamp

amrex::Real DampingChoice::rayleigh_zdamp = 500.0

Referenced by display(), and init_params().

◆ rayleigh_ztop

amrex::Real DampingChoice::rayleigh_ztop

◆ w_damping

bool DampingChoice::w_damping = false

Referenced by display(), and init_params().

◆ w_damping_cfl

amrex::Real DampingChoice::w_damping_cfl = 1.0

Referenced by init_params().

◆ w_damping_coeff

amrex::Real DampingChoice::w_damping_coeff = -1

Referenced by display(), and init_params().

◆ w_damping_const

amrex::Real DampingChoice::w_damping_const = -1

Referenced by display(), and init_params().


The documentation for this struct was generated from the following file: