![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Phase R4 — reaction binding for the LEGACY (CSTR) quality engine. More...
#include <limits>Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::transport |
Functions | |
| bool | openswmm::transport::legacyReactionsActive (const SimulationContext &ctx) |
| Test configured and compiled native reaction readiness. | |
| void | openswmm::transport::ensureMsxState (SimulationContext &ctx) |
| Lazily size + seed the MSX element state; warn once about the R4b transport limitation when any RATE MSX species exists in either scope (LEGACY only — under LARD the species ride the segments as of L3). | |
| void | openswmm::transport::noteNegativeClamp (SimulationContext &ctx, const char *where) |
| Review A2: one warning per run when the reaction step had to clamp a negative concentration. The LEGACY binding also books the mass the clamp added (msx_ledger.clamped); the other engines report it here only. | |
| double | openswmm::transport::clampRateSpecies (const ReactionData &rx, bool tank, double *block, double *added) |
| Floor negative RATE species only and optionally report each concentration addition. | |
| void | openswmm::transport::reactSpeciesBlock (SimulationContext &ctx, bool tank, double dt, double *species_block, const double *pollut, double hrt_seconds, double temp_c, int element) |
| React one LARD-owned tuple with held HRT/temperature and optional element geometry. | |
| void | openswmm::transport::reactLegacyNodes (SimulationContext &ctx, double dt) |
| Run legacy-bound exact pollutant decay and native node kinetics once. | |
| void | openswmm::transport::reactLegacyLinks (SimulationContext &ctx, double dt) |
| Run legacy-bound exact pollutant decay and native link kinetics once. | |
| void | openswmm::transport::warnIfLegacyBindingBypassed (SimulationContext &ctx) |
| Warn when configured compiled reactions are bypassed by IGNORE_QUALITY. | |
Phase R4 — reaction binding for the LEGACY (CSTR) quality engine.
When a reactions component is configured:
(1 − k·dt) to the EXACT exponential exp(−k·dt) at nodes and links (the "kdecay-as-RATE" semantics realized in closed form — pollutant decay is exactly first-order, so the integrator would only approximate what the exponential IS). Bit-parity holds when NO reactions component is present: the legacy applyDecay / in-mix decay paths are untouched then.