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):
- The link's OWN gate ([LOSSES] col 5, or the
Gated column on an orifice/weir/outlet) blocks flow opposing links.direction.
- 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
-
| q | Signed flow (or a bare direction indicator — magnitude and units are irrelevant, only the sign is read). |