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

#include <SurfaceTransportState.hpp>

Collaboration diagram for openswmm::twoD::SurfaceTransportState:

Classes

struct  BoundaryQualityRow
 

Public Member Functions

bool signedRow (int s) const noexcept
 
int rowIndex (std::string_view name) const noexcept
 
bool active () const noexcept
 
void resize (int n_spec, int n_tri, int n_coupling_points)
 
void clear ()
 
std::size_t idx (int s, int c) const noexcept
 
double concentration (int s, int c, double volume_m3, double dry_volume_m3) const noexcept
 
double totalIncludingLedgers (int s) const noexcept
 

Public Attributes

int n_species = 0
 rows carried; 0 ⇒ transport is off everywhere
 
int n_cells = 0
 
int n_pollut = 0
 
int n_msx = 0
 
int age_row = -1
 
int temp_row = -1
 
std::vector< std::string > row_names
 
std::vector< double > cell_mass
 
std::vector< double > lost_infiltration
 left through the bed
 
std::vector< double > lost_boundary
 left through an open edge
 
std::vector< double > lost_coupling
 
std::vector< double > exch_mass
 
std::vector< double > exch_spill
 
std::vector< double > rain_conc
 
std::vector< double > bc_conc
 
std::vector< BoundaryQualityRowbc_quality_rows
 
long dispersion_limiter_binds = 0
 
std::vector< double > gained_rainfall
 
std::vector< double > gained_boundary
 
std::vector< double > gained_coupling
 
std::vector< double > coupling_src
 

Member Function Documentation

◆ active()

bool openswmm::twoD::SurfaceTransportState::active ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ clear()

void openswmm::twoD::SurfaceTransportState::clear ( )
inline

◆ concentration()

double openswmm::twoD::SurfaceTransportState::concentration ( int s,
int c,
double volume_m3,
double dry_volume_m3 ) const
inlinenoexcept

Reported concentration — derived, never stored. dry_volume_m3 is the hydraulics' own dry threshold expressed as a volume; below it the cell holds its mass and reports 0 rather than dividing by a vanishing volume (the 2D analogue of the 1D dryness guard).

Here is the call graph for this function:

◆ idx()

std::size_t openswmm::twoD::SurfaceTransportState::idx ( int s,
int c ) const
inlinenoexcept
Here is the caller graph for this function:

◆ resize()

void openswmm::twoD::SurfaceTransportState::resize ( int n_spec,
int n_tri,
int n_coupling_points )
inline

◆ rowIndex()

int openswmm::twoD::SurfaceTransportState::rowIndex ( std::string_view name) const
inlinenoexcept

◆ signedRow()

bool openswmm::twoD::SurfaceTransportState::signedRow ( int s) const
inlinenoexcept

The temperature row is SIGNED (°C below zero is a state, not an error): every "mass ≥ 0" guard in the marcher and the queue must skip it. Age and every concentration row are non-negative.

◆ totalIncludingLedgers()

double openswmm::twoD::SurfaceTransportState::totalIncludingLedgers ( int s) const
inlinenoexcept

Total mass of one species over the surface + every ledger — the quantity the S1 conservation gate asserts is invariant.

Member Data Documentation

◆ age_row

int openswmm::twoD::SurfaceTransportState::age_row = -1

◆ bc_conc

std::vector<double> openswmm::twoD::SurfaceTransportState::bc_conc

[bc_slot * n_species + s] concentration carried by INFLOW through a non-WALL boundary edge, from [2D_BOUNDARY_QUALITY]. Sized by the solver to its own bc_cell_ list at initialize; empty ⇒ inflow arrives clean. Outflow always leaves at the cell's concentration.

◆ bc_quality_rows

std::vector<BoundaryQualityRow> openswmm::twoD::SurfaceTransportState::bc_quality_rows

◆ cell_mass

std::vector<double> openswmm::twoD::SurfaceTransportState::cell_mass

[s * n_cells + c] species mass in the cell's water, in the species' own mass units (concentration units × m³, so a report divides by the SI cell volume and needs no further conversion).

◆ coupling_src

std::vector<double> openswmm::twoD::SurfaceTransportState::coupling_src

[s * n_cells + c] species mass-rate DENSITY (conc · m/s) riding the positive coupling_flux an outfall scatters onto its cells, so a cell gains coupling_src · area · dt beside the volume coupling_flux · / area · dt. Sized by the router when transport is active and outfall points exist; empty ⇒ outfall discharge arrives clean. The junction spill does NOT use this — it is booked live in the marcher from the node's concentration.

◆ dispersion_limiter_binds

long openswmm::twoD::SurfaceTransportState::dispersion_limiter_binds = 0

Times the explicit dispersive exchange on a face was capped to keep the pair from crossing (the max-principle limiter). Nonzero means the dispersion is under-resolved at the marcher's dt on that face — a modelling signal, not an error, and the reason it is counted rather than hidden.

◆ exch_mass

std::vector<double> openswmm::twoD::SurfaceTransportState::exch_mass

[k * n_species + s] species mass drained through coupling point k this advance (m³·conc, + = 2D→1D). Reset with exch_ per advance; S3's tuple reads it into the node's qual_mass_in.

◆ exch_spill

std::vector<double> openswmm::twoD::SurfaceTransportState::exch_spill

[k] spill VOLUME (m³, 1D→2D side only) through coupling point k this advance. Volume, not mass — it exists for the mass bookkeeping: the volume queue NETS a window's flip-flop while exch_mass holds the drain GROSS, and the router pairs min(spill, drain) of the spill against the queued mass at the node's concentration so a mixed-sign window hands the node mass and water in the same ratio. The net-negative remainder is the part the node's own volume drop removes at the mixed concentration (the plan's §2.1 argument, now scoped to exactly that remainder). Reset with exch_mass.

◆ gained_boundary

std::vector<double> openswmm::twoD::SurfaceTransportState::gained_boundary

◆ gained_coupling

std::vector<double> openswmm::twoD::SurfaceTransportState::gained_coupling

S3: what came in through the 1D→2D coupling (junction spill at the node's published concentration, outfall discharge at the outfall's).

◆ gained_rainfall

std::vector<double> openswmm::twoD::SurfaceTransportState::gained_rainfall

Source ledgers (per species, m³·conc, cumulative) so the continuity statement can close: what came in through rain and boundaries.

◆ lost_boundary

std::vector<double> openswmm::twoD::SurfaceTransportState::lost_boundary

left through an open edge

◆ lost_coupling

std::vector<double> openswmm::twoD::SurfaceTransportState::lost_coupling

left through the 1D↔2D exchange

◆ lost_infiltration

std::vector<double> openswmm::twoD::SurfaceTransportState::lost_infiltration

left through the bed

◆ n_cells

int openswmm::twoD::SurfaceTransportState::n_cells = 0

◆ n_msx

int openswmm::twoD::SurfaceTransportState::n_msx = 0

◆ n_pollut

int openswmm::twoD::SurfaceTransportState::n_pollut = 0

◆ n_species

int openswmm::twoD::SurfaceTransportState::n_species = 0

rows carried; 0 ⇒ transport is off everywhere

◆ rain_conc

std::vector<double> openswmm::twoD::SurfaceTransportState::rain_conc

[s] concentration carried by rainfall — [POLLUTANTS] rain concentration, set by the router. Empty ⇒ rain arrives clean (S1).

◆ row_names

std::vector<std::string> openswmm::twoD::SurfaceTransportState::row_names

Row names in row order (pollutant ids, MSX ids, __WATER_AGE__, __TEMPERATURE__) — what the HDF5 species attribute and the [2D_INITIAL_QUALITY]/[2D_BOUNDARY_QUALITY] resolvers key on.

◆ temp_row

int openswmm::twoD::SurfaceTransportState::temp_row = -1

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