OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SurfaceQuality2D.hpp File Reference

S7 (2026-09-19) — cell coverages, buildup, washoff and street sweeping on the 2D overland surface. More...

#include <cstddef>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
#include "../../input/SectionRegistry.hpp"
Include dependency graph for SurfaceQuality2D.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::twoD::SqScopeKey
 
struct  openswmm::twoD::CoverageRow2D
 [2D_COVERAGES] — one row = the whole coverage set of its scope. More...
 
struct  openswmm::twoD::LoadingRow2D
 [2D_LOADINGS] — initial buildup, user mass per unit land area. More...
 
struct  openswmm::twoD::CurbRow2D
 [2D_CURB_LENGTH] — curb length per cell, project length units. More...
 
class  openswmm::twoD::SurfaceQuality2D
 The S7 store: authored rows, resolved per-cell coverages and state, and the per-species ledgers. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Enumerations

enum class  openswmm::twoD::SqScope : int8_t {
  openswmm::twoD::GLOBAL = 0 ,
  openswmm::twoD::TAG = 1 ,
  openswmm::twoD::CELL = 2
}
 Row scope — the [2D_INFILTRATION] / [GW_*] ladder. More...
 

Functions

std::string openswmm::twoD::parse2DCoveragesLine (const std::vector< std::string > &tokens, std::vector< CoverageRow2D > &rows)
 Parse one scoped 2D coverage authoring row.
 
std::string openswmm::twoD::parse2DLoadingsLine (const std::vector< std::string > &tokens, std::vector< LoadingRow2D > &rows)
 Parse one scoped 2D loading authoring row.
 
std::string openswmm::twoD::parse2DCurbLengthLine (const std::vector< std::string > &tokens, std::vector< CurbRow2D > &rows)
 Parse one scoped 2D curb authoring row.
 
void openswmm::twoD::registerSurfaceQualitySections (SurfaceQuality2D &sq, input::SectionRegistry &registry)
 Register [2D_COVERAGES], [2D_LOADINGS], [2D_CURB_LENGTH] writing into sq.
 
std::string openswmm::twoD::formatSqScope (const SqScopeKey &k)
 Scope key ↔ file token ("*", "TAG name", "CELL n" — 1-based).
 
std::string openswmm::twoD::parseSqScope (const std::vector< std::string > &tokens, std::size_t &at, SqScopeKey &key, const char *section)
 Parse a scoped surface-quality row prefix and expose its first payload token.
 

Detailed Description

S7 (2026-09-19) — cell coverages, buildup, washoff and street sweeping on the 2D overland surface.

The subcatchment land-use convention on the mesh: a cell (or a tag, or the whole mesh) names which EXISTING land uses cover it and by what percent; buildup accrues per (cell, land use, surface species) with the land use's own [BUILDUP] function, is swept on the [LANDUSES] schedule, and is washed off by the cell's runoff into the cell's species row — from where it advects to the 1D network with the water. Surface species = pollutants ∪ the reactions component's (MSX) species (BW-MSX), keyed by the transport row layout, so nothing here is pollutant-shaped.

Sections ([2D_*] family in the .inp for v1; scope keys and the 1-based CELL index as [2D_INFILTRATION] / [GW_*]):

[2D_COVERAGES]     scope LANDUSE PERCENT [LANDUSE PERCENT]…
[2D_LOADINGS]      scope SPECIES INITIAL_BUILDUP   (mass / unit area)
[2D_CURB_LENGTH]   scope LENGTH                    (project length units)

scope = * | TAG name | CELL n; GLOBAL < TAG < CELL; a coverage row REPLACES the set for its scope (no merging).

Cell runoff rate (D-A22, revised 2026-09-19): the cell's NET outflow over the runoff step — what left across its faces, open boundary edges and drains to nodes, minus what arrived across faces, from node spills, outfall discharge and inflow boundaries — clamped at zero, per unit area; accumulated by the marcher in SurfaceTransportState::cell_runoff_vol. That is the runoff the cell itself produced (rain excess plus storage release), the cell analogue of the subcatchment step's q = outflow / area: zero on a still pond, zero on a cell that only passes upstream water through, and independent of how finely a plane is meshed. (The gross outward face flux was considered and rejected: it grows with the count of cells upstream, so EMC and RC loads — and EXP's rate — would scale with the mesh.) Defined on triangles and quads alike.

Cadence (D-A26): buildup, washoff and sweeping run at the RUNOFF step, right after the subcatchment surface-quality step, so the two share one calendar (dry days, sweep season); the washoff mass is added to the cell row as a source, which is conservative at any cadence.

Design: plans/transport/OVERLAND_TRANSPORT_HEAT_MSX_PLAN_2026-09-01.md §8 (2026-09-19); program plan D-A22–D-A26.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0