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

#include <ERF_SpongeStruct.H>

Collaboration diagram for SpongeChoice:

Public Member Functions

void init_params (std::string pp_prefix)
 Read sponge-layer options from the input parameter database. More...
 
void display ()
 Print the configured sponge-layer options. More...
 

Public Attributes

bool use_xlo_sponge_damping = false
 Whether sponge damping is applied at the low-x boundary. More...
 
bool use_xhi_sponge_damping = false
 Whether sponge damping is applied at the high-x boundary. More...
 
bool use_ylo_sponge_damping = false
 Whether sponge damping is applied at the low-y boundary. More...
 
bool use_yhi_sponge_damping = false
 Whether sponge damping is applied at the high-y boundary. More...
 
bool use_zlo_sponge_damping = false
 Whether sponge damping is applied at the low-z boundary. More...
 
bool use_zhi_sponge_damping = false
 Whether sponge damping is applied at the high-z boundary. More...
 
amrex::Real sponge_strength = 0.0
 Sponge damping strength. More...
 
amrex::Real xlo_sponge_end
 Physical end location of the low-x sponge layer. More...
 
amrex::Real xhi_sponge_start
 Physical start location of the high-x sponge layer. More...
 
amrex::Real ylo_sponge_end
 Physical end location of the low-y sponge layer. More...
 
amrex::Real yhi_sponge_start
 Physical start location of the high-y sponge layer. More...
 
amrex::Real zlo_sponge_end
 Physical end location of the low-z sponge layer. More...
 
amrex::Real zhi_sponge_start
 Physical start location of the high-z sponge layer. More...
 
amrex::Real sponge_density = -one
 Target density used by sponge damping. More...
 
amrex::Real sponge_rhotheta = -one
 Target rho-theta used by sponge damping. More...
 
amrex::Real sponge_rhomoist = -one
 Target moist density variable used by sponge damping. More...
 
amrex::Real sponge_x_velocity = zero
 Target x velocity used by sponge damping. More...
 
amrex::Real sponge_y_velocity = zero
 Target y velocity used by sponge damping. More...
 
amrex::Real sponge_z_velocity = zero
 Target vertical velocity used by sponge damping. More...
 

Static Public Attributes

static SpongeType sponge_type = SpongeType::Standard
 Selected sponge damping model. More...
 

Detailed Description

Container holding the sponge-related choices

Member Function Documentation

◆ display()

void SpongeChoice::display ( )
inline

Print the configured sponge-layer options.

86  {
87  amrex::Print() << "Sponge choices: " << std::endl;
88  }

Referenced by SolverChoice::display().

Here is the caller graph for this function:

◆ init_params()

void SpongeChoice::init_params ( std::string  pp_prefix)
inline

Read sponge-layer options from the input parameter database.

Parameters
pp_prefixParmParse prefix for the ERF input namespace.
29  {
30  amrex::ParmParse pp(pp_prefix);
31 
32  // The default type is SpongeType::Standard
33  // Here we can overwrite the default with None or Input_Sponge
34  pp.query_enum_case_insensitive("sponge_type",sponge_type);
35 
36  if (sponge_type == SpongeType::None) return;
37 
38  pp.query("sponge_strength" , sponge_strength);
39 
40  // If sponge_strength == 0 then we set sponge_type to None
41  if (std::abs(sponge_strength) == zero)
42  {
43  sponge_type = SpongeType::None;
44  }
45  else
46  {
47  pp.query("use_xlo_sponge_damping", use_xlo_sponge_damping);
48  pp.query("use_xhi_sponge_damping", use_xhi_sponge_damping);
49  pp.query("use_ylo_sponge_damping", use_ylo_sponge_damping);
50  pp.query("use_yhi_sponge_damping", use_yhi_sponge_damping);
51  pp.query("use_zlo_sponge_damping", use_zlo_sponge_damping);
52  pp.query("use_zhi_sponge_damping", use_zhi_sponge_damping);
53 
55  pp.get("xlo_sponge_end" , xlo_sponge_end);
56  }
58  pp.get("xhi_sponge_start" , xhi_sponge_start);
59  }
61  pp.get("ylo_sponge_end" , ylo_sponge_end);
62  }
64  pp.get("yhi_sponge_start" , yhi_sponge_start);
65  }
67  pp.get("zlo_sponge_end" , zlo_sponge_end);
68  }
70  pp.get("zhi_sponge_start" , zhi_sponge_start);
71  }
72 
73  pp.query("sponge_density" , sponge_density);
74  pp.query("sponge_rhotheta" , sponge_rhotheta);
75  pp.query("sponge_rhomoist" , sponge_rhomoist);
76  pp.query("sponge_x_velocity" , sponge_x_velocity);
77  pp.query("sponge_y_velocity" , sponge_y_velocity);
78  pp.query("sponge_z_velocity" , sponge_z_velocity);
79  }
80  }
constexpr amrex::Real zero
Definition: ERF_Constants.H:8
ParmParse pp("prob")
amrex::Real zlo_sponge_end
Physical end location of the low-z sponge layer.
Definition: ERF_SpongeStruct.H:104
amrex::Real xlo_sponge_end
Physical end location of the low-x sponge layer.
Definition: ERF_SpongeStruct.H:102
bool use_zlo_sponge_damping
Whether sponge damping is applied at the low-z boundary.
Definition: ERF_SpongeStruct.H:94
amrex::Real sponge_y_velocity
Target y velocity used by sponge damping.
Definition: ERF_SpongeStruct.H:109
amrex::Real sponge_x_velocity
Target x velocity used by sponge damping.
Definition: ERF_SpongeStruct.H:108
amrex::Real ylo_sponge_end
Physical end location of the low-y sponge layer.
Definition: ERF_SpongeStruct.H:103
amrex::Real sponge_strength
Sponge damping strength.
Definition: ERF_SpongeStruct.H:97
amrex::Real sponge_rhotheta
Target rho-theta used by sponge damping.
Definition: ERF_SpongeStruct.H:106
amrex::Real yhi_sponge_start
Physical start location of the high-y sponge layer.
Definition: ERF_SpongeStruct.H:103
bool use_zhi_sponge_damping
Whether sponge damping is applied at the high-z boundary.
Definition: ERF_SpongeStruct.H:95
amrex::Real sponge_density
Target density used by sponge damping.
Definition: ERF_SpongeStruct.H:105
static SpongeType sponge_type
Selected sponge damping model.
Definition: ERF_SpongeStruct.H:100
amrex::Real sponge_z_velocity
Target vertical velocity used by sponge damping.
Definition: ERF_SpongeStruct.H:110
bool use_xlo_sponge_damping
Whether sponge damping is applied at the low-x boundary.
Definition: ERF_SpongeStruct.H:90
amrex::Real xhi_sponge_start
Physical start location of the high-x sponge layer.
Definition: ERF_SpongeStruct.H:102
bool use_xhi_sponge_damping
Whether sponge damping is applied at the high-x boundary.
Definition: ERF_SpongeStruct.H:91
amrex::Real sponge_rhomoist
Target moist density variable used by sponge damping.
Definition: ERF_SpongeStruct.H:107
bool use_yhi_sponge_damping
Whether sponge damping is applied at the high-y boundary.
Definition: ERF_SpongeStruct.H:93
bool use_ylo_sponge_damping
Whether sponge damping is applied at the low-y boundary.
Definition: ERF_SpongeStruct.H:92
amrex::Real zhi_sponge_start
Physical start location of the high-z sponge layer.
Definition: ERF_SpongeStruct.H:104

Referenced by SolverChoice::init_params().

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

Member Data Documentation

◆ sponge_density

SpongeChoice::sponge_density = -one

Target density used by sponge damping.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), and init_params().

◆ sponge_rhomoist

SpongeChoice::sponge_rhomoist = -one

Target moist density variable used by sponge damping.

Referenced by ApplySpongeZoneBCsForCC(), and init_params().

◆ sponge_rhotheta

SpongeChoice::sponge_rhotheta = -one

Target rho-theta used by sponge damping.

Referenced by ApplySpongeZoneBCsForCC(), and init_params().

◆ sponge_strength

SpongeChoice::sponge_strength = 0.0

◆ sponge_type

SpongeChoice::sponge_type = SpongeType::Standard
inlinestatic

Selected sponge damping model.

Referenced by ERF::advance_dycore(), init_params(), make_mom_sources(), and make_sources().

◆ sponge_x_velocity

SpongeChoice::sponge_x_velocity = zero

Target x velocity used by sponge damping.

Referenced by ApplySpongeZoneBCsForMom(), and init_params().

◆ sponge_y_velocity

SpongeChoice::sponge_y_velocity = zero

Target y velocity used by sponge damping.

Referenced by ApplySpongeZoneBCsForMom(), and init_params().

◆ sponge_z_velocity

SpongeChoice::sponge_z_velocity = zero

Target vertical velocity used by sponge damping.

Referenced by ApplySpongeZoneBCsForMom(), and init_params().

◆ use_xhi_sponge_damping

SpongeChoice::use_xhi_sponge_damping = false

Whether sponge damping is applied at the high-x boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ use_xlo_sponge_damping

SpongeChoice::use_xlo_sponge_damping = false

Whether sponge damping is applied at the low-x boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ use_yhi_sponge_damping

SpongeChoice::use_yhi_sponge_damping = false

Whether sponge damping is applied at the high-y boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ use_ylo_sponge_damping

SpongeChoice::use_ylo_sponge_damping = false

Whether sponge damping is applied at the low-y boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ use_zhi_sponge_damping

SpongeChoice::use_zhi_sponge_damping = false

Whether sponge damping is applied at the high-z boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ use_zlo_sponge_damping

SpongeChoice::use_zlo_sponge_damping = false

Whether sponge damping is applied at the low-z boundary.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ xhi_sponge_start

SpongeChoice::xhi_sponge_start

Physical start location of the high-x sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ xlo_sponge_end

SpongeChoice::xlo_sponge_end

Physical end location of the low-x sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ yhi_sponge_start

SpongeChoice::yhi_sponge_start

Physical start location of the high-y sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ ylo_sponge_end

SpongeChoice::ylo_sponge_end

Physical end location of the low-y sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ zhi_sponge_start

SpongeChoice::zhi_sponge_start

Physical start location of the high-z sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().

◆ zlo_sponge_end

SpongeChoice::zlo_sponge_end

Physical end location of the low-z sponge layer.

Referenced by ApplySpongeZoneBCsForCC(), ApplySpongeZoneBCsForMom(), ApplySpongeZoneBCsForMom_ReadFromFile(), and init_params().


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