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

Water quality routing — batch SoA, numerically identical to legacy. More...

Include dependency graph for QualityRouting.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::quality
 

Functions

bool openswmm::quality::linkTakesUpstreamValue (const SimulationContext &ctx, int link)
 Test whether a link has no mixed conduit water pool.
 
double openswmm::quality::conduitMixingInflow (const SimulationContext &ctx, int link, double dt)
 Calculate a conduit quality mixing inflow from accepted hydraulic balance.
 
bool openswmm::quality::linkIsDry (const SimulationContext &ctx, int link)
 Test the accepted conduit water/depth effective-zero thresholds.
 
bool openswmm::quality::nodeIsReactor (const SimulationContext &ctx, int node)
 Select storage or retained-water node mixing.
 
double openswmm::quality::storageEvapFactor (const SimulationContext &ctx, int node)
 Calculate storage concentration increase from non-LID evaporation.
 
void openswmm::quality::updateUntreatedStorageHrt (SimulationContext &ctx, double dt)
 Advance residence time only for untreated storage nodes under active native reactions.
 
bool openswmm::quality::nodeIsDry (const SimulationContext &ctx, int node, double q_in)
 Test node effective dryness only when mixing inflow is negligible.
 
void openswmm::quality::applyNodeTreatment (SimulationContext &ctx, int j, double dt, double q_raw, const double *cin)
 Resolve one node's compiled co-treatment laws and book accepted pollutant removal.
 

Detailed Description

Water quality routing — batch SoA, numerically identical to legacy.

All quality operations use flat [node*n_pollutants+p] indexing for cache-friendly batch processing. Inner loops are vectorisable.

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