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

Phase R4 body — LEGACY quality engine reaction binding. More...

#include "ReactionLegacyBinding.hpp"
#include "../../../quality/QualityRouting.hpp"
#include <cmath>
#include <string>
#include <vector>
#include "../../../core/SimulationContext.hpp"
#include "ReactionIntegrator.hpp"
#include "ReactionGeometry.hpp"
#include "../../../hydrology/LidNode.hpp"
Include dependency graph for ReactionLegacyBinding.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::transport
 

Functions

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.
 
bool openswmm::transport::legacyReactionsActive (const SimulationContext &ctx)
 Test configured and compiled native reaction readiness.
 
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.
 

Detailed Description

Phase R4 body — LEGACY quality engine reaction binding.

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