OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::hydstruct Namespace Reference

Classes

struct  OrificeGroup
 
struct  OutletGroup
 
struct  PumpGroup
 
class  StructureSolver
 
struct  WeirGroup
 

Functions

bool flapGateBlocks (const SimulationContext &ctx, int j, int n1, int n2, double q)
 Is flow through link j blocked by a flap gate?
 

Variables

constexpr double GRAVITY = 32.2
 
constexpr double FUDGE = 0.0001
 

Function Documentation

◆ flapGateBlocks()

bool openswmm::hydstruct::flapGateBlocks ( const SimulationContext & ctx,
int j,
int n1,
int n2,
double q )

Is flow through link j blocked by a flap gate?

Mirrors legacy link_setFlapGate (link.c:646-673), which applies TWO independent tests and is called from all four link-flow paths (dwflow.c:332 for conduits, link.c:1895/2303/2697 for orifice/weir/outlet):

  1. The link's OWN gate ([LOSSES] col 5, or the Gated column on an orifice/weir/outlet) blocks flow opposing links.direction.
  2. A gated OUTFALL on the link's INFLOW end blocks any flow that would leave that outfall and enter the network — regardless of whether the link itself carries a gate.

Test (2) is why this must be a shared predicate rather than an inline has_flap_gate check: three structure kernels previously implemented only test (1), so a tide gate modelled as a gated outfall with an orifice or weir on it admitted reverse flow.

Parameters
qSigned flow (or a bare direction indicator — magnitude and units are irrelevant, only the sign is read).
Here is the call graph for this function:

Variable Documentation

◆ FUDGE

double openswmm::hydstruct::FUDGE = 0.0001
constexpr

◆ GRAVITY

double openswmm::hydstruct::GRAVITY = 32.2
constexpr