![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Plan D-H5e — the single node/link surface-flux binding. More...
#include "../../../data/HeatOverrideData.hpp"Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::transport |
| namespace | openswmm::transport::heat |
Functions | |
| double | openswmm::transport::heat::netFluxOut (const SimulationContext &ctx, const HeatElement &elem, double t_w) noexcept |
Net outward surface flux at t_w, summed over every enabled module [W/m²]. | |
| void | openswmm::transport::heat::applyHeatFluxes (SimulationContext &ctx, double dt) |
| Apply one step of surface heat exchange to every exchanging node and link. | |
Plan D-H5e — the single node/link surface-flux binding.
One traversal, one net flux, one relaxation. Every enabled flux family contributes to J(T); the element is then stepped once.
applySurfaceExchange then applyRadiativeExchange, called back to back from routeLegacyHeat. Under forward Euler that was harmless — the two increments were linear and added exactly. D-H5d replaced the step with an exponential relaxation, and relaxations do not commute: each sub-step relaxes FULLY toward its own module's equilibrium, so the pair overshoots the true combined one and the result depends on which module ran last. Measured, two equal modules with equilibria at 30 °C and 10 °C, true combined 20 °C, from 5 °C:| k·dt | split | combined |
|---|---|---|
| 4.1e-3 | 5.061317 | 5.061359 |
| 0.41 | 9.700850 | 10.044256 |
| 39.4 | 10.000000 | 20.000000 |
At large k·dt the split lands exactly on the last module's equilibrium — the first module's contribution has been erased.
The general lesson, worth more than this instance: replacing an integrator underneath an existing operator split silently changes what the split means. Forward Euler's linearity was load-bearing and nobody had written that down.
netFluxOut here and cannot acquire a binding of its own — but that sentence once claimed H6's SEDIMENT_EXCHANGE too, and it was wrong: the bed acts on the wetted perimeter (a different area, nonzero exactly when the free surface is zero) and adds a SECOND state variable, so relaxT's fixed equilibrium does not exist for it. H6b therefore steps the water/bed pair as ONE coupled relaxation (BedExchange.hpp) inside this file's link loop — coupled rather than sequential for exactly the D-H5e reason above.