SWMM 5 Aquifer has a Saturated and Unsaturated Zone
Note: The unsaturated upper zone
|
SWMM5, SWMM6, XPSWMM, InfoSWMM, InfoSewer, OpenSWMM, and ICM — engine internals, error messages, calibration, and hard-won field wisdom from Robert Dickinson.
Note: The unsaturated upper zone
|
dickinsonre | July 28, 2013 at 11:42 am | Tags: Blogger, H2oMAP SWMM, IFTTT, InfoSWMM,swmm5 | Categories: H2OMAP SWMM, InfoSWMM, swmm5 | URL: http://wp.me/pnGa9-2n1
|
Note: You could delete the subcatchments if you saw them on the screen. What I did here was to make a list of the subcatchments I wanted to delete; made a simple SWMM 5 import file simply containing the subcatchment names and the POLYGON field
I found a workaround that uses a part of the SWMM 5 input file but does not require you to export all of the SWMM 5 data to EPA SWMM 5. If you make a POLYGON file in this example format for all of the subcatchments you want to delete then you can import JUST the polygon data using the EPASWMM 5 import, selecting Clear All and Import. The subcatchments can then be located using the Locate command and you can easily delete the data using the delete selection icon.
I found it is best to bring in the polygon surrounding the subcatchment in the form of a triangle as this example shows.
[POLYGONS]
L33 1 1
L33 11 11
LS3 3 99
LS33 3 9
LS33 11 11
LS33 3 199
Subject: Adding New View Variables To SWMM 5 for Villemonte Correction for Downstream Submergence. A simple seven step procedure to modify the SWMM 5 GUI Delphi Code and the SWMM 5 C code.
Step 1: Add a new View Variable to the SWMM 5 GUI Delphi code UGLOBAL.PAS
You need to add a new variable name (LINKVILLEMONTE) and increase the index number of LINKVIEWS
LINKVILLEMONTE = 48; //Output // (5.0.022 - RED)
LINKQUAL = 49; //Output // (5.0.022 - RED)
LINKVIEWS = 48; //Max. display variable index // (5.0.022 - RED)
Step 2: Add a new BaseLinkUnits description to the SWMM 5 GUI Delphi code UGLOBAL.PAS
('',''), // Villemonte Correction // (5.0.022 - RED)
('mg/L','mg/L')); // Quality
Step 3: Add a new Link View Variable SourceIndex description to the SWMM 5 GUI Delphi code Viewvars.txt
(Name: 'Villemonte Correction';
SourceIndex: 43;
DefIntervals: (25,50,75,100)),
(Name:'Quality';
SourceIndex: 44;
DefIntervals:(0.25,0.5,0.75,1.0))
);
Step 4: Add a new Link View Variable LINK_VILLEMONTE to the SWMM 5 C code in enums.h
You also need to increase the number of Link Results in enums.h for the increased number of view variables
#define MAX_LINK_RESULTS 45 // (5.0.022 - RED)
LINK_VILLEMONTE, // Villemonte Correction // (5.0.022 - RED)
LINK_QUAL}; // concentration of each pollutant
Step 5: Add a new variable to objects.h for the structure Tlink to remember the Villemonte correction at each iteration for each Weir and Orifice
double Villemonte; //(5.0.022 - RED)
} TLink;
Step 6: In the SWMM 5 LINK.C code in procedure weir_getInflow save the current iteration value of the Villemonte correction to the new structure variable
// --- apply Villemonte eqn. to correct for submergence
Link[j].Villemonte = 1.0; //(5.0.022 - RED)
Link[j].head = head; //(5.0.022 - RED)
if ( h2 > hcrest )
{
ratio = (h2 - hcrest) / (h1 - hcrest);
q1 *= pow( (1.0 - pow(ratio, weirPower[Weir[k].type])), 0.385);
if ( q2 > 0.0 )
q2 *= pow( (1.0 - pow(ratio, weirPower[VNOTCH_WEIR])), 0.385);
Link[j].Villemonte = pow( (1.0 - pow(ratio, weirPower[Weir[k].type])), 0.385); //(5.0.022 - RED)
}
Step 7: Save the value of the saved Villemonte correction in LINK.C in the procedure link_getResults so it can be read and seen in the Delphi interface
x[LINK_VILLEMONTE] = (float)Link[j].Villemonte; // (5.0.022 - RED)
St. Venant Terms in SWMM 5 and how they change for Force Mainsby dickinsonre |
Note: Orifice and Weir Flow Computations
The orifice flow calculation proceeds as follows:
1. Initially and whenever the setting (i.e., the fraction opened) changes, flow coefficients for both orifice and weir behavior are computed as follows:
a. For side orifices:
Define Hcrit = h/2 where h is the opening height.
b. For bottom orifices:
i. For a circular orifice, compute area over length (i.e., circumference) as AL = h /4.
ii. For a rectangular orifice compute AL = h*w/(2*(h+w)) where w is the opening width.
iii. Compute Hcrit = Cd*AL/0.414 where Cd is the orifice discharge coefficient.
At step 1b, the critical head for the bottom orifice, where orifice flow turns into weir flow, is found by equating the result of the orifice equation to that of the weir equation
Cd*Area*sqrt(2g)*sqrt(Hcrit) = Cw*Length*sqrt(Hcrit)*Hcrit or
Hcrit = (Cd * Area) / (Cw/sqrt(2g) * Length) The value of Cw/sqrt(2g) for a sharp crested weir is 0.414.
c. Compute the flow coefficients (where A is the area of the opening):
Corif = A*sqrt(2g)*Cd
Cweir = A*sqrt(2g)*Cd*sqrt(Hcrit)
2. During flow routing, compute the degree of inlet submergence (f) and head (H) at the current time step:
a. Define:
H1 = upstream head (from node with higher head),
H2 = downstream head (from node with lower head) ,
Hcrest = elevation of bottom of opening,
Hcrown = elevation of top of opening,
Hmidpt = elevation of midpoint of opening
b. For side orifices:
f = min{1.0, (H1 - Hcrest) / (Hcrown - Hcrest)}
if f < 1.0 then H = H1 - Hcrest,
else if H2 < Hmidpt then H = H1 - Hmidpt
else H = H1 - H2
c. For bottom orifices:
if H2 > Hcrest then H = H1 - H2
else H = H1 - Hcrest
f = min{1.0, H/Hcrit}
3. Compute the flow through the orifice (Q):
if f < 1.0 then Q = Cweir*f^1.5
else Q = Corif*sqrt(H)
4: Villemonte correction
If f < 1.0 and H2 > Hcrest then:
r = (H2 - Hcrest) / (H1 - Hcrest)
Q = Q * (1 - r^1.5)^0.385
Weir Flow Computations
1. Weir head calculations
h1 = Upstream Node Depth + Upstream Invert Elevation
h2 = Downstream Node Depth + Downstream Invert Elevation
If h2 is greater than h1 then the flow is reversed and h2 = h1 and h1 = h2
Weir Crest = Upstream Node Invert Elevation + Weir Offset Depth
Head = h1 – Weir Crest
2. Center Weir flow for Transverse Weirs
Q = Cw * Weir Length * Head^3/2
3. Center Weir flow for Side Flow Weirs
Weir behaves as a transverse weir under reverse flow
Q = Cw * Weir Length * Head^3/2
And under normal flow
Q = Cw * Weir Length * Head^5/3
4. Center Weir flow for V Notch Weirs
Q = Cw * Weir Slope * Head^5/2
Link Area Types in SWMM 5, InfoSWMM and H2OMap SWMMby dickinsonre |
Class
|
Description
|
Link Area Assignment
|
0 Dry conduit
|
1/2 Upstream and 1/2 Downstream Node
| |
1 Upstream end is dry
|
1/2 Downstream Node
| |
2 Downstream end is dry
|
1/2 Upstream Node
| |
3 Sub-critical flow
|
1/2 Upstream and 1/2 Downstream Node
| |
4 Super-critical flow
|
1/2 Upstream and 1/2 Downstream Node
| |
5 Free-fall at upstream end
|
1/2 Downstream Node
| |
6 Free-fall at downstream end
|
1/2 Upstream Node
| |
| Class | Description | Link Area Assignment |
| 0 Dry conduit | 1/2 Upstream and 1/2 Downstream Node | |
| 1 Upstream end is dry | 1/2 Downstream Node | |
| 2 Downstream end is dry | 1/2 Upstream Node | |
| 3 Sub-critical flow | 1/2 Upstream and 1/2 Downstream Node | |
| 4 Super-critical flow | 1/2 Upstream and 1/2 Downstream Node | |
| 5 Free-fall at upstream end | 1/2 Downstream Node | |
| 6 Free-fall at downstream end | 1/2 Upstream Node | |
Note: Orifice Critical Depth
The Critical height is the opening where weir flow turns into orifice flow. It equals (Co/Cw)*(Area/Length) where Co is the orifice coeff., Cw is the weir coeff/sqrt(2g), Area is the area of the opening, and Length = circumference of the opening. For a basic sharp crested weir, Cw = 0.414. All of the units are based on the internal SWMM 5 units of American Standard.
For a circular orifice the Critical
Critical Height = Orifice Discharge Coefficient / 0.414 * Orifice Opening / 4
For a rectangular orifice the Critic
Critical Height = Orifice Discharge Coefficient / 0.414 * (Orifice Opening*Width) / (2.0*(Orifice Opening+Width))
The Orifice Critical Depth
|