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

Overland transport S1 — per-cell species MASS on the 2D surface. More...

#include <cstddef>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for SurfaceTransportState.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::twoD::SurfaceTransportState
 
struct  openswmm::twoD::SurfaceTransportState::BoundaryQualityRow
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Detailed Description

Overland transport S1 — per-cell species MASS on the 2D surface.

Species are carried as mass, not concentration (D-2DT1). The 2D solver's integrated state is SurfaceStateData::volume, with depth and head reconstructed from it each step; a concentration state would have to be reconstructed against a volume that itself moves, and the two would disagree at every wet/dry transition. Mass is what the flux form conserves, and it makes drying trivial: a cell that empties keeps what it held.

Layout is SPECIES-MAJOR, [s * n_cells + c], matching ArdEngine's cell_phi so the two engines' kernels read alike.

What S1 carries, and what it does not
S1 rows are the [POLLUTANTS] species only, [0, np). Water age, temperature and MSX rows arrive with S4 and take the same row convention the 1D engines use (pollutants, MSX, age, temperature). n_species is therefore whatever the router sizes it to, and no code in the marcher knows what a row MEANS — it moves mass.
Sources in S1
Water arriving through rainfall, a boundary inflow, or the 1D→2D coupling arrives at zero concentration in S1. Water LEAVING through infiltration, a boundary outflow, or the 2D→1D drain leaves at the cell's concentration and its mass is booked to a ledger, so nothing is destroyed silently. Evaporation removes volume and no mass — the concentration rises — which is the up-concentration the 1D path gets wrong (KD1's open residual) and the 2D path gets right from the start. Source concentrations (rain concentration, boundary species, the coupling tuple) are S2/S3; the ledger rows below are what those phases will consume.
See also
plans/transport/OVERLAND_TRANSPORT_HEAT_MSX_PLAN_2026-09-01.md
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0