![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
The S7 store: authored rows, resolved per-cell coverages and state, and the per-species ledgers. More...
#include <SurfaceQuality2D.hpp>
Public Member Functions | |
| bool | authored () const noexcept |
| Test whether any coverage, loading or curb authoring row exists. | |
| void | clearRows () |
| Clear all authored coverage, loading and curb-length rows. | |
| std::vector< std::string > | resolve (const SimulationContext &ctx, const MeshData &mesh, const SurfaceTransportState &tr, const SolverOptions2D &opts) |
| Bind the rows to the mesh, the land uses and the transport rows. | |
| bool | active () const noexcept |
| Read whether the last resolution activated mesh surface quality. | |
| void | initState (const SimulationContext &ctx, const MeshData &mesh) |
Seed initial buildup: [2D_LOADINGS] row, else the buildup function at [OPTIONS] DRY_DAYS (legacy landuse_getInitBuildup). | |
| void | step (const SimulationContext &ctx, const MeshData &mesh, SurfaceStateData &state, double dt_runoff, double abs_time, bool is_raining) |
| One runoff step: buildup accrual, washoff into the cell rows, street sweeping. | |
| int | nLandUses () const noexcept |
| Read the resolved land-use count. | |
| int | nSpecies () const noexcept |
| Read the resolved pollutant plus MSX buildup row count, excluding age/temperature. | |
| int | nCells () const noexcept |
| < surface species (rows that build up) | |
| int | rowOf (int s) const noexcept |
Transport row index of surface species s (pollutants first, then MSX). | |
| const std::string & | speciesName (int s) const noexcept |
| Read resolved per-species metadata. | |
| double | coverage (int c, int lu) const noexcept |
| Read one resolved cell/land-use coverage fraction. | |
| double | curbLength (int c) const noexcept |
| Read resolved curb normalization length. | |
| double | buildup (int c, int lu, int s) const noexcept |
| Buildup of species s on land use lu of cell c, user mass per normalizer unit. | |
| double | buildupPerArea (int c, int s) const noexcept |
| Total buildup of species s on cell c per unit land area (user mass / acre or ha) — what the results file reports. | |
| const std::vector< double > & | ledInitBuildup () const noexcept |
| Per-species ledgers, user mass, cumulative. | |
| const std::vector< double > & | ledBuildup () const noexcept |
| Borrow cumulative accrued buildup, including generated storeless-washoff supply per surface species. | |
| const std::vector< double > & | ledWashoff () const noexcept |
| Borrow cumulative net washoff delivered to surface transport after BMP per surface species. | |
| const std::vector< double > & | ledSweeping () const noexcept |
| Borrow cumulative buildup removed by sweeping per surface species. | |
| const std::vector< double > & | ledBmp () const noexcept |
| Borrow cumulative washoff removed by BMP treatment per surface species. | |
| double | mcf (int s) const noexcept |
| Per-species conversion: concentration-mass units → user mass (lbs / kg). | |
| double | runoffVolume (int c) const noexcept |
Cumulative runoff volume (m³) the cell produced (the positive part of its net outflow per step, D-A22) — the q·A·dt the washoff laws saw. | |
| double | wetRunoffVolume (int c) const noexcept |
| …of which on steps fast enough to wash off (legacy MIN_RUNOFF): the volume an EMC washes off at its concentration. | |
Public Attributes | |
| std::vector< CoverageRow2D > | coverage_rows |
| std::vector< LoadingRow2D > | loading_rows |
| std::vector< CurbRow2D > | curb_rows |
The S7 store: authored rows, resolved per-cell coverages and state, and the per-species ledgers.
|
inlinenoexcept |
Read whether the last resolution activated mesh surface quality.
|
inlinenoexcept |
Test whether any coverage, loading or curb authoring row exists.
|
inlinenoexcept |
Buildup of species s on land use lu of cell c, user mass per normalizer unit.
| [in] | c | Valid resolved cell, unchecked. |
| [in] | lu | Valid resolved land-use row, unchecked. |
| [in] | s | Valid resolved buildup species, unchecked. |
|
noexcept |
Total buildup of species s on cell c per unit land area (user mass / acre or ha) — what the results file reports.
| [in] | c | Valid resolved cell when active, unchecked. |
| [in] | s | Valid resolved species when active, unchecked. |
|
inline |
Clear all authored coverage, loading and curb-length rows.
|
inlinenoexcept |
Read one resolved cell/land-use coverage fraction.
| [in] | c | Valid cell [0,nCells()), unchecked. |
| [in] | lu | Valid land use [0,nLandUses()), unchecked. |
|
inlinenoexcept |
Read resolved curb normalization length.
| [in] | c | Valid cell [0,nCells()), unchecked. |
| void openswmm::twoD::SurfaceQuality2D::initState | ( | const SimulationContext & | ctx, |
| const MeshData & | mesh ) |
Seed initial buildup: [2D_LOADINGS] row, else the buildup function at [OPTIONS] DRY_DAYS (legacy landuse_getInitBuildup).
| [in] | ctx | Context with initial dry_days; must match resolved land-use/species identity. |
| [in] | mesh | Matching SI cell areas; all configured cells must be present. |
|
inlinenoexcept |
Borrow cumulative washoff removed by BMP treatment per surface species.
|
inlinenoexcept |
Borrow cumulative accrued buildup, including generated storeless-washoff supply per surface species.
|
inlinenoexcept |
Per-species ledgers, user mass, cumulative.
Borrow cumulative seeded initial buildup per surface species.
|
inlinenoexcept |
Borrow cumulative buildup removed by sweeping per surface species.
|
inlinenoexcept |
Borrow cumulative net washoff delivered to surface transport after BMP per surface species.
|
inlinenoexcept |
Per-species conversion: concentration-mass units → user mass (lbs / kg).
Read resolved per-species metadata.
| [in] | s | Valid surface species index [0,nSpecies()); unchecked. |
|
inlinenoexcept |
< surface species (rows that build up)
Read the resolved mesh-cell count.
|
inlinenoexcept |
Read the resolved land-use count.
|
inlinenoexcept |
Read the resolved pollutant plus MSX buildup row count, excluding age/temperature.
| std::vector< std::string > openswmm::twoD::SurfaceQuality2D::resolve | ( | const SimulationContext & | ctx, |
| const MeshData & | mesh, | ||
| const SurfaceTransportState & | tr, | ||
| const SolverOptions2D & | opts ) |
Bind the rows to the mesh, the land uses and the transport rows.
| [in] | ctx | Prepared land-use, pollutant/MSX, unit-system and subcatchment identity. Parameters are copied; source context must remain compatible for subsequent initialization/steps. |
| [in] | mesh | Prepared SI cell areas/centroids/tags and stable cell identity. |
| [in] | tr | Prepared native transport layout, with pollutant/MSX rows first and matching names. Age/temperature are excluded from buildup rows. |
| [in] | opts | Resolved rainfall ownership and mesh coordinate conversion. RAINFALL_MODE NONE leaves runtime inert after authoring validation; possible subcatchment double-loading emits warning. |
|
inlinenoexcept |
Transport row index of surface species s (pollutants first, then MSX).
Read resolved per-species metadata.
| [in] | s | Valid surface species index [0,nSpecies()); unchecked. |
|
inlinenoexcept |
Cumulative runoff volume (m³) the cell produced (the positive part of its net outflow per step, D-A22) — the q·A·dt the washoff laws saw.
| [in] | c | Valid resolved cell index, unchecked. |
|
inlinenoexcept |
Read resolved per-species metadata.
| [in] | s | Valid surface species index [0,nSpecies()); unchecked. |
| void openswmm::twoD::SurfaceQuality2D::step | ( | const SimulationContext & | ctx, |
| const MeshData & | mesh, | ||
| SurfaceStateData & | state, | ||
| double | dt_runoff, | ||
| double | abs_time, | ||
| bool | is_raining ) |
One runoff step: buildup accrual, washoff into the cell rows, street sweeping.
| dt_runoff | runoff step (s) | |
| abs_time | absolute date-time at the START of the step | |
| is_raining | engine's current-step rainfall flag (sweeping gate) | |
| [in] | ctx | Matching engine land-use schedule, current unit system and external buildup tables. Although const-qualified, external buildup lookups update shared table cursors through const_cast; caller serializes with other cursor users. |
| [in] | mesh | Matching SI cell area array covering nCells(). |
| [in,out] | state | Prepared matching surface transport. Consumes and zeros each cell_runoff_vol, adds native concentration*m3 washoff inventory to cell_mass/gained_washoff and updates this owner's buildup, calendar sweep clocks and cumulative user-mass/runoff ledgers. |
|
inlinenoexcept |
…of which on steps fast enough to wash off (legacy MIN_RUNOFF): the volume an EMC washes off at its concentration.
| [in] | c | Valid resolved cell index, unchecked. |
| std::vector<CoverageRow2D> openswmm::twoD::SurfaceQuality2D::coverage_rows |
| std::vector<CurbRow2D> openswmm::twoD::SurfaceQuality2D::curb_rows |
| std::vector<LoadingRow2D> openswmm::twoD::SurfaceQuality2D::loading_rows |