![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
LARD (Lagrangian ARD) quality engine — X2: LTD transport core. More...
#include <algorithm>#include <cmath>#include <limits>#include <cstdint>#include <vector>#include "../../core/SimulationContext.hpp"#include "../../transport/InitialQualitySeeds.hpp"#include "../NegativeSources.hpp"#include "../QualityRouting.hpp"#include "../../transport/components/ReactionModule/ReactionLegacyBinding.hpp"#include "../../transport/TransportPolicy.hpp"#include "RwptDispersion.hpp"#include "SegmentStore.hpp"#include "../../core/UnitConversion.hpp"#include "../../hydraulics/Node.hpp"#include "../../transport/components/HeatFluxModules/BedExchange.hpp"#include "../../transport/components/HeatFluxModules/HeatFluxes.hpp"#include "../../transport/components/HeatFluxModules/HeatOverrides.hpp"#include "../../transport/components/HeatFluxModules/SolarRadiation.hpp"#include "../../transport/components/HeatFluxModules/SurfaceExchange.hpp"Go to the source code of this file.
Classes | |
| struct | openswmm::lard::SpeciesRowLayout |
| The segment store's species-row layout, computed in ONE place. More... | |
| class | openswmm::lard::LagrangianSolver |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::lard |
Functions | |
| SpeciesRowLayout | openswmm::lard::rowLayout (const SimulationContext &ctx) |
Variables | |
| constexpr double | openswmm::lard::kTinyFlow = 1.0e-8 |
| cfs; below this a link moves nothing | |
LARD (Lagrangian ARD) quality engine — X2: LTD transport core.
Subplan X2 (plans/transport/LARD_AGE_EXPEDITE_SUBPLAN_2026-08-23.md; strategy plans/LAGRANGIAN_QUALITY_STRATEGY.md §2/§4, §16 amendments D-L1/D-L2/D-L5 binding). X3a: [OPTIONS] QUALITY_STEP splits each routing step into equal transport substeps (strategy §4.2) — flows are frozen within the routing step, so refining dtq refines transport ALONE, which is what the dt-reference instrument leans on; MAX_SEGMENTS_PER_LINK sizes the slabs. Both keys warn when set under other engines.
Step orchestration (§4.2, trimmed to X2 scope):
links.volume and the volume change is booked, never rescaled away (the E2 unbooked-resync family).qual_mass_in rate × dt, qual_vol_in volume — assembled by QualitySolver::assembleExternalLoads, the ARD precedent). Zero-volume links (pump/orifice/weir/outlet) pass the node's NEW concentration through in the same step — the reason the order is topological (§4.3, Davis et al.).links.volume exactly; §4.5 merge tolerance collapses plug flow.qual_routing_reacted.links.conc = volume-weighted segment mean (so engine-side final-storage and outfall bookings are exact), then conc_old = conc (the ARD convention).X4: water age rides the segments as species row np — exact aging (+dt on every live parcel and node store BEFORE transport, the routeLegacyAge convention), volume-weighted mixing through the same drain/mix/release phases, sources from node_age_vol_in (the D-UT10 parallel accumulator, all seven loader pathways), state published to water_age_state (seconds), no decay on the age row, and the dry-link state keeps aging (the A2b state/report separation).
X3b: [OPTIONS] DISPERSION RWPT activates resolved vertical-shear dispersion on the segments (RwptDispersion.hpp, D-X3b1: particles estimate inter-segment exchange, carry no mass themselves), keyed by the deterministic RWPT_SEED (D-L6). Runs on the substep's final field, conduits only.
Deliberately NOT here: reactions module binding (deferred L3), heat (H7 — does not advance under this dispatch and the open() warning says so), treatment interop (warned bypass), storage mixing models beyond CMSTR, the legacy evaporation up-concentration factor (recorded deviation — steady gates cannot see it; parity work owns it), D-NS1's clamp counter/warning (the max(0,·) floor is here, but its observer — a negative source reaching a node — only exists once X6 lands negative loads in the shared loaders).
Header-only for the same reason X1 was: the engine source glob lacks CONFIGURE_DEPENDS, and a patch-applied .cpp silently does not compile.