Sunday, September 26, 2010

SWMM 5 Related Websites

MY BLOG LIST

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

SWMM 5 Flooding Volumes for Ponding and Without Ponding


SWMM 5 Flooding Volumes for Ponding and Without Ponding

No Ponded Area for a Flooded Node

Ponded Area for a Flooded Node

Mud Flow in SWMM 5

Comment: A method to model Mud flow and other Non Newtonian Fluids in a modified SWMM 5.  You will have to modify the code as described in the link to actually model mud flow. Link Here

Tuesday, September 21, 2010

LPS Output Units when the Inflow is CMS

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.

Sunday, September 19, 2010

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.


Orifice Open and Close Speed and the Target Setting in SWMM 5

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 Setting equals 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 Open and 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 orifice then 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


Example rule for the opening and closing of the orifice

Here is an example Real Time Control (RTC) rule for the opening and closing of an orifice.
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

Saturday, September 18, 2010

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.

Tuesday, September 14, 2010

Graphical Representation of Results in InfoSWWM

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.

Saturday, September 11, 2010

SWMM 5 Interface Guide Tips for C Compilers

SWMM 5 Interface Guide Tips
SWMM 5 has a Interfacing guide on http://www.epa.gov/nrmrl/wswrd/wq/models/swmm/#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/nrmrl/wswrd/wq/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.



Weather Underground to SWMM 5 Rainfall Time Series

Weather Underground is a site that provides excellent local weather information in the form of graphs, tables and csv files. You can use the data very easily in SWMM 5 by copying from Excel to a time series in SWMM 5. Here is the rainfall for a storm event in Tampa, Florida in September, 2010
Export from WeatherUnderground using the CSV File Export Option
The data imported from the csv file to Excel and after the text to columns tool is used looks like this in Excel. The data is now ready to be imported into SWMM 5 after the time column is adjusted to fall on even 5 minute intervals. In Excel you can use the formula @ROUND((B2)/"0:05:00",0)*"0:05:00" to round all of the time values to 5 minutes. If you do not do this step then you will have problems in SWMM 5 due to the rainfall interval not being equal to the defined raingage interval.

You will need to format the new rounded time as a time format for import into SWMM 5
Open up and make a new time series in SWMM 5 and then copy and paste the date, rounded time column and rainfall column into the SWMM 5 time series columns.

DWF Scale Factor in SWMM 5 for entering Population Data

I (and a few others) think a welcome change to the DWF dialog in SWMM 5 would be the addition of another scale factor to modify the average flow field.  The purpose of the scale factor would be to allow the users to enter the DWF contributing population * the various DWF patterns * the scale factor (in units of cfs/person or l/s/person) in the Inflows dialog.  Some users of SWMM 5 prefer to use population directly in the GUI rather than doing this calculation externally and entering either the flow in cfs or l/s.  An example of why this would be useful is a future conditions model in which the population either increases or decreased in the catchment.

InfoSwmm import / export capabilities

InfoSWMM can both import and export to shapefiles and other databases using the Import and Export Manager, GIS Gateway and CSV file import and export generator.

Sunday, July 4, 2010

SWMM5 Routing Time Step Summary

SWMM5 Routing Time Step Summary

This table is a summary of the iterations, times steps and amount of node and link bypasssing that occurs during a SWMM 5 simulation. It is listed in the text output file or the .rpt file of SWMM 5 which the file shown when you use the Report/Status command.


The minimum time step is the smallest time step used during the simulation.

The average time step is the mean time step used during the simulation.

The maximum time step is the maximum time used during the simulation.

The percent in steady state is the percent of the total simulation time spent in steady state during the simulation.

The average iterations per time step is the total number of iterations during the simulation divided by the total number of time steps or step count in this table. This will range between 2 and 4 iterations as SWMM 5.0.018 has a minimum of 2 and and a maximum of 4 iterations.

The Step count is the total number of time steps during the simulation.

The percent of bypassed links are the link flows that are NOT computed between time step iteration 2 and 4 because both the upstream and downstream node depths are converged in the current time step.

The percent of bypassed nodes are those nodes that have been converged between time step iteration 2 and 4. The node depth is still calculated, however, between iterations 2 and 4 as long as the whole time step is not considered converged.

Saturday, July 3, 2010

Explicit Iteration Hydraulic Computation and Implicit Time Step Hydraulic Computations in SWMM 5

Explicit Iteration Hydraulic Computation and Implicit Time Step Hydraulic Computations in SWMM 5
The dynamic wave solution in SWMM 5 and InfoSWMM uses an interlocking explicit iteration in an overall time step implicit calculation of the node depths and link flows. The node depths and links flows are computed based on the last iteration values for 2 to 4 iterations. It explicitly calculates the node depths and link flows at each iteration based on the last iteration value but uses an underrelaxation or Gauss-Seidel method averaging to compute the final new iteration values. The underrelaxation method averages the last iteration value and the current iteration estimate to calculate the final iteration node depth and links flow.
At each time step this is the sequence of computations:
1. The time step is based on the Courant–Friedrichs–Lewy (CFL) condition for the most restrictive link (the CFL condition is based on the link length, current depth and current velocity),
2.Link flows and node depths are calculated at the 1st iteration based on the last time steps flows and depths,
3. The new iterations link flow and node depths are calculated by averaging the node depths and link flows found in step 2 with the original iteration node depths and link flows,
4. The iteration process continues for at least 2 iterations for all nodes and links,
5. The iteration process may stop after 2 iterations for those links in which the upstream and downstream node depths have converged,
6. The upstream or downstream node is considered converged when the absolute depth difference between iterations is less than 0.005 feet,
7. The maximum number of iterations for all nodes and links is set to 4.
8. Once the number of iterations has reached 4 or all nodes and links are converged the time step calculations are considered finished and the program moves on to a new time step.
9. The image shown below shows how the node continuity equation is solved for each iteration but the link combined continuity and momentum equation is calculated for either 2, 3 or 4 iterations depending on the upstream and downstream node convergence of the link.

Friday, March 19, 2010

Steady State Option in SWMM 5

The skip steady state periods uses the last computed flows in the conveyance system instead of computing new flows. In the sample graphs you can see where the change in lateral flow is below 0.05 cfs (the blue arrow in the second image). The network solution used the steady flows about 27 percent of the time. The time step summary in the text output file tells you how often the model was in steady state.

Skip Steady State Periods
Checking this option will make the simulation use the most recently computed conveyance system flows during a steady state period instead of computing a new flow routing solution. A time step is considered to be in steady state if the change in external inflow at each node is below 0.5 cfs and the relative difference between total system inflow and outflow is below 5%.


Saturday, March 13, 2010

Lead and Lag Pump Options in SWMM 5


Introduction: If you have a lead and lag pump connecting the same upstream and downstream nodes the normal behavior for the two pumps is to have the the lead pump turn on first followed by the lag pump. The turn on and turn off depths for the pumps determine when the pumps turn of. The pump will work as a simple lead and lag pump based on a wet well elevation without any real time controls.




If you want to add real time controls (RTC) to the lead and lag pumps you can add more sophisticated controls. For example, if you wanted to turn on and off the lead pump at successive time steps then you can add these RTC rules

; New Real Time Control (RTC) Rules
RULE RULE-1
IF PUMP LEAD_PUMP STATUS = ON
AND PUMP LAG_PUMP STATUS = ON
THEN PUMP LEAD_PUMP STATUS = OFF
PRIORITY 1.000000

RULE RULE-2
IF PUMP LEAD_PUMP STATUS = OFF
AND PUMP LAG_PUMP STATUS = ON
THEN PUMP LEAD_PUMP STATUS = ON
PRIORITY 1.000000

RULE RULE-3
IF PUMP LEAD_PUMP STATUS = OFF
AND PUMP LAG_PUMP STATUS = ON
THEN PUMP LEAD_PUMP STATUS = ON
PRIORITY 1.000000

If you want to add a pattern of 2 time steps and 1 time step off for both pumps then you can add this RTC new rule to control the lag pump:

RULE RULE-4
IF PUMP LEAD_PUMP STATUS = OFF
AND PUMP LAG_PUMP STATUS = ON
THEN PUMP LAG_PUMP STATUS = OFF
PRIORITY 1.000000


Reblog this post [with Zemanta]

Saturday, February 27, 2010

SWMM 5 Link Iterations

These three graphs show how the number of iterations to solve the St. Venant equation in SWMM 5 changes during the course of the simulation based on rapidly changing inflow, steady inflow and decreasing inflow. This example allows up to ten iterations and a tighter head tolerance to better illustrate how the number of iterations increase at the beginning of the simulation and during rapid inflow. Normally, in SWMM 5 the number of iterations will be between a minimum of 2 and a maximum of 4 iterations.

In the first graph the outflow is in blue and the number of iterations at each time step is shown in red. In the second graph the bubble size is based on the number of iterations and the y axis is outflow of the network. The third graph shows the number of iterations used at each link in the model at a particular time step. The more the flow changes the more iterations are needed to keep the flow in balance.









Reblog this post [with Zemanta]

SWMM5 Bubble Plot of Continuity Error

The overall continuity error at any time during the simulation is simply the total inflow minus the total outflow. The total inflow is the dry weather, wet weather, groundwater, I&I inflow, external inflow and the initial network storage. The total outflow is the amount of surface flooding, outfall flow, reacted flow and the final storage.

Continuity error = Total Inflow - Total Outflow

The continuity error can be variable over time as this graph of the total inflow, total outflow and continuity error over time shows for the classic extran example from SWMM 3 and SWMM 4. The continuity error can be negative or positive at each saved time step and it tends to balance out over time. As you can imagine depending on how long the simulation lasts the continuity error may be much greater than zero. If you can the simulation to dry weather flow is reached in the sanitary network or the stormwater network has drained the continuity error will be better. You can see that the CE increases at the beginning of the simulation, continues on and then goes to zero CE when the system drains.

If we look at a bubble chart of the continuity error over time (with the bubble size the continuity error) and the y axis the Total Inflow to the network you can see how continuity error increases and then decreases over time. The white bubbles are negative continuity error points.

Tuesday, February 16, 2010

SWMM 5 Conduit Lengthening

If you use the conduit lengthening option under the dynamic tab the shorter lengths will be lengthened internally during the simulation and the results will be a smoother.

Saturday, January 30, 2010

Vertical Migration of SWMM 5 Calibration Files

Note: It is often important to compare the results for your link flows, node heads and system variables between SWMM 5 versions to help you calibrate the new version based on the old version results. If you run a SWMM 5 model in an older version, save the .rpt and .out file and then open up the SWMM 5 input file in a newer version of SWMM 5 you should see a active graph symbol. The active symbol means that you can plot the results of the old model in the newer SWMM 5 GUI.


For example, you can plot one of the system variables and then save ALL of the system variables to either a clipboard or a system calibration file. You can then use the Calibration dialog of SWMM 5 to compare the older results with the simulation results of a new version of SWMM 5.


Reblog this post [with Zemanta]

Sunday, January 24, 2010

Water Analogies for Divergence, Curl and Gradient

Comment: A really nice water analogy for the field properties Divergence, Curl and Gradient from the Blog Starts With a Bang

....it's pretty mathematically intensive, but what's missing from most textbooks and E&M courses are physical explanations of what the mathematics means. For instance, I've started teaching about fields, and pretty much every textbook out there goes on and on about the properties of fields. They say you can do three things to fields, take the gradient, divergence, or curl of them.
(Are you asleep yet? I'm sorry!)
What do these things mean? An easy way to picture it is in terms of water. If you placed a drop of water anywhere on, say,Earth, the magnitude and direction of how it rolls down is the gradient of the Earth's elevation.
If you let that drop of water flow, as it goes downhill, it can either spread out or converge to a narrower stream. When we quantify that, that's what the divergence of the field is.
And finally, when that water is flowing, sometimes it gets an internal rotational motion, like an eddy. A measure of that rotational motion is called thecurl of the field.
Well, one math geek statement is as follows: the curl of the gradient of a scalar field is always zero. What does this mean, in terms of our water? It means that I can take any topography I can find, invent, or even dream up.
I can drop a tiny droplet of water on it anywhere I like, and while the water may roll downhill (depending on the gradient), and while the water may spread out or narrow (depending on the divergence of the gradient), it will not start to rotate. For rotation to happen, you need something more than just a drop starting out on a hill, no matter how your hill is shaped! That's what it means when someone says, "The curl of the gradient is zero."

This passage uses the metaphor of water flowing over terrain to help explain some concepts from vector calculus and electromagnetic fields. Let's dig a little deeper into each of these mathematical operations and their physical implications.

Gradient

The gradient is a vector operation that acts on a scalar field. It tells you the direction and rate at which the field changes most rapidly. In the water analogy, the gradient of the Earth's elevation is the direction and magnitude of the steepest downhill slope at a given point. It's the direction the water would naturally roll down.

Divergence

Divergence measures the degree to which a vector field sources or sinks at a given point. In the context of water flow, the divergence of the field describes whether the water is spreading out or converging to a narrower stream as it moves downhill. A positive divergence indicates that the water is spreading out, like a water source, while a negative divergence implies it is converging, like a sink or drain.

Curl

The curl of a field measures its rotation or twisting. In the water flow example, the curl would represent the rotational motion of the water as it flows, such as the swirling of an eddy in a river.

The statement "the curl of the gradient of a scalar field is always zero" can be understood with our water analogy. When a droplet of water is placed on a landscape (which represents our scalar field), it can roll downhill (gradient) and it can spread out or converge (divergence), but it will not spontaneously start to rotate (curl). Any rotation (curl) in the water's motion requires an additional influence beyond just the shape of the landscape. It could be introduced by an external force like wind, or by irregularities in the terrain, but it's not a natural outcome of a droplet simply being placed on a slope. This is the physical interpretation of the mathematical statement "The curl of the gradient is zero."

This explanation aids in visualizing these abstract mathematical concepts, making them more tangible and understandable, especially for those who are new to these ideas or find them difficult to grasp. It also provides a more intuitive understanding of the mathematical operations involved in vector calculus and their significance in the study of fields, of both in physics and engineering.

Reblog this post [with Zemanta]

Saturday, January 23, 2010

Water Hits and Sticks: Findings Challenge a Century of Assumptions About Soil Hydrology

From Science Daily


ScienceDaily (Jan. 23, 2010) — Researchers have discovered that some of the most fundamental assumptions about how water moves through soil in a seasonally dry climate such as the Pacific Northwest are incorrect -- and that a century of research based on those assumptions will have to be reconsidered.




A new study by scientists from Oregon State University and the Environmental Protection Agency showed -- much to the surprise of the researchers -- that soil clings tenaciously to the first precipitation after a dry summer, and holds it so tightly that it almost never mixes with other water.


The finding is so significant, researchers said, that they aren't even sure yet what it may mean. But it could affect our understanding of how pollutants move through soils, how nutrients get transported from soils to streams, how streams function and even how vegetation might respond to climate change.


The research was just published online in Nature Geoscience, a professional journal.


"Water in mountains such as the Cascade Range of Oregon and Washington basically exists in two separate worlds," said Jeff McDonnell, an OSU distinguished professor and holder of the Richardson Chair in Watershed Science in the OSU College of Forestry. "We used to believe that when new precipitation entered the soil, it mixed well with other water and eventually moved to streams. We just found out that isn't true."


"This could have enormous implications for our understanding of watershed function," he said. "It challenges about 100 years of conventional thinking."


What actually happens, the study showed, is that the small pores around plant roots fill with water that gets held there until it's eventually used up in plant transpiration back to the atmosphere. Then new water becomes available with the return of fall rains, replenishes these small localized reservoirs near the plants and repeats the process. But all the other water moving through larger pores is essentially separate and almost never intermingles with that used by plants during the dry summer.

The study found in one test, for instance, that after the first large rainstorm in October, only 4 percent of the precipitation entering the soil ended up in the stream -- 96 percent was taken up and held tightly by soil around plants to recharge soil moisture. A month later when soil moisture was fully recharged, 55 percent of precipitation went directly into streams. And as winter rains continue to pour moisture into the ground, almost all of the water that originally recharged the soil around plants remains held tightly in the soil -- it never moves or mixes.

"This tells us that we have a less complete understanding of how water moves through soils, and is affected by them, than we thought we did," said Renee Brooks, a research plant physiologist with the EPA and courtesy faculty in the OSU Department of Forest Ecosystems and Society.

"Our mathematical models of ecosystem function are based on certain assumptions about biological processes," Brooks said. "This changes some of those assumptions. Among the implications is that we may have to reconsider how other things move through soils that we are interested in, such as nutrients or pollutants."

The new findings were made possible by advances in the speed and efficiency of stable isotope analyses of water, which allowed scientists to essentially "fingerprint" water and tell where it came from and where it moved to. Never before was it possible to make so many isotopic measurements and get a better view of water origin and movement, the researchers said.

The study also points out the incredible ability of plants to take up water that is so tightly bound to the soil, with forces nothing else in nature can match.

The research was conducted in the H.J. Andrews Experimental Forest near Blue River, Ore., a part of the nation's Long Term Ecological Research, or LTER Program. It was supported by the EPA.



Much to the surprise of the researchers, soil clings tenaciously to the first precipitation after a dry summer, and holds it so tightly that it almost never mixes with other water. (Credit: iStockphoto/Mats Lund)
Oregon State University (2010, January 23). Water hits and sticks: Findings challenge a century of assumptions about soil hydrology.ScienceDaily. Retrieved January 23, 2010, from http://www.sciencedaily.com/releases/2010/01/100121173452.htm

Sunday, January 17, 2010

Runoff Example Files for SWMM 4

These are 48 Runoff Example Files that I created based on PC-SWMM 3, SWMM 3 and new SWMM 4 features at UF between 1985 and 1981..

These files will work with any SWMM 4 version. If you look at page http://www.swmm2000.com/SWMM4/swmm-3-4-dos-engines

we have a variety of SWMM 3 and SWMM 4 engine.

The File Runoff45.DOC is the text documentation for the SWMM 4 Runoff File.

Link http://www.swmm2000.com/group/swmm4inputfiles

GitHub code and Markdown (MD) files Leveraging

 To better achieve your goal of leveraging your GitHub code and Markdown (MD) files for your WordPress blog or LinkedIn articles, consider t...