#include <HydStructures.hpp>
◆ computeAllFlows()
| void openswmm::hydstruct::StructureSolver::computeAllFlows |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double * | node_new_surf_area = nullptr ) |
Evaluate grouped pumps, orifices, weirs and outlets in type order.
Pumps run first, then orifices/weirs, then outlets. Only orifices add node surface area; weirs retain a group diagnostic area but do not scatter it. Does not add link flows to node inflow/outflow accumulators or reset all dqdh fields before each type; sequential DW routing uses computeNonConduitFlowOne instead.
- Parameters
-
| [in,out] | ctx | Borrowed resolved native node/link/subtype/curve stores; links flow/depth/class/dqdh and selected table cursors may change. Caller serializes evaluation. |
| [in] | dt | Positive routing seconds used for pump donor limits. |
| [in,out] | node_new_surf_area | Optional writable n_nodes ft2 accumulator. Pump evaluation reads donor area; orifices add eligible endpoint area; NULL skips those effects. |
◆ computeNonConduitFlowOne()
| void openswmm::hydstruct::StructureSolver::computeNonConduitFlowOne |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double * | node_new_surf_area, |
|
|
int | link_idx ) |
Evaluate one sequential nonconduit or DUMMY link using current node accumulators.
DUMMY conduit passes upstream inflow+overflow/divider split, subject to setting and flow limit. Other valid mapped types reset dqdh then dispatch one type-group row. Caller must scatter resulting link flow/derivative to node accumulators before evaluating a later structure, preserving shared-wet-well ordering. No generic rollback or finite/input validation.
- Parameters
-
| [in,out] | ctx | Borrowed resolved native node/link/subtype/curve stores; links flow/depth/class/dqdh and selected table cursors may change. Caller serializes evaluation. |
| [in] | dt | Positive routing seconds for pump/storage donor limits. |
| [in,out] | node_new_surf_area | Optional writable n_nodes ft2 accumulator. Pump evaluation reads donor area; orifices add eligible endpoint area; NULL skips those effects. |
| [in] | link_idx | Valid global link index selected from nonConduitIndices; ordinary conduits must not be passed. |
◆ init()
Build per-type structure groups and global sequential-dispatch maps.
Copies pump curves/thresholds, raw weir/outlet coefficients and selected geometry, derives effective orifice/weir lengths max(200ft,2*routingStep*sqrt(g*y_full)), and includes DUMMY conduits in the nonconduit index list. Missing/nonpump pump curves select ideal behavior. Does not evaluate flows or validate all authoring; allocation can leave partial caches. Reinitialize after cached authoring/topology edits.
- Parameters
-
| [in,out] | ctx | Borrowed resolved model with valid subtype rows/endpoints and geometry; pump curve_type is written back to its relational store. |
◆ nonConduitIndices()
| const std::vector< int > & openswmm::hydstruct::StructureSolver::nonConduitIndices |
( |
| ) |
const |
|
inlinenoexcept |
Get pre-built list of all non-conduit link indices.
◆ scatterHeldSurfArea()
| void openswmm::hydstruct::StructureSolver::scatterHeldSurfArea |
( |
SimulationContext & | ctx, |
|
|
double * | node_new_surf_area, |
|
|
int | link_idx ) |
Scatter a bypassed orifice's retained area using current flow classification.
Uses the previous computed orifice area; half at each end except storage/critical-end suppression. Does not reevaluate opening, flow or depth; other structure types contribute no held area.
- Parameters
-
| [in] | ctx | Borrowed native endpoints/node types/link class; no hydraulic values are mutated. |
| [in,out] | node_new_surf_area | Optional writable n_nodes ft2 accumulator; NULL no-op. |
| [in] | link_idx | Valid global link index; nonorifices, absent mapped rows or negative endpoints skip. |
◆ updatePumpTargetSettings()
| void openswmm::hydstruct::StructureSolver::updatePumpTargetSettings |
( |
SimulationContext & | ctx | ) |
|
Apply pump startup/shutoff hysteresis once before step iterations.
For each valid upstream node resets target to current setting, then turns on/off at strict positive startup/shutoff thresholds. Does not immediately write setting or compute flow; computePumpFlowK adopts target. Repeating after depths change within Picard iterations changes the intended hysteresis timing.
- Parameters
-
| [in,out] | ctx | Borrowed current start-of-step node depths ft and pump setting/target columns. |
◆ openswmm::SWMMEngine
| friend class openswmm::SWMMEngine |
|
friend |
The documentation for this class was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydraulics/HydStructures.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydraulics/HydStructures.cpp