Edition 29: From 1988 to 2024: SWMM's Incredible 54,000-fold Engine or PC Speed Improvement
Robert Dickinson
Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks ICM SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM
Edition 29 has 15 sections and shows how SWMM evolved from Punch Cards in 1977 to Mag Tapes in 1990 and PC's in 1988: Here are the sections:
11-14. SWMM Input Files and References: - Includes the SWMM 5 INP file (.INP) and the SWMM 4 Input Data file (.DAT) for the test model. - Lists references to SWMM 3, 4, and 5 user manuals and related publications.
1/ Methodology of the Test Model aka Extran1.INP
The test model, originally from Extran 3 in 1981, was modified to work in SWMM4 in 1987 and 1988. It also became part of the SWMM5 suite of tests and is included in the OWA-Extran set of hydraulic sample models. During a two-year period (1987–1988),, I frequently compiled the Fortran code and ran the test model using an ICM AT. The experience is etched in my memory: it took 5 minutes to compile the code using a two-pass compiler and another 5 minutes to run the sample model on the ICM AT.
Fast forward to SWMM 5.2+, and the sample model now runs in a mere fraction of a second. To better compare the times, I created a longer simulation model. The original 1987 model was run for a simulation time of 6 hours with 3 hours of flow in a time series. I developed a similar model with a 3-hour baseline pattern that repeats daily and adjusted the simulation dates so that the current version of SWMM5 also took 5 minutes to complete.
The SWMM5 model was run for the period between January 1, 1988, and January 1, 2024, which spans 324,360 hours. Remarkably, SWMM5 is now 54,060 times faster than it was in 1987. In other words, the 5-minute real-time run in 1987, which simulated 6 hours. The same 5 minutes now in SWMM5 can simulate 324,360 hours (or 36 years). This incredible improvement in performance showcases the significant advancements made in the SWMM engine over the past few decades.
The significant speed increase in SWMM5 can be attributed to several factors, both on the software and hardware side.From the SWMM5 perspective, the improvements include a more efficient engine, optimized C code, and the ability to utilize multiple cores on modern PCs. These software enhancements have undoubtedly contributed to the faster execution of the model.
However, Moore's Law can largely explain the remarkable advancements in computer hardware over the past few decades that have led to the most significant speed improvement. Moore's Law is an observation and projection stating that the number of transistors in a dense integrated circuit doubles about every two years. This has led to exponential growth in computing power, allowing for faster processing speeds and more efficient execution of complex software like SWMM5.
2/ What does a Punch Card look like and how it was created in Punch Card Machine. How did you use the Punch Cards to run a SWMM model - use a Punch Card Reader
3/ What does a Magnetic Tape look like? The SWMM3 program was stored on a mag tape and the Job Control Language (JCL) told the PC operators that Mag Tape to use when you ran SWMM3 on a Mini or Mainframe computer.
4/ You stored SWMM in boxes and had to carry the boxes to the Computer labs to run the model. SWMM 2.5 and SWMM 3 were in ten boxes. You can document the cards by writing on top of them.
5/ SWMM 1 and SWMM 2 Pioneers in front of Black Hall at UF. You can see Wayne Huber on the right. I was around Black Hall in 1974 but was a lowly undergrad. Wayne and Jim Heaney had offices on the 4th floor. Which mean i had to walk down the stairs multiple times per day to run SWMM - the Computer Lab was in the Electrical Engineering Building. I used the Punch cards for SWMM from 1977 to 1980.
6/ What an IBM PC AT (with internal hard drive) looked like in 1987 or 1988. It was used to make SWMM 4 with a two pass Fortran Compiler. The compiler worked on the hard drive.
领英推荐
7/ What a 5 1/4 Floppy Disk looked Like before 1990. It was used to mail SWMM4 to Users.
8/ SWMM 5 version of the SWMM 3 Test Model called Example 1 from 1981 - it was called Extran 3 in 1981
9/ SWMM5 Modification for this Model Speed Test - Baseline Patterns were used instead of a flow time series so we can have the same flow every day of every year.
10/ SWMM 5 is written in C and not Fortran and can use as many cores as you have on your PC. My test PC has 32 cores.
11/ SWMM 5 is simulated from 1988 to 2024 on 32 cores and takes 5 minutes to run.
EPA STORM WATER MANAGEMENT MODEL - VERSION 5.2 (Build 5.2.4)
------------------------------------------------------------
Example 1 of Extran Manual
****************
Analysis Options
****************
Flow Units ............... CFS
Process Models:
Rainfall/Runoff ........ NO
RDII ................... NO
Snowmelt ............... NO
Groundwater ............ NO
Flow Routing ........... YES
Ponding Allowed ........ NO
Water Quality .......... NO
Flow Routing Method ...... DYNWAVE
Surcharge Method ......... EXTRAN
Starting Date ............ 01/01/1988 00:00:00
Ending Date .............. 01/01/2024 08:00:00
Antecedent Dry Days ...... 0.0
Report Time Step ......... 00:15:00
Routing Time Step ........ 30.00 sec
Variable Time Step ....... NO
Maximum Trials ........... 8
Number of Threads ........ 32
Head Tolerance ........... 0.005000 ft
************************** Volume Volume
Flow Routing Continuity acre-feet 10^6 gal
************************** --------- ---------
Dry Weather Inflow ....... 0.000 0.000
Wet Weather Inflow ....... 0.000 0.000
Groundwater Inflow ....... 0.000 0.000
RDII Inflow .............. 0.000 0.000
External Inflow .......... 391236.491 127490.256
External Outflow ......... 370548.432 120748.742
Flooding Loss ............ 22050.363 7185.440
Evaporation Loss ......... 0.000 0.000
Exfiltration Loss ........ 0.000 0.000
Initial Stored Volume .... 0.000 0.000
Final Stored Volume ...... 0.301 0.098
Continuity Error (%) ..... -0.348
*************************
Highest Continuity Errors
*************************
Node 80608 (1.39%)
********************************
Highest Flow Instability Indexes
********************************
All links are stable.
*********************************
Most Frequent Nonconverging Nodes
*********************************
Node 10208 (1.08%)
Node 82309 (1.04%)
Node 80608 (0.59%)
Node 80408 (0.24%)
Node 81009 (0.03%)
*************************
Routing Time Step Summary
*************************
Minimum Time Step : 30.00 sec
Average Time Step : 30.00 sec
Maximum Time Step : 30.00 sec
% of Time in Steady State : 0.00
Average Iterations per Step : 2.11
% of Steps Not Converging : 1.08
******************
Analysis begun on: Fri Apr 26 22:26:56 2024
Analysis ended on: Fri Apr 26 22:32:01 2024
Total elapsed time: 00:05:05
12/ SWMM 5 INP file (.INP) as a variation on the Extran 4 model. It now has patterns.
[TITLE]
;;Project Title/Notes
Example 1 of Extran Manual
[OPTIONS]
;;Option Value
FLOW_UNITS CFS
INFILTRATION HORTON
FLOW_ROUTING DYNWAVE
LINK_OFFSETS DEPTH
MIN_SLOPE 0
ALLOW_PONDING NO
SKIP_STEADY_STATE NO
START_DATE 01/01/2000
START_TIME 00:00:00
REPORT_START_DATE 01/01/2000
REPORT_START_TIME 00:00:00
END_DATE 01/01/2024
END_TIME 08:00:00
SWEEP_START 01/01
SWEEP_END 12/31
DRY_DAYS 0
REPORT_STEP 00:15:00
WET_STEP 00:15:00
DRY_STEP 01:00:00
ROUTING_STEP 0:00:30
RULE_STEP 00:00:00
INERTIAL_DAMPING NONE
NORMAL_FLOW_LIMITED BOTH
FORCE_MAIN_EQUATION D-W
VARIABLE_STEP 0.00
LENGTHENING_STEP 10
MIN_SURFAREA 12.557
MAX_TRIALS 8
HEAD_TOLERANCE 0.005
SYS_FLOW_TOL 5
LAT_FLOW_TOL 5
MINIMUM_STEP 0.5
THREADS 8
[EVAPORATION]
;;Data Source Parameters
;;-------------- ----------------
CONSTANT 0.0
DRY_ONLY NO
[JUNCTIONS]
;;Name Elevation MaxDepth InitDepth SurDepth Aponded
;;-------------- ---------- ---------- ---------- ---------- ----------
80408 124.6 13.4 0 0 0
80608 118.3 16.7 0 0 0
81009 128.2 8.8 0 0 0
81309 117.5 12.5 0 0 0
82309 112.3 42.7 0 0 0
10309 101.6 9.4 0 0 0
15009 111.5 13.5 0 0 0
16009 102 18 0 0 0
16109 102.8 22.2 0 0 0
[OUTFALLS]
;;Name Elevation Type Stage Data Gated Route To
;;-------------- ---------- ---------- ---------------- -------- ----------------
10208 89.9 FREE NO
[CONDUITS]
;;Name From Node To Node Length Roughness InOffset OutOffset InitFlow MaxFlow
;;-------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ----------
8040 80408 80608 1800 0.015 0 0 0 0
8060 80608 82309 2075 0.015 0 2.2 0 0
8100 81009 81309 5100 0.015 0 0 0 0
8130 81309 15009 3500 0.015 0 0 0 0
1030 10309 10208 4500 0.016 0 0 0 0
1570 15009 16009 5000 0.0154 0 0 0 0
1600 16109 16009 500 0.015 0 0 0 0
1630 16009 10309 300 0.015 0 0 0 0
1602 82309 16109 5000 0.034 0 0 0 0
[XSECTIONS]
;;Link Shape Geom1 Geom2 Geom3 Geom4 Barrels Culvert
;;-------------- ------------ ---------------- ---------- ---------- ---------- ---------- ----------
8040 CIRCULAR 4 0 0 0 1
8060 CIRCULAR 4 0 0 0 1
8100 CIRCULAR 4.5 0 0 0 1
8130 CIRCULAR 4.5 0 0 0 1
1030 TRAPEZOIDAL 9 0 3 3 1
1570 CIRCULAR 5.5 0 0 0 1
1600 CIRCULAR 6 0 0 0 1
1630 TRAPEZOIDAL 9 0 3 3 1
1602 CIRCULAR 5 0 0 0 1
[INFLOWS]
;;Node Constituent Time Series Type Mfactor Sfactor Baseline Pattern
;;-------------- ---------------- ---------------- -------- -------- -------- -------- --------
80408 FLOW 80408 FLOW 1.0 1.0 1 weekday
81009 FLOW "" FLOW 1.0 1.0 1 weekday
82309 FLOW "" FLOW 1.0 1.0 1 weekday
[CURVES]
;;Name Type X-Value Y-Value
;;-------------- ---------- ---------- ----------
E1 Pump3 0 1
E1 6 2
[TIMESERIES]
;;Name Date Time Value
;;-------------- ---------- ---------- ----------
82309 0 0
82309 0.25 40
82309 3.0 40
82309 3.25 0
82309 12.0 0
;
80408 0 0
80408 0.25 45
80408 3.0 45
80408 3.25 0
80408 12 0
;
81009 0 0
81009 0.25 50
81009 3.0 50
81009 3.25 0
81009 12 0
[PATTERNS]
;;Name Type Multipliers
;;-------------- ---------- -----------
weekday HOURLY 0 0 40 40 40 0
weekday 0 0 0 0 0 0
weekday 0 0 0 00 0 0
weekday 0 0 0 0 0 0
[REPORT]
;;Reporting Options
SUBCATCHMENTS ALL
NODES ALL
LINKS ALL
[TAGS]
[MAP]
DIMENSIONS -1113.687 0.000 10650.527 10000.000
Units None
[COORDINATES]
;;Node X-Coord Y-Coord
;;-------------- ------------------ ------------------
80408 10115.790 7536.840
80608 7463.160 7536.840
81009 9989.470 2421.050
81309 7568.420 2421.050
82309 4957.890 7536.840
10309 389.470 2421.050
15009 4978.950 2421.050
16009 2494.740 2421.050
16109 2494.740 7536.840
10208 -578.950 4947.370
[VERTICES]
;;Link X-Coord Y-Coord
;;-------------- ------------------ ------------------
[LABELS]
;;X-Coord Y-Coord Label
2431.580 1052.630 "EXAMPLE 1 OF EXTRAN MANUAL" "" "Arial" 12 1 1
9821.050 7157.890 "Inflow" "" "Arial" 10 0 0
4659.810 7199.370 "Inflow" "" "Arial" 10 0 0
9694.740 2084.210 "Inflow" "" "Arial" 10 0 0
13/ SWMM 4 Input Data file (.DAT) It has a lot of comments or comment lines
SW 1 0 20
MM 3 10 11 12
*
# PLOT_ALL_NODES
# PLOT_ALL_CONDUITS
# SWMM5_CALIBRATION_FILE
$EXTRAN
A1 'EXTRAN USER''S MANUAL EXAMPLE PROBLEM 1'
A1 'BASIC PIPE SYSTEM FROM FIGURE 3-1'
*
*
* B0 LINE IS COMPLETELY OPTIONAL
* ISOL = 0 --> USUAL EXPLICIT EXTRAN SOLUTION
* ISOL = 1 --> SEMI-IMPLICIT SOLUTION
* ISOL = 2 --> ITERATIVE EXTRAN SOLUTION
* NOTE: ISOL = 1 CAN ALSO BE INVOKED BY SETTING SURTOL < 0 AS EXPLAINED
* ON USER'S MANUAL PAGE 32.
* KSUPER = 0 --> ASSUME NORMAL FLOW WHENEVER WATER SURFACE
* SLOPE IS LESS THAN THE CONDUIT INVERT
* SLOPE. THIS IS THE USUAL (DEFAULT)
* EXTRAN ASSUMPTION FOR SUPERCRITICAL FLOW.
* KSUPER = 1 --> ASSUME NORMAL FLOW WHENEVER THE FROUDE
* FROUDE THAN OR EQUAL TO 1.0.
* THIS IS A MORE REALISTIC ASSUMPTION
* FOR SUPERCRITICAL FLOW.
* ISOL KSUPER
B0 1 0
* A LARGER TIME STEP IS USUALLY POSSIBLE USING ISOL = 1 OR 2, E.G.,
* NTCYC DELT TZERO NSTART INTER JNTER REDO
*B1 192 150.0 0.0 1 100 100 0
*
* HERE, CONTINUE THE EXTRAN INPUT SHOWN IN TABLE 3-1 OF USER'S MANUAL.
*
* NTCYC DELT TZERO NSTART INTER JNTER REDO
B1 1440 20.0 0.0 45 -1 1 0
* METRIC NEQUAL AMEN ITMAX SURTOL
B2 0 0 0.0 30 0.05
* NHPRT NQPRT NPLT LPLT NJSW
B3 6 6 6 6 3
* PRINT HEADS
B4 80608 16009 16109 15009 82309 80408
* PRINT FLOWS
B5 1030 1630 1600 1602 1570 8130
* PLOT HEADS
B4 80608 16009 16109 15009 82309 80408
* PLOT FLOWS
B7 1030 1630 1600 1602 1570 8130
* CONDUIT DATA
* NCOND NJ1 NJ2 QO NKLASS AFULL DEEP WIDE LEN ZP1 ZP2 ROUGH STHETA SPHI
C1 8040 80408 80608 0.0 1 0.0 4.0 0.0 1800. 0.0 0.0 0.015 0.0 0.0
C1 8060 80608 82309 0.0 1 0.0 4.0 0.0 2075. 0.0 2.2 0.015 0.0 0.0
C1 8100 81009 81309 0.0 1 0.0 4.5 0.0 5100. 0.0 0.0 0.015 0.0 0.0
C1 8130 81309 15009 0.0 1 0.0 4.5 0.0 3500. 0.0 0.0 0.015 0.0 0.0
C1 1030 10309 10208 0.0 6 0.0 9.0 0.0 4500. 0.0 0.0 0.016 3.0 3.0
C1 1570 15009 16009 0.0 1 0.0 5.5 0.0 5000. 0.0 0.0 .0154 0.0 0.0
C1 1600 16009 16109 0.0 1 0.0 6.0 0.0 500. 0.0 0.0 0.015 0.0 0.0
C1 1630 16009 10309 0.0 6 0.0 9.0 0.0 300. 0.0 0.0 0.015 3.0 3.0
C1 1602 82309 16109 0.0 1 0.0 5.0 0.0 5000. 0.0 0.0 0.034 0.0 0.0
* JUNCTION DATA
* JUN GRELEV Z QINST Y
D1 80408 138.0 124.6 0.0 0.0
D1 80608 135.0 118.3 0.0 0.0
D1 81009 137.0 128.2 0.0 0.0
D1 81309 130.0 117.5 0.0 0.0
D1 82309 155.0 112.3 0.0 0.0
D1 10208 100.0 89.9 0.0 0.0
D1 10309 111.0 101.6 0.0 0.0
D1 15009 125.0 111.5 0.0 0.0
D1 16009 120.0 102.0 0.0 0.0
D1 16109 125.0 102.8 0.0 0.0
I1 10208 1
J1 1
K1 3
K2 82309 80408 81009
K3 0.0 0.0 0.0 0.0
K3 0.25 40.0 45.0 50.0
K3 3.0 40.0 45.0 50.0
K3 3.25 0.0 0.0 0.0
K3 12.0 0.0 0.0 0.0
$ENDPROGRAM
14/ SWMM 3,4,5 References
Storm Water Management Model User's Manual, Version III, Huber, W.C., Heaney, J.P., Nix, S. J., Dickinson, R.E. and Polmann, D.J., "Storm Water Management Model User's Manual Version III," EPA 600/2 84 109a (NTIS PB84 198423), USEPA, Cincinnati, OH (also available from Dept. of Environmental Engineering Sciences, University of Florida, Gainesville), November 1981
Storm Water Management Model, Version 4: User's Manual, Huber, W.C. and Dickinson, R.E.,"Storm Water Management Model, Version 4: User's Manual," First Printing, NTIS PB88 236641/AS, Environmental Research Laboratory office of Research and Development U.S. Environmental Protection Agency, Athens, Georgia, August, 1988
Storm Water Management Model User's Manual Version 4: Extran Addendum, Roesner, L.A., Aldrich, J.A., Dickinson, R.E., "Storm Water Management Model User's Manual Version 4: Extran Addendum," EPA/600/3 88/001b,Environmental Research Laboratory Office of Research and Development, U.S. Environmental Protection Agency, Athens, Georgia, August, 1988
Rossman, L.A., Dickinson, R.E., Schade, T., Chan, C.C., Burgess, E., Lai, F.H. Sullivan, D. 2003. Redevelopment of the US EPA Stormwater Management Model. Proceedings of WEFTEC 2003. Los Angeles, CA. Oct. 11-15 SWMM5
15/ Wayne C Huber History of SWMM from ICWMM 2020
Closing Note: Thank you so much for journeying with me through this content. This space is reserved for future updates and insights. Your engagement and time are truly appreciated. Until next time! You can also see my past articles on LinkedIn (91 in 2023). The next goal is 133, or 17*19, in FY2025 (which is the calendar year 2024 and the start of 2025 in Autodesk terms).
Why 1729: The factors of 1729 are 1, 7, 13, 19, 91, 133, 247, and 1729 itself. A bit of history about 1729: It's famously known as the Hardy-Ramanujan number after a story involving two great mathematicians, G.H. Hardy and Srinivasa Ramanujan. According to the anecdote, Hardy visited Ramanujan in the hospital and mentioned that he arrived in a taxi numbered 1729, which he found to be a rather uninteresting number. Ramanujan immediately responded that 1729 is actually very interesting because it is the smallest number expressible as the sum of two cubes in two different ways: 1729=1^3+12^3=9^3+10^3. This property makes 1729 a significant figure in the world of mathematics, showcasing Ramanujan's extraordinary intuitive grasp of numbers.
Senior Science Advisor (Retired)
10 个月BTW, What’s Wayne Huber doing these days? I haven’t seen him since visiting him in Corvallis when he was at OSU.
Senior Science Advisor (Retired)
10 个月Thanks for the trip down memory lane. I remember the day Harry Torno transferred SWMM distribution to me at the USEPA Athens LAb.
Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks ICM SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM
10 个月I included the SWMM4 data file and the SWMM5 inp file as part of the article (for posterity)