---
title: "Tutorial 9 - Modeling Stormwater Quality Best Management Practices"
canonical: "https://help.innovyze.com/space/xps/19661132/Tutorial%209%20-%20Modeling%20Stormwater%20Quality%20Best%20Management%20Practices"
format: markdown
---
**Subcatchment surface runoff** to individual nodes is calculated in the Runoff mode (**Rnf**). When the Water Quality option is invoked, pollutographs are calculated for each contaminant at each active runoff node. These hydrographs and pollutographs may be stored on interface files that are used as input to the Sanitary mode (**San**) to model storage and treatment processes in XPSWMM. Similarly in XPSWMM/XPStorm (with water quality add-on module), the same treatment can be applied at the node and catchment level in the Runoff mode to represent LID (WSUD). The interface files may also be used as input to Hydraulics (**Hdr**) to model the transport of contaminants through the network.   
 

| **Level** | Intermediate |
| --- | --- |
| **Objectives** | To model Best Management Practices (BMP) for water quantity and quality. Specifically, you will generate contaminant pollutographs in Runoff Mode and model the removal of suspended solids and phosphorous in Sanitary mode. Finally, a yearlong simulation of the treatment process will be run. |
| <span style="color: #003366">**Time**</span> | 1 hour |
| **Data files** | - **Mod-49a.xp** (starter file)
- **Mod-49b.xp** (Part 1 complete, starter file for part 2)
- **Mod-49c.xp** (Part 2 complete, starter file for part 3)
- **Mod-49d.xp** (Part 3 complete)
- **Mod-49.his** (2007 rainfall data)
- **2001162DES.dwg** (design background)
- **2001162SUR.dwg** (survey topo and contours) |

## Part 1 - Generating Pollutographs in Runoff

1. Launch the program:
  1. Open the file *Mod-49a.xp *and set the mode to **Runoff**.
  2. Save the model as *Mod-49b.xp*.
  3. Enhance the visibility of the network by clearing the visible buttons of the design and/or CAD layers.
  4. Click the **Fit Window** button located at the right side of the interface screen.
2. Add Landuse records in the Global Database and for each of them, define the pollutant buildup parameters for Dust and Dirt:
  1. In the **Configuration** menu, select **Global Data**.
  2. From the **Data Base Type** list, select **(R) Landuse**. Type the name **Roof** in the user field and click **Add Record**. Add the **Irrigation** and **Paved** records.
  3. Select the Record Name: **Roof** and then click **Edit**.  
> Macro (inline-media-image)
  4. Enter the Dust and Dirt pollutant build up equation data for each landuse. This data is required for each landuse record but is only used if the pollutant buildup option is **Landuse**. In that type of simulation, all pollutant buildup is tied to the buildup of dust and dirt as a fraction or factor. For this tutorial, set this data to the default values and click **OK**. Pollutant washoff will be defined without any build up limitations.> Macro (inline-media-image)
3. Define the parameters for each pollutant and each pollutant-land use combination according to the following table. For convenience, these rating curves and EMC values have already been entered in the model *Mod-49a.xp *as well as the pollutants TSS and TP. In the **Global Data **dialog, see the **(R) Buildup/Washoff**.  
> Macro (inline-media-image)

  
> Macro (inline-media-image)
  1. In the **Configuration** menu, select **Global Data**.
  2. From the **Data Base Type** list, select **(R) Pollutant**. Select the existing record name **TSS** and click **Edit**.
  3. Enter the **Unit Label** as mg/L and **Daily Decay Rate** as **0.0** for **TSS**.
  4. Repeat this step for **TP**.  
> Macro (inline-media-image)
4. Click the **Landuse specific data** button to associate a particular pollutant’s washoff characteristics for each individual land use. Do the same with TP.  
> Macro (inline-media-image)

  
> Macro (inline-media-image)

  
> Macro (inline-media-image)

  
To modify or view washoff rates already defined in this tutorial, go to **(R) Buildup/Washoff** in the **Global Data **dialog or directly via the above dialog to the same Global data record.  
> Macro (inline-media-image)

> Macro (inline-media-image)
5. Edit or review specific pollutant washoff characteristics for each landuse as defined in the table above. For the three TSS records, we are using the Event Mean Concentration (EMC) method. For the three TP records, a rating curve is used where the concentration in the runoff is equal to a coefficient (0.9) times the runoff rate raised to a power (1).  
> Macro (inline-media-image)

  
> Macro (inline-media-image)
6. Add water quality parameters:
  1. In the **Configuration** menu, select **Job Control** **>** **Runoff**.
  2. Click the **Water Quality** button to open the **Water Quality** dialog. > Macro (inline-media-image)
  3. Click the **Pollutant List** button.> Macro (inline-media-image)
  4. Select **TSS** and **TP** from the pollutants list and add them to the **Use Pollutants** list. Click **OK**.> Macro (inline-media-image)
  5. In the **Water Quality** dialog, click the **Landuse List** button.
  6. Add **Roof**, **Irrigation**, and **Paved** to the **Use Land Uses** list. > Macro (inline-media-image)
  7. Click **OK** three times to return to the network view.
7. Enter the Runoff Node Data:
  1. Double-click the runoff node **5/1** to open the **Runoff Node **dialog.> Macro (inline-media-image)
  2. Open the **Sub-Catchment 3** dialog.  
> Macro (inline-media-image)
  3. Click the **Water Quality Data** button to open the **Water Quality** dialog. Select **Irrigation** and **Roof** by clicking on blank button and selecting from global data list, making up sub-catchment and type in % of each land use.
  4. Click **OK** three times to return to the network view.
8. Solve the model in the Runoff mode to generate the pollutographs:
  1. In the **Configuration** menu, select **Mode Properties**.
  2. Set the **Solve Mode** to **Runoff**.
  3. In the network view, make sure that all of the nodes are Active and all links are Inactive.
  4. Click the **Solve** tool.
9. When the model has been solved, select **Node 3/1** and click the **Review Results** tool. The graph displays results for rainfall, flow, and pollutant concentration.
  1. Go to **File > Properties**. In the** Review Results Properties **dialog, clear all parameters except **Pollutant Loads**, **Pollutant Conc.**, and **Cumulative**.> Macro (inline-media-image)
  2. Click **OK**. The graph displays time series of Cumulative Load (kg) and Concentration (mg/L) for TSS and TP.> Macro (inline-media-image)
  3. Go to **File > Properties**, and select **TSS** in the **Show Selected Pollutants** section. The **TSS** results will be shown.> Macro (inline-media-image)
  4. Go to **File > Properties**, and select **TP **in the **Show Selected Pollutants** section. The **TP** results will be shown.> Macro (inline-media-image)

### Questions  


1. What are the maximum concentrations and total loads of TSS from node 3/1?
  a. TSS ____ mg/L _____ kg
  b. TP ____ mg/L _____ kg
  
2. Use the output file to answer the following:  
a. What was the total rainfall? _____ mm  
b. Total washoff of TP and TSS? ______ kg


## Part 2 – Storage Treatment Units in Sanitary Mode

Hydraulic routing of pollutants can occur in the **Runoff**, **Sanitary**,or **Hydraulics** modes. However, routing of pollutants through BMP storage/treatment units usually occurs in the **Sanitary** mode. The **Hydraulics** mode provides detailed dynamic hydraulic modeling that allows for multi-conduits between nodes at different levels, looped conduits, and channels plus outlet controls including tidal conditions.

The **Sanitary **mode > Macro (inline-media-image)

 uses considerably less sophisticated hydraulic analysis based on pipe slopes. It does not use the invert levels specified for the **Hydraulics **mode and consequently cannot directly account for loops and multi-conduits or backwater conditions.

If it is only necessary to estimate the total pollution from the system, then the **Hydraulics **mode is all that is required. This will ensure with looped and more complex systems with multiple outlets etc., the pollutants are routed to the correct outfall and with the appropriate magnitude. If, however, the pollutants are to be passed through a BMP, then it is possible to route these within the **Sanitary** mode.

In this part, the TSS and TP pollutographs generated in Runoff in Part 1 are routed through a gravity collection system and treatment unit. The reduction in peak flow and the removal of contaminants through sedimentation are modeled.

1. Launch the program:
  1. Open file *Mod-49b.xp *and set the mode to **Runoff**.
  2. Enhance the visibility of the network by turning off the visible buttons of the design and the topographic background layers.
  3. Click the **Fit Window** button. The network is the same as the one completed in Part 1, only nodes are active.
2. Set the mode to **Sanitary**. All nodes and links should be active. Note that the nodes are connected with a network of pipes leading to node LF ST. This is a pond functioning as storage and treatment unit. The pond discharges via a V-shaped channel to the outfall.
3. Go to **Configuration > Job Control** menu, select **Sanitary**.  
> Macro (inline-media-image)
  1. Click the **Pollutant List** button.
  2. Add **TSS** and **TP** to the **Use Pollutants** column. Click **OK**.> Macro (inline-media-image)
  3. In the **Sanitary Job Control** dialog, click **Evaporation**. You will use zero evaporation by clicking **OK** to accept the default values.> Macro (inline-media-image)
  4. Click the **Removal Equation Variables** button. The Initial Concentration (**Initial Conc**.), Concentration (**Conc**.), and **Removal Fraction** variables for each pollutant have been pre-assigned. Click **OK**.> Macro (inline-media-image)
  5. Return to the **Sanitary Job Control** and click **Time Control**. Set the parameters equal to those shown in the dialog below.  
> Macro (inline-media-image)
  6. Click **OK** two times to return to the network view.
4. Double-click node **LF ST** to open the **Sanitary Node** data dialog.  
> Macro (inline-media-image)
5. Click the **S/T plant** button to open the **BMP Treatment Processes** dialog.The plant consists of three units, a storage process, node outflow, and disposal for the removed solids.   
> Macro (inline-media-image)
  1. Click the **More** button and then click **Pollutant Characterisation. **
  2. Make sure that the pollutants **TP** and **TSS** are selected as **Concentration only **in the dialog. Mandatory **Print Control** defaults have also been previously selected.   
> Macro (inline-media-image)
  3. Click **OK** twice.
6. Click the **Draw** button to display a schematic diagram of the **S/T plant**.  
> Macro (inline-media-image)
7. Click the **Storage Processes** button in the **BMP Treatment Processes** dialog. In the **S/T Unit Type** dialog, note that **Unit Name** is **POND**.> Macro (inline-media-image)
8. Click the **Storage Unit** button to open the **Storage Unit** dialog.  
> Macro (inline-media-image)
9. Click **Hydraulic Properties** to open the next dialog. The discharge from the pond is modeled using the direct method (Q<sub>out</sub> = f (depth)). This method simulates a weir controlling the outflow. Click **OK** to close the **Hydraulic Properties** dialog and return to the **Storage Unit** dialog.  
> Macro (inline-media-image)
10. Click the **Pollutant Removal** button to open the **Storage Unit Removal** dialog. This is used to define removal equations for TSS and TP. The fraction removed is defined as:  
** R              = 0.000001 x DT**<sup>**1**</sup>
  Where:     R = fraction removed
  DT = time step, seconds
11. Click **Removal Equation** to enter the removal equation parameters and set the **Maximum Removal Fraction** to **0.95**. Enter the same parameters for TP. Click **OK** until you go to the network view.  
> Macro (inline-media-image)

> Macro (inline-media-image)
12. Solve the model:
  1. In the **Configuration >** **Interface Files**,** **make sure that the pollutographs generated in Runoff are written to an interface file which, in turn is read by the Sanitary mode.> Macro (inline-media-image)
  2. In the **Configuration > ****Mode Properties**, set the **Solve Mode** to **Runoff **and **Sanitary**.
  3. Solve your model.  
> Macro (inline-media-image)
13. Review the results:
  1. The impact of the treatment pond may be reviewed by selecting nodes **3/6** and **LF ST** and click the **Review Results** tool. The time series of the outflow from these nodes is displayed.
  2. Go to **File > Properties**, and select **Flow**, **Pollutant Loads**, and **Pollutant Conc.** as shown in the following figure.> Macro (inline-media-image)
  3. Click **OK** to view the updated graph.> Macro (inline-media-image)

> Macro (inline-media-image)
  4. To obtain values from the graph, zoom in and use the **Include Data Labels** option. The maximum flow was reduced from 0.0648 to 0.0035 m<sup>3</sup>/s, the max TSS concentration from 243 to 55 mg/L and the load from about 4.780 to 0.158 kg.
  5. Save the file as *Mod-49c.xp*.

### **Questions**

1. Use the Properties tool to turn off the TSS load and concentration series. What is the peak concentration and total load of TP exiting the treatment pond?
2. From the output file develop a mass balance on TSS.

____ kg inflow load                            _____ kg outflow load

____ kg remaining in BMP                _____ kg remaining in conduits

## Part 3 – Year Long Water Quality Simulation

In the last part of this tutorial, a year-long water quality simulation will be developed using the model from Part 2. This will require:

- Constructing of new rainfall in the Global Database from a rain gauge data file
- Assigning the new rainfall to all subcatchments
- Adjusting the Job Control settings for the year long simulation

1. Launch the program:
  1. Open the file *Mod-49c.xp*. The network is the same as the one completed in Part 2.
  2. Enhance the visibility of the network by turning off the visible buttons of the design and the topographic background layers.
  3. Click the **Fit Window** button.
2. In the **Configuration** menu, select **Global Data.**
3. In the **Data Base Type** column in the right panel, select **(R) Rainfall** and enter **2007** as the new record name.
4. Click **Add Record** and then click **Edit**.> Macro (inline-media-image)
5. In the **(R)Rainfall** dialog, select **User Defined Rainfall File**.> Macro (inline-media-image)
6. In the **User File Selection** dialog, navigate to the file *Mod-49.his*. Enter **570987** as the Station.> Macro (inline-media-image)
7. Click the **File Format** button.
8. Highlight **his** as the **User Defined Files** and then click **Edit**.  
> Macro (inline-media-image)
9. The next dialog defines the data contents of the file 2007.his.
  1. Review the settings and click **OK** returning to the **User File Selection **dialog.   
> Macro (inline-media-image)
  2. Click **Edit** to review the rainfall data. Use the horizontal slider bar to scroll across the columns or adjust the column width to view the data. Note that the data has a variable time step and only contains records of nonzero rainfall.> Macro (inline-media-image)
  3. Click **OK**.
10. Click **OK** on all the dialogs and return to the network view.
11. The 2007 rainfall must be assigned to every active subcatchment in the model. An efficient method is to use XP Tables.
  1. Click the **XP Table List **tool. A table called **Runoff** has been set up. In the **Rainfall Reference** column, there is a drop list of the records in the Global Database.
  2. Set the rainfall to **2007** for every active subcatchment. Note: You can use Copy/Paste to make this task completed quickly.> Macro (inline-media-image)
12. In the **Configuration > ****Job Control** menu, set the **Time Control** for **Runoff** and **Sanitary** setting to start on **Jan 1, 2007** and end on **Dec 31, 2007** as displayed in the figures below.  
> Macro (inline-media-image)

> Macro (inline-media-image)
13. **Solve** the model.
14. Save the file as *Mod-49d.xp*.

**Questions**

1. What is the peak concentration and total load of TSS and TP exiting the treatment pond?
  ____kg TSS                                           _____kg TP
  ____mg/L TSS                                      _____mg/L TP
  
2. From the output file develop a mass balance on TSS.
  ____kg inflow load                             _____kg outflow load
  ____kg remaining in BMP                  _____kg remaining in conduits