xpswmm/xpstorm Resource Center xps

Fully two-dimensional (2D) models have been widely used for modeling river and coastal hydraulics and recently have become a viable practical option for modeling urban floods. As a stormwater management tool, 2D models are more accurate and produce results that are far more readily accepted and understood by managers, decision makers, and other stakeholders.

The application has incorporated a 2D hydrodynamic simulation engine into a user-friendly graphical interface which walks you through preprocessing of input data, calculation of the model, and displaying model results.

In this tutorial, a 2D component is added to one-dimensional (1D) river model developed in the previous tutorial. 2D objects are added as polylines and polygons. 2D job control parameters are set and the model is solved. Animations of velocity and water depth are displayed.

  • Create a 2D flow model in a flood plain
  • Link the 2D model to a 1D river model
  • Solve the 1D/2D linked model
  • Display animations of 2D results as vectors and maps
Time1.5 hour
Data files

  1. Launch the program.
    1. At the opening dialog, open the 1D model in file 1D-2D_Flooding.xp.
    2. Save your file as 1D-2D_Flooding01.xp.
  2. Define the 2D GRID extents:

    A 2D model can include multiple Grid Extents (Domains). The 2D domain(s) should not extend beyond the area covered by the DTM (1D domain or network can extend even beyond DTM).

    1. In the Layer Control Panel, select the Grid Extents layer. Check the visible box and make sure the layer is not locked.
    2. With the name highlighted, select the Polygon tool from the object creation toolbar. A drawing polygon will appear next to the cursor.

    3. Draw a polygon that defines the extent of the 2D domain by clicking and dragging the mouse. Click once to add a vertex.
    4. Double-click to complete the polygon. When the polygon is completed, a rectangular grid will be displayed.
    5. You can edit the display properties of the 2D domain and 2D Grids by right-clicking the 2D Grid layer and accessing the Properties option.
    6. Under the Extent Boundary section, set the Line Size to and change the Extent Cells Line Color to Red
    7. Click OK to exit. 

      One polygon drawing technique is to “rough in” the area with a few vertices. Then edit the polygon by adding and adjusting the vertices. After a polygon is selected, it may be edited by three techniques:

    • Move the cursor over a vertex. It will appear as a four-arrowed cross . Hold the left button down, drag the vertex to a new location and release. 

    • Right-click over the polygon and select Insert Vertex from the menu. A red dot will appear next to the cursor. Move the cursor over the polygon boundary. The cursor will appear as a box with arrows moving inward. Click once to add a vertex. The vertex may be moved by dragging it to the new location. Move to another location on the boundary to add a new vertex. Click once in the interior of the polygon to exit the Add Vertex mode. 
    • Move the cursor over a vertex. It will appear as a four-arrowed cross. Right-click and select Delete Vertex from the menu. The polygon will be redrawn.

  3. Set the 2D Grid size:
    1. In the Layers Control Panel, select the Grid Extents layer and right-click. Select Properties.
    2. In the Line Properties section, set the Grid Step Size to 15 ft
    3. Select the box for Show 2D Cell Center Elevation
    4. Click OK to exit. 

  4. Define the 2D Landuse. 
    1. To access the landuse categories, they must first be entered in the Global Database. In the Configuration menu, select Global Data.
    2. In the left panel, select 2D Landuse from Data Base Type.
    3. Type in “Grass” and click the Add button. A new Global Database record Grass will be created. 
    4. Click Edit.

    5. In the Manning's Roughness section, click the Constant radio button and set roughness to 0.05

      Note that you can have variable Manning’s roughness values in the databases. If you click the Variable roughness radio button, you can enter the Depth vs Roughness values for the database. This is a useful tool for entering the roughness of natural streams which are essentially variable with the depth of flow.


    6. Click OK twice to return to the network view. 


  5. Set the 2D Model Job Control Parameters:
    1. In the Configuration menu, select Job Control > 2D Model Settings
    2. Select the box next to 2D Model Active.
    3. Select Grass as the Default Landuse Category
    4. Set the 1D/2D Sync timestep to 2 seconds. In this example, you only need to edit the settings on the General branch of the tree.

  6. Define the 1D open channel extents. The area that is modeled with 1D cross sections excluded from the 2D model. Because this area lies within the 2D Area Extent, it must be defined as an Inactive 2D area. 
    1. Construct a polygon that runs along the top of each bank from Node1 to Node5
    2. To enhance viewing, adjust the display settings. Right-click the Rivers layer and select Display Label Off. Toggle the display of the DTM and Background Images layers. 

    3. In the Layer Control Panel, right-click the 2D Model layer and select Add New Layer > Inactive Areas.

    4. Name the layer Layer1.
    5. Select the visible box and make sure that this new layer is not locked.
    6. With the layer name highlighted, select the Polygon tool from the object creation toolbar. Construct the polygon using the procedures described in Step 2.

    7. Alternatively, to save time, you can import the inactive 2D area from the GIS (Shape or Mapinfo) files:
      1.  Right-click the Inactive 2D Area layer and select Import from GIS File option. 

      2. Browse for the file 2D_Inactive_Area.shp, select Open, and Import.

  7. Define the 1D/2D interface:
    The boundary between the 1D and 2D layers is represented as a polyline. As with other 2D layers, you must right-click the 2D Model to add this layer. 
    1. In the Layers Control Panel, right-click 2D Model and select Add New Layer > 1D/2D Interfaces.

    2. Name it 1D/2D Interface layer. 
    3. Select the visible box and make sure that the layer is not locked. 
    4. With the layer name highlighted, select the Polyline tool from the object creation toolbar. Make sure that Snap Mode button in the top toolbar is on. 
    5. Construct two polylines along the border between the Inactive 2D area and the Active 2D Grid along the left and right banks.

  8. Define the 1D/2D connections. The 1D and 2D areas of the model are linked to polylines from 1D nodes to vertices of the 1D/2D interface. Add this layer and use the default name.
    1. In the Layers Control Panel, right-click 2D Model layer and then select Add New Layer > 1D/2D Connections.

    2. Select the visible box and make sure that the layer is not locked.
    3. With the layer name highlighted, select the Polyline tool from the object creation toolbar.
    4. Construct a polyline from each node to the nearest vertex of the 1D/2D interface. Make sure that there is a connection for each end of the 1D/2D interface.

  9. Link the 1D node to 2D.
    1. Double-click a node to open the Node Data Dialog.
    2. Select the box next to Link River Crest to 2D.
    3. Click OK to return to the network view. Repeat for the remaining nodes.

  10. Define the 2D Head Boundary. In the default setting, a vertical wall is assumed at the edge of the Active Grid domain. This will cause water to accumulate at the downstream edge of the 2D model. To allow water to exit the flooded area, a head boundary needs to be added to the model. Head boundaries are represented as polylines and must be located on an edge of an Active Area (Inactive Area polygon is also valid).
    1. In the Layers Control Panel, right-click the 2D Model layer and then select Add New Layer > Head Boundaries.

    2. Select the visible box and make sure that the layer is not locked.
    3. Make sure that Snap Mode is on. 
    4. Select the Polyline tool from the object creation toolbar. 
    5. Locate the lowest point along the lowest edge of the Active Area. Construct a polyline along the edge of the Active Areas

  11. Set the 2D Boundary Conditions. 
    1. Double-click the 2D Head Boundaries to open the dialog. 
    2. Set a constant head of 515 ft for both and 5 hours. 
    3. Click OK to return to the network view.

      By setting the 2D Head Boundary at an elevation below the grid cell elevations, this boundary will operate as a free outfall.

      Note that the inflow hydrograph is already defined in the Node 1. Hence you do not need to define another 2D flow boundary.
  12. Increase the inflow hydrograph defined in Node1.
    1. Select Node 1.
    2. In the Configuration menu, click Job Control > Hydraulics.
    3. In the Hydraulics Job Control dialog, click the Routing Control button.

    4. In the Routing Control dialog, change the Flow Adjustment Factor to 20. This will increase the hydrograph defined in Node 1 by a factor of 20. 

  13. Solve the model. In the Analyze menu, select Solve.

    Several files will be created in the local directory. The MID, MIF and some other files are used by the 2D engine. The XPS 1D/2D Simulation dialog displays the status of various parameters during the calculation. The calculation may be paused and then continued. The engine is faster if the Don’t Show Model Status box is checked. At the end of simulation the text output and binary results files will be created.

  14. Resolve the errors. Pre-processing may identify errors in the 1D/2D model that prevent the model from solving. The interface will automatically load the diagnostic file (1D-2D_Flooding01_messages.mif) to the diagnostic layer. You will be able to see the warnings and errors.

    If there are too many messages, right-click the .mif file and select properties. Reduce the number of messages that are displayed to facilitate viewing.

    Any error messages that occur are listed in the .mif file and will be displayed in the network view. Elevations are reported in meters (m) regardless of the units setting in the model. 

  15. Set the results properties. The display of 2D results is managed in the Results layer panel. Animations of results can be displayed as vectors (flows or velocity) and as maps (water depth, water elevation, or hazard).
    1. Select the 2D Vectors2D Maps and Legends boxes to display these layers.

    2. Right-click the 2D Vectors Max Velocity layer and select Properties from the menu.

    3. Click the Arrow tab.

    4. In the Arrow Head section, set to Fixed Size and enter Length to 3, and Width to 2.

    5. In the Total Length section, set to Fixed Size and enter 10 as the scale factor. Set the Skip to 2 results.

    6. Click OK.


    7. Right-click the 2D Maps > Max Water Depth layer and select Properties from the menu.

    8. Click the Fill Colors tab.

    9. Adjust the Transparency to allow for better map display and then click OK.

    10. Right-click the Legends layer and select Properties from the menu.
    11. Set the Max Velocity and the Max Depth locations to Bottom Left and Top Right and then click OK.

  16. Displaying the results with animations. By switching to the Water Depth and Velocity results maps, the simulation animation can be shown. 
    1. Locate the DVR Controls at the bottom of the network view.

    2. Click the Play button to display the animation of velocity and water depth during the simulation period.


  1. At what time does the stream flow over its banks?

  2. What is the maximum width of the flooded area between Node 1 and Node 5?
  3. Does the floodplain drain by the end of the simulation?

Refer to the Common 2D Modelling Errors to help resolve issues that may arise during the 2D modelling process.