How do I model a gate valve opening and closing based on a logic such as pressure at a pressure transducer (water level in an upstream manhole for example) or based on time (for example open a penstock after a storm).
This can be done using the Explicit (SWMM) numerical solver (selected in your calculation options) with SWMM Control Sets. After selecting the SWMM solver, define a start control structure on your downstream conduit such as an orifice with a particular label that will be referenced in the SWMM controls.
Next, Go to Components > SWMM Extensions > Controls sets. In here you will need to define two control rules; one to set the setting of the orifice to 0 when the level reaches the point when the gate should close, and another to set the setting to 1 when the orifice should be fully open. For example:RULE AIF NODE WW-1 DEPTH <= 0.1THEN ORIFICE OR SETTING = 0}RULE BIF NODE WW-1 DEPTH > 3THEN ORIFICE OR SETTING = 1
Example: a penstock/gate in a pond starts closed and opens up after a storm event, to let the pond's water into the storm drain system:
Example model for the above (need version 10.02.XX.XX or greater to open):
Pond gate penstock SWMM controls.zip
Using SWMM Control Sets in SewerGEMS and CivilStorm
Conduit start/stop control structures