Showing posts with label Groundwater. Show all posts
Showing posts with label Groundwater. Show all posts

Sunday, November 13, 2011

How is the Mass Balance Calculated in the SWMM 5 Groundwater Component?

Subject:   How is the Mass Balance Calculated in the SWMM 5 Groundwater Component?

How is the Mass Balance Calculated in the SWMM 5 Groundwater Component?

by dickinsonre
Subject:   How is the Mass Balance Calculated in the SWMM 5 Groundwater Component?

The groundwater component of SWMM 5 is found in the gwater.c code.  It (as is all of SWMM 5) is excellently written in small functions by Lew Rossman of the EPA during the SWMM 5 development process.  However, code being code sometimes it is easier to see how the code is functioning.  This blog or note tries to show the mass balance local function updateMassBal

The groundwater component consists of groundwater data (gw in the equation) and aquifer data (a) in the equation.  The equation for the groundwater mass balance is shown in Figure 1.   The infiltration, evaporation occur only over the perviousarea but the percolation out the bottom of the aquifer occurs over the whole Subcatchment.

Figure 1.  Groundwater Mass Balance

How is the Volume Calculated in the SWMM 5 Groundwater Component?

Subject:   How is the Volume Calculated in the SWMM 5 Groundwater Component?

How is the Volume Calculated in the SWMM 5 Groundwater Component?

by dickinsonre
Subject:   How is the Volume Calculated in the SWMM 5 Groundwater Component?
 The groundwater component of SWMM 5 is found in the gwater.c code.  It (as is all of SWMM 5) is excellently written in small functions by Lew Rossman of the EPA during the SWMM 5 development process.  However, code being code sometimes it is easier to see how the code is functioning.  This blog or note tries to show that function. 
 The groundwater component consists of groundwater data (gw in the equation) and aquifer data (a) in the equation.  The equation for the groundwater volume is shown in Figure 1.   The volume is the water content (theta) times the upper depth and the porosity of the aquifer times the lower depth (Figure 2).
 Figure 1.  Groundwater Volume Calculations
 
 Figure 2.  Lower and Upper Depth of the Groundwater Compartrment
 


Saturday, November 12, 2011

Aquifer and Groundwater Objects in SWMM 5

Subject:   Aquifer and Groundwater Objects in SWMM 5

Aquifer and Groundwater Objects in SWMM 5

by dickinsonre
Subject:   Aquifer and Groundwater Objects in SWMM 5
 There are two types of data objects in SWMM 5 to describe the Groundwater flow component.  There is a Groundwater data object associated with a Subcatchment that describes flow equations, the interaction between the Subcatchment infiltration and the Groundwater component and an Aquifer data object that describes the characteristics of the Aquifer that may span one or more Subcatchments.  The Groundwater data is specific to one Subcatchment but the Aquifer may
  

Saturday, September 17, 2011

All Possible Culverts Example Model in SWMM5

Note:  Attached is an example SWMM 5 model that has all 57 culvert types possible in SWMM 5 in one model.  The culverts are 57 small individual networks consisting of an inflow node, an upstream open channel, upstream node for the culvert, culvert link with culvert code, downstream node of the culvert, downstream open channel and finally an outfall node.  The culvert code and the shape of the culvert determine which FHWA equation is used to determine the flow INTO the Culvert during the simulation:
 1.   The flow from the St Venant Equation or
2.   The flow from the FHWA equation
 The minimum flow is used by the program. 



all_culverts.inp Download this file

All Possible Culverts Example Model in SWMM5

by dickinsonre
Note:  Attached is an example SWMM 5 model that has all 57 culvert types possible in SWMM 5 in one model.  The culverts are 57 small individual networks consisting of an inflow node, an upstream open channel, upstream node for the culvertculvert link with culvert code, downstream node of the culvert, downstream open channel and finally an outfall node.  The culvert code and the shape of the culvert determine which FHWA equation is used to determine the flow INTO the Culvert during the simulation:
1.   The flow from the St Venant Equation or
2.   The flow from the FHWA equation
The minimum flow is used by the program. 

SWMM5 Weir Rules, Head Calculations and Weir HGL Plots

Note:  SWMM5 Weir Rules and Head Calculations

This note attempts to explain both how the head upstream and the head downstream of a weir in SWMM 5 is calculated compared to the weir crest elevation and also to explain how the weir is presented in the HGL plot of SWMm 5.  There has been confusion in the past concering how the weir is shown compared to the actual weir calculations.  The node head is calculated obviously at both ends of the weir but the head over the weir is always based on H1-Crest or H2-Crest (Figure 1) and hence the weir should look flat – to the weir the downstream head is important but NOT the downstream node invert so the weir really is flat and should look flat in the HGL Profile across the weir (Figure 2).    The crest elevation is always relative to the upstream node invert elevation NOT the downstream node invert elevaation

Figure 1.  How the Head across a Weir is calculated in SWMM 5

Figure 2.   HGL Profile across a Weir in SWMM 5.0.022.  The black line should be shown flat.


Weir and Orifice Flow Equations for a Weir in SWMM 5

by dickinsonre
Note:  Weir and Orifice Flow Equations for a Weir in SWMM 5
If you use a weir in SWMM 5 then two flow equations are used
1.       The weir uses the weir flow equation when the head at the weir is between the invert elevation of the weir and the crown of the weir and
2.      An orifice equation when the head is above the weir crown or the weir is submerged.


Sunday, July 31, 2011

The Groundwater flow in SWMM 5 Groundwater

Subject:  The Groundwater flow in SWMM 5 Groundwater

The Groundwater Flow Component in SWMM5

by dickinsonre
Subject:  The Groundwater flow in SWMM 5 Groundwater 
The Groundwater flow in SWMM 5 is actually made up of three components: 
1.   groundwater flow computed from the coefficient a1 and exponent b1
2.   groundwater flow computed from the coefficient a2 and exponent b2 and
3.   A Surface Water / Groundwater Interaction coefficient a3
The total Groundwater flow is the sum of the flow from 1, 2 and 3 – normally 2 is the opposite of 1.




Tuesday, July 12, 2011

Three Inertial Term Options in SWMM 5 and InfoSWMM/H2OMAP SWMM

Subject:  Three Inertial Term Options in SWMM 5 and InfoSWMM/H2OMAP SWMM

Three Inertial Term Options in SWMM 5 and InfoSWMM/H2OMAP SWMM

by dickinsonre
Subject:  Three Inertial Term Options in SWMM 5 and InfoSWMM/H2OMAP SWMM

The dynamic wave flow in SWMM5 and InfoSWMM is calculated from the following equation

Q  =   (Qold – dq2 + dq3*sigma +  dq4*sigma ) / ( 1  + dq1 + dq5)

Where,

Qold               =         Last Time Step Flow in the Link
dq1                 =         friction loss term
dq2                 =         water suface slope + bed slope term
dq3                 =         midpoint area non linear term
dq4                 =         upstream and downstream area non linear term
dq5                 =         Entrance, Other and Exit Loss Term
sigma            =         function of the Froude number and a function of the Three Intertial Term Options

Figure 1 shows how Sigma is set based on the user selection of the Three Intertial Terms.  Figure 2 shows how Sigma is calculated for the Dampen Option.  If you use Ignore then dq3 and dq4 are ignored all of the time, if you use Dampen then dq3 and dq4 are used for a Froude number less than 0.5 and then the terms gradually fade away until a Froude number of 1 is reached.   If you use Keep then the non linear terms are used all of the time no matter the value of the link Froude Number. There is one exception to this rule: If a closed link is full then the value of sigma is set to 0.0 no matter what is selected for the Intertial Term.

Figure 1.  The value of Sigma for each of the Three Inertial Term Options in SWMM 5 and InfoSWMM/H2OMAP SWMM
Figure 2.  At each iteration for each link during the simulation the link Froude Number is calculated and based on the Froude Number the value of Sigma is Set.

Sunday, June 19, 2011

SWMM 5 Fixed Surface Water Depth Boundary Condition

Subject:  SWMM 5 Fixed Surface Water Depth Boundary Condition

A large difference between SWMM 5 and SWMM 4 is how the Groundwater Aquifer interacts with the drainage network.  In SWMM 4 since the hydrology was simulated in the Runoff Block, the results saved to an interface file and the hydraulics were simulated in the Extran Block it was not possible to have a time step to time step interaction between the Aquifer and the Open Channels.  SWMM 5 has integrated hydrology and hydraulics so it is possible to use either a Fixed Surface Water Depth for each Subcatchment or the Receiving Nodes Node Depth Invert Elevation – the Aquifer Bottom Elevation.  The groundwater thus flows either to a fixed boundary condition as in SWMM 4 or to a time varying boundary condition.


Image003

SWMM 5 Threshold Groundwater Elevation

Subject:  SWMM 5 Threshold Groundwater Elevation

A large difference between SWMM 5 and SWMM 4 is how the Groundwater Aquifer interacts with the drainage network.  In SWMM 4 since the hydrology was simulated in the Runoff Block, the results saved to an interface file and the hydraulics were simulated in the Extran Block it was not possible to have a time step to time step interaction between the Aquifer and the Open Channels.  SWMM 5 has integrated hydrology and hydraulics so it is possible to use either a fixed Threshold Groundwater Elevation for each Subcatchment or the Receiving Nodes Invert Elevation.



Image002

Aquifers in SWMM 5

Subject:   Aquifers in SWMM 5

Aquifers in SWMM 5

by dickinsonre
Subject:   Aquifers in SWMM 5
 Groundwater in SWMM 5 is modeled as two zones: (1) Saturated and (2) Unstaturated.  The data for the Groundwater Simulation consists of physical data in an Aquifer and elevation and flow coefficient and exponent data in the GroundwaterData.  The Aquifer data object can be applied to multiple Subcatchments but each Subcatchment has its own set of Groundwaterdata.  For example, in this model all of the Subcatchments share the same Aquifer data but each Subcatchment has different elevation and flow data – the labels on the basin are the groundwater elevations.

Friday, January 7, 2011

How to Import a File from SWMM5 toH20MAP SWMM

Subject:  How to Import a File from SWMM5 toH20MAP SWMM

Step 1:  Make a new H2oMAP SWMM Network

Figure 1.  New Network Dialog.

Step 2:  Use the Exchange Tool / Import EPA SWMM 5
Figure 2. Exchange Tool in H20MAP SWMM

Step 3:  Import your EPA SWMM data file after locating it using the browser.  Click on Import.
Figure 3.  Import Dialog in H2OMAP SWMM.


Step 4:  Use the Attribute Browser,  DB Editor and Run Manager to see your data and network after import.
Figure 4.  The imported network in H2oMAP SWMM.


Monday, December 20, 2010

Swamee and Jain approximation to the Colebrook-White equation in SWMM 5

Note: There is a function called ForceMain in SWMM5/InfoSWMM whose purpose is to compute the Darcy-Weisbach friction factor for a force main using the Swamee and Jain approximation to the Colebrook-White equation.
f = forcemain_getFricFactor(xsect.rBot, d/4.0, 1.0e12);
return sqrt(f/185.0) * pow(d, (1./6.));
double forcemain_getFricFactor(double e, double hrad, double re)
//// Input: e = roughness height (ft)
// hrad = hydraulic radius (ft)
// re = Reynolds number
// Output: returns a Darcy-Weisbach friction factor
// Purpose: computes the Darcy-Weisbach friction factor for a force main
// using the Swamee and Jain approximation to the Colebrook-White equation.
{ double f;
if ( re < 10.0 ) re = 10.0;
if ( re <= 2000.0 ) f = 64.0 / re;
else if ( re < 4000.0 )
{ f = forcemain_getFricFactor(e, hrad, 4000.0);
f = 0.032 + (f - 0.032) * ( re - 2000.0) / 2000.0; }
else { f = e/3.7/(4.0*hrad);
if ( re < 1.0e10 ) f += 5.74/pow(re, 0.9);
f = log10(f);
f = 0.25 / f / f; }
return f;}

From http://en.wikipedia.org/wiki/Darcy_friction_factor_formulae
http://www.swmm2000.com/profiles/blogs/swamee-and-jain-approximation

Monday, November 1, 2010

The new features in SWMM 5.0.021

Note: The new features in SWMM 5.0.021, which really are the new features in SWMM 5.0.019, 5.0.020 and 5.0.021 because of the way in which it was released. The big structural changes were made to the subcatchment, node, groundwater, infiltration and evaporation routines so that there is better continuity between the rainfall that falls on the pervious area of a watershed, the BMP/LID’s of the subcatchment (unlimited per subcatchment), evaporation, infiltration and storage nodes/ponds/lakes. A watershed or subcatchment is now simulated in layers:

· Pervious and Impervious Area surface runoff,

· Shallow Water Aquifer for Infiltration,

· Surface ponds with evaporation and infiltration,

· BMP and LID coverage under the pervious area,

· Two layer Groundwater Aquifer for flow to canals and manholes.

Wednesday, October 20, 2010

SWMM5 Groundwater Flow Components

Note: There are three sub flow components in the calculation of the groundwater flow from a SWMM 5 Subcatchment.
1st Component: Flow = Groundwater Flow Coef. * (LowerDepth – Aquifer Bottom to Node Invert) ^ Groundwater Flow Exponent
2 nd Component: Flow = SurfaceWater Flow Coef. * (Aquifer Bottom to Water Surface – Aquifer Bottom to Node Invert) ^ SurfaceWater Flow Exponent
3rd Component: Flow = SurfaceWater-Groundwater Flow Coef. * (Aquifer LowerDepth * Aquifer Bottom to Node Invert)
The total flow is the sum of all three components.

Saturday, February 27, 2010

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.

Saturday, November 28, 2009

SWMM 5.0.018

------------------------
Build 5.0.018 (11/18/09)
------------------------
Engine Updates

1. Reporting of the total infiltration + evaporation loss for each
Storage Unit (as a percent of total inflow to the unit) was added
to the Storage Volume Summary table in the Status Report. See
objects.h, node.c, stats.c, and statsrpt.c.

2. Double counting the final stored volume when finding the nodes with
the highest mass balance errors has been eliminated. See stats.c.

3. A warning message was added for when a Rain Gage's recording
interval is less than the smallest time interval appearing in its
associated rainfall time series. (An error message is issued if
the recording interval is greater than the smallest time series
interval.) See gage.c and text.h.

4. Hot Start interface files now contain the final state of each
subcatchment's groundwater zone in addition to the node and
link information they have always had. See routing.c.

5. To avoid confusion, the actual conduit slope is now listed in the
Link Summary table of the Status Report rather than the adjusted
slope that results from any conduit lengthening. See link.c and
dynwave.c.

6. The Status Report now displays only those summary tables for
which results have been obtained (e.g., if the Flow Routing
option is turned off, then no node or link tables are displayed).
See massbal.c and statsrpt.c.

7. Some code re-factoring was done to place rain gage validation
and initialization in separate functions. See project.c, gage.c,
and funcs.h.

8. The engine version number was updated to 50018 (this update had
been overlooked since release 5.0.010). See consts.h.

GUI Updates

1. A bug that prevented Status Report files from being deleted from
a users TEMP folder when they were no longer in use was corrected.
Users should check their TEMP folders (usually in
c:\Documents and Settings\\Local Settings\Temp)
for old files that begin with "swm". These can safely be deleted.

2. The project input file created for use by SWMM's Add-On Tools now
contains all project data, including map coordinates and element
tags.

Sunday, September 7, 2008

SWMM 5 View Variables


SWMM 5 View Variables


There are four types of graphical variables in SWMM 5: (1) Subcatchements, (2) System, (3) Nodes and (4) Links.  The SWMM 5 Hydrology binary graphics file consists of 21 view variables for each subcatcment simulation in SWMM 5.  The variables are:
    
Subcatchment Variables Description
      SUBCATCH_RAINFALL  rainfall intensity
      SUBCATCH_SNOWFALL snowfall intensity
      SUBCATCH_RUNOFF total runoff flow rate
      SUBCATCH_RUNOFF_IMPZero runoff flow rate from zero imp area feb 2007
      SUBCATCH_RUNOFF_IMP runoff flow rate from imp area feb 2007
      SUBCATCH_RUNOFF_Pervious runoff flow rate from pervious area feb 2007
      SUBCATCH_LOSSES total losses (infil)
      SUBCATCH_EVAP watershed evaporation loss
      SUBCATCH_DEPTH watershed depth
      SUBCATCH_GW_FLOW groundwater flow rate to node
      SUBCATCH_GW_FLOW_A1 groundwater flow rate to node
      SUBCATCH_GW_FLOW_A2 groundwater flow rate to node
      SUBCATCH_GW_FLOW_A3  groundwater flow rate to node
      SUBCATCH_GW_ELEV elevation of saturated gw table
      SUBCATCH_GW_THETA soil moisture
      SUBCATCH_GW_PERCOLATION aquifer deep percolation
      SUBCATCH_SNOWMELT watershed snow melt
      SUBCATCH_SNOWDEPTH watershed snow depth
      SUBCATCH_FREEWATER watershed snow depth
      SUBCATCH_COLD watershed cold content
      SUBCATCH_SNOWAREA watershed snow coverage
      SUBCATCH_UL soil thickness
      SUBCATCH_FTOT infiltration during an event
      SUBCATCH_FU current value of F
      SUBCATCH_FUMAX maximum value of F
      SUBCATCH_MOISTURE current soil mositure (less than porosity)
      SUBCATCH_IMD current IMD (Porisity - Moisture)
      SUBCATCH_IMDbyEvent IMD at the beginning of an event
      SUBCATCH_SAT  Flag for saturation (1 is saturated)
      SUBCATCH_INFIL_TIME GA infiltration time
      SUBCATCH_WLMAX current infiltration RATE
      SUBCATCH_NETPRECIP rainfall intensity
      SUBCATCH_BUILDUP pollutant buildup concentration
      SUBCATCH_WASHOFF pollutant washoff concentration
The SWMM 5 system binary graphics file consists of 25 variables on one line for each system variable simulated in SWMM 5.  The variables are:
System Variables Description
SYS_TEMPERATURE air temperature                   
SYS_WINDSPEED wind speed                        
SYS_RAINFALL rainfall intensity                
SYS_SNOWFALL snow depth                        
SYS_RUNOFF runoff flow                       
SYS_LOSSES evap + infil                      
SYS_EVAP evap                              
SYS_DWFLOW dry weather inflow                
SYS_GWFLOW ground water inflow               
SYS_IIFLOW RDII inflow                       
SYS_EXFLOW external inflow                   
SYS_INFLOW total lateral inflow              
SYS_FLOODING flooding outflow                  
SYS_OUTFLOW outfall outflow                   
SYS_STORAGE storage volume                    
SYS_CE continuity error for the basin    
SYS_ITERATIONS average iterations over the basin 
SYS_SNOWDEPTH snow depth                        
SYS_COLD cold storage for the basin        
SYS_SNOWMELT snowmelt for the basin            
SYS_RAINMELT rainmelt for the basin            
SYS_TS time steps during the simulation  
SYS_DWFLoad total K3 line DWF load            
SYS_WWFLoad total K3 line WWF load            
SYS_WWFLoadExtra agency extra WWF Load             


The SWMM 5 Node graphics binary file consists of 20 variables on one line for each junction/storage/outfall/divider  simulated in SWMM 5.  The variables are:
Node Variables Description
NODE_DEPTH water depth above invert                          
NODE_HEAD hydraulic head                                    
NODE_VOLUME volume stored & ponded                            
NODE_LATFLOW lateral inflow rate                               
NODE_IIFLOW total rdii inflow rate                            
NODE_UH1 total rdii inflow rate from UH 1
NODE_UH2 total rdii inflow rate from UH 2
NODE_UH3 total rdii inflow rate from UH 3
NODE_DWFFLOW total DWF inflow rate                             
NODE_INFLOW total inflow rate                                 
NODE_OUTFLOW total outflow rate                                
NODE_OVERFLOW overflow rate                                     
NODE_CE node ce                        
NODE_AREA node surface area              
NODE_DQDH node surcharge dqdh            
NODE_DENOM node surcharge dqdh            
NODE_ITERATIONS node iterations to this time step  
NODE_TIMESTEP node iterations to this time step  
NODE_CONVERGENCE node iterations to this time step  
NODE_QUAL         concentration of each pollutant                   

Link Variables

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