OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::twoD::SubsurfaceState Struct Reference

Per-cell resolved parameters and state (SoA). More...

#include <SubsurfaceData.hpp>

Collaboration diagram for openswmm::twoD::SubsurfaceState:

Public Member Functions

void resize (int n, int m)
 
double storage () const noexcept
 Total water in both zones (m³) — the continuity check's storage term.
 

Public Attributes

int n_cells = 0
 
int m_layers = 0
 σ layers per closure-B column (fixed)
 
std::vector< double > Ks
 
std::vector< double > zs
 
std::vector< double > theta_s
 
std::vector< double > theta_r
 
std::vector< double > alpha
 
std::vector< double > psi_b
 
std::vector< double > lambda
 
std::vector< double > vg_n
 
std::vector< double > vg_L
 
std::vector< double > c_loss
 
std::vector< int8_t > soil_char
 SoilChar.
 
std::vector< int8_t > closure
 GwClosure, AUTO already resolved.
 
std::vector< double > area
 cell planimetric area (m²)
 
std::vector< double > z_bed
 aquifer bottom elevation (m) = cell z − zs
 
std::vector< double > hg
 saturated thickness (m)
 
std::vector< double > hu
 
std::vector< double > theta_sigma
 
std::vector< double > q0_last
 recharge (m/s), + down, − capillary rise
 
std::vector< double > qnode_last
 node exchange (m³/s), + into the pipe
 
std::vector< double > qlat_last
 net lateral Darcy into the cell (m³/s)
 
std::vector< double > qdeep_last
 deep loss (m/s)
 
std::vector< double > qet_last
 subsurface ET (m/s, ≥ 0 out)
 
std::vector< double > dunne_last
 saturation-excess to the surface (m³/s)
 
std::vector< double > qplus_last
 infiltration delivered in (m/s)
 
std::vector< double > dt_cell
 min(Δt_g, Δt_u) per cell (s)
 
std::vector< uint8_t > tier
 
std::vector< double > eacc_L
 
std::vector< double > eacc_R
 
std::vector< double > xacc_from_surface
 
std::vector< double > xacc_to_surface
 
std::vector< double > nacc
 
double led_recharge = 0.0
 unsat → sat (negative = capillary rise)
 
double led_lateral = 0.0
 net lateral Darcy across the domain edge
 
double led_deep = 0.0
 deep percolation out
 
double led_node = 0.0
 node exchange, + out of the aquifer
 
double led_dunne = 0.0
 saturation excess to the surface
 
double led_caprise = 0.0
 capillary rise (the negative recharge share)
 
double led_et = 0.0
 subsurface ET out
 
double led_infil_in = 0.0
 q⁺ delivered from the surface
 
double led_init_storage = 0.0
 
double led_final_storage = 0.0
 
bool active = false
 the kernel ran this simulation
 

Detailed Description

Per-cell resolved parameters and state (SoA).

Sized to the mesh cell count at initialize. Under MODE PER_SUBCATCH the "mesh" is one degenerate cell per subcatchment and every lateral term is absent — the identical code path, which is what makes G1 and G2 the same kernel.

Member Function Documentation

◆ resize()

void openswmm::twoD::SubsurfaceState::resize ( int n,
int m )

◆ storage()

double openswmm::twoD::SubsurfaceState::storage ( ) const
noexcept

Total water in both zones (m³) — the continuity check's storage term.

Member Data Documentation

◆ active

bool openswmm::twoD::SubsurfaceState::active = false

the kernel ran this simulation

◆ alpha

std::vector<double> openswmm::twoD::SubsurfaceState::alpha

◆ area

std::vector<double> openswmm::twoD::SubsurfaceState::area

cell planimetric area (m²)

◆ c_loss

std::vector<double> openswmm::twoD::SubsurfaceState::c_loss

◆ closure

std::vector<int8_t> openswmm::twoD::SubsurfaceState::closure

GwClosure, AUTO already resolved.

◆ dt_cell

std::vector<double> openswmm::twoD::SubsurfaceState::dt_cell

min(Δt_g, Δt_u) per cell (s)

◆ dunne_last

std::vector<double> openswmm::twoD::SubsurfaceState::dunne_last

saturation-excess to the surface (m³/s)

◆ eacc_L

std::vector<double> openswmm::twoD::SubsurfaceState::eacc_L

Lateral Darcy side accumulators, one pair per unique GW edge — the same ±ΔV strategy as the surface facc_L_/facc_R_, which is what makes cross-tier conservation a property inherited rather than re-proved (G-B).

◆ eacc_R

std::vector<double> openswmm::twoD::SubsurfaceState::eacc_R

◆ hg

std::vector<double> openswmm::twoD::SubsurfaceState::hg

saturated thickness (m)

◆ hu

std::vector<double> openswmm::twoD::SubsurfaceState::hu

closure A: bulk unsat storage (m of water)

◆ Ks

std::vector<double> openswmm::twoD::SubsurfaceState::Ks

◆ lambda

std::vector<double> openswmm::twoD::SubsurfaceState::lambda

◆ led_caprise

double openswmm::twoD::SubsurfaceState::led_caprise = 0.0

capillary rise (the negative recharge share)

◆ led_deep

double openswmm::twoD::SubsurfaceState::led_deep = 0.0

deep percolation out

◆ led_dunne

double openswmm::twoD::SubsurfaceState::led_dunne = 0.0

saturation excess to the surface

◆ led_et

double openswmm::twoD::SubsurfaceState::led_et = 0.0

subsurface ET out

◆ led_final_storage

double openswmm::twoD::SubsurfaceState::led_final_storage = 0.0

◆ led_infil_in

double openswmm::twoD::SubsurfaceState::led_infil_in = 0.0

q⁺ delivered from the surface

◆ led_init_storage

double openswmm::twoD::SubsurfaceState::led_init_storage = 0.0

◆ led_lateral

double openswmm::twoD::SubsurfaceState::led_lateral = 0.0

net lateral Darcy across the domain edge

◆ led_node

double openswmm::twoD::SubsurfaceState::led_node = 0.0

node exchange, + out of the aquifer

◆ led_recharge

double openswmm::twoD::SubsurfaceState::led_recharge = 0.0

unsat → sat (negative = capillary rise)

◆ m_layers

int openswmm::twoD::SubsurfaceState::m_layers = 0

σ layers per closure-B column (fixed)

◆ n_cells

int openswmm::twoD::SubsurfaceState::n_cells = 0

◆ nacc

std::vector<double> openswmm::twoD::SubsurfaceState::nacc

Node-exchange accumulator, per coupled node (m³), booked at tier-0 node-head sampling and gathered at the GW cell's firing.

◆ psi_b

std::vector<double> openswmm::twoD::SubsurfaceState::psi_b

◆ q0_last

std::vector<double> openswmm::twoD::SubsurfaceState::q0_last

recharge (m/s), + down, − capillary rise

◆ qdeep_last

std::vector<double> openswmm::twoD::SubsurfaceState::qdeep_last

deep loss (m/s)

◆ qet_last

std::vector<double> openswmm::twoD::SubsurfaceState::qet_last

subsurface ET (m/s, ≥ 0 out)

◆ qlat_last

std::vector<double> openswmm::twoD::SubsurfaceState::qlat_last

net lateral Darcy into the cell (m³/s)

◆ qnode_last

std::vector<double> openswmm::twoD::SubsurfaceState::qnode_last

node exchange (m³/s), + into the pipe

◆ qplus_last

std::vector<double> openswmm::twoD::SubsurfaceState::qplus_last

infiltration delivered in (m/s)

◆ soil_char

std::vector<int8_t> openswmm::twoD::SubsurfaceState::soil_char

◆ theta_r

std::vector<double> openswmm::twoD::SubsurfaceState::theta_r

◆ theta_s

std::vector<double> openswmm::twoD::SubsurfaceState::theta_s

◆ theta_sigma

std::vector<double> openswmm::twoD::SubsurfaceState::theta_sigma

Closure B: layer water content θ, [layer * n_cells + cell] — layer-major so a fixed-layer sweep walks contiguous cells and vectorizes ACROSS columns (the σ pivot's key win over the draft's per-cell MOC column).

◆ tier

std::vector<uint8_t> openswmm::twoD::SubsurfaceState::tier

assigned tier

◆ vg_L

std::vector<double> openswmm::twoD::SubsurfaceState::vg_L

◆ vg_n

std::vector<double> openswmm::twoD::SubsurfaceState::vg_n

◆ xacc_from_surface

std::vector<double> openswmm::twoD::SubsurfaceState::xacc_from_surface

Cross-domain accumulator: volume (m³) the SURFACE booked for this GW cell at the surface's finer cadence, gathered at the GW firing.

◆ xacc_to_surface

std::vector<double> openswmm::twoD::SubsurfaceState::xacc_to_surface

…and the reverse: volume the GW cell owes the surface twin (Dunne, exfiltration), gathered by the surface cell.

◆ z_bed

std::vector<double> openswmm::twoD::SubsurfaceState::z_bed

aquifer bottom elevation (m) = cell z − zs

◆ zs

std::vector<double> openswmm::twoD::SubsurfaceState::zs

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