![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Phase H1 — the LEGACY (CSTR) engine's temperature transport. More...
Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::transport |
Functions | |
| void | openswmm::transport::routeLegacyHeat (SimulationContext &ctx, double dt) |
Phase H1 — the LEGACY (CSTR) engine's temperature transport.
A single-scalar rerun of the CSTR quality stages for __TEMPERATURE__, in the same order the pollutant arrays take — structurally the A1b water-age mirror (WaterAgeModule/WaterAgeLegacy.cpp) with three deliberate differences, each of which is a way a verbatim copy would have been wrong:
max(value, 0) because a negative age is meaningless. Temperatures below 0 °C are ordinary, and flooring them would silently warm every cold-weather model to freezing. The bound here is the physical one: a volume-weighted mean lies between its inputs, so the clamp is two-sided, [min(T_old, T_in), max(T_old, T_in)].Like the age mirror this runs at the END of QualitySolver::execute — it reads the fully accumulated qual_vol_in as its mixing denominator — and writes ONLY heat_state, so HEAT_TRANSPORT ON leaves every pollutant and water-age trajectory bit-identical under LEGACY.