OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
DynamicWave.hpp File Reference

Dynamic wave routing solver — batch-oriented St. Venant equations. More...

#include "XSectBatch.hpp"
#include "../data/NodeData.hpp"
#include "../data/LinkData.hpp"
#include <vector>
Include dependency graph for DynamicWave.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::dynwave::DWNodeState
 
class  openswmm::dynwave::DWSolver
 Dynamic wave solver — operates on entire link/node system. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::dynwave
 

Enumerations

enum class  openswmm::dynwave::SurchargeMethod : int {
  openswmm::dynwave::EXTRAN = 0 ,
  openswmm::dynwave::SLOT = 1 ,
  openswmm::dynwave::DYNAMIC_SLOT = 2
}
 Surcharge method: EXTRAN (classic) or SLOT (Preissmann). More...
 

Variables

constexpr double openswmm::dynwave::OMEGA = 0.5
 Picard under-relaxation.
 
constexpr double openswmm::dynwave::DEFAULT_HEADTOL = 0.005
 Convergence tolerance (ft)
 
constexpr int openswmm::dynwave::DEFAULT_MAXTRIALS = 8
 Max Picard iterations.
 
constexpr double openswmm::dynwave::MAXVELOCITY = 50.0
 Velocity limiter (ft/s)
 
constexpr double openswmm::dynwave::MINTIMESTEP = 0.001
 Minimum timestep (s)
 
constexpr double openswmm::dynwave::EXTRAN_CROWN_CUTOFF = 0.96
 EXTRAN surcharge fraction.
 
constexpr double openswmm::dynwave::SLOT_CROWN_CUTOFF = 0.985257
 Preissmann slot crown cutoff.
 
constexpr double openswmm::dynwave::SLOT_WIDTH_FACTOR = 0.001
 Slot width = y_full * this factor.
 

Detailed Description

Dynamic wave routing solver — batch-oriented St. Venant equations.

Port of legacy dwflow.c + dynwave.c, restructured for batch execution:

     **Per Picard iteration:**
     1. **Batch geometry** — XSectGroups pre-computes a1[], a2[], aMid[],
        rMid[], wMid[] for ALL conduits simultaneously (shape-grouped,
        SIMD-vectorisable)
     2. **Batch momentum** — friction slope, head gradient, inertial terms
        computed as array operations over pre-computed geometry (no xsect
        dispatch in the inner loop)
     3. **Scatter** — link flows transferred to node inflow/outflow
     4. **Node depth update** — per-node (Picard convergence check)

     Uses theta-implicit scheme with Preissmann slot for surcharge,
     inertial damping based on Froude number, and under-relaxation.
Note
Legacy reference: src/legacy/engine/dwflow.c, dynwave.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License