OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::quality::QualitySolver Class Reference

#include <QualityRouting.hpp>

Collaboration diagram for openswmm::quality::QualitySolver:

Public Member Functions

void init (int n_nodes, int n_links, int n_pollutants)
 
void execute (SimulationContext &ctx, double dt)
 Execute one quality routing timestep.
 
void addWetWeatherLoads (SimulationContext &ctx, double dt)
 Add subcatchment washoff quality loads to node inflows.
 

Member Function Documentation

◆ addWetWeatherLoads()

void openswmm::quality::QualitySolver::addWetWeatherLoads ( SimulationContext ctx,
double  dt 
)

Add subcatchment washoff quality loads to node inflows.

For each subcatchment with runoff, adds the washoff concentration × flow as mass inflow to the outlet node. Matches legacy addWetWeatherInflows() in routing.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

void openswmm::quality::QualitySolver::execute ( SimulationContext ctx,
double  dt 
)

Execute one quality routing timestep.

  1. Accumulate link mass flows → node quality (batch over links)
  2. Complete mixing at nodes: c_new = (c_old*V + W*dt) / (V + Vin)
  3. First-order decay: c = c * (1 - k*dt)
  4. Update link quality from upstream node
Parameters
ctxSimulation context.
dtTimestep (seconds).
Here is the call graph for this function:

◆ init()

void openswmm::quality::QualitySolver::init ( int  n_nodes,
int  n_links,
int  n_pollutants 
)

The documentation for this class was generated from the following files: