Thursday, August 8, 2013

Singapore - Catching Every Drop of Rain

Singapore - Catching Every Drop of Rain

The source of the map of the rivers of Singapore is the Singapore PUB
As a small island that doesn't have natural aquifers and lakes and with little land to collect rainwater, Singapore needs to maximize whatever it can harvest.
Currently, Singapore uses two separate systems to collect rainwater and used water. Rainwater is collected through a comprehensive network of drains, canals, rivers and stormwater collection ponds before it is channelled to Singapore's 17 reservoirs for storage. This makes Singapore one of the few countries in the world to harvest urban stormwater on a large scale for its water supply.
The newest reservoirs are Punggol and Serangoon Reservoirs which are our 16th and 17th reservoirs. By 2011, the water catchment area has increased from half to two-thirds of Singapore's land surface with the completion of the Marina, Punggol and Serangoon reservoirs.
With all the major estuaries already dammed to create reservoirs, PUB aims to harness water from the remaining streams and rivulets near the shoreline using technology that can treat water of varying salinity. This will boost Singapore's water catchment area to 90% by 2060,
The goal is to capture every drop of rain (Figure 1)
 

Reservoirs
Pandan Reservoir
Kranji Reservoir
Jurong Lake Reservoir
MacRitchie Reservoir
Upper Peirce Reservoir
Lower Peirce Reservoir
Bedok Reservoir
Upper Seletar Reservoir
Lower Seletar Reservoir
Poyan Reservoir
Murai Reservoir
Tengeh Reservoir
Sarimbun Reservoir
Pulau Tekong Reservoir
Marina Reservoir
Serangoon Reservoir
Punggol Reservoir


Rivers
Singapore River
Sungei Kallang
Rochor River
Sungei Whampoa
Geylang River
Sungei Bedok
Sungei Ketapang
Sungei Changi
Sungei Selarang
Sungei Loyang
Sungei Tampines
Sungei Api Api
Sungei Blukar
Sungei Serangoon
Sungei Punggol
Sungei Tongkang
Sungei Pinang
Sungei Seletar
Sungei Khatib Bongsu
Sungei Seletar Simpang Kiri
Sungei Sembawang
Sungei Mandai
Sungei China
Sungei Mandai Kechil
Sungei Peng Siang
Sungei Tengah
Sungei Kangkar
Sungei Buloh Besar
Sungei Jurong
Sungei Lanchar
Sungei Pandan
Sungei Ulu Pandan



Here's an emoji-laden table summarizing Singapore's efforts in rainwater harvesting and management:

Topic πŸ“šDescription πŸ“Emoji Illustration 🌟
Rainwater Harvesting 🌧️Singapore utilizes a comprehensive network of drains, canals, rivers, and stormwater collection ponds to channel rainwater into 17 reservoirs, making it one of the few countries to harvest urban stormwater on a large scale.🌧️πŸ’¦πŸ”„
Reservoir Expansion 🏞️The addition of Punggol and Serangoon Reservoirs, as well as the completion of Marina Reservoir, increased the water catchment area from half to two-thirds of Singapore's land surface by 2011.🏞️⬆️πŸ‡ΈπŸ‡¬
Future Water Catchment Goals 🎯PUB aims to boost Singapore's water catchment area to 90% by 2060 by harnessing water from remaining streams and rivulets near the shoreline using technology to treat water of varying salinity.πŸŽ―πŸ’§πŸ”œ
Reservoirs 🚰List includes Pandan, Kranji, Jurong Lake, MacRitchie, Upper Peirce, Lower Peirce, Bedok, Upper Seletar, Lower Seletar, Poyan, Murai, Tengeh, Sarimbun, Pulau Tekong, Marina, Serangoon, and Punggol Reservoirs.πŸš°πŸ“‹πŸ’§
Rivers 🏞️Extensive list of rivers including Singapore River, Sungei Kallang, Rochor River, and many others which play a role in the rainwater collection system.🏞️πŸ’¦πŸ”„

This table encapsulates Singapore's robust approach towards maximizing rainwater harvesting amidst geographical constraints, its expansion of reservoirs to increase water catchment areas, and its ambitious goals for future water catchment, along with a mention of the numerous reservoirs and rivers that contribute to this system.


InfoSewer Inflow Control for a PUMP

InfoSewer Inflow Control for a PUMP

You can control the pumps in InfoSewer and H2OMap Sewer by using a Pump Control which will control the pump based on:

1.       Volume
2.      Level
3.      Discharge
4.      Inflow
5.      Time

If you use a By Inflow control the pump speed of the pump is increased or decreased to make the Upstream Wet Well Level Constant (Figure 1).
Figure 1.  Inflow Control for  PUMP in InfoSewer and H2OMAP Sewer will change the Pump Speed of the pump to make the Wet Well level constant

How to Make an Excel Fixed Width File from SWMM 5

How to Make an Excel Fixed Width File from SWMM 5

You can use this macro for MATLAB or some other DOS based program by using the Tools command of SWMM 5 and configuring the EXCEL file option.  If you use the EXCEL tool then your SWMM 5 input file will be opened up in EXCEL and you can use this macro to make a fixed format file for SWMM 5.  Note, SWMM 5 does not use fixed format but other programs may need it for reading,  You adjust the column widths in the macro for your program.


Here is the macro, which is placed  in Excel using these command:
  1. Copy the code above.
  2. Open Excel.
  3. Alt + F11 to open the Visual Basic Editor.
  4. Click Insert-Module from the menu.
  5. Paste the code into the window that appears at right.
Option Explicit

Sub CreateFixedWidthFile(strFile As String, ws As Worksheet, s() As Integer)
    Dim i As Long, j As Long
    Dim strLine As String, strCell As String
    
     'get a freefile
    Dim fNum As Long
    fNum = FreeFile
    
     'open the textfile
    Open strFile For Output As fNum
     'loop from first to last row
     'use 2 rather than 1 to ignore header row
    For i = 1 To ws.Range("a65536").End(xlUp).Row
         'new line
        strLine = ""
         'loop through each field
        For j = 0 To UBound(s)
             'make sure we only take chars up to length of field (may want to output some sort of error if it is longer than field)
            strCell = Left$(ws.Cells(i, j + 1).Value, s(j))
             'add on string of spaces with length equal to the difference in length between field length and value length
            strLine = strLine & strCell & String$(s(j) - Len(strCell), Chr$(32))
        Next j
         'write the line to the file
        Print #fNum, strLine
    Next i
     'close the file
    Close #fNum
    
End Sub

 'for example the code could be called using:

Sub CreateFile()
    Dim sPath As String
    sPath = Application.GetSaveAsFilename("SWMM5_Fixed_EXPORT", "Text Files,*.inp")
    If LCase$(sPath) = "false" Then Exit Sub
     'specify the widths of our fields
     'the number of columns is the number specified in the line below +1
    Dim s(15) As Integer
     'starting at 0 specify the width of each column for the SWMM5 File, alter the columns if you need more columns in your data input file
    s(0) = 40
    s(1) = 20
    s(2) = 20
    s(3) = 20
    s(4) = 20
    s(5) = 20
    s(6) = 20
    s(7) = 20
    s(8) = 20
    s(9) = 20
    s(10) = 20
    s(11) = 20
    s(12) = 20
    s(13) = 20
    s(14) = 20
    s(15) = 20
     'for example to use 3 columns with field of length 5, 10 and 15 you would use:
    'dim s(2) as Integer
     's(0)=5
     's(1)=10
     's(2)=15
     'write to file the data from the activesheet
    CreateFixedWidthFile sPath, ActiveSheet, s
End Sub
 .

Maximum HGL Head Class in InfoSWMM AND H2OMAP SWMM

Maximum HGL Head Class in InfoSWMM AND H2OMAP SWMM

You can find the node flood or surcharge maximum occurrence during a simulation in the Junction Summary Report table in InfoSWMM and H2OMAP SWMM (Figure 1)

Empty                                   if the Node Head is below or equal to the Lowest Link Connecting  Elevation
Below Link Crown            if the Node Head is below or equal to the Highest Link Connecting Crown
Below Maximum Depth   if the Node Head is below or equal to the Node Invert + Full  Depth.  The column Max Surcharge Height above Crown will also tell you how deep the Surcharge in a Node.
Surchaged                           if none of the above is true.


Figure 1.  Junction Summary Report in InfoSWMM

Figure 2.  Maximum Surcharge Height above Crown Definition

The Non Linear Term in the Saint Venant Equation of SWMM 5

Subject: Non Linear Term in the Saint Venant Equation of SWMM 5
The flow equation has six components that have to be in balance at each time step:
1. The unsteady flow term or dQ/dt
2. The friction loss term (normally based on Manning's equation except for full force mains),
3. The bed slope term or dz/dx
4. The water surface slope term or dy/dx,
5. The non linear term or d(Q^2/A)/dx and
6. The entrance, exit and other loss terms.
All of these terms have to add up to zero at each time step. If the water surface slope becomes zero or negative then the only way the equation can be balanced is for the flow to decrease. If the spike is due to a change in the downstream head versus the upstream head then typically you will a dip in the flow graph as the water surface slope term becomes flat or negative, followed by a rise in the flow as the upstream head increases versus the downstream head.
You get more than the normal flow based on the head difference because in addition to the head difference you also get a push from the nonlinear terms or dq3 and dq4 in this graph. 

Lambda Calculus or the Method of Successive under-relaxation for the SWMM 5 Dynamic Wave Solution

Subject:  Successive under-relaxation for the SWMM 5 Dynamic Wave Solution

SWMM 5 uses the method of Successive under-relaxation to solve the Node Continuity Equation and the Link Momentum/Continuity Equation for a time step.  The dynamic wave solution in dynwave.c will use up to 8 iterations to reach convergence before moving onto the next time step.  The differences between the link flows and node depths are typically small (in a non pumping system) and normally converge within a few iterations unless you are using too large a time step.  The number of iterations is a minimum of two with the 1st iteration NOT using the under-relaxation parameter omega. The solution method can be term successive approximation, fixed iteration or Picard Iteration, fixed-point combinatory, iterated function and Lambda Calculus. In computer science, iterated functions occur as a special case of recursive functions, which in turn anchor the study of such broad topics as lambda calculus, or narrower ones, such as the denotational semantics

In the SWMM 5 application of this various named iteration process there are three main concepts for starting, iterating and stopping the iteration process during one time step:

·         The 1st guess of the new node depth or link flow is the current link flow (Figure 3) and the new estimated node depths and link flows are used at each iteration to estimate the new time step depth or flow.  For example, in the node depth (H) equation dH/dt = dQ/A the value of dQ or the change in flow and the value of A or Area is updated at each iteration based on the last iteration's value of all node depths and link flows. 

·         A bound or a bracket on each node depth or link flow iteration value is used by averaging the last iteration value with the new iteration value.  This places a boundary on how fast a node depth or link flow can change per iteration – it is always ½ of the change during the iteration (Figure 1).  

·         The Stopping Tolerance (Figure 2) determines how many iterations it takes to reach convergence and move out of the iteration process for this time step to the next time step.
Figure 1.  Under relaxation with an omega value of ½ is done on iterations 2 through a possible 8 in SWMM 5. This is not done for iteration 1.
Figure 2.  if the change in the Node Depth is less than the stopping tolerance in SWMM 5 the node is considered converged.  The stopping tolerance has a default value of 0.005 feet in SWMM 5.0.022. 


Figure 3.  The differences between the link flows and node depths are typically small (in a non pumping system) and normally converge within a few iterations unless you are using too large a time step.  The number of iterations is a minimum of two with the 1st iteration NOT using the under-relaxation parameter omega.

How is the Time of Flooding Calculated in SWMM 5?

The time flooding in SWMM 5 is pretty simple:
1. It is the sum of all time steps in which excess flow is coming out of the top of the manhole or
2. If you are using the ponding option then it is the time the surface pond has more than zero depth.


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 Have both Depth and Elevation for the Node Rim Elevation in InfoSWMM

How to Have both Depth and Elevation for the Node Rim Elevation in InfoSWMM

If you turn on  store Absolute Junction Rim option  then the Rim Elevation = Invert Elevation + Maximum Node Depth will be shown in the DB Table Junction Hydraulic Modeling Data and the Attribute Browser of InfoSWMM and H2OMAP SWMM

Figure 1.  Store Absolute Junction Rim Elevation Option

Now the Rim Elevation can be copied from the DB Table

Figure 2.  The DB for Junction Modeling Data

And Pasted to the Elevation Table in Junction Information

Figure 3.  The DB for the Junction Information Data

Then you can go back and turn off the Preferences flag and you will have the Rim Elevation in in the Information Table and the Maximum Depth in the Junction Hydraulic Modeling Data DB Table,  I do this all of the time as it helps to see both the depth and the Elevation.

How to Use the Arc Map Editor in InfoSWMM

Note:  How to Use the Arc Map Editor in InfoSWMM

Step 1 is to use the Edit Feature for example the Subcatchment layer to bring up the Arc Map Editor Tool.



Step 2 is to use the Reshape Feature tool or Vertex tools to bring together mis matched Subcatchment Boundaries



Step 3 is to use save the edits and then Update the DB from the Map to recalculate the area of the Subcatchments

Sh.

How to use the Flow Splitter in InfoSewer for Dendritic Networks

Subject:  How to use the Flow Splitter in InfoSewer for Dendritic Networks

InfoSewer, which is an extension in Arc Map, does need to have slit split defined where gravity mains merge together to determine the amount of flow in each of the downstream conduits (Figure 1).   The options for the flow splitterin each of the downstream links are:
1.       Automatic Allocation
2.       Fixed Flow Percentage
3.       Variable Flow Percentage and
4.       Inflow-Outflow Curve 
At an outfall where the invert of the outfall pipe is raised compared to the inverts of the incoming and outgoing pipes a flow split of Variable Flow Percentage or Inflow/Outflow curve may work better (Figure 2). 

Figure 1. Options for Performing a Flow Split in InfoSewer


Figure 2.  The Effect of the flow split can be used to model complex situations in a dendritic model with outfalls.

Wednesday, August 7, 2013

InfoSewer to InfoSWMM Import Tips

Subject:   InfoSewer to InfoSWMM Import Tips

The direct import of InfoSewer to InfoSWMM (Figure 1) is both direct and robust but you need to be aware of Run Manager changes to optimize the InfoSWMMmodel:

1. Make sure that the Flow Units in InfoSWMM Run Manager match the default flow units in InfoSewer so that the DWF values are comparable,
2. Make sure that the Output Flow Units in InfoSWMM match the Output Flow Units in InfoSewer so direct comparisons are easier,
3. Add a Pump On and Pump Off depth to the Pumps in InfoSWMM so that the pumps work better in a fully dynamic solution,
4. The Fixed Pump Curves of InfoSewer should be checked in the Pump Curve section of InfoSWMM to make sure they are comparable,
5. The InfoSWMM conduit step lengthening option should be used to speed up the model if you have short links in InfoSewer,
6. You can check the overall balance in the two modeling platforms by comparing the System Load Graph in InfoSewer to the Total Inflow Graph inInfoSWMM.

Figure 1   Dialog for Importing InfoSewer to InfoSWMM

1000 Year Simulation with Rainfall in SWMM5

Subject:   1000 Year Simulation with Rainfall

The attached one Subcatchment SWMM 5 model and associated Rainfall was created using the Random function in Excel on a measured NCD station in Boston.    There is a dry weather flow component of 0.5 cfs with an hourly pattern.  The rainfall averages 54 inches over the 1000 years and the runoff is 20 inches on average over the 1000 years.

Figure 1. Combined Flow at the Outfall for the 1000 year Simulation.

If you want to download this model and its rainfall data the files are located at 
http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5
in three download files

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

Huff Distribution SWMM 5 Model

Huff Distribution SWMM 5 Model





SWMM 5 Weir RTC Rules

Subject:   SWMM 5 Weir RTC Rules

This example SWMM 5 model closes a weir based on the depth at the upstream node of the Weir every 0.25 feet.  You can see the effect of the RTC rules using a Scatter plot of Weir Flow versus Weir Depth in SWMM 5 (Figure 1).   The Weir flows normally every 0.25 feet but shuts down three times using these rules which set the Weir Setting to 0.0

RULE Weir100
IF Node  WeirNode Depth > 1.75
AND Node WeirNode Depth < 2.0
THEN WEIR WEIR Setting = 0.0
Priority 2

RULE Weir101
IF Node  WeirNode Depth > 2.25
AND Node WeirNode Depth < 2.5
THEN WEIR WEIR Setting = 0.0
Priority 2

RULE Weir102
IF Node  WeirNode Depth > 2.75
AND Node WeirNode Depth < 3.0
THEN WEIR WEIR Setting = 0.0
Priority 2

RULE Weir103
IF Node  WeirNode Depth > 3.25
AND Node WeirNode Depth < 3.5
THEN WEIR WEIR Setting = 0.0
Priority 2

RULE Weir104
IF Node  WeirNode Depth > 3.75
AND Node WeirNode Depth < 4.0
THEN WEIR WEIR Setting = 0.0
Priority 2

Figure 1.  Scatter Graph of Weir flow versus Weir Node Depth.


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