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 "../../../quality/QualityRouting.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)
 Advance age seconds through legacy node/conduit mixing without altering pollutants.
 

Variables

constexpr double openswmm::transport::ZERO_DEPTH
 
constexpr double openswmm::transport::LEGACY_ZERO
 

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 (the findStorageQual / findNodeQual dispatch, the volume-balance mix with the c_max clamp and the dry-node rule), updateLinkQuality (the non-conduit shortcut, findSFLinkQual's node1, the DW volume-change inflow and the dry-link rule). Those rules are ASKED for through the shared predicates in QualityRouting.hpp rather than re-derived here — four hand-copies had already drifted apart. 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
Apache-2.0