#include <HydStructures.hpp>
|
| void | init (SimulationContext &ctx) |
| |
| void | computeAllFlows (SimulationContext &ctx, double dt, double *node_new_surf_area=nullptr) |
| | Compute flow for all non-conduit links (batch by type).
|
| |
| void | updatePumpTargetSettings (SimulationContext &ctx) |
| | Evaluate pump startup/shutoff depth hysteresis. Must be called ONCE per timestep BEFORE the DW iteration loop, matching legacy link_setTargetSetting() timing.
|
| |
| const std::vector< int > & | nonConduitIndices () const noexcept |
| | Get pre-built list of all non-conduit link indices.
|
| |
| void | computeNonConduitFlowOne (SimulationContext &ctx, double dt, double *node_new_surf_area, int link_idx) |
| | Compute flow for ONE non-conduit link (per-link sequential path). PARITY: legacy findLinkFlows (dynwave.c:383-398) processes non-conduits one at a time in link-index order with an immediate updateNodeFlows() scatter, so a later structure (e.g. the second pump on a shared wet well) sees the earlier one's flow in the node accumulators. Callers must scatter the resulting links.flow/dqdh to the node accumulators BEFORE computing the next link.
|
| |
| void | scatterHeldSurfArea (SimulationContext &ctx, double *node_new_surf_area, int link_idx) |
| | Scatter the HELD surface area of a bypassed non-conduit link (legacy updateNodeFlows runs for bypassed links too, adding the previous iteration's Link.surfArea1/2). Only orifices carry a non-zero held area (weirs/pumps/outlets contribute none).
|
| |
◆ computeAllFlows()
| void openswmm::hydstruct::StructureSolver::computeAllFlows |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double * | node_new_surf_area = nullptr ) |
Compute flow for all non-conduit links (batch by type).
For each type group:
- Gather upstream/downstream heads from node arrays
- Batch compute flow using type-specific equation
- Scatter flow + dQ/dH back to link arrays
- Parameters
-
| ctx | Simulation context. |
| dt | Timestep (seconds). |
| node_new_surf_area | Per-node surface area from the DW solver's xnode buffer. Read by computePumpFlows (pump flow-limiter, matching legacy getModPumpFlow) and written by computeWeirFlows (weir surface-area scatter, matching legacy findNonConduitSurfArea). Pass nullptr to skip both (pump falls back to MIN_SURFAREA; weir scatter is skipped). |
◆ computeNonConduitFlowOne()
| void openswmm::hydstruct::StructureSolver::computeNonConduitFlowOne |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double * | node_new_surf_area, |
|
|
int | link_idx ) |
Compute flow for ONE non-conduit link (per-link sequential path). PARITY: legacy findLinkFlows (dynwave.c:383-398) processes non-conduits one at a time in link-index order with an immediate updateNodeFlows() scatter, so a later structure (e.g. the second pump on a shared wet well) sees the earlier one's flow in the node accumulators. Callers must scatter the resulting links.flow/dqdh to the node accumulators BEFORE computing the next link.
◆ init()
◆ 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 the HELD surface area of a bypassed non-conduit link (legacy updateNodeFlows runs for bypassed links too, adding the previous iteration's Link.surfArea1/2). Only orifices carry a non-zero held area (weirs/pumps/outlets contribute none).
◆ updatePumpTargetSettings()
| void openswmm::hydstruct::StructureSolver::updatePumpTargetSettings |
( |
SimulationContext & | ctx | ) |
|
Evaluate pump startup/shutoff depth hysteresis. Must be called ONCE per timestep BEFORE the DW iteration loop, matching legacy link_setTargetSetting() timing.
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