Research summary · 2023
Using SWMM for Emergency Response Planning: A Case Study Evaluating Biological Agent Transport Under Various Rainfall Scenarios and Urban Surfaces
How SWMM can support emergency-response planning for biological-agent transport under varying rainfall and urban surfaces.
Research snapshot
How do rainfall intensity and urban surface type control biological-agent transport through stormwater systems?
SWMM / PCSWMM · rainfall scenarios · contaminant fate and transport · Python automation
Supports exposure-zone identification, decontamination strategy evaluation, and emergency-response planning.

Research Question
How do rainfall intensity and urban surface type influence the washoff, transport, and potential exposure pathways of biological-agent surrogates in an urban stormwater system?
Why It Matters
Emergency-response teams need defensible estimates of where hazardous biological material may move after release and rainfall. Urban hydrologic modeling can connect surface conditions, drainage pathways, and storm intensity to potential exposure zones and decontamination priorities.
Methods
- Applied the EPA Storm Water Management Model (SWMM/PCSWMM).
- Simulated biological-contaminant runoff and transport under rainfall scenarios with different intensities.
- Compared impervious and pervious urban surface configurations, including asphalt, concrete, and grass.
- Integrated urban hydrologic and hydraulic parameters, agent-decay rates, washoff coefficients, and flow pathways.
- Used custom Python scripts to automate output extraction and scenario comparisons.
Key Findings
- Heavier storms produced faster and more widespread dispersal of biological-agent surrogates.
- Impervious surfaces generated quicker runoff and reduced opportunities for agent decay or settling.
- Surface configuration and rainfall intensity jointly controlled transport pathways and contaminant-load patterns.
- The modeling framework identified infrastructure and drainage zones that may be more vulnerable to contamination.
My Contribution
Lifeng Yuan led SWMM model development, Python scripting, field-data integration, scenario evaluation, visualization, and manuscript preparation. The study demonstrated SWMM’s applicability to non-traditional pollutants and was conducted through the U.S. EPA Homeland Security Research Program in collaboration with the U.S. Coast Guard and Department of Homeland Security.
Supporting Python workflow
##############################################################################
## Programmer: Lifeng Yuan ##
## Development date: Dec. 1, 2021 ##
## Last update: Dec.10, 2021 ##
## Description: Output flow or velocity from certain conduits on land uses ##
## Running env: IronPython (Python2.7) in PCSWMM ##
# ############################################################################
import os, sys, math, csv
# set work directory
path = r'C:\Users\lifengyuan\Stormwater Models\Stormwater_EC_EPA_v4'
os.chdir(path)
# confirm current work directory
print(os.getcwd())
# store swmm input file into a variable
swmm = pcpy.open_swmm_input('Stormwater_EC_EPA_v4.inp')
# obtain time step of swmm report in simulation options
outfile = pcpy.Graph.Files[0]
# identify and summarize conduits from asphalt, concrete, and grass
land_dict = {'S1A1000': ['C220233','C220231','C184791','C220229'],
'S9100E0' :['C220236','C220235'],
'S1C1000' :['C112822','C220243','C220241','C220240','C220238']}
# write a empty csv file
csv_file = open('output_velocity.csv','wb')
csv_writer = csv.writer(csv_file,delimiter = ',')
csv_writer.writerow(['Subcatchment','link','Year','Month','Day','Hour','Minute','Second','Velocity'])
csv_file.close()
# define a export_output function to write data and output statistics of surface runoff, velocity, flow
# take velocity as an example in the script
def export_output(sub,category,funcname,units,loc):
csv_file = open('output_velocity.csv','ab')
data = outfile.get_data(category,funcname,units,loc)
velocity = []
year = []
month = []
day = []
hour = []
minute = []
second = []
for i in range(len(data)):
year.append(getattr(data[i].DateTime,'Year'))
month.append(getattr(data[i].DateTime,'Month'))
day.append(getattr(data[i].DateTime,'Day'))
hour.append(getattr(data[i].DateTime,'Hour'))
minute.append(getattr(data[i].DateTime,'Minute'))
second.append(getattr(data[i].DateTime,'Second'))
velocity.append(data[i].Value)
# start to write csv file
csv_writer = csv.writer(csv_file,delimiter = ',')
for i in range(len(data)):
csv_writer.writerow([sub,loc,year[i],month[i],day[i],hour[i],minute[i],second[i],velocity[i]])
csv_file.close()
print(sub, loc, 'successfully finished')
# define the output objectives
category = ['Subcatchments','Nodes','Links','System']
fnNames = ['Infiltration','Rainfall','Runoff','Depth','Volume','Flow','Velocity']
fnUnits = ['in/hr','ft','cfs','ft/s','ft2']
# export selected objectives
for k,v in land_dict.items():
for i in range(len(v)):
export_output(k,category[2],fnNames[6],fnUnits[3],v[i])
Practical Relevance
The workflow supports emergency planning by showing how storm conditions and surface type alter contaminant mobility, helping agencies identify potential exposure zones, compare decontamination strategies, and prioritize monitoring and response actions.