![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Explicit next-timestep computation for the new engine. More...
#include <algorithm>#include <cmath>Go to the source code of this file.
Classes | |
| class | openswmm::hydraulics::TimestepController |
| Static utility class for explicit timestep computation. More... | |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::hydraulics |
Explicit next-timestep computation for the new engine.
The TimestepController implements the explicit timestep formula:
The legacy SWMM engine (src/solver/routing.c, routing_execute()) uses a fixed routing step and then interpolates simulation state to hit output time boundaries. This means the output values are not computed at exact output times — they are interpolated.
The new engine instead:
This is more physically correct (no interpolation artifacts) and also simplifies the output writing code (no interpolation logic needed).
The main simulation loop uses TimestepController as follows: