Q: Can you please give me an example of how to use operating controls on Sluice Gate?
We also recommend the 2013-12 release notes(http://www.tuflow.com/Download/TUFLOW/Releases/2013-12/Doc/TUFLOW%20Release%20Notes.2013-12.pdf). Page 23
We've put together a small example on Sluice gate controls below.
This example builds on the data provided Tutorial module2.
(1) Make the layer
After loading 1d_nwk_M02_culverts_001 into your GIS package of choice, save copy (I'm calling mine 1d_nwk_M02_culverts_operational_002).
On the northern most set of culverts make the following changes (See figure 1)
ID: FC01.2_SG Change the ID for clarity
Type: SGO Type "SG" for sluice gate with an added "O" to make it operational
Inlet_Type Sluice Test The control ID for the structure, used to link the structure to the logic block
Save and export your file.
(2) Write the logic
Create a new file in the runs directory called Sluice_gate.toc
Add the following lines:
Define Sluice Gate Control == SluiceTest
! Default Settings
Gate Height Fully Open == 1.0 !Optional, sets the height of the open gate
Period Opening/Closing ==1 !Time taken to fully open or close (hours)
Gate Opening == Close !start with gate closed
!Define User variables
h_US == H2D 293286 6178179.75 ! 2D Water Level Upstream of the Gate (at specified X and Y)
if h_US > 41.0 !If the US water level is greater than 41.0 then open the gate
Gate Opening == Open
else ! Else, close the gate
Gate Opening == Close
A few notes of interest:
Multiple structures can refer to this logic block, just reference 'SluiceTest' in the 1d_nwk file like the previous
Note that there was a change from the 2013-12 documentation, as detailed
(3) Update .tcf and run
Save a new version of the .tcf file for M02 and make to following changes in the 1D domain block:
Update the reference to the 1d_nwk file: Read GIS Network == ..\model\mi\1d_nwk_M02_culverts_Operational_002.mif
Add a link to your newly created .toc file: Read Operating Controls File == sluice_gate.toc
Run your new .tcf
(4) Review results
To review the results of your operational structure, use the 1d_O.csv in the results\M02\1D\csv folder (see figure 2)
Here you will see that the gate status is closed until the trigger level of 41.0m AHD is reached at the X, Y location set in the .toc file. The gate then opens for 1 hour as specified buy the period in the logic block. The gate remains open while the level is greater than 41.0m AHD at the specified location, until it closes again.