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

#include <ERF_SedimentationFlux.H>

Collaboration diagram for SedimentationFlux:

Public Member Functions

void define (const amrex::BoxArray &cc_ba, const amrex::DistributionMapping &dm, const amrex::Vector< int > &a_cons_comp)
 
int inflow_flag_comp () const
 The component of a sedimentation inflow (see above) that flags the faces it applies at. More...
 
void reset (amrex::Real a_dt)
 Zero the fluxes at the start of an Advance of length a_dt. More...
 

Public Attributes

std::shared_ptr< amrex::MultiFab > down
 
amrex::Vector< int > cons_comp
 
amrex::Real dt = 0.0
 

Detailed Description

The hydrometeors a microphysics scheme moved across each z-face by sedimentation during its most recent Advance on a level.

down(i,j,k,n) is the amount of the conserved state component cons_comp[n] (rho*q, so kg m^-3 for a mixing ratio and m^-3 for a number concentration) that crossed z-face (i,j,k) downward during that Advance, per unit horizontal area: kg m^-2 or m^-2. Face k is the bottom face of cell k, so the face at the domain bottom holds what reached the ground. down is defined on the level's grids, z-nodal, and is zeroed at the start of every Advance.

A scheme records the fluxes its cell updates actually used, so that (up to the clipping of negative values) the change of rho*q*dz in a cell is down on its top face minus down on its bottom face. Schemes whose sedimentation has no face fluxes of its own (the semi-Lagrangian WSM6/WDM6 solvers) reconstruct them with sedimentation_add_column_sums below. The inflow a fine patch receives through its top face, handed to a scheme for one Advance (NullMoist::Set_Sed_Inflow). It is z-nodal on the level's grids, with the components of the level's SedimentationFlux plus a flag, comp inflow_flag_comp(): where the flag is 1, face (i,j,k) is the top of a fine column that stops short of the domain top, and component n holds the amount of cons_comp[n] entering through it during the Advance, per unit horizontal area (as SedimentationFlux::down). Elsewhere everything is zero.

Member Function Documentation

◆ define()

void SedimentationFlux::define ( const amrex::BoxArray &  cc_ba,
const amrex::DistributionMapping &  dm,
const amrex::Vector< int > &  a_cons_comp 
)
inline
45  {
46  cons_comp = a_cons_comp;
47  down = std::make_shared<amrex::MultiFab>(amrex::convert(cc_ba, amrex::IntVect(0,0,1)), dm,
48  static_cast<int>(cons_comp.size()), 0);
49  down->setVal(0.0);
50  dt = 0.0;
51  }
amrex::Real dt
Definition: ERF_SedimentationFlux.H:41
std::shared_ptr< amrex::MultiFab > down
Definition: ERF_SedimentationFlux.H:39
amrex::Vector< int > cons_comp
Definition: ERF_SedimentationFlux.H:40

◆ inflow_flag_comp()

int SedimentationFlux::inflow_flag_comp ( ) const
inline

The component of a sedimentation inflow (see above) that flags the faces it applies at.

54 { return static_cast<int>(cons_comp.size()); }

◆ reset()

void SedimentationFlux::reset ( amrex::Real  a_dt)
inline

Zero the fluxes at the start of an Advance of length a_dt.

58  {
59  if (down) { down->setVal(0.0); }
60  dt = a_dt;
61  }

Referenced by SAM::Advance(), and Kessler::Advance().

Here is the caller graph for this function:

Member Data Documentation

◆ cons_comp

amrex::Vector<int> SedimentationFlux::cons_comp

Referenced by define(), and inflow_flag_comp().

◆ down

std::shared_ptr<amrex::MultiFab> SedimentationFlux::down

◆ dt

amrex::Real SedimentationFlux::dt = 0.0

Referenced by define(), and reset().


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