EPANET2 vs SWMM5 for pressure network |
I've made a couple of runs of EPANET and SWMM5 on the same networks that have just a single source reservoir of water. To make the SWMM5 network equivalent to the EPANET network you have to make all of your conduits force mains, represent the source node as an outfall with a fixed head equal to EPANET's reservoir head, set all of the node inverts to 0 and the maximum depths to a large value, and use negative inflows at the junctions to represent demands. Here's what I found for runs where demands stayed constant:
I've added the input files for the 3-loop network below (the linear and branched networks are just variations on that one). If you run the SWMM file you will see a huge continuity error because the program doesn't recognize negative inflows in the mass balance accounting routine for some reason.
EPANET input file:
;File: "EPANET-SWMM Hazen Williams comparison.net" [TITLE] EPANET-SWMM Comparison [JUNCTIONS] ;ID Elev Demand Pattern 2 710 150 ; 3 700 150 ; 4 695 100 ; 5 700 150 ; 6 695 200 ; 7 690 0 ; 8 700 100 ; 9 710 100 ; [RESERVOIRS] ;ID Head Pattern 1 970 ; [PIPES] ;ID Node1 Node2 Length Diameter Roughness MinorLoss Status 2 2 3 400 4 100 0 Open ; 3 3 4 400 4 100 0 Open ; 8 5 6 400 4 100 0 Open ; 9 6 7 400 4 100 0 Open ; 11 8 9 400 4 100 0 Open ; 1 1 3 200 4 100 0 Open ; 4 2 5 400 4 100 0 Open ; 5 3 6 400 4 100 0 Open ; 6 4 7 400 4 100 0 Open ; 7 5 8 400 4 100 0 Open ; 10 6 9 400 4 100 0 Open ; [TIMES] Duration 0:00 Hydraulic Timestep 1:00 Quality Timestep 0:05 Pattern Timestep 2:00 Pattern Start 0:00 Report Timestep 1:00 Report Start 0:00 Start ClockTime 12 am Statistic NONE [REPORT] Status Full Summary No Page 0 [OPTIONS] Units GPM Headloss H-W Specific Gravity 1.0 Viscosity 1.0 Trials 40 Accuracy 0.00001 CHECKFREQ 2 MAXCHECK 10 DAMPLIMIT 0 Unbalanced Continue 10 [COORDINATES] ;Node X-Coord Y-Coord 2 30.00 70.00 3 50.00 70.00 4 70.00 70.00 5 30.00 40.00 6 50.00 40.00 7 70.00 40.00 8 30.00 10.00 9 50.00 10.00 1 50.04 89.37 [BACKDROP] DIMENSIONS 7.00 6.00 73.00 94.00 UNITS None FILE OFFSET 0.00 0.00 [END]
SWMM5 input file:
;File: "EPANET-SWMM Hazen Williams comparison.inp" [TITLE] ;;Project Title/Notes SWMM-EPANET Comparison [OPTIONS] ;;Option Value FLOW_UNITS GPM INFILTRATION HORTON FLOW_ROUTING DYNWAVE LINK_OFFSETS DEPTH MIN_SLOPE 0 ALLOW_PONDING NO SKIP_STEADY_STATE NO START_DATE 07/29/2014 START_TIME 00:00:00 REPORT_START_DATE 07/29/2014 REPORT_START_TIME 00:00:00 END_DATE 07/29/2014 END_TIME 02:00:00 SWEEP_START 01/01 SWEEP_END 12/31 DRY_DAYS 0 REPORT_STEP 00:15:00 WET_STEP 00:05:00 DRY_STEP 01:00:00 ROUTING_STEP 0:00:10 INERTIAL_DAMPING FULL NORMAL_FLOW_LIMITED BOTH FORCE_MAIN_EQUATION H-W VARIABLE_STEP 0.00 LENGTHENING_STEP 0 MIN_SURFAREA 12.557 MAX_TRIALS 12 HEAD_TOLERANCE 0.01 SYS_FLOW_TOL 5 LAT_FLOW_TOL 5 [EVAPORATION] ;;Evap Data Parameters ;;-------------- ---------------- CONSTANT 0.0 DRY_ONLY NO [JUNCTIONS] ;;Junction Invert Dmax Dinit Dsurch Aponded ;;-------- ------ ----- ----- ------ ------- 2 0 1000 2 0 0 3 0 1000 2 0 0 4 0 1000 2 0 0 5 0 1000 2 0 0 6 0 1000 2 0 0 7 0 1000 2 0 0 8 0 1000 2 0 0 9 0 1000 2 0 0 [OUTFALLS] ;;Outfall Invert Type Stage Data Gated ;;------- ---------- --------- ---------------- -------- 1 0 FIXED 970 NO [CONDUITS] ;;Conduit From Node To Node Length Roughness InOffset OutOffset InitFlow MaxFlow ;;------- --------- ------- ------ --------- -------- --------- -------- ------- 1 1 3 200 0.01 0 0 0 0 2 3 2 400 0.01 0 0 0 0 3 3 4 400 0.01 0 0 0 0 4 2 5 400 0.01 0 0 0 0 5 3 6 400 0.01 0 0 0 0 6 4 7 400 0.01 0 0 0 0 7 5 8 400 0.01 0 0 0 0 8 5 6 400 0.01 0 0 0 0 9 6 7 400 0.01 0 0 0 0 10 6 9 400 0.01 0 0 0 0 11 8 9 400 0.01 0 0 0 0 [XSECTIONS] ;;Link Shape Geom1 Geom2 Geom3 Geom4 Barrels ;;-------------- ------------ ---------------- ---------- ---------- ---------- ---------- 1 FORCE_MAIN 0.333 100 0 0 1 2 FORCE_MAIN 0.333 100 0 0 1 3 FORCE_MAIN 0.333 100 0 0 1 4 FORCE_MAIN 0.333 100 0 0 1 5 FORCE_MAIN 0.333 100 0 0 1 6 FORCE_MAIN 0.333 100 0 0 1 7 FORCE_MAIN 0.333 100 0 0 1 8 FORCE_MAIN 0.333 100 0 0 1 9 FORCE_MAIN 0.333 100 0 0 1 10 FORCE_MAIN 0.333 100 0 0 1 11 FORCE_MAIN 0.333 100 0 0 1 [INFLOWS] ;;Node Inflow Time Series Type Funits Fscale Baseline Pattern ;;-------------- ---------------- ---------------- -------- -------- -------- -------- -------- 2 FLOW "" FLOW 1.0 1.0 -150 3 FLOW "" FLOW 1.0 1.0 -150 4 FLOW "" FLOW 1.0 1.0 -100 5 FLOW "" FLOW 1.0 1.0 -150 6 FLOW "" FLOW 1.0 1.0 -200 8 FLOW "" FLOW 1.0 1.0 -100 9 FLOW "" FLOW 1.0 1.0 -100 [REPORT] ;;Reporting Options INPUT NO CONTROLS NO SUBCATCHMENTS ALL NODES ALL LINKS ALL [TAGS] [MAP] DIMENSIONS 0.000 0.000 10000.000 10000.000 Units None [COORDINATES] ;;Node X-Coord Y-Coord ;;-------------- ------------------ ------------------ 2 2282.258 7161.290 3 4701.613 7177.419 4 6814.516 7193.548 5 2282.258 4935.484 6 4701.613 4935.484 7 6814.516 4935.484 8 2282.258 2661.290 9 4701.613 2661.290 1 4701.613 8596.774
This is an update on yesterday's topic of modeling water distribution systems with SWMM instead of EPANET. This actually has some relevance to systems in certain parts of the world that operate intermittently and are allowed to de-pressurize.
What I reported about SWMM not coming close to EPANET for a branched system was incorrect. I repeated the test today (carving the branched system out of the looped system) and the results were as close to EPANET as those for the looped system. I must have done something wrong in setting up the model yesterday or maybe I was just looking at the wrong set of output numbers. So SWMM can satisfactorily replicate EPANET's results for linear, branched, and looped networks.
I also found the source of the screwy mass balance numbers SWMM produces when its presented with negative external inflows and will pass the code fix-ups on to Michael Tryby so he can include them in a future SWMM update.
The discussion topic that prompted this example model can be found here:
https://www.openswmm.org/Topic/4648/hazen-williams-in-epanet2-vs-swmm5
I'm interested in the topic because I'm dealing with modeling intermittent distribution networks and, therefore, I would like to use swmm in the first phase of network filling network. I have studied the attached examples and I would like to ask some questions:
Thanks in advance.
I think the SWMM model Lew provided is setup to simulate a pressurized water distribution system, in order to compare the two solutions.
I would also suggest that you test this sample model from Lew in the newer SWMM 5.1.013 since the newer SWMM 5 engine has an added Preissmann slot option, which might make this comparison even better.
Register today for the preeminent annual meeting of water management modelers.