Tute M06 MI Mod Files

From Tuflow
Jump to: navigation, search

Modify Simulation Control Files and Set-up a TUFLOW Scenario

Now that we have made all of the necessary changes to the GIS layers, we need to update our control files to include the option of modelling the replacement bridge.

TGC File

There have been a number of changes to the geometry to allow for the three bridge modelling approaches:

  • We have created a 2D zshape layer to revise the road crest elevation.
  • We have modified the existing 1D/2D boundary conditions layer
  • We have created 2D zshape layers to remove the road embankment in the area of the new bridge.
  • We have created a 2D layered flow constriction (2d_lfcsh) to model the bridge within the floodplain.

As introduced in Module 5, we are going to use a series of TUFLOW model scenarios to model the new bridge. Section 4.12.2 of the 2010 TUFLOW manual gives a full description of the If Scenario command. In summary, it permits control over which commands are to be applied to the model simulation depending on the scenario or combination of scenarios specified by the user. This permits the user to simulate multiple simulations using a single .tgc and .tcf. For this tutorial we will write the control files such that both the existing 'EXG' scenario and each bridge modelling method can be simulated with the same control files. Open the M05_5m_001.tgc in your text editor or navigate to the correct tab. Save the .tgc file as M06_5m_001.tgc and ensure this .tgc file is open in your text editor. (Ultraedit will automatically open the newly saved file).

We will insert an If Scenario block of commands to differentiate how the active and inactive areas of the model have been defined between the scenarios. Replace the Read GIS Code BC == mi\2d_bc_M04_HX_001.MIF command with the following:

If Scenario == EXG | DEV | FINB1 | FINB3

Read GIS Code BC == mi\2d_bc_M04_HX_001.MIF

Else If Scenario == FINB2

Read GIS Code BC == mi\2d_bc_M06_HX_001.MIF

Else

Pause == Scenario not recognised

End If


Within the existing If Scenario block for the 'DEV' scenario, we will place a command to regrade the road. We will also expand the If Scenario logic block to include commands specific to the 'FINB1', 'FINB2' ad 'FINB3' scenarios that we have created for this module. The entire If Scenario logic block for modifying the topography is as follows:

If Scenario == DEV

Read GIS Z Shape == mi\2d_zsh_M06_Rd_Crest_001.MIF
Read GIS Z Shape == mi\2d_zsh_M05_development_001.MIF

Else If Scenario == FINB2

Read GIS Z HX Line MAX == mi\2d_bc_M06_HX_001.MIF | mi\2d_bc_M06_HX_001_P.MIF

Else If Scenario == FINB3

Read GIS Z Shape == mi\2d_zsh_M06_NorthRd_001.MIF
Read GIS Layered FC Shape == mi\2d_lfcsh_M06_bridge_001.MIF | mi\2d_lfcsh_M06_bridge_001_P.MIF

Else If Scenario == EXG | FINB1

Else

Pause == Scenario not recognised

End If

In the above set of commands, if a scenario other than "DEV", "FINB1", "FINB2", "FINB3" or "EXG" is specified, the Pause command will pause the simulation and output the message Scenario not recognised. Although an optional step, including these commands will ensure that any errors in defining scenarios is captured. This is highly recommended when using nested If Scenario command blocks. Save the file. The geometry file is now ready to be used.

TBC File

To facilitate the differing bridge modelling approaches, we have modified the 1d/2d boundary conditions for bridge modelling approach 2 'FINB2'. Again, we will use scenarios to ensure the correct 1d_2d bc layers are applied. Open M04_5m_001.tbc in your text editor or navigate to the correct tab. Save the .bc file as M06_5m_001.tbc and ensure this .tbc file is open in your text editor. (Ultraedit will automatically open the newly saved file.)

Delete the line Read GIS BC == mi\2d_bc_M04_HX_001.mif from the file.

Add an If/Else If Scenario command block with the following statements:
If Scenario == EXG | DEV | FINB1 | FINB3  !Commands specific to the 'EXG', 'DEV', Bridge Options 1 and 3

Read GIS BC == mi\2d_bc_M04_HX_001.mif

Else If Scenario == FINB2  ! Commands specific to Bridge Option 2 Scenario

Read GIS BC == mi\2d_bc_M06_HX_001.mif

Else

Pause == Scenario not recognised

End If
(Does it matter where the If statement gets put in a TBC file?)
In the above set of commands, if a scenario other than "DEV", "FINB1", "FINB2", "FINB3" or "EXG" is specified, the Pause command will pause the simulation and output the message Scenario not recognised. Although an optional step, including these commands will ensure that any errors in defining scenarios is captured. This is highly recommended when using nested If Scenario command blocks. Save the file. The boundary conditions file is now ready to be used.

ECF File

There have been multiple changes to the 1D control file:

  • We have created a new 1d_nwk layer to model the culverts located elsewhere in the model area that are not at the location of the new bridge.
  • We have created a new 1d_nwk layer to model the 1D domain replacement bridge.
  • We have created a new 1d_nwk layer to model the 1D domain weir.
  • We have created two new 1d_bg layers to read in the bridge/weir cross section and the bridge loss coefficient with height table.

Again we are going to place the new commands specific to the new bridge scenario within an If Scenario command block. Open the M04_1d_001.ecf in your text editor or navigate to the correct tab. Save the .ecf file as M06_1d_001.ecf and ensure this .ecf file is open in your text editor.

Delete or comment out the Read GIS Network == mi\1d_nwk_M04_culverts_001.mif command. Insert an If Scenario command block between the Read GIS Table Links == xs\1d_xs_M04_creek_001.mif and Read GIS BC == mi\1d_bc_M04_001.MIF commands as follows:
If Scenario == FINB1

Read GIS Network == mi\1d_nwk_M06_culverts_001.MIF
Read GIS Network == mi\1d_nwk_M06_bridge_001.MIF
Read GIS Table Links == bg\1d_bg_M06_bridge_001.MIF

Else If Scenario == FINB2

Read GIS Network == mi\1d_nwk_M06_culverts_001.MIF
Read GIS Network == mi\1d_nwk_M06_bridge_001.MIF
Read GIS Network == mi\1d_nwk_M06_weir_001.MIF
Read GIS Table Links == bg\1d_bg_M06_bridge_001.MIF
Read GIS Table Links == bg\1d_bg_M06_weir_001.MIF

Else If Scenario == FINB3

Read GIS Network == mi\1d_nwk_M06_culverts_001.MIF

Else If Scenario == EXG | DEV

Read GIS Network == mi\1d_nwk_M04_culverts_001.MIF

Else

Pause == Scenario not recognised

End If

Save the file. The 1D control file is now ready to be used.

TCF File

We need to save a new .tcf file that includes the option to include scenarios in the simulation and incorporate new .tgc and .ecf files.

  • Firstly, save a copy of the TUFLOW control file created for Module 5 (M05_5m_~s1~_001.tcf) as M06_5m_~s1~_001.tcf.
  • The s1 switch permits simulation of one scenario and s1 will be replaced by the scenario name in all output files (for example, specifying FINB1 will simulate our Bridge Option 1 scenario. Alternatively, specifying EXG will simulate our existing scenario). Tip: There are two methods for including scenarios in your simulation .tcf control file. Refer to Section 4.12.2 of the TUFLOW 2010 manual for details.

  • Update the Geometry Control File == command to M06_5m_001.tgc
  • Update the BC Control File == command to M06_5m_001.tbc
  • Update the ESTRY Control File == command to M06_5m_001.ecf
  • Update the Output Folder == command to ..\results\M06\2d
  • Update the Write Check Files == command to ..\check\2d\

    Conclusion

    You have now setup your run files are are ready to run the model. Please return to the main page of module 6.