XPSWMM to TUFLOW-SWMM

From Tuflow
Revision as of 10:39, 6 February 2024 by Chris Huxley (talk | contribs) (Created page with "= Introduction = This Wiki page outlines recommended steps for conversion of an XPSWMM model to TUFLOW. <br> XPSWMM is a flood and urban stormwater drainage modeling software...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

This Wiki page outlines recommended steps for conversion of an XPSWMM model to TUFLOW.

XPSWMM is a flood and urban stormwater drainage modeling software developed by Autodesk (previously Innovyze and XP Solutions). The XPSWMM solution uses EPA SWMM for its 1D calculations, dynamically linked to TUFLOW for its 2D calculations. The software functions within a custom build Graphical User interface (GUI). During simulation, XPSWMM calls a TUFLOW dynamic library for the 2D calculations. As XPSWMM uses TUFLOW for its 2D engine, XPSWMM and TUFLOW use the same 2D solution and will achieve identical results if configured in a like-for-like way.

Common user feedback suggests the XPSWMM GUI is useful for simple modeling projects; however, it can become cumbersome and inefficient in workflow when dealing with larger datasets and/or a large volume of different scenario and event simulations. In response to requests from USA XPSWMM users who want to convert XPSWMM models into a native TUFLOW format, TUFLOW linkage with 1D EPA Storm Water Management Model (SWMM) was added as a supported feature in TUFLOW 2023-03-AD release. The modeling workflow in TUFLOW differs from XPSWMM, as TUFLOW modeling is integrated with QGIS (Geographical Information System) GIS software. This GIS integration is well-suited for working with larger datasets. Additionally, the structural design associated with TUFLOW modeling makes its general workflow extremely efficient, particularly for the automated management of multiple scenarios and events.


If you are building a TUFLOW SWMM model from scratch, not from XPSWMM, please refer to the TUFLOW SWMM Tutorials. Tutorials are provided for the following topics:


TUFLOW Licensing / XPSWMM Discount

If you are an existing / or past XPSWMM perpetual license owner who would like to purchase a TUFLOW license, please contact sales@tuflow.com. You may be eligible for an XPSWMM / TUFLOW discount in recognition of past royalties Autodesk paid TUFLOW when you purchased an XPSWMM perpetual license.

XPSWMM to TUFLOW Model Conversion

Two Dimensional (2D) Model Elements

XPSWMM writes TUFLOW model files when it pre-processes the model inputs defined in its GUI (prior to the hydraulic calculations). Using default settings, XPSWMM typically writes the TUFLOW files to the 2D\Data folder.

The following sections explain how 2D data can be exported from XPSWMM and/or reconfigured into a format that is more standard of a TUFLOW model. The conversion has been summarized into three steps:

  1. Obtain Digital Terrain Model (DTM) dataset for TUFLOW model.
  2. Use TUFLOW's Processing Tool to configure the XPSWMM written TUFLOW files into a standard TUFLOW folder structure and GIS database format.
  3. Manual optional changes to the TUFLOW control files.


Digital Terrain Model (DTM) Data

XPSWMM reads its 2D DTM data in one of two ways:

  • The DTM data can be directly specified in the '2D Model Settings', or
  • The DTM data can be internally processed by XPSWMM using its terrain tools and DTM builder.

Depending which method is applied to your XPSWMM model, the steps required to convert the model to TUFLOW will vary.

Let's review what method is used:

  1. Open your existing model in XPSWMM.
  2. In the top dropdown menu options, navigate to Configuration >> Job control >> 2D Model Settings. This will open a dialog.
  3. Under '2D Hydraulics Job Control', select 'Surface & Sampling'.
  4. Review the options in the 'Surface' section:

    Video


XPSWMM DTM Preprocessing

If 'Use DTM' was selected, XPSWMM pre-processes its Digital Terrain Model (DTM) into a binary XPTIN elevation dataset for inclusion in the TUFLOW model. XPTIN is a propriety format that can't readily be used in GIS software. For this reason, the following section outlines how to obtain a DTM dataset in a GIS friendly form.

Note: If 'Use DTM' was selected, follow the steps below. Otherwise, do not complete these steps; continue to the Convert XPSWMM Model to Recommended TUFLOW Structure section.


XPSWMM provides two options for preprocessing the DTM to be used in the TUFLOW model, both options are outlined below. As 'Option 1' is straightforward and 'Option 2' is more involved, 'Option 2' is demonstrated in the video below.

Option 1 (recommended) - Use Original Source Elevation Data Imported to XPSWMM:
  1. Locate the original 'Grid' file (.asc or .flt/.hdr format). Save it to the folder where XPSWMM writes the .tcf during its simulation preprocessing. By default, this is the 2D\Data folder.
    If this folder does not exist, either:
    • The XPSWMM model has not run, so the TUFLOW control files have not been created by XPSWMM. Run the XPSWMM model (go to Analyze >> Solve... in top dropdown menu options).
    • Non-default output settings have been specified in XPSWMM. To determine the output location, in the top dropdown menu options, go to Configuration >> Job Control >> 2D Model Settings >> Folder Options. Ensure the following 'Folder Locations' are selected:
    XPSWMM to TUFLOW 2DJobControl FolderOptions Dialog 01c.png

  2. In the top dropdown menu options, navigate to Configuration >> Job control >> 2D Model Settings. This will open a dialog, under '2D Hydraulics Job Control', select 'Surface & Sampling'.
  3. Tick on 'Use grid file for topography' and select '...' to navigate to the Grid file saved in the 2D\Data folder. This file will be read directly into TUFLOW.
  4. Click 'OK' to save the settings.
  5. If these steps worked as expected, skip 'Option 2' and continue to the next section. Otherwise, proceed to 'Option 2'.


Option 2 - Export DTM Data from XPSWMM:
  1. In the XPSWMM Layers panel, under 'Topography', right click on DTM and select 'Export DTM Data'.
    • Input TIN File: Select the relevant XPSWMM Input TIN file.
    • Output File Format: 'ASCII Grid File Format'.
    • Cell Size Value: Choose a suitable DTM resolution. This resolution should be finer than the hydraulic model resolution. Typically, a DTM resolution is 1/10th (or smaller) of the hydraulic model 2D cell size.
  2. Click 'Export'.
  3. Save the file to the folder where XPSWMM writes the .tcf during its simulation preprocessing. By default, this is the 2D\Data folder.
    If this folder does not exist, either:
    • The XPSWMM model has not run, so the TUFLOW control files have not been created by XPSWMM. Run the XPSWMM model (go to Analyze >> Solve... in top dropdown menu options).
    • Non-default output settings have been specified in XPSWMM. To determine the output location, in the top dropdown menu options, go to Configuration >> Job Control >> 2D Model Settings >> Folder Options. Ensure the 'Folder Locations' shown in the image above are selected.
  4. In the top dropdown menu options, navigate to Configuration >> Job Control >> 2D Model Settings. This will open a dialog, under '2D Hydraulics Job Control', select 'Surface & Sampling'.
  5. Tick on 'Use grid file for topography' and select '...' to navigate to the Grid file saved in the 2D\Data folder. This file will be read directly into TUFLOW.
  6. Click 'OK' to save the settings.

    Video


Convert XPSWMM Model to Recommended TUFLOW Structure

When XPSWMM writes its TUFLOW files, it consolidates all the information into a single folder (typically the 2D\Data folder). This is not a standard TUFLOW structure. The standard structure used by the majority of TUFLOW modelers globally includes the following subfolders:

Folder Folder Folder Purpose
TUFLOW Folder Structure.JPG
Folders typically saved to the network within a folder titled TUFLOW
runs TUFLOW Control File(s) (.tcf), the primary file(s) used to run TUFLOW simulations, are saved here.
runs\log TUFLOW simulation log and error/warning message files are written here during a model simulation.
bc_dbase Input boundary condition database(s) and time-series data for 1D and 2D domains are saved here.
model TUFLOW's second level control files (.tgc, .tbc, .tscf, .ecf) are saved here.
model\gis
model\grid
model\mi
model\swmm
GIS layers defining the input spatial datasets are saved here.
Folders typically saved to a computers local drive in a Project folder
results TUFLOW simulation results are written here during a model simulation.
check TUFLOW simulation check files are written here during a model simulation.


To simplify the process of converting the XPSWMM model to the recommended TUFLOW SWMM folder structure, we have created a processing tool. This tool converts the GIS format of the XPSWMM model, creates the recommended TUFLOW folder structure and saves the converted model files to their correct locations. For more information on the processing tool, see Convert TUFLOW Model GIS Format.

  1. Open QGIS. If you do not have QGIS installed:
  2. In QGIS, go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
  3. Go to 'TUFLOW' in the processing tool list and select 'Convert TUFLOW Model GIS Format'. This opens the dialog shown below.
    • TCF: Click '...' and navigate to the XPSWMM .tcf.
    • Output Vector Format: 'GPKG'
    • Output Raster Format: 'GTIFF'
    • Output Profile: Any option can be used. 'ALL IN ONE' is used in this example for model design consistency with the TUFLOW SWMM Tutorials.
    • Output Folder: Click '...' and navigate to an appropriate location to save your TUFLOW model. In this location, create a new folder called TUFLOW and select it.
    • Advanced Parameters:
    • Tick on 'Write empty files'.
    • Output CRS: Select an appropriate Coordinate Reference System (CRS) for the model.
    • Tick on 'Force TUFLOW Directory Structure'.
  4. Click 'Run'.

Note: Update text further here after Ellis updates Plugin

  • TUFLOw Folder
  • SWMM Folder

Video



Clean TUFLOW Control File

In the process of converting a model, the Convert TUFLOW Model GIS Format tool adds commands to control files. While these control files will allow the converted model to run, they have not been structured neatly. To maintain an easy to read and effective model, it is recommended to 'clean up' the TUFLOW control files. This can be done by:

  • Including a title at the beginning of each control file. For example, ! TUFLOW CONTROL FILE (.TCF) defines the model simulation parameters and directs input from other data sources.
  • Adding headings to sections of the control file. For example, ! MODEL INITIALIZATION could be used as a header for the commands required to initialize the TUFLOW SWMM model.
  • Using comments to explain the purpose of commands. For example, Spatial Database == ..\model\gis\1D2D_Urban_001.gpkg  ! Specify the location of the GeoPackage Spatial Database.
  • Using relative file paths to specify the location of various files and layers in the model.

The example below demonstrates how to clean up a TCF.

Emilie, I haven't worked on the text below. You're welcome to write something here if you feel confident doing it




Load TUFLOW Model in QGIS

Load and style the TUFLOW model in QGIS:

  1. Click on the ‘Load TUFLOW Layers from TCF’ symbol from the TUFLOW Plugin toolbar.
    Tuflow plugin load tcf layers.png

  2. Go to the location of the TUFLOW model and navigate to the TUFLOW\runs folder. Select the TCF.
  3. In the Load Layers window, select:
    • Ordering Options: Alphabetical
    • Grouping Options: Group by control file
    • Raster Load Options: Load Normally
  4. Click ‘Open’ and ‘OK’.


Style the layers however you desire. Common steps to do this are:

  1. Click on the ‘Apply TUFLOW Styles to Open Layers’ symbol from the TUFLOW Plugin toolbar.
    Tuflow plugin styles open layers.png

  2. Change the symbology of the DEM:
    • Right click on the DEM file in the QGIS Layers Panel and select 'Properties'.
    • From the Symbology tab, under 'Band Rendering' select the following options:
    • Render type: Singleband pseudocolor
    • Color ramp: Spectral
    • Color ramp: Invert Color Ramp
    • Mode: Equal Interval
    • From the Transparency tab, set the Global Opacity to 75%.
    • Click 'Apply' and 'OK'.

    Video
  3. Create a hillshade of the DEM:
    • Right click on the DEM file in the QGIS Layers Panel and select 'Duplicate Layer'.
    • Right click on the DEM_copy and select 'Rename Layer'. Rename the layer to DEM_Hillshade.
    • Right click on the DEM_Hillshade and select 'Properties'.
    • From the Symbology tab, under 'Band Rendering' select the following options:
    • Render type: Hillshade
    • Z Factor: 3
    • Click 'Apply' and 'OK'.

    Video

Emilie, I haven't worked on the text below. You're welcome to write something here if you feel confident doing it


Tell the user to load the model, style the file and inspect the data.



One Dimensional (1D) SWMM Model Elements

Export 1D EPA SWMM Pipe Network Data from XPSWMM

Convert 1D XPSWMM hydraulics features into a EPA SWMM 5 INP file format for TUFLOW:

  1. In XPSWMM, select 'Hydraulics Mode' from the toolbar.

    XPSWMM to TUFLOW toolbar hydraulics mode 01a.png
  2. From the XPSWMM top dropmenu select File >> Import/Export Data >> Export to EPASWMM5. The exported INP file will be saved to the same folder as the .xp project file.
  3. When prompted to save changes, select 'Yes'.
  4. Rename the exported INP file by adding 'HDR' to the file name. For example, 1D2D_Urban_001.inp > 1D2D_Urban_HDR_001.inp. Copy the renamed INP file into the TUFLOW\model\swmm folder.
  5. In Windows File Explorer, navigate to the TUFLOW\model\swmm folder. Drag and drop the .inp file into QGIS. This will open the GeoPackage - Create from SWMM inp tool from the QGIS Processing Toolbox.
    • SWMM Input File (inp): Pre-populated
    • CRS for GeoPackage: Select and appropriate Coordinate Reference System (CRS) for the model.
    • GeoPackage output filename: Prepopulated to save the output GeoPackage file in the same folder location and with the same name as the SWMM input file.
  6. Click 'Run'. Once the tool is finished, click 'Close'.
  7. A dialog will appear. Select 'Add Layers' to open all vectors within the newly created SWMM GeoPackage file. By default, all items in the available list should have been selected.
  8. In the QGIS Layers panel, move the SWMM GeoPackage file to the top of the list. This will ensure the data within this database file is displayed above all other layers in the project.
  9. Inspect the attributes associated with the various objects in the GeoPackage to familiarize yourself with the data.

    Video


Correct SWMM Nodes--Junction/Outfall Model Design

XPSWMM used a modified version of the EPA SWMM engine. Unlike traditional EPA SWMM networks that require Nodes--Junctions at the upstream end of culverts and Nodes--Outfalls at the outlets, XPSWMM uses Nodes--Junctions in all locations. TUFLOW's implementation of SWMM has retained the traditional EPA SWMM structure. Due to this fundamental difference in approach, some manipulation of the XPSWMM Nodes--Junctions information is necessary.

  1. In the QGIS Layers panel, select (left click) Nodes--Junctions to make it the active dataset.
  2. Go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
  3. Go to TUFLOW >> SWMM in the processing tool list and select 'Junctions - Downstream junctions to outfalls'. This opens the dialog shown below.
    • Input Junctions: Nodes--Junctions (this is prepopulated as Nodes--Junctions is the active dataset).
    • Input Conduits: Click '...' and tick on Links--Conduits
    • Modified Junctions Layer: Leave this field blank so the tool writes the data to a temporary file. It will not be used.
    • Modified Outfalls Layer:
    1. Click '...', select 'Save to GeoPackage...'.
    2. Navigate to the TUFLOW\model\swmm folder and select the GeoPackage file created in the Convert XPSWMM Model to Recommended TUFLOW Structure section. Click 'Save'.
    3. A dialog will open. In the 'Layer Name' field, write Nodes--Outfalls. It is important that this layer is named correctly so it is recognized by the other TUFLOW SWMM processing tools.
    4. Click 'OK'.
  4. Click 'Run'. Once the tool is finished, click 'Close'.
  5. The temporary
    • Layer Name: Nodes--Outfalls
  6. to finish this update step we need to delete the existing Nodes--Junctions where the Nodes--Outfalls have been created. If there are a small number of locations, do this manually. Otherwise, here is a QGIS workflow to make the edit.
    • In the QGIS Layers Panel, select (left click) Nodes--Junctions and toggle on editing.
    • Use the Select Features tool to select all Nodes--Junctions in the layer. The should change colour to a bright yellow when selected.
    • Open the Select Within Distance tool
    • Set the following parameters:
    • Select Features from: Nodes--Junctions
    • By comparing features from: Nodes--Outfalls
    • Where features are within: 0.1 meters
    • Modify current selection by: Selecting within current selection
    • Delete the Nodes--Junctions that remain selected (highlighted yellow).
  7. Toggle off editing for Node--Junctions and save the layer edits.
  8. The new Nodes--Outfalls Layer will not load automatically in the current QGIS session. The data exists, it simply isn't displayed. Either load the layer manually, or close and reopen the entire SWMM GeoPackage file (this approach is demonstrated in the video).


Video

1D/2D Pipe Network Pit (Inlet Usage) Connections

⁠ Inlet usage connections define the 1D/2D linkages between the ground surface, defined in 2D, and the 1D SWMM pipe network. Physically these features come in many forms and dimensions, though are typically referred to as kerb inlets with or without associated grates. An example is shown in the image below.
XPSWMM Kerb Inlet.JPG
Transfer of inlet usage connection information from XPSWMM to TUFLOW requires a three step process:

  • Export of data from XPSWMM.
  • Conversion of the exported data into a TUFLOW SWMM compatible format.
  • Minor edits are required to correct for snapping deficiencies in the XPSWMM export tools.

The following sections provide step by step instructions for these three tasks.

Export Data from XPSWMM

  1. Select the Hydraulics mode in XPSWMM: XPSWMM Hyd Icon 002.png.
  2. Right click Nodes in the layers panel and select Export to GIS File...
    • Enter an appropriate filename in the GIS File field. A common name for this temporary file is, "XPSWMM_Node_Export.shp"
    • Set the file path to the TUFLOW\model\swmm folder.
    • Save as type: ESRI (*.shp)
  3. Expand the selection tree to display: Node data and Results >> Hydraulics Node >> HDR Node Data.
  4. In HDR Node Data select the following items by either double clicking the item, of selecting the entry then clicking the right arrow button XPSWMM Right Arrow Icon 002.png:
    • Node 2D Inflow Capture Flag
    • Ground Elevation (Spill Crest)
    • 2D Inflow Capture Coefficient
    • 2D Inflow Capture Exponent
  5. The items should now be listed in the righthand box. In the Custom Names column shorten the text entries to less than 10 characters. Common abbreviations are NodeIn, Ground, Coeff, Exponent.
  6. Click 'Export'. A Pop-up message will appear reporting how many nodes were exported.

Video

Convert Exported Data into TUFLOW SWMM Format

  1. Open QGIS and load XPSWMM_Node_Export.shp
  2. Left click XPSWMM_Node_Export in the Layers panel to make it the active dataset.
  3. If you closed the Processing Toolbox after the previous model conversion steps, select Processing > Toolbox from the top dropdown menu options.
  4. Select TUFLOW >> SWMM >> Convert - XPSWMM GIS Inlet Layers to SWMM in the processing tool list.
  5. Select the following in the dialog box.
    • GIS Layer with inlet information: XPSWMM_Node_Export (this entry should already be populated if you left clicked the layer before selecting the tool)
    • Inlet Field Name: Node Name
    • Inlet Elevation Field: Ground
    • Inlet 2D capture flag: NodeIn
    • Inlet discharge coeffecient field: Coeff
    • Inlet discharge exponent field: Exponent
    • Inlet connection width: This defines the number of 2D cells associated with the 1D/2D connect. Typically, it is set to match your 2D cell size.
    • CRS: Choose your model's Coordinate Reference System
    • SWMM inp file (for inlet definition and curves):
    • Save to File...
    • Save within the TUFLOW/model/swmm folder
    • Choose an appropriate inp file name (for example: swmm_inlet_curves_XP_001.inp).
    • Geo-Package file for inlet usage (for inlet placement):
    • Save to File...
    • Save within the TUFLOW/model/swmm folder
    • Choose an appropriate gpkg file name (for example:swmm_iu_XP_001.gpkg)
  6. Select 'Run'.
  7. Open swmm_iu_XP_001.gpkg and swmm_inlet_curves_XP_001.gpkg in QGIS. Inspect the attributes associated with the objects in both layers.

Video

Edit TUFLOW SWMM Data

Unfortunately the snapping tolerance set by XPSWMM for its Node GIS Data Export function is greater than the underlying model information it is associated with. This can offset the data by a small distance. We need to correct this error. There is an automated tool to assist (reducing manual effort) for this task.

  1. In the QGIS Layers Panel, select (left click) the swmm_iu_XP_001 layer.
  2. Make the swmm_iu_XP_001 layer editable by clicking the 'Toggle Editing' symbol Toggle editing icon.png.
  3. Go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
  4. In the Processing Toolbox, select the Edit Features In-Place tool Edit features in place icon.png. This allows the editing of an existing layer, instead of the creation of a new layer.
  5. Choose Vector geometry >> Snap geometries to layer and enter the following inputs to the dialog box:
    • Reference Layer (this is the layer we wish to snap to): Nodes--Junctions
    • Tolerance: 0.1 (units = metres)
    • Behaviour: Prefer aligning nodes, insert extra vertices where needed.
  6. Select: Modify All Features
  7. Toggle the editing off for swmm_iu_XP_001 to save the edits.

Video

Create 1D/2D Culvert Connections

In addition to the pipe network inlet usage 1D/2D connections, we also need to connect our 1D culvert inlet/outlets to the 2D. Physically these features are often associated with either culverts under raised road or rail embankment, outlets from pipe networks into creeks, streams or river, or open pipe network inlets and outlets associated with major stormwater drainage infrastructure (modifying historically above ground streamflows to an underground stormwater network). An example is shown in the image below.
XPSWMM Culvert Inlet.JPG
To link a 1D SWMM culvert to the TUFLOW 2D, TUFLOW SWMM requires 1D/2D HX connection lines for the upstream (inlet) end of a culvert and 1D/2D SX connection lines at the downstream (outlet) end. This model schematization is different to TUFLOW ESTRY and also XPSWMM (which require 1D/2D SX connections upstream and downstream), though matches the traditional requirements of EPA SWMM.

  1. In the QGIS Layers Panel, select (left click) Links--Conduits.
  2. Use the 'Select Features' tool to select the culvert and pipe objects in Links--Conduits layer that will have a clear opening (typically under an embankment or from a pipe network to/from a waterway, such as a creek). In XPSWMM, this type of feature is typically represented by Links snapped to Nodes with "Link invert to 2D" selected.
  3. In the Processing Toolbox, go to TUFLOW >> SWMM and select 'BC - Create channel endpoint 1D/2D connections'. This opens the dialog shown below.
    • Input Conduits Layer: Links--Conduits
    • Create connections at: 'Both ends'.
    • Offset Distance: 2
    • Length of BC lines: 10
    • Tick on 'Set 2D cell elevation to 1D culvert invert at 1D/2D connection cells if needed'.
    • Output Layer:
    1. Click the ... and select 'Save to GeoPackage'.
    2. Navigate to the TUFLOW\model\gis folder and select the HDR GPKG you exported from the XPSWMM model during the Convert XPSWMM Model to Recommended TUFLOW Structure step. It should be saved to the TUFLOW/model/swmm folder. Click Save.
    3. A dialog will open. In the Layer name field, write 2d_bc_SWMM_Culvert_Connections_001_L.
    4. Click 'OK'.
  4. Click 'Run'.
  5. Once the tool is finished, click 'Close'.
  6. The 2d_bc_SWMM_Culvert_Connections_001_L appears in the QGIS Layers Panel. Select 'Apply TUFLOW Styles to Current Layer'.
  7. Make the 2d_bc_SWMM_Culvert_Connections_001_L layer editable by clicking the 'Toggle Editing' symbol Toggle editing icon.png.
  8. Review the 2d_bc_SWMM_Culvert_Connections_001_L data. Make corrections by deleting objects in locations where a 1D/2D connection was only needed at one end of the conduit , instead of both ends.
  9. Toggle editing off for 2d_bc_SWMM_Culvert_Connections_001_L to save the edits

Video

SWMM Hydrology

If your XPSWMM model includes EPA SWMM hydrology, the hydrology components can be brought across into TUFLOW SWMM.

  1. Open the XPSWMM model.
  2. Check whether the SWMM Hydrology runoff method has been used in your XPSWMM model by reviewing the selection from the following model settings: Configure >> Mode Properties >> Solver Mode >> Methods
    XPSWMM Hydrology Methods.JPG
  3. Select the Hydraulics mode: XPSWMM Rnf Icon 002.png.
  4. Convert 1D XPSWMM hydraulics features into a EPA SWMM 5 INP file format for TUFLOW:
  5. From the XPSWMM top drop menu select File > Import/Export Data > Export to EPASWMM5
  6. When prompted if you wish to save changes, select Yes.
  7. The exported INP file will be saved to the same folder and .XP project file.
  8. In QGIS in the Processing Toolbox, go to TUFLOW >> SWMM and select GeoPackage Create from SWMM inp. Enter the field below into the dialog box:
    • SWMM Input File (inp): Select the recently exported INP file in the .XP project file.
    • CRS for GeoPackage: Select an appropriate Coordinate Reference System for your model.
    • GeoPackage output filename: Save the file to the TUFLOW\model\swmm folder, add "RNF" to the XP exported filename to distinguish this file from the HDR GeoPackage.
    • Select 'Run'.
  9. Before Opening the RNF GeoPackage file in QGIS we have to delete the Nodes--Junctions Layer within it. It is a duplicate of the Nodes--Junctions Layer contained in the HDR GeoPackage file.
  10. From the QGIS drop menus, Select View > Panels. Tick Browser Panel.
  11. In the Browser Panel view the Layer tree associated with RNF GeoPackage file. Right click Nodes--Junctions Select Manage > Remove Layer
  12. After making the above change, open the RNF GeoPackage file in QGIS and review the attribute data. Note: For hydrology, TUFLOW has more advanced, workflow efficient "Event Scenario Management" options than XPSMM. If your project requires the simulation of multiple hydrology events, please complete TUFLOW SWMM Module 4 (1D SWMM Pipe Network / 1D SWMM Urban Hydrology: Executing multiple different event simulations from a single model control file). and use the model design concepts in it to upgrade the configuration of your TUFLOW model to accommodate for the simulation of multiple events from a single model.

Video

Update SWMM Nodes--Junction Attributes

The final GIS feature update that is necessary to finalise the SWMM portion of the TUFLOW model relates to the Nodes---Junctions attributes. This is typically the final model bulid step because the recommended Junctions attributes varies depending on whether the Junction is associated with inlet usage connections, 1D/2D culvert connections and SWMM hydrology sub-catchments.

  1. In the QGIS Layers Panel, select (left click) Nodes--Junctions and toggle on editing.
  2. In the Processing Toolbox, select the 'Edit Features In-Place' tool. This allows the editing of an existing layer, instead of the creation of a new layer.
  3. Go to TUFLOW >> SWMM in the processing tool list and select 'Junctions - Set attributes ' processing tool. This opens the dialog shown below.
    Dialog Recommended Parameter Value Comment
    Input Subcatchments: Hydrology--Subcatchments Input is optional - only use if Hydrology Subcatchment Layers exist
    Input Inlet Usage Layers: swmm_iu_TS02_001 Input is optional - only use if Inlet Usage Layers exist
    Input BC Connection Layers 2d_bc_SWMM_Culvert_Connections_001_L Input is optional - only use if BC Connection Layers exist
    General Options
    Maximum Depth Option (Ymax) Set to 0.0 -
    Nodes receiving subcatchment flows option
    (if connected to 2D):
    Set Apond = 0.0; Ksur = 0.0
    (overwrites options below)
    -
    Nodes connected to 2D without Inlets: Ysur: 0 -
    Area of ponding: 50 This value should match the 2D cell area associated with 1D/2D culvert connections.
    Nodes connected to the 2D with Inlets: Maximum depth: 'Use global option' -
    Ysur: 0 -
    Area of ponding: 9 This value should match the 2D cell area associated with the Inlet Usage connections
    Nodes without a 2D connection: Surcharge Depth: 99 This entry should equal a value higher than any expected water level in the model
    Area of ponding: 1 -


  4. Select 'Modify All Features'.
  5. Once the tool has finished, click 'Close'.
  6. Turn off editing to save the edits.
  7. View the attributes associated within Nodes--Junctions to verify the data processing has been completed correctly.
    For a summary of the attributes associated with the Nodes--Junctions layer, refer to TUFLOW 2023-03-AD Release Notes (Table A.30) and the SWMM Reference Manual - Volume 2 (Hydraulics).

Video

Export INP Files

Emilie, I haven't worked on the text below. All the INP file need to be exported before they are useed- you're welcome to write something here if you feel confident doing it

Link 1D SWMM and 2D TUFLOW Model

Emilie, I haven't worked on the text below (it was Pavlina's notes)- you're welcome to if you feel confident doing it


The linking is specified in the TUFLOW control files. Further commands can be added in or removed based on the modeling task.

  1. Create TUFLOW SWMM Control File (TSCF):
      Read SWMM == ..\swmm\original_model.inp
      Read SWMM == ..\swmm\inlet_definition.inp.inp
      Read SWMM == ..\swmm\subcatchments.inp
      Read SWMM Inlet Usage == ..\swmm\inlet_usage_information.gpkg

    <<Video>>

  2. Update TUFLOW Boundary Control file (TBC):
    • Add non-inlet 1D/2D links:
      Read GIS BC == ..\gis\2d_bc_1d2d_links.gpkg

    <<Video>>

  3. Update main TUFLOW control file (TCF):
    • Add below commands if applicable:
      Solution Scheme == HPC
      Hardware == GPU
      GIS Format == GPKG
    • Add TSCF command to read the 1D SWMM features:
      SWMM Control File == ..\swmm\SWMM.tscf
    • Add time control comands:
      Start Time == <<start_time>>
      End Time == <<end_time>>
    • Rarely used options to consider removing from the TCF:
      SX ZC Check == OFF
      HX ZC Check == OFF
      Mass Balance Corrector == OFF
    • Remove XPSWMM references:
      Read GIS XP Nodes ==
      Read GIS XP WLL ==
      Read GIS XP NETWORK ==
    • Add scenarios/events if applicable

    <<Video>>


Feedback / Suggestions

If you have any suggestions to be included in these pages, please email support@tuflow.com.


Up
Go-up.png Back to Main Page