Saturday, July 27, 2013

SWMM 5 Interface Guide Tips

SWMM 5 Interface Guide Tips

SWMM 5 has a Interfacing guide on http://www.epa.gov/ednnrmrl/models/swmm/index.htm#Downloads for creating a VB, Delphi or command line C program to both run and printout some of the output file results from SWMM 5.   The readme file is self explanatory in the file http://www.epa.gov/ednnrmrl/models/swmm/swmm5_iface.zip but here are a few tips for those of you who want to compile the InterFaceGuide C code in a Executable file for Windows.

1.   The first step is to make a new console program in Visual Studio

2.   The second step is to add the files swmm5.h, swmm5_iface.h, swmm5_iface.c, test.c to the project header and source files.
3.   Next add the file swmm5.lib as an additional dependency along with the directory name.



4.   If you want to save the .out and .rpt files then you must comment out the remove statements at the end of test.c


5.   You need to make a batch file to both run and save the input and output files from SWMM 5,
6.   The file swmm5.dll must be in the same directory as the created interface executable file,
7.   It will help you see the intermediate output if you add a pause statement in the batch file to hold the fprintf statements on the screen for you to view.





Create Watersheds Using InfoSWMM Subcatchment Manager

Subject:  Create Watersheds Using InfoSWMM Subcatchment Manager


The Subcatchment Manager of InfoSWMM will  help calculate most of the  physical parameters associated with a Watershed or Subcatchment in SWMM 5 from a Digital Elevation Data (Step 1).  The Subcatchments area created from a Flow Direction Raster (Step 2) and a Flow Accumulation Raster (Step 4) after filling in any Sinks in the DEM (Step 3).  The created watersheds (Step 5).   The physical parameters estimated from the DEM are shown in Figure 1.

Figure 1.  Physical Data Estimated from a DEM using the Subcatchment Manager in InfoSWMM.


Step 1.  Find, Create or Otherwise Locate a TIN, DEM or DTM for the project area with elevation data that you can  use with the InfoSWMMSubcatchment Manager.


Step 2.   Create a Flow Direction Raster using the Watershed Command.


Step 3.   Check to see if there are Sinks in the Elevation Data that have to be filled using the Filled Sink Command.


Step 4.   Create a Flow Accumulation Raster


Step 5.   Create the Watersheds from the Flow Direction and Flow Accumulation Rasters.



Display Feature Options for InfoSewer and InfoSWMM

Display Feature Options for InfoSewer and InfoSWMM

Or, how to manage your active and inactive network in a scenario

Display Feature Options for InfoSewer and InfoSWMM

How to Make a New Geodatabase for InfoSWMM and InfoSewer in Arc Map

How to Make a New Geodatabase for InfoSWMM and InfoSewer in Arc Map

How to Make a New Geodatabase for InfoSWMM and InfoSewer in Arc Map



Graphical Representation of Results in InfoSWWM and H2OMap SWMM

If you are graphing from the attribute browser you are restricted to 24 hours.

 If you are using the report manager  then you select the graphing by changing the From and To dates.  I hope this helps.

  

SWMM 5 Link Time Step Calculations

SWMM 5 Link Time Step Calculations

It you select the variable time step option in SWMM 5 then the program will compute the CFL time step for each link based on the ending system variables in the last time step based on the following steps.  The smallest value of t is used for each time step but often the same small set of links will be the controlling time for the whole simulation.  In the example shown below link  1570c is controlling the time step 83 percent of the time.  The link time step is usually the controlling time step.


 

LPS Output Units when the Inflow is CMS in InfoSWMM and H2OMap SWMM

LPS Output Units when the Inflow is CMS

1.   The inflow time series is in units of CMS,
2.   If you set the internal units to LPS in Run Manager,
3.   Set the output units to LPS in Output Unit Manager,
4.   Add a Scale multiplier of 1000 in the Inflows DB Table then

The inflows do not have to be altered, the internal model flows will LPS, the velocity will be m/s with 6 decimal places in the RPT file and the flows will be LPS with 3 decimal places in the RPT file. 

Example RTC rule for the opening and closing of the orifice in SWMM5

Here is an example Real Time Control (RTC) rule for the opening and closing of  an orifice in SWMM5.

RULE Orifice1
IF SIMULATION  CLOCKTIME >=  01:00:00
AND SIMULATION CLOCKTIME <=  2:00:00
THEN ORIFICE OR1@82309b-15009b SETTING = 1
ELSE ORIFICE OR1@82309b-15009b SETTING = 0
PRIORITY 1
; Opens up the orifice at hour 1 of the simulation

Orifice Open and Close Speed and the Target Setting

Orifice Open and Close Speed and the Target Setting

In SWMM 5 there is an orifice parameter called setting which opens or closes the orifice opening by modifying the depth of the orifice.  The setting is  based either on a RTC rule of the orifice or the Flap Gate condition of the orifice and can be between 0 and 1.  Closed is 0; Open is 1.  The difference is that the target setting is what the setting should be based on the condition of the Flap Gate or the RTC Rules and the setting is the value actually used in the model. 

The open and close speed of the orifice modifies the orifice setting by changing the orifice setting based on the open and closing speed using the equation:

New Orifice Setting = Old Orifice Setting + (Target Setting – Orifice Setting) * Time Step / Orifice Open and Close Speed

If your target setting and the current orifice setting are both 1 or 0 then the orifice Open and Close option does not change the orifice setting.  New Settingequals Old Setting in that case.  If the target and  setting are out of phase then the Open and Close Option will function correctly.  For example, if the Openand Close Speed is 1 hour then the orifice setting will open and close in a one hour period.  The table shown below shows how the orifice setting changes as a function of the speed and the difference between the target and orifice settings.   The setting starts out open but the target says closed – the orificethen closes over a 1 hour period.  At one hour the target setting is 1 and the orifice will then open over a one hour period.

Table - Link OR1@82309b-15009b
                                Setting               Target         
Days         Hours                                                
0              00:00:00    1.00                  0.00           
0              00:15:00    0.74                  0.00           
0              00:30:00    0.50                  0.00           
0              00:45:00    0.25                  0.00           
0              01:00:00    0.00                  0.00           
0              01:15:00    0.25                  1.00           
0              01:30:00    0.50                  1.00           
0              01:45:00    0.75                  1.00           
0              02:00:00    1.00                  1.00           
0              02:15:00    0.75                  0.00           
0              02:30:00    0.50                  0.00           
0              02:45:00    0.25                  0.00           
0              03:00:00    0.00                  0.00           
0              03:15:00    0.00                  0.00           
0              03:30:00    0.00                  0.00            
0              03:45:00    0.00                  0.00           






You can see recent Posts in the Recent Post Section, Older Alphabetical Labels and Dated Archives. You can also search for Tags in the Google Search Box or the Custom Search Box. You can send me further questions to robert.dickinson@gmail.com if you have further questions or ideas. Thanks for visiting!

Conduit Lengthening in SWMM 5

Conduit Lengthening in SWMM 5

If you use the conduit lengthening option in SWMM 5  then your short conduits will be lengthened based on the CFL or explicit time step criterion.  Any conduits in which the Length Factor or the courant time step link length over the original length is greater than 1 will be lengthened and will have its roughness lowered so that the conduit is hydraulically the same at full conduitdepth.  The full area, full width and full hydraulic radius stay the same in the modified link – only the length, slope and roughness are altered.

Length Factor  = (Wave Celerity + Full Depth Velocity) * Time Step / Conduit Length, and for those links in which the Length Factor is greater than 1

New Roughness =  Old Roughness / (Length Factor) ^1/2

New Slope = Old Slope / Length Factor

A few metric's for showing how this option has altered the network are shown in the figure below:

1.    The most important is the increase in Network full volume as you never want to drastically alter the volume of your network,
2.    The number of conduits modified along with the new mean slope (lower) and the new total conduit length are important indicators,
3.    The mean wave celerity, full flow velocity and courant time step mean give the user some idea of the optimal time step for the simulation.


The Three Flows in SWMM 5 for a Link

The Three Flows in SWMM 5 for a Link

There are actually three flows computed or used for a link in SWMM 5:

1.    The St. Venant Flow equation flow
2.    The Upstream Normal Flow Manning's equation based on the link roughness, slope, upstream cross sectional area and upstream hydraulic Radius,
3.    The flow actually used in the model which is either the flow computed from St. Venant or Manning's equation

The following three links shows how this works in a real model:

·         Link 8040 almost always uses the St. Venant Equation because it is dominated by backwater and surcharge 
·         Link 8100 almost always uses Manning's equation except at the beginning and end of the simulation, 
·         Link 1600 is an adverse slope link and it mainly uses the St. Venant equation. 
·         Flow = the flow actually used during the simulation 
·         Qdynamic = the flow computed from the St. Venant Equation 
·         QNormUp = Flow based on Manning's equation at the upstream end of the link. 
·         QNormDown = Flow based on Manning's equation at the downstream end of the link.



Link 8100 almost always uses Manning's equation except at the beginning and end of the simulation.  The beginning and end of the simulation is when the non linear terms dominant.



How to Use the SWMM 5 Excel Tool with InfoSewer CSV Files

How to Use the SWMM 5 Excel Tool with InfoSewer CSV Files

1. Export Link and Manholes in InfoSewer for your current Scenario to CSV files,
2. Set up the Excel Add on for SWMM 5 by using the command Tools, and Configure Tools (see below)
3. Run SWMM 5 and edit the data in Excel, you should be able to copy and paste the information from the CSV files into the correct SWMM 5 sections. 

How to Use the SWMM 5 Excel Tool with InfoSewer CSV Files

Dual Drainage in SWMM 5

Subject:  Dual Drainage in SWMM 5

The purpose of the Dual Drainage tool in InfoSWMM is to create a major or street drainage network on top of an existing pipe or what is called the minor network in  dualdrainage.  The created major network has a node (sometimes called the inlet node) on top of the existing minor network node connected by two  OUTLET links.  One outlet link takes the flow from the street and  passes it to the minor network node, the second outlet link  takes the surcharged minor network flow and passes it to the major network or street – the direction of flow is important (Figure 1).  The general purpose of the Captured OUTLET is to  use a head or depth equation to separate the street incoming  flow into captured flow and bypass flow



Figure 1.  Dual Drainage in General

Figure 2.  How it looks in SWMM 5 with node, outlet and conduit elements.

Arc Map If Statements for Showing Flooding in InfoSWMM

Arc Map If Statements for Showing Flooding in InfoSWMM

You can use a combination of the Map Display in InfoSWMM and the Arc Map Label Properties to show the Maximum Ponded Volume at a node during amInfoSWMM simulation. 

The label function in VBSCRIPT to show just non zero flooded volumes(Figure 1) is:

Function FindLabel ( [PONDED_VOL] )
If [PONDED_VOL] > 0 THEN
  FindLabel = "" & FormatNumber([PONDED_VOL],2) & ""
END IF
End Function

and the values of Flooded Time,  Maximum Flooded Rate and Maximum Ponded Volume can be found in the Junction Attribute Table(Figure 2)  but not the Junction Summary Table of the InfoSWMM output report manager tables. 

A VBSCRIPT function to show both ponded volume and flooded rate (Figure 3) is:

Function FindLabel ( [PONDED_VOL], [FLOOD_RATE]  )
If [PONDED_VOL] > 0 THEN
  FindLabel = "" & FormatNumber([PONDED_VOL],2) & " / "   & FormatNumber([FLOOD_RATE],1)
END IF
End Function



Figure 1.  InfoSWMM Map Display of Ponded Volume which is the integral of node flooding over the flooded time.

Figure 2.   If you use the Map Display feature in InfoSWMM then the total flooded time, flood rate and maximum ponded volume will be shown in the Junction Attribute Table.


Figure 3.  Labels showing both Maximum Flooded Volume and Maximum Flooded Time on the InfoSWMM Map Display

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...