OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
KinematicWave.cpp File Reference

Kinematic wave routing — batch-oriented, numerically identical to legacy. More...

#include "KinematicWave.hpp"
#include "XSectBatch.hpp"
#include "../core/SimulationContext.hpp"
#include "../core/UnitConversion.hpp"
#include "HydStructures.hpp"
#include "Node.hpp"
#include "Divider.hpp"
#include <cmath>
#include <algorithm>
Include dependency graph for KinematicWave.cpp:

Namespaces

namespace  openswmm
 
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).
 

Detailed Description

Kinematic wave routing — batch-oriented, numerically identical to legacy.

The solver is structured as:

  1. Gather inflows for all conduits
  2. Batch-compute inlet areas from inflows (via section factor inversion)
  3. Per-conduit Newton solve for outlet area (grouped by shape where possible)
  4. Batch-compute outflows from outlet areas (via section factor)
  5. Scatter results back to global link arrays
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0