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

Water quality routing — constituent transport, mixing, decay. More...

#include "FvQualityTransport.hpp"
#include <vector>
Include dependency graph for QualityRouting.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmm::quality::QualitySolver
 

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.
 
bool openswmm::quality::nodeIsDry (const SimulationContext &ctx, int node, double q_in)
 Test node effective dryness only when mixing inflow is negligible.
 
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.
 
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.
 

Variables

constexpr double openswmm::quality::ZERO_VOLUME = 0.0353147
 1 liter in ft3
 
constexpr double openswmm::quality::ZERO_DEPTH = 0.003281
 
constexpr double openswmm::quality::LEGACY_ZERO = 1.0e-10
 

Detailed Description

Water quality routing — constituent transport, mixing, decay.

Batch-oriented quality routing:

  1. Batch accumulate link mass flows to downstream nodes (vectorisable)
  2. Batch complete mixing at all nodes
  3. Apply node treatment and owned native kinetics
  4. Mix/update links with evaporation and first-order decay as appropriate
Note
Legacy reference: src/legacy/engine/qualrout.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0