![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Kinematic wave solver state. More...
#include <KinematicWave.hpp>
Public Member Functions | |
| void | init (int n_conduits, const XSectGroups &groups) |
| void | setLinkOrder (const std::vector< int > &sorted_links) |
| Set topological link order (must be called after init, before first execute). | |
| int | execute (SimulationContext &ctx, double dt) |
| Route all conduits for one KW timestep. | |
| int | solveConduit (int idx, const XSectParams &xs, double q_full, double a_full, double s_full, double beta, double length, double dt, double loss_rate) |
| Per-conduit Newton solve. Returns iteration count. | |
Public Attributes | |
| std::vector< int > | sorted_links_ |
| Topological link order (upstream → downstream) | |
| std::vector< double > | q1_ |
| Previous inlet flow (cfs) | |
| std::vector< double > | a1_ |
| Previous inlet area (ft2) | |
| std::vector< double > | q2_ |
| Previous outlet flow (cfs) | |
| std::vector< double > | a2_ |
| Previous outlet area (ft2) | |
| std::vector< double > | q_in_ |
| Inflow to each conduit (cfs) | |
| std::vector< double > | a_in_ |
| Inlet area from inflow (ft2) | |
| std::vector< double > | q_out_ |
| Computed outflow (cfs) | |
| std::vector< double > | a_out_ |
| Outlet area from Newton solve (ft2) | |
| std::vector< double > | sf_in_ |
| Section factor at inlet. | |
Kinematic wave solver state.
Holds SoA working arrays for all conduits. Allocated once at init. The execute() method routes all conduits for one timestep.
| int openswmm::kinwave::KWSolver::execute | ( | SimulationContext & | ctx, |
| double | dt | ||
| ) |
Route all conduits for one KW timestep.
| ctx | Simulation context (links/nodes modified in place). |
| dt | Timestep (seconds). |
| void openswmm::kinwave::KWSolver::init | ( | int | n_conduits, |
| const XSectGroups & | groups | ||
| ) |
Initialise for n conduit-type links. Call once after model is built. Builds topological link order for upstream → downstream processing.
|
inline |
Set topological link order (must be called after init, before first execute).
| int openswmm::kinwave::KWSolver::solveConduit | ( | int | idx, |
| const XSectParams & | xs, | ||
| double | q_full, | ||
| double | a_full, | ||
| double | s_full, | ||
| double | beta, | ||
| double | length, | ||
| double | dt, | ||
| double | loss_rate | ||
| ) |
Per-conduit Newton solve. Returns iteration count.
| std::vector<double> openswmm::kinwave::KWSolver::a1_ |
Previous inlet area (ft2)
| std::vector<double> openswmm::kinwave::KWSolver::a2_ |
Previous outlet area (ft2)
| std::vector<double> openswmm::kinwave::KWSolver::a_in_ |
Inlet area from inflow (ft2)
| std::vector<double> openswmm::kinwave::KWSolver::a_out_ |
Outlet area from Newton solve (ft2)
| std::vector<double> openswmm::kinwave::KWSolver::q1_ |
Previous inlet flow (cfs)
| std::vector<double> openswmm::kinwave::KWSolver::q2_ |
Previous outlet flow (cfs)
| std::vector<double> openswmm::kinwave::KWSolver::q_in_ |
Inflow to each conduit (cfs)
| std::vector<double> openswmm::kinwave::KWSolver::q_out_ |
Computed outflow (cfs)
| std::vector<double> openswmm::kinwave::KWSolver::sf_in_ |
Section factor at inlet.
| std::vector<int> openswmm::kinwave::KWSolver::sorted_links_ |
Topological link order (upstream → downstream)