Difference between revisions of "XPSWMM Conversion TUFLOW Control File (TCF)"

From Tuflow
Jump to navigation Jump to search
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== TUFLOW Control File (TCF) ==
 
== TUFLOW Control File (TCF) ==
The TCF file references all the control files we have worked on in the previous steps. It also defines the model time and output controls.<br>
+
The TCF file references all the control files we have worked on in the previous steps and defines the model time and output controls.<br>
  
In the <u>[[XPSWMM_Conversion_TUFLOW_Structure | Convert XPSWMM Model to Recommended TUFLOW Structure]]</u> section, the <u>[[Convert_TUFLOW_Model_GIS_Format |Convert TUFLOW Model GIS Format]]</u> processing tool utilizes the TUFLOW control files generated by XPSWMM to construct the TUFLOW SWMM model control files. During this process, the tool updates the commands within the TUFLOW control files to align with the requirements of a TUFLOW SWMM model. However, since the original control files were intended for use with XPSWMM, they lack the commands required to execute a TUFLOW simulation. Additionally, these files often contain unnecessary and/or outdated commands.<br>
+
In the <u>[[XPSWMM_Conversion_TUFLOW_Structure | Convert XPSWMM Model to Recommended TUFLOW Structure]]</u> section, the <u>[[Convert_TUFLOW_Model_GIS_Format |Convert TUFLOW Model GIS Format]]</u> processing tool utilized the TUFLOW control files generated by XPSWMM to construct the TUFLOW SWMM model control files. During this process, the tool updates the commands within the TUFLOW control files to align with the requirements of a TUFLOW SWMM model. However, since the original control files were intended for use with XPSWMM, they lack the commands required to execute a TUFLOW simulation. Additionally, these files often contain unnecessary and/or outdated default parameter commands that we recommend removing.<br>
 
 
In the prior sections, the TBC was edited to reflect the model updates implemented during the conversion process, while no updates were necessary for the TGC. However, the TCF requires updating to ensure the TUFLOW SWMM model runs smoothly.
 
 
<ol>
 
<ol>
<li> In Windows File Explorer, navigate to the '''TUFLOW\runs''' folder and open the TCF into a Text Editor (Notepad++ is recommended).
+
<li> In Windows File Explorer, navigate to the '''TUFLOW\runs''' folder and open the TCF (e.g. '''1D2D_Urban_001.tcf''') into a Text Editor (Notepad++ is recommended).
<li> Remove or comment out the following commands. They are either irrelevant to the model or represent default settings in TUFLOW, thus rendering them unnecessary.
+
<li> Remove or comment out the following commands using a '<font color="green"><tt>!</tt></font>' symbol. These commands are either default settings that don't need to be specified or outdated defaults that aren't recommended.
 
{|
 
{|
 
|style="width: 50%"| <font color="blue"><tt>Check MI Save Date </tt></font> <font color="red"><tt>== </tt></font>  
 
|style="width: 50%"| <font color="blue"><tt>Check MI Save Date </tt></font> <font color="red"><tt>== </tt></font>  
Line 13: Line 11:
 
|-
 
|-
 
|<font color="blue"><tt>MI Projection </tt></font> <font color="red"><tt>== </tt></font>
 
|<font color="blue"><tt>MI Projection </tt></font> <font color="red"><tt>== </tt></font>
|<font color="blue"><tt>CSV Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>HOURS </tt></font>
+
|<font color="blue"><tt>CSV Time </tt></font> <font color="red"><tt>== </tt></font>
 
|-
 
|-
 
|<font color="blue"><tt>MI Projection Check </tt></font> <font color="red"><tt>== </tt></font>
 
|<font color="blue"><tt>MI Projection Check </tt></font> <font color="red"><tt>== </tt></font>
|<font color="blue"><tt>Viscosity Formulation </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>SMAGORINSKY </tt></font>
+
|<font color="blue"><tt>Viscosity Formulation </tt></font> <font color="red"><tt>== </tt></font>  
 
|-
 
|-
 
|<font color="blue"><tt>Timestep (s) </tt></font> <font color="red"><tt>== </tt></font>
 
|<font color="blue"><tt>Timestep (s) </tt></font> <font color="red"><tt>== </tt></font>
|<font color="blue"><tt>Viscosity Coefficient </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0.500, 0.050 </tt></font>
+
|<font color="blue"><tt>Viscosity Coefficient </tt></font> <font color="red"><tt>== </tt></font>  
 
|-
 
|-
|<font color="blue"><tt>Cell Wet/Dry Depth </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0.002000 </tt></font>
+
|<font color="blue"><tt>Cell Wet/Dry Depth </tt></font> <font color="red"><tt>== </tt></font>  
 
|<font color="blue"><tt>SX ZC Check </tt></font> <font color="red"><tt>== </tt></font>  
 
|<font color="blue"><tt>SX ZC Check </tt></font> <font color="red"><tt>== </tt></font>  
 
|-
 
|-
Line 39: Line 37:
 
! Original Command
 
! Original Command
 
! Updated Command
 
! Updated Command
|-
 
| style="width: 50%" | <font color="blue"><tt>GPKG Projection </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1D2D_Urban_001_proj</tt></font>
 
| style="width: 50%" | <font color="blue"><tt>GPKG Projection </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>??</tt></font>
 
 
|-
 
|-
 
|<font color="blue"><tt>Write Check Files </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>OFF</tt></font>
 
|<font color="blue"><tt>Write Check Files </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>OFF</tt></font>
Line 50: Line 45:
 
|-
 
|-
 
| <font color="blue"><tt>Log Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>log\Log </tt></font>
 
| <font color="blue"><tt>Log Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>log\Log </tt></font>
|<font color="blue"><tt>Output Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>log</tt></font>
+
|<font color="blue"><tt>Log Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>log</tt></font>
|-
 
| <font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>qVdhZ0 </tt></font>
 
|<font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>q V d h Z0</tt></font>
 
 
|-
 
|-
 
| <font color="blue"><tt>Map Output Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>XMDF </tt></font>
 
| <font color="blue"><tt>Map Output Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>XMDF </tt></font>
 
|<font color="blue"><tt>Map Output Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>XMDF TIF</tt></font>
 
|<font color="blue"><tt>Map Output Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>XMDF TIF</tt></font>
 
|}
 
|}
<li> Add the following commands:<br>
+
<li> Add the following simulation time and output commands:<br>
<font color="blue"><tt>Tutorial Model </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>ON </tt></font> <font color="green"><tt> ! Required command to run this tutorial model licence free</tt></font><br>
 
 
<font color="blue"><tt>GIS Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>GPKG </tt></font> <font color="green"><tt> ! Specify GPKG as the output format for all GIS files</tt></font><br>
 
<font color="blue"><tt>GIS Format </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>GPKG </tt></font> <font color="green"><tt> ! Specify GPKG as the output format for all GIS files</tt></font><br>
<font color="blue"><tt>Solution Scheme </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>HPC </tt></font> <font color="green"><tt> ! Heavily Parallelised Compute, uses adaptive timestepping</tt></font><br>
 
<font color="blue"><tt>Hardware </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>CPU </tt></font> <font color="green"><tt> ! Replace with "Hardware == GPU" if GPU available </tt></font><br>
 
 
<font color="blue"><tt>Start Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0 </tt></font> <font color="green"><tt> ! Specifies the simulation start time (0 hours) </tt></font><br>
 
<font color="blue"><tt>Start Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0 </tt></font> <font color="green"><tt> ! Specifies the simulation start time (0 hours) </tt></font><br>
<font color="blue"><tt>End Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>3 </tt></font> <font color="green"><tt> ! Specifies the simulation end time (3 hours)</tt></font><br>
+
<font color="blue"><tt>End Time </tt></font> <font color="red"><tt>== </tt></font> 2  <font color="green"><tt> ! Specifies the simulation end time (2 hours)</tt></font><br>
 +
<font color="blue"><tt>NetCDF Output Start Date </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 2014-01-01 00:00  </tt></font> <font color="green"><tt>! SWMM start date / time</tt></font><br>
 
<font color="blue"><tt>TIF Map Output Interval </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0 </tt></font> <font color="green"><tt> ! Outputs only maximums for grids</tt></font><br>
 
<font color="blue"><tt>TIF Map Output Interval </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0 </tt></font> <font color="green"><tt> ! Outputs only maximums for grids</tt></font><br>
 +
 
<li> Add the following command to reference the TUFLOW SWMM Control File (TSCF):<br>
 
<li> Add the following command to reference the TUFLOW SWMM Control File (TSCF):<br>
<font color="blue"><tt>SWMM Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\1D2D_Urban_001.tscf</tt></font>
+
<font color="blue"><tt>SWMM Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\1D2D_Urban_001.tscf</tt></font> <font color="green"><tt>! Reference the SWMM (1D) Control File</tt></font>
 +
<li> The following commands are recommended, though optional solver commands. They will convert your CPU Classic model from TUFLOW Classic to TUFLOW HPC and run the simulation using an NVIDIA GPU card. TUFLOW HPC has superior stability compared to TUFLOW Classic. Using the GPU card instead of CPU will typically increase the simulation speed by a factor of between 10 and 50 (depending on the model and computer hardware).<br>
 +
<font color="blue"><tt>Solution Scheme </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>HPC </tt></font> <font color="green"><tt> ! Heavily Parallelized Compute, uses adaptive timestepping</tt></font><br>
 +
<font color="blue"><tt>Hardware </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>GPU </tt></font> <font color="green"><tt> ! Use NVIDIA GPU card for accelerated compute. Set to CPU if GPU is not available </tt></font><br>
 +
 
 +
<li> If you are using our XPSWMM conversion dataset, add the following command so the TUFLOW model can run without requiring a license. This command is not recommended if you are converting any other XPSWMM model.<br>
 +
<font color="blue"><tt>Tutorial Model </tt></font> <font color="red"><tt>== </tt></font> <font color="blue"><tt>ON </tt></font> <font color="green"><tt> ! Required command to run this tutorial model licence free</tt></font>
 +
 
 
<li> Save the TCF.  
 
<li> Save the TCF.  
<br><br>
+
{|class="wikitable"
'''<font color="red> Video </font>'''
+
! Original TCF
 +
! Updated TCF
 +
|- style="vertical-align:top; width: 90%;"
 +
| style="text-align:right;" | [[File: XPSWMM_to_TUFLOW_original_TCF_01a.png]]
 +
| style="text-align:left;" | [[File: XPSWMM_to_TUFLOW_updated_TCF_01b.png]]
 +
|}
 +
</ol>
 
<br>
 
<br>
</ol>
 
  
  
 
{{Tips Navigation
 
{{Tips Navigation
|uplink=[[XPSWMM_to_TUFLOW-SWMM#TUFLOW_Control_File_Updates| Back to XPSWMM to TUFLOW Conversion Page]]
+
|uplink=[[XPSWMM_Conversion_TUFLOW_Control_File_Formatting | Continue to Next Step: "Format TUFLOW Control Files"]]</u>
 +
}}
 +
{{Tips Navigation
 +
|uplink=[[XPSWMM_to_TUFLOW-SWMM#TUFLOW_Control_File_Updates| Back to Main XPSWMM to TUFLOW Conversion Page]]
 
}}
 
}}

Latest revision as of 09:39, 20 August 2024

TUFLOW Control File (TCF)

The TCF file references all the control files we have worked on in the previous steps and defines the model time and output controls.

In the Convert XPSWMM Model to Recommended TUFLOW Structure section, the Convert TUFLOW Model GIS Format processing tool utilized the TUFLOW control files generated by XPSWMM to construct the TUFLOW SWMM model control files. During this process, the tool updates the commands within the TUFLOW control files to align with the requirements of a TUFLOW SWMM model. However, since the original control files were intended for use with XPSWMM, they lack the commands required to execute a TUFLOW simulation. Additionally, these files often contain unnecessary and/or outdated default parameter commands that we recommend removing.

  1. In Windows File Explorer, navigate to the TUFLOW\runs folder and open the TCF (e.g. 1D2D_Urban_001.tcf) into a Text Editor (Notepad++ is recommended).
  2. Remove or comment out the following commands using a '!' symbol. These commands are either default settings that don't need to be specified or outdated defaults that aren't recommended.
    Check MI Save Date == Mass Balance Output Interval (s) ==
    MI Projection == CSV Time ==
    MI Projection Check == Viscosity Formulation ==
    Timestep (s) == Viscosity Coefficient ==
    Cell Wet/Dry Depth == SX ZC Check ==
    Read GIS XP Nodes == SX Storage Approach ==
    Simulations Log Folder == HX ZC Check ==
    Store Maximums and Minimums == Mass Balance Corrector ==
    Mass Balance Output ==
  3. Make the following updates:
    Original Command Updated Command
    Write Check Files == OFF Write Check Files == ..\check\
    Output Folder == ..\results\Output Output Folder == ..\results\
    Log Folder == log\Log Log Folder == log
    Map Output Format == XMDF Map Output Format == XMDF TIF
  4. Add the following simulation time and output commands:
    GIS Format == GPKG  ! Specify GPKG as the output format for all GIS files
    Start Time == 0  ! Specifies the simulation start time (0 hours)
    End Time == 2  ! Specifies the simulation end time (2 hours)
    NetCDF Output Start Date == 2014-01-01 00:00 ! SWMM start date / time
    TIF Map Output Interval == 0  ! Outputs only maximums for grids
  5. Add the following command to reference the TUFLOW SWMM Control File (TSCF):
    SWMM Control File == ..\model\1D2D_Urban_001.tscf ! Reference the SWMM (1D) Control File
  6. The following commands are recommended, though optional solver commands. They will convert your CPU Classic model from TUFLOW Classic to TUFLOW HPC and run the simulation using an NVIDIA GPU card. TUFLOW HPC has superior stability compared to TUFLOW Classic. Using the GPU card instead of CPU will typically increase the simulation speed by a factor of between 10 and 50 (depending on the model and computer hardware).
    Solution Scheme == HPC  ! Heavily Parallelized Compute, uses adaptive timestepping
    Hardware == GPU  ! Use NVIDIA GPU card for accelerated compute. Set to CPU if GPU is not available
  7. If you are using our XPSWMM conversion dataset, add the following command so the TUFLOW model can run without requiring a license. This command is not recommended if you are converting any other XPSWMM model.
    Tutorial Model == ON  ! Required command to run this tutorial model licence free
  8. Save the TCF.
    Original TCF Updated TCF
    XPSWMM to TUFLOW original TCF 01a.png XPSWMM to TUFLOW updated TCF 01b.png



Up
Go-up.png Continue to Next Step: "Format TUFLOW Control Files"
Up
Go-up.png Back to Main XPSWMM to TUFLOW Conversion Page