Showing posts with label Inside SWMM5. Show all posts
Showing posts with label Inside SWMM5. Show all posts

Tuesday, April 4, 2017

Use Sublime Text to Diff two files in the same folder for SWMM 5 C Code

Sublime Text is nice but not a free Text Editor for large files.  However, it does have a limited file difference capability – here is how you can use Sublime Text to Diff two files in the same folder for SWMM 5 C Code.  You can also use this to compare dozens of files in Sublime - which is needed for a program such as SWM 5 which has been continuously updated from 2003 to 2017 with at least 35? major version.  This makes it easy for example to compare the groundwater or rdii code between 2005 / 2012 and 2017, for example.


Saturday, October 15, 2016

Hydraulic Jump and Froude # in #SWMM5


In this blog we example the Froude Number values computed in SWMM5 as equations, table, graphs and units. We use a QA/QC version of SWMM 5 that lists many more link, node, system and Subcatchment variables than the default SWMM 5 GUI and engine. This blog also applies to #InfoSWMM and any software the uses the #SWMM5 engine.  SWMM 5 computes only one flow in the middle of the link but it uses depth, head, cross sectional area and hydraulic radius at the upstream, midpoint and downstream points of the link (Figure 1).  The Froude # is computed at all three points and if you could see the Froude # you will see a jump at times in a single link (Figure 2).

Figure 1.  Computational points in #SWMM5
Figure 2.  Three locations of the Froude Number - it is possible to see where the Hydraulic Jump occurs in the link.

Thursday, January 2, 2014

RDII Components at a node for a 100 year simulation in SWMM 5

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, we show some of the internal working of the RDII estimation for SWMM5. 

Discussion:  There are nine main parameters for estimating RDII in SWMM 5:
1.       Slow response or R1, T1 and K1
2.      Medium response  R2, T2 and K2
3.      Fast Response or R3, T3 and K3
4.      The RDII flow is associated with a Node in SWMM 5 (Figure 1)
5.      The RDII flow is composed of three separate time series generated from the slow, medium and fast R,  T and K values (Figure 2)
6.      If you look at the total number of RDII events for the 100 years, the number of events goes down based on the value of the Time Base of the UH or T*K (also Figure 2) 

Figure 1.   RDII at a node for a 100 year simulation in SWMM 5
  

Figure 2.   RDII Component Events over the 100 year period using the SWMM 5 statistics block



Sunday, December 29, 2013

The total losses include both evaporation and infiltration for a 100 Year SWMM 5 Simulation

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, the components of the total losses in SWMM 5 which are the infiltration from the pervious area and the evaporation from the impervious and pervious area are shown (Figure 1)

Discussion:  The total losses (Figure 1) are:
1.       The infiltration only losses from the pervious area,
2.      Evaporation losses from the pervious and impervious area weighted by areal coverage
3.      The total losses which are the sum of the evaporation plus infiltration losses
a.      In a continuous simulation the times of infiltration only loss is less than the total losses due to the times when evaporation only is occurring from the depression storage of the Subcatchment
b.       The Statistics assume an inter-event time of 0 hours to capture all of the one hour saved time increments
Figure 1.   The total losses include both evaporation and infiltration for a 100 Year SWMM 5 Simulation




Green Ampt Infiltration for the Storage Nodes of SWMM 5

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   Continuing with the recent blogs on Green Ampt Infiltration, you can also simulate the infiltration and evaporation from a Storage node in SWMM 5

Discussion:  The infiltration and evaporation can be simulated in SWMM 5 using Green Ampt Infiltration:
1.       The three Green Ampt parameters are entered in the Storage Node Dialog
2.      The statistics for the whole run are shown in the Storage Node Summary Table for Volume, Percent Full and Percent Loss
3.      The Node Storage Graph for Infiltration varies with the time and the depth of the storage nodes along with the side area (based on the average depth over a time step) and the bottom area of the node.   In figure 2, Area0 is the bottom area and Area1 is the side area.

Figure 1.   Green Ampt Infiltration for the Storage Nodes of SWMM 5 for a 100 year Simulation

Figure 2.  The bottom and side area of a storage pond (Functional)


The Internal Green Ampt Parameters, Soil Moisture and IMD for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, we show some of the internal working of the Green Ampt Infiltration Parameters over the 100 year period. 

Discussion:  Key internal parameters for Green Ampt infiltration are

FUMax is the Saturated Moisture Content of the Upper Zone (internal units of feet)
F or FTOT in the graph is the Cumulative event infiltration at start of time interval (internal units of feet)
FU is the current moisture content of upper zone (internal units of feet)

As shown in Figure 1,  IMD and Soil Moisture are related.  When the soil moisture is zero then the IMD is equal to the maximum values of IMD or IMDMax.

These three parameters are used to calculate the IMD during the simulation among other important uses

IMD =  [ Maximum Allowable Infiltration – Current Moisture Content of the Upper Zone ] / Depth of the Upper Soil Layer

Or  IMD = [ FUMax – FU ] / Depth of the Upper Soil Layer

Soil Moisture = IMDMax - IMD 

Figure 1.   The Internal Green Ampt Parameters, Soil Moisture and IMD for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration



Saturday, December 28, 2013

The Internal Green Ampt Parameters, FUMax, FU and FTOT or F for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, we show some of the internal working of the Green Ampt Infiltration Parameters over the 100 year period. 

Discussion:  Key internal parameters for Green Ampt infiltration are

FUMax is the Saturated Moisture Content of the Upper Zone (internal units of feet)
F or FTOT in the graph is the Cumulative event infiltration at start of time interval (internal units of feet)
FU is the current moisture content of upper zone (internal units of feet)

As shown in Figure 1, FUMax is constant during the simulation, whereas F and FU vary during the Simulation.  These three parameters are used to calculate the IMD during the simulation among other important uses

IMD =  [ Maximum Allowable Infiltration – Current Moisture Content of the Upper Zone ] / Depth of the Upper Soil Layer

Or    IMD = [ FUMax – FU ] / Depth of the Upper Soil Layer

FUMax =  Depth of the Upper Soil Layer * IMDMax
Figure 1. The Internal Green Ampt Parameters, FUMax, FU and FTOT or
F for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration


Initial Moisture Deficit or IMD for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, we show some of the internal working of the Green Ampt Infiltration Parameters over the 100 year period.  The IMD is normally near the initial user defined value but it can go to zero during the course of the simulation (Figure 1)

Discussion:  A key internal and user defined parameter is the Green Ampt Infiltration parameter Initial Moisture Deficit.  It starts out at the user Initial Deficit and then is computed at each hydrology time step using the equation

IMD =  [ Maximum Allowable Infiltration – Current Moisture Content of the Upper Zone ] / Depth of the Upper Soil Layer


Figure 1.   Initial Moisture Deficit or IMD for a 100 Year SWMM 5 Simulation for Green Ampt Infiltration

Rainfall and Losses One Watershed for a 100 Year Simulation with SWMM 5 Statistics at a saved time step of one hour.

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.   In this example, we show how the statistics change when you change the reporting time step.  You can only see what you report, if you only save every hour or 15 minutes then you may miss some important model results.

Discussion:  In this blog we look at the Rainfall and Pervious Losses for the 100 year period:
Generally, it is better to have finer time steps for rainfall and for reporting.    As you can see in Figure 1 we only get pervious runoff when the rainfall is greater than the infiltration rate which explains the findings of this blog http://www.swmm5.net/2013/12/runoff-from-one-watershed-for-100-year.html  in which the pervious flow is small an infrequent.  The pervious area runoff is a function not only of the pervious infiltration parameters but the rainfall time interval. 

Embark on a hydrological odyssey spanning a millennium with this series of blogs, anchored by the extensive 1000-year rainfall/runoff/hydraulics model available at SWMM2000. Utilizing a specialized QA/QC version of SWMM 5 that boasts enhanced graphics, these insights aim to illuminate the intricate mechanics of SWMM 5, as well as its counterparts InfoSWMM and H2oMap SWMM. 🌧️🔄🛠️

The quest for understanding isn't just academic; it's a practical exploration into how pivotal parameters influence the model's behavior, highlighting their significance or, occasionally, their redundancy. 📊🧐

Key Insight: The essence of this narrative lies in the influence of reporting time steps on statistical output. The granularity of data — whether recorded every hour or every quarter of an hour — can dramatically shape the story your model tells. Miss a beat, and you could miss a flood. ⏱️💧

Focal Point: This particular chapter delves into the interplay between rainfall and pervious surface losses over a century-long saga. The model suggests a critical truth: the finer the temporal resolution of rainfall and reporting, the sharper the picture of runoff. As demonstrated in Figure 1 and supported by SWMM5.net, pervious runoff is a rare and minimal occurrence, emerging only when rainfall intensity surpasses the rate of infiltration. This revelation underscores the delicate dance between rainfall intervals and pervious surface parameters. 🌳💦📈

Stay tuned to this blog series for more revelations from the vast timescales of hydrological phenomena, where every parameter tells a tale, and every setting shapes the flow of urban water wisdom. 🚀🌍💡


Figure 1.   Rainfall and Losses One Watershed for a 100 Year Simulation with SWMM 5 Statistics at a saved time step of one hour.


Sunday, December 1, 2013

Runoff from One Watershed for a 100 Year Simulation with SWMM 5 Statistics for the Subcatchment Impervious and Pervious Depth

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.  

Discussion:  In this blog we look at the Subcatchment Runoff Depth for the three types of Subcatchment Surfaces in SWMM 5:
1.       Impervious with depression storage
2.      Impervious without depression storage
3.      Pervious area with depression storage

As you can see in the graphs of depth (Figure 1) the pervious depth is often zero as the infiltration is greater than the continuous rainfall.  Of course this depends on the rainfall intensity, infiltration type and infiltration parameters.  If you perform a Statistical Analysis on the pervious depth at a saved time step of 1 hour you will find 2721 events over a threshold of 0.01 feet. 


Figure 1.   Runoff from One Watershed for a 100 Year Simulation with SWMM 5 Statistics for the Subcatchment Impervious and Pervious Depth



Friday, November 29, 2013

Runoff from One Watershed for a 100 Year Simulation with SWMM 5 Statistics for Peak, Mean and Total Runoff

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.  

Discussion:  In this blog we look at the Runoff total over the 100 year period, graph the runoff (Figure 1) and show the Mean, Total and Peak Runoff using the Statistics Command in SWMM 5.   The Frequency plots shown in Figure 1 are made using event separation time of 6 hours.  The number of Runoff Events over the 100 year period is 11,144 events.   The details of the simulation are shown in Figure 2.

Figure 1.   Runoff from One Watershed for a 100 Year Simulation with SWMM 5 Statistics for Peak, Mean and Total Runoff

Figure 2.  Details of the Simulation Watershed
[TITLE]

[OPTIONS]
FLOW_UNITS           CFS
INFILTRATION         GREEN_AMPT
FLOW_ROUTING         DYNWAVE
START_DATE           01/01/2500
START_TIME           00:00:00
REPORT_START_DATE    01/01/2500
REPORT_START_TIME    00:00:00
END_DATE             12/31/2599
END_TIME             23:00:00
SWEEP_START          01/01
SWEEP_END            01/30
DRY_DAYS             0
REPORT_STEP          01:00:00
WET_STEP             00:15:00
DRY_STEP             00:30:00
ROUTING_STEP         0:01:00
ALLOW_PONDING        NO
INERTIAL_DAMPING     NONE
VARIABLE_STEP        0.75
LENGTHENING_STEP     1
MIN_SURFAREA         0
NORMAL_FLOW_LIMITED  BOTH
SKIP_STEADY_STATE    NO
FORCE_MAIN_EQUATION  H-W
LINK_OFFSETS         DEPTH
MIN_SLOPE            0
; Added Parameters for QA/QC
MAX_PROCESSORS       NO
BYPASS               YES
ThetaStorage         NO
MAX_ITERATIONS       8
MIN_ITERATIONS       2
TOLERANCE            0.001000
RELAXATION           0.50
AREAWEIGHT           1.00
HYDRAULICWEIGHT      1.00
DWF_GLOBAL           1.0
RDII_GLOBAL          1.0
DEPTH_UNITS         
SaveAllData          NO

[FILES]
SAVE RAINFALL "C:\Users\Robert E Dickinson\Desktop\Desktop_July2012\RainFall.rff"

[EVAPORATION]
;;Type       Parameters
;;---------- ----------
MONTHLY      .1     0.1    .1     0.15   0.2    0.3    0.191  0.3    0.2    0.1    0.05   0.05 
RECOVERY     soil
DRY_ONLY     YES

[RAINGAGES]
;;               Rain      Time   Snow   Data     
;;Name           Type      Intrvl Catch  Source   
;;-------------- --------- ------ ------ ----------
RainGage         VOLUME    1:00   1.0    FILE       "D:\100_years_rainfall.dat" user       IN  

[SUBCATCHMENTS]
;;                                                 Total    Pcnt.             Pcnt.    Curb     Snow   
;;Name           Raingage         Outlet           Area     Imperv   Width    Slope    Length   Pack   
;;-------------- ---------------- ---------------- -------- -------- -------- -------- -------- --------
MySubCatchment           RainGage         Storage          10       10       100      0.5      0                       

[SUBAREAS]
;;Subcatchment   N-Imperv   N-Perv     S-Imperv   S-Perv     PctZero    RouteTo    PctRouted
;;-------------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
MySubCatchment           0.02       0.05       0.05       0.1        25         OUTLET   

[INFILTRATION]
;;Subcatchment   Suction    HydCon     IMDmax   
;;-------------- ---------- ---------- ----------
MySubCatchment           4          1          0.25     

[OUTFALLS]
;;               Invert     Outfall    Stage/Table      Tide
;;Name           Elev.      Type       Time Series      Gate
;;-------------- ---------- ---------- ---------------- ----
Outfall          0          FREE                        NO

[STORAGE]
;;               Invert   Max.     Init.    Storage    Curve                      Ponded   Evap.  
;;Name           Elev.    Depth    Depth    Curve      Params                     Area     Frac.    Infiltration Parameters
;;-------------- -------- -------- -------- ---------- -------- -------- -------- -------- -------- -----------------------
Storage          1        9        0        FUNCTIONAL 10       0        0        0        0       

[CONDUITS]
;;               Inlet            Outlet                      Manning    Inlet      Outlet     Init.      Max.     
;;Name           Node             Node             Length     N          Offset     Offset     Flow       Flow     
;;-------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ----------
VENANT           Storage          Outfall          500        0.013      0          0          0          0        

[XSECTIONS]
;;Link           Shape        Geom1            Geom2      Geom3      Geom4      Barrels    Culvert Code  Transition Multipler
;;-------------- ------------ ---------------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
VENANT           CIRCULAR     3                0          0          0          1          0          0          0        

[LOSSES]
;;Link           Inlet      Outlet     Average    Flap Gate
;;-------------- ---------- ---------- ---------- ----------

[POLLUTANTS]
;;               Mass   Rain       GW         I&I        Decay      Snow  Co-Pollut.       Co-Pollut. DWF      
;;Name           Units  Concen.    Concen.    Concen.    Coeff.     Only  Name             Fraction   Concen.  
;;-------------- ------ ---------- ---------- ---------- ---------- ----- ---------------- ---------- ----------
tn               MG/L   1          0.0        0.0        0.0        NO    *                0.0        0.0      

[LOADINGS]
;;Subcatchment   Pollutant        Loading  
;;-------------- ---------------- ----------

[INFLOWS]
;;                                                 Param    Units    Scale    Baseline Baseline
;;Node           Parameter        Time Series      Type     Factor   Factor   Value    Pattern
;;-------------- ---------------- ---------------- -------- -------- -------- -------- --------
Storage          FLOW             ""               FLOW     1.0      1.0      1      

[DWF]
;;                                Average    Time     
;;Node           Parameter        Value      Patterns 
;;-------------- ---------------- ---------- ----------
Storage          FLOW             2          "Hourly"

[HYDROGRAPHS]
;;               Rain Gage/     
;;Name           Month            Response R        T        K        IA_max   IA_rec   IA_ini 
;;-------------- ---------------- -------- -------- -------- -------- -------- -------- --------
MANY             RainGage       
MANY             All              Short    .1       1        1        1        .01      0      
MANY             All              Medium   .05      3        3        1        .01      0      
MANY             All              Long     .01      5        10       1        .01      0      


[RDII]
;;Node           Unit Hydrograph  Sewer Area
;;-------------- ---------------- ----------
Storage          MANY             1        

[PATTERNS]
;;Name           Type       Multipliers
;;-------------- ---------- -----------
soil             MONTHLY    .01   .10   1     2     1     .10 
soil                        .01   .10   1     2     1     .1  

Hourly           HOURLY     0.191 0.236 0.251 0.302 0.400 0.463
Hourly                      0.703 1.000 0.876 0.670 0.491 0.456
Hourly                      0.400 0.358 0.274 0.290 0.373 0.385
Hourly                      0.468 0.596 0.640 0.543 0.403 0.364

[REPORT]
INPUT      YES
CONTROLS   NO
SUBCATCHMENTS ALL
NODES ALL
LINKS ALL

[TAGS]

[MAP]
DIMENSIONS 747573.697 247745.801 753800.907 251809.529
Units      Feet

[COORDINATES]
;;Node           X-Coord            Y-Coord          
;;-------------- ------------------ ------------------
Outfall          747879.187         247930.516       
Storage          750522.255         249213.382       

[VERTICES]
;;Link           X-Coord            Y-Coord          
;;-------------- ------------------ ------------------

[Polygons]
;;Subcatchment   X-Coord            Y-Coord          
;;-------------- ------------------ ------------------
MySubCatchment           747856.752         247967.907       
MySubCatchment           747726.887         248390.794       
MySubCatchment           747597.022         248813.681       
MySubCatchment           747221.312         249101.864       
MySubCatchment           747337.291         249659.456       
MySubCatchment           747484.496         250917.382       
MySubCatchment           749812.998         251702.471       
MySubCatchment           753039.238         251624.814       
MySubCatchment           753965.941         250721.110       
MySubCatchment           753517.852         247990.342       

[SYMBOLS]
;;Gage           X-Coord            Y-Coord          
;;-------------- ------------------ ------------------
RainGage         750276.915         250966.450       

AI Rivers of Wisdom about ICM SWMM

Here's the text "Rivers of Wisdom" formatted with one sentence per line: [Verse 1] 🌊 Beneath the ancient oak, where shadows p...