Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ _build/
*.chi
*.~inp
*.thm
*.INT
temp.inp
temp.rpt

# env
venv/
Expand Down
362 changes: 362 additions & 0 deletions copy-of-philly.inp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion swmmio/graphics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def save_image(img, img_path, antialias=True, auto_open=False):
imgSize = (img.getbbox()[2], img.getbbox()[3])
if antialias:
size = (int(imgSize[0] * 0.5), int(imgSize[1] * 0.5))
img.thumbnail(size, Image.LANCZOS)
img.thumbnail(size, Image.Resampling.LANCZOS)

img.save(img_path)
if auto_open:
Expand Down
337 changes: 337 additions & 0 deletions swmmio/tests/data/Pump_Control_Model.rpt

Large diffs are not rendered by default.

Binary file added swmmio/tests/data/RUNOFF46.INT
Binary file not shown.
358 changes: 358 additions & 0 deletions swmmio/tests/data/model_curve_num.rpt

Large diffs are not rendered by default.

314 changes: 314 additions & 0 deletions swmmio/tests/data/model_full_features.rpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@

EPA STORM WATER MANAGEMENT MODEL - VERSION 5.2 (Build 5.2.4)
PYSWMM TOOLKIT API - VERSION v1.0 (2025-12-04)
------------------------------------------------------------


*************
Element Count
*************
Number of rain gages ...... 1
Number of subcatchments ... 3
Number of nodes ........... 4
Number of links ........... 3
Number of pollutants ...... 0
Number of land uses ....... 0


****************
Raingage Summary
****************
Data Recording
Name Data Source Type Interval
------------------------------------------------------------------------
SCS_24h_Type_I_1in SCS_24h_Type_I_1in INTENSITY 15 min.


********************
Subcatchment Summary
********************
Name Area Width %Imperv %Slope Rain Gage Outlet
-----------------------------------------------------------------------------------------------------------
S1 1.00 500.00 100.00 0.5000 SCS_24h_Type_I_1in J1
S2 2.00 500.00 100.00 0.5000 SCS_24h_Type_I_1in J2
S3 3.00 500.00 100.00 0.5000 SCS_24h_Type_I_1in J3


************
Node Summary
************
Invert Max. Ponded External
Name Type Elev. Depth Area Inflow
-------------------------------------------------------------------------------
J1 JUNCTION 20.73 15.00 0.0 Yes
J3 JUNCTION 6.55 15.00 0.0 Yes
J4 OUTFALL 0.00 0.00 0.0
J2 STORAGE 13.39 15.00 0.0 Yes


************
Link Summary
************
Name From Node To Node Type Length %Slope Roughness
---------------------------------------------------------------------------------------------
C1:C2 J1 J2 CONDUIT 244.6 3.0002 0.0100
C2 J2 J3 IDEAL PUMP
C3 J3 J4 WEIR


*********************
Cross Section Summary
*********************
Full Full Hyd. Max. No. of Full
Conduit Shape Depth Area Rad. Width Barrels Flow
---------------------------------------------------------------------------------------
C1:C2 CIRCULAR 1.00 0.79 0.25 1.00 1 8.02


****************
Analysis Options
****************
Flow Units ............... CFS
Process Models:
Rainfall/Runoff ........ YES
RDII ................... NO
Snowmelt ............... NO
Groundwater ............ NO
Flow Routing ........... YES
Ponding Allowed ........ NO
Water Quality .......... NO
Infiltration Method ...... HORTON
Flow Routing Method ...... DYNWAVE
Surcharge Method ......... EXTRAN
Starting Date ............ 11/01/2015 14:00:00
Ending Date .............. 11/04/2015 00:00:00
Antecedent Dry Days ...... 0.0
Report Time Step ......... 00:01:00
Wet Time Step ............ 00:05:00
Dry Time Step ............ 00:05:00
Routing Time Step ........ 1.00 sec
Variable Time Step ....... YES
Maximum Trials ........... 8
Number of Threads ........ 1
Head Tolerance ........... 0.005000 ft


*********************
Control Actions Taken
*********************


************************** Volume Depth
Runoff Quantity Continuity acre-feet inches
************************** --------- -------
Total Precipitation ...... 0.500 1.000
Evaporation Loss ......... 0.000 0.000
Infiltration Loss ........ 0.000 0.000
Surface Runoff ........... 0.482 0.964
Final Storage ............ 0.019 0.038
Continuity Error (%) ..... -0.116


************************** Volume Volume
Flow Routing Continuity acre-feet 10^6 gal
************************** --------- ---------
Dry Weather Inflow ....... 38.346 12.496
Wet Weather Inflow ....... 0.482 0.157
Groundwater Inflow ....... 0.000 0.000
RDII Inflow .............. 0.000 0.000
External Inflow .......... 14.380 4.686
External Outflow ......... 44.585 14.529
Flooding Loss ............ 8.619 2.809
Evaporation Loss ......... 0.000 0.000
Exfiltration Loss ........ 0.000 0.000
Initial Stored Volume .... 0.000 0.000
Final Stored Volume ...... 0.002 0.001
Continuity Error (%) ..... 0.001


***************************
Time-Step Critical Elements
***************************
None


********************************
Highest Flow Instability Indexes
********************************
All links are stable.


*********************************
Most Frequent Nonconverging Nodes
*********************************
Convergence obtained at all time steps.


*************************
Routing Time Step Summary
*************************
Minimum Time Step : 0.50 sec
Average Time Step : 1.00 sec
Maximum Time Step : 1.00 sec
% of Time in Steady State : 0.00
Average Iterations per Step : 2.00
% of Steps Not Converging : 0.00
Time Step Frequencies :
1.000 - 0.871 sec : 100.00 %
0.871 - 0.758 sec : 0.00 %
0.758 - 0.660 sec : 0.00 %
0.660 - 0.574 sec : 0.00 %
0.574 - 0.500 sec : 0.00 %


***************************
Subcatchment Runoff Summary
***************************

------------------------------------------------------------------------------------------------------------------------------
Total Total Total Total Imperv Perv Total Total Peak Runoff
Precip Runon Evap Infil Runoff Runoff Runoff Runoff Runoff Coeff
Subcatchment in in in in in in in 10^6 gal CFS
------------------------------------------------------------------------------------------------------------------------------
S1 1.00 0.00 0.00 0.00 0.96 0.00 0.96 0.03 0.61 0.964
S2 1.00 0.00 0.00 0.00 0.96 0.00 0.96 0.05 1.19 0.964
S3 1.00 0.00 0.00 0.00 0.96 0.00 0.96 0.08 1.71 0.963


******************
Node Depth Summary
******************

---------------------------------------------------------------------------------
Average Maximum Maximum Time of Max Reported
Depth Depth HGL Occurrence Max Depth
Node Type Feet Feet Feet days hr:min Feet
---------------------------------------------------------------------------------
J1 JUNCTION 15.00 15.00 35.73 0 00:00 15.00
J3 JUNCTION 1.98 2.37 8.91 0 10:00 2.37
J4 OUTFALL 0.00 0.00 0.00 0 00:00 0.00
J2 STORAGE 0.00 0.00 13.39 0 00:00 0.00


*******************
Node Inflow Summary
*******************

-------------------------------------------------------------------------------------------------
Maximum Maximum Lateral Total Flow
Lateral Total Time of Max Inflow Inflow Balance
Inflow Inflow Occurrence Volume Volume Error
Node Type CFS CFS days hr:min 10^6 gal 10^6 gal Percent
-------------------------------------------------------------------------------------------------
J1 JUNCTION 9.61 9.61 0 10:00 14.1 14.1 0.005
J3 JUNCTION 2.71 12.12 0 10:00 1.64 14.5 0.001
J4 OUTFALL 0.00 12.12 0 10:00 0 14.5 0.000
J2 STORAGE 2.19 9.41 0 10:00 1.61 12.9 0.000


**********************
Node Surcharge Summary
**********************

Surcharging occurs when water rises above the top of the highest conduit.
---------------------------------------------------------------------
Max. Height Min. Depth
Hours Above Crown Below Rim
Node Type Surcharged Feet Feet
---------------------------------------------------------------------
J1 JUNCTION 58.00 14.000 0.000


*********************
Node Flooding Summary
*********************

Flooding refers to all water that overflows a node, whether it ponds or not.
--------------------------------------------------------------------------
Total Maximum
Maximum Time of Max Flood Ponded
Hours Rate Occurrence Volume Depth
Node Flooded CFS days hr:min 10^6 gal Feet
--------------------------------------------------------------------------
J1 58.00 4.01 0 00:00 2.808 0.000


**********************
Storage Volume Summary
**********************

------------------------------------------------------------------------------------------------
Average Avg Evap Exfil Maximum Max Time of Max Maximum
Volume Pcnt Pcnt Pcnt Volume Pcnt Occurrence Outflow
Storage Unit 1000 ft³ Full Loss Loss 1000 ft³ Full days hr:min CFS
------------------------------------------------------------------------------------------------
J2 0.001 0.0 0.0 0.0 0.001 0.0 0 00:00 9.41


***********************
Outfall Loading Summary
***********************

-----------------------------------------------------------
Flow Avg Max Total
Freq Flow Flow Volume
Outfall Node Pcnt CFS CFS 10^6 gal
-----------------------------------------------------------
J4 100.00 9.30 12.12 14.528
-----------------------------------------------------------
System 100.00 9.30 12.12 14.528


********************
Link Flow Summary
********************

-----------------------------------------------------------------------------
Maximum Time of Max Maximum Max/ Max/
|Flow| Occurrence |Veloc| Full Full
Link Type CFS days hr:min ft/sec Flow Depth
-----------------------------------------------------------------------------
C1:C2 CONDUIT 7.22 0 00:01 18.36 0.90 0.50
C2 PUMP 9.41 0 10:00
C3 WEIR 12.12 0 10:00 0.47


***************************
Flow Classification Summary
***************************

-------------------------------------------------------------------------------------
Adjusted ---------- Fraction of Time in Flow Class ----------
/Actual Up Down Sub Sup Up Down Norm Inlet
Conduit Length Dry Dry Dry Crit Crit Crit Crit Ltd Ctrl
-------------------------------------------------------------------------------------
C1:C2 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00


*************************
Conduit Surcharge Summary
*************************

----------------------------------------------------------------------------
Hours Hours
--------- Hours Full -------- Above Full Capacity
Conduit Both Ends Upstream Dnstream Normal Flow Limited
----------------------------------------------------------------------------
C1:C2 0.01 58.00 0.01 0.01 0.01


***************
Pumping Summary
***************

---------------------------------------------------------------------------------------------------------
Min Avg Max Total Power % Time Off
Percent Number of Flow Flow Flow Volume Usage Pump Curve
Pump Utilized Start-Ups CFS CFS CFS 10^6 gal Kw-hr Low High
---------------------------------------------------------------------------------------------------------
C2 100.00 1 0.00 8.25 9.41 12.888 196.88 0.0 0.0


Analysis begun on: Thu Feb 12 15:05:24 2026
Analysis ended on: Thu Feb 12 15:05:25 2026
Total elapsed time: 00:00:01
Loading