![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Kinematic wave routing solver — batch-oriented design. More...
Go to the source code of this file.
Classes | |
| class | openswmm::kinwave::KWSolver |
| Kinematic wave solver state. More... | |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::hydstruct |
| namespace | openswmm::kinwave |
Functions | |
| double | openswmm::kinwave::getLinkInflow (SimulationContext &ctx, hydstruct::StructureSolver *structures, int j, double dt) |
| Flow into the upstream end of a link under Steady/Kin. Wave routing. | |
| void | openswmm::kinwave::updateStorageState (SimulationContext &ctx, hydstruct::StructureSolver *structures, const std::vector< int > &order, int pos, int i, double dt) |
| Update a storage node's depth & volume by successive approximation. | |
| void | openswmm::kinwave::finishRouting (SimulationContext &ctx, hydstruct::StructureSolver *structures, const std::vector< int > &order, const std::vector< char > &storage_updated, const std::vector< double > &link_y1, const std::vector< double > &link_y2, double dt) |
| End-of-step node/link state for tree-layout routing (KW/steady). | |
Variables | |
| constexpr double | openswmm::kinwave::WX = 0.6 |
| Distance weighting factor. | |
| constexpr double | openswmm::kinwave::WT = 0.6 |
| Time weighting factor. | |
| constexpr double | openswmm::kinwave::EPSIL = 0.001 |
| Newton convergence tolerance. | |
Kinematic wave routing solver — batch-oriented design.
Port of legacy kinwave.c, restructured for data-oriented execution:
1. **Batch geometry** — uses XSectGroups to pre-compute section
factors for all conduits before solving
2. **Per-conduit Newton** — the continuity equation solve is
inherently per-conduit (each converges independently), but
conduits are grouped by shape so the section-factor evaluations
within Newton can also be batched per group
3. **Batch state update** — inlet/outlet areas and flows updated
for all conduits in contiguous sweeps
Weighted finite-difference scheme:
WX = 0.6 (space weighting)
WT = 0.6 (time weighting)