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

Phase A1b body — LEGACY CSTR water-age mirror. More...

#include "WaterAgeLegacy.hpp"
#include <algorithm>
#include <cmath>
#include <vector>
#include "../../../core/SimulationContext.hpp"
#include "../../../quality/NegativeSources.hpp"
#include "../../InitialQualitySeeds.hpp"
Include dependency graph for WaterAgeLegacy.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::transport
 

Functions

void openswmm::transport::routeLegacyAge (SimulationContext &ctx, double dt)
 

Detailed Description

Phase A1b body — LEGACY CSTR water-age mirror.

Formula provenance, line by line, is the pollutant path in QualityRouting.cpp: accumulateLinkLoads (rate convention q·value), mixAtNodes ((c_old·v_old + mass_in)/(v_old + v_in) with the c_max clamp), updateLinkQuality (STEADY / no-flow / zero-volume / volume-balance branches with the DW q_in correction). Deliberate differences, both documented in the header: no evaporation factor (plan §8 — evaporation leaves the mean age unchanged) and no decay (age has none).

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