Showing posts with label St. Venant. Show all posts
Showing posts with label St. Venant. Show all posts

Sunday, October 23, 2016

How to Use Scatter Plots in the DB Output tables of #InfoSWMM for d/D and q/Q


Harness the power of visualization with scatter plots in the DB Output tables of #InfoSWMM—a dynamic feature that brings the extensive data from SWMM5 output tables to life. 🌟📊

In InfoSWMM, you're not just reading numbers; you're witnessing the maximum link values dance across the Conduit Summary Table. With a simple right-click, a world of statistical analysis unfolds before you, offering plots, frequency graphs, histograms, and the coveted scatter graphs for any selected column. 🖱️💡

Dive Into the Data: Engage in a visual dialogue with your model by selecting two columns and crafting a scatter plot that tells a story. A plot of particular interest? The relationship between d/D, the depth-to-diameter ratio (capacity) of the pipe, and q/Qfull, the flow rate to full capacity flow rate. 📈🔍

Why Does It Matter? Qfull is calculated based on the full pipe depth, area, and hydraulic radius, all derived from the bed slope. Given that InfoSWMM, SWMM5 employ the robust St. Venant equations, you might observe q/Qfull ratios exceeding 1, even when d/D is below 1—a testament to the detailed physics captured by the models. 🌊🔢

Reference Material: For those thirsty for more knowledge, a treasure trove of St. Venant solutions within SWMM5 awaits in our comprehensive blogs. Each post serves as a beacon, guiding you through the intricacies of hydraulic modeling. 📚✨

Embrace these tools to transform data points into a narrative, charting the course of your wastewater management journey with precision and clarity. 🛠️🌐🚀






Figure 1 - How to Use Scatter Plots in the DB Output tables of #InfoSWMM for d/D and q/Q

Sunday, October 16, 2016

More St Venant Equations in #SWMM5

This blog shows the relationship between the terms dq1, dq2, dq3 and dq4 in the SWMM5 code and the St. Venant Partial Differential Equations.

dq2 = Time Step * Area wtd * (Head Downstream – Head Upstream) / Link Length or

dq2 = Time Step * Area wtd * (HGL) / Link Length Qnew = (Qold – dq2 + dq3 + dq4) / ( 1 + dq1) when the force main is full dq3 and dq4 are zero and

Qnew = (Qold – dq2) / ( 1 + dq1) The dq4 term in dynamic.c uses the area upstream (a1) and area downstream (a2), the midpoint velocity, the sigma factor (a function of the link Froude number), the link length and the time step or

dq4 = Time Step * Velocity * Velocity * (a2 – a1) / Link Length * Sigma the dq3 term in dynamic.c uses the current midpoint area (a function of the midpoint depth), the sigma factor and the midpoint velocity

dq3 = 2 * Velocity * ( Amid(current iteration) – Amid (last time step) * Sigma

dq1 = Time Step * RoughFactor / Rwtd^1.333 * |Velocity| The weighted area (Awtd) is used in the dq2 term of the St. Venant equation:

dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length


In this blog we show how the St Venant terms are used in SWMM5 as equations, table, graphs and units. We use a QA/QC version of SWMM 5 that lists many more link, node, system and Subcatchment variables than the default SWMM 5 GUI and engine. This also applies to #InfoSWMM and any software the uses the #SWMM5 engine.  
SWMM5 is using is the most advanced equations as it takes into consideration the full dynamic (St. Venant) equations and not the more simplified kinematic wave / manning equations. The manning equation only considers the uniform flow conditions which represents a situation where the gravitational force on a column of water (due to the channel slope) balances out the frictional force. The full dynamic equations contains additional factors that affect the movement of water in a conduit or channel. These include the pressure force due to variation of depth along the length of the channel and the inertial (or convective acceleration) effect due to variation of flow area along the channel length. Because of these additional terms the flow/head relation you have in uniform flow conditions can be completely different according to the configuration of his network.

Saturday, October 15, 2016

#SWMM5 1-D St Venant Equation Terms

Overview

In this blog we show how the St Venant terms are used in SWMM5 as equations, table, graphs and units. We use a QA/QC version of SWMM 5 that lists many more link, node, system and Subcatchment variables than the default SWMM 5 GUI and engine. This also applies to #InfoSWMM and any software the uses the #SWMM5 engine.
SWMM5 is using is the most advanced equations as it takes into consideration the full dynamic (St. Venant) equations and not the more simplified kinematic wave / manning equations. The manning equation only considers the uniform flow conditions which represents a situation where the gravitational force on a column of water (due to the channel slope) balances out the frictional force. The full dynamic equations contains additional factors that affect the movement of water in a conduit or channel. These include the pressure force due to variation of depth along the length of the channel and the inertial (or convective acceleration) effect due to variation of flow area along the channel length. Because of these additional terms the flow/head relation you have in uniform flow conditions can be completely different according to the configuration of his network.

How are the St Venant Terms used in SWMM5?

Figure 1 shows the terms and Figure 2  and Figure 3 shows the terms in a SWMM5 table and SWMM5 graph. 

dq2 = Time Step * Area wtd * (Head Downstream – Head Upstream) / Link Length or

dq2 = Time Step * Area wtd * (HGL) / Link Length Qnew = (Qold – dq2 + dq3 + dq4) / ( 1 + dq1) when the force main is full dq3 and dq4 are zero and

Qnew = (Qold – dq2) / ( 1 + dq1) The dq4 term in dynamic.c uses the area upstream (a1) and area downstream (a2), the midpoint velocity, the sigma factor (a function of the link Froude number), the link length and the time step or

dq4 = Time Step * Velocity * Velocity * (a2 – a1) / Link Length * Sigma the dq3 term in dynamic.c uses the current midpoint area (a function of the midpoint depth), the sigma factor and the midpoint velocity

dq3 = 2 * Velocity * ( Amid(current iteration) – Amid (last time step) * Sigma

dq1 = Time Step * RoughFactor / Rwtd^1.333 * |Velocity| The weighted area (Awtd) is used in the dq2 term of the St. Venant equation:

dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length

You can also see the QA/QC report for SWMM 5 https://www.epa.gov/water-research/storm-water-management-model-swmm#downloads

How are the St Venant Units used in #SWMM5?

The new flow (Q) calculated at during each iteration of time step as

(1) Q for the new iteration = (Q at the Old Time Step – DQ2 + DQ3 + DQ4 ) / ( 1.0 + DQ1 + DQ5)

In which DQ2, DQ3 and DQ4 all have units of flow (note internally SWMM 5 has units of CFS and the flows are converted to the user units in the output file, graphs and tables of SWMM 5).

The equations and units for DQ2, DQ3 and DQ4 are:

(2) Units of DQ2 = DT * GRAVITY * aWtd * ( H2 – H1) / Length = second * feet/second^2 * feet^2 * feet / feet = feet^3/second = CFS

(3) Units of DQ3 = 2 * Velocity * ( aMid – aOld) * Sigma = feet/second * feet^2 = feet^3/second = CFS

(4) Units of DQ4 = DT * Velocity * Velocity * ( aMid – aOld) * Sigma / Length = second * feet/second * feet/second * feet^2 / feet = feet^3/second = CFS

The equations and units for DQ1 and DQ5 are:

(5) Units of DQ1 = DT * GRAVITY * (n/PHI)^2 * Velocity / Hydraulic Radius^1.333 = second * feet/second^2 * second^2 * feet^1/3 * feet/second / feet^1.33 = Dimensionless

(6) Units of DQ5 = K * Q / Area / 2 / Length * DT = feet^3/second * 1/feet^2 * 1/feet * second = Dimensionless
Figure 1.  St Venant Terms in Table and Graphs for #SWMM5 for dq1, dq2, dq3, dq4, dq5, dq6

Figure 2.  St Venant Equation in SWMM5

Sunday, November 15, 2015

Innovyze St Venant Solutions for InfoSewer, H20Map Sewer, #InfoSWMM, H2OMap SWMM and #InfoWorks_ICM and #InfoWorks_ICM_SE

This blog contrasts the St Venant Solutions for InfoSewerH20Map Sewer (1), InfoSWMM/H2OMap SWMM and ICM/ICM SE.

1.  Assumptions for the St. Venant Equations

The assumptions behind Lumped and Distributed Models along with the assumptions of the St Venant equations.  InfoSewerH20Map Sewer, InfoSWMM, H2OMap SWMM, SWMM5, ICM and ICM SE are all Distributed models for Unsteady flow.  InfoSWMM and InfoSewerH20Map Sewer have options for direct steady flow.  ICM and InfoSWMM can also use a quasi steady flow solution.   All of these Innovyze models use the Continuity Equation and Momentum equation for routing flows in links.  The numerical solution differs between the three Innovyze main  platforms:
  • Storm cloudInfoSewer and H2OMap Sewer
  • Storm cloudInfoSWMM,  H2OMap SWMM and SWMM 5
  • Storm cloudICM and ICM SE
image242[5]
image243[5]

image241[7]

Continuity Equation

image489[5]

Various Forms of the Momentum Equation

image488[5]

2.  Muskingum-Cunge for InfoSewerH20Map Sewer

image143[5]
The continuity (mass conservation) equation is:
image499[6]
image497[5]
where
x          =          distance along the pipe (longitudinal direction of sewer)
A          =          flow cross sectional area normal to x
y          =          coordinate direction normal to x on a vertical plane
d          =          depth of flow of the cross section, measured along y direction
Q         =          discharge through A
V          =          cross sectional average velocity along x direction
S0         =          pipe slope, equal to sin θ
θ          =          angle between sewer bottom and horizontal plane
Sf            =          friction slope
g             =          gravitational acceleration
t           =          time
β          =          Boussinesq momentum flux correction coefficient for velocity distribution

3. SWMM5, H2OMap SWMM and InfoSWMM

image144[5]
 

4. ICM and ICM SE

image145[4]
image149[4]

5. A common look at the Equations for ICM, ICM  SE. InfoSWMM and H2OMap SWMM

image192[7]

ICM 2D and InfoSWMM 2D Equations

ICM 2D and InfoSWMM share the same computational engine as described on the Innovyze Blog
image491[5]
As the scheme is an explicit solution it does not require iteration to achieve stability within defined tolerances like the ICM 1D scheme or the iterative solution in InfoSWMM.  Instead, for each element, the required timestep is calculated using the Courant-Friedrichs-Lewy condition in order to achieve stability, where the Courant-Friedrichs-Lewy condition is
image492[5]

Sunday, March 9, 2014

SWMM 5 solution for the St Venant Equation and the Node Continuity Equation

I like the way the SWMM 5 solution for the St Venant Equation and the Node Continuity Equation is presented in this paper file:///D:/Downloads/swmm-paper-libre.pdf 
It shows the major components of the SWMM5 solution (gravity, time, inertial, friction and entrance/other and exit losses) and the connection between Storage Area of the Node and the Area of the Node associated with the connecting links.  In my description of the solution here http://www.swmm5.net/2013/07/st-venant-terms-in-swmm-5-and-how-they.html dq1 is Friction, dq2 is gravity, dq3 + dq4 is inertial and dq5 is losses.



Key Dynamic Wave Equations in SWMM 5

Sunday, August 25, 2013

The Link Time Step in SWMM 5, InfoSWMM and H2OMap SWMM

Introduction:  This set of blogs uses the 1000 year rainfall/runoff/hydraulics model that you can download at http://swmm2000.com/forum/topics/1000-year-simulation-with-rainfall-in-swmm-5 to show the inner workings of SWMM 5 and by extension InfoSWMM and H2oMap SWMM using a QA/QC version of SWMM 5 with extended graphics.   I always hope that seeing the inner workings of a SWMM 5 feature helps to understand the code, sensitivity and importance of a parameter.   It also helps show sometimes when a parameter is not important.  

Discussion:  Here we look at the link time step for a 100 year simulation.   If you use the Variable Time Step in SWMM5 with the CFL Adjustment factor the program will compute the needed link time step at each simulation time step based on the last time steps depth, velocity and width.  The link time step is

Link Time Step = Adjustment Factor * CFL Explicit Time Step for the Controlling Link

The time step is larger for low flows and decreases as the flow in the link increases (Figure 1).     The time step ranges between the maximum step allowed by the user during the simulation and the time step lengthening value in the Dynamic Wave Tab of the Simulation options.  The program will use the minimum of the time steps for ALL links.  The minimum time step at each simulation step is multiplied by the Adjustment Factor.  The time steps used during the simulation are listed in the Routing Time Step Summary table where you can find the average, minimum and maximum time steps.  The smaller the Adjustment Factor the smaller the link time steps during higher flow.
Figure 1.  The Link Time Step over a 100 Year Period for Link Venant


Thursday, August 8, 2013

The SWMM 4 Dynamic Wave Solution

The SWMM 4 Dynamic Wave Solution
The attached PDF file is a copy of Appendix C of the SWMM 4 manual explaining the three St Venant solutions in SWMM 4 / Extran 4.  The current SWMM 5 solution in its dynamic wave solution is an adaptive time step iterative solution of the ISOL Zero solution in SWMM 4.


SWMM 4 and SWMM 5 St. Venant Solutions Contrasted

SWMM 4 and SWMM 5 StVenant Solutions Contrasted

1. Compute at time t+delta t the values of dQ/dt for the Links and dH/dt for the Nodes from the properties at time t
2 Iterate at least 2 times until either all nodes and links are converged or a maximum of 8 iterations are reached
3. Use the values of Q and H at time t+delta t for the new time step

The SWMM5 Solution for Flow and Depth at each time step.  The new depth and new flow is always based on the old depth and old flow and normally converges fast as the flow is gradually varied.   The solution is iterative and implicitly uses the new depth and flow at each iteration.

The SWMM4 Solution for Flow and Depth is solved Explicitly at each time step.  The new depth and new flow is always based on the old depth and old flow and and a half and full time step during the time step.

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. 

Monday, August 5, 2013

Force Main Friction Loss in InfoSWMM and the Transition from Partial to Full Flow

Subject:  Force Main Friction Loss in InfoSWMM and the Transition from Partial to Full Flow


You can model Force Main friction loss in InfoSWMM using either Darcy Weisbach or Hazen Williams as the full pipe friction loss method (see Figure 1 for the internal definition of full flow).   A function called ForceMain in 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 No matter which method you use for full flow the  program will use Manning's equation to calculate the loss in the link when the link is not full (see Figure 2 for the equations used for calculating the friction loss – variable dq1 in the St Venant equation for InfoSWMM).   The regions for the different friction loss equations are shown in Figure 3.    

There is no slot in InfoSWMM for the full pipe flow as a surcharged node in InfoSWMM uses this point iteration equation (Figure 4): 
dY/dt = dQ / The sum of the Connecting Link values of  dQ/dH 
where Y is the depth in the node, dt is the time step, H is the head across the link (downstream – upstream), dQ is the net inflow into the node and dQ/dH is the derivative with respect to H of the link  St Venant equation.  If you are trying to calibrate the surcharged node depth, the main calibration variables are the time step and the link  roughness:
 1.   Mannings's N
2.   Hazen-Williams or
3.   Darcy-Weisbach 

The link roughness is part of the term dq1 in the St Venant solution and the other loss terms are included in the term dq5.  You can adjust the roughness of the surcharged link  to affect the node surcharge depth.   The point iteration continues until the sum of the flow in the node is zero – basically the new depth in the node either increases or decreases the friction loss in the force main so that net flow at the node is zero.  This is why it is important to use the right time step to ensure that the net flow is zero when the pumps turn on and off. 

Figure 1.  How the full pipe condition is defined in InfoSWMM - both ends have to be full





Figure 2:  Friction equations used in SWMM 5 for a Force Main.


Figure 3:  Regions of Friction loss equations in SWMM 5.


Figure 4.  The Node Surcharge Equation is a function of the net inflow and the sum of the term dQ/dH in all connecting links. Generally, as you increase the roughness the value of dQ/dH increases and the denominator of the term dY/dt = dQ/dQdH increases.

How is the St Venant Equation Solved for in the Dynamic Wave Solution of SWMM 5?

Subject:   How is the St Venant Equation Solved for in the Dynamic Wave Solution of SWMM 5?

An explanation of the four StVenant Terms in SWMM 5 and how they change for Gravity Mains and Force Mains. The HGL is the water surface elevation in the upstream and downstream nodes of the link. The HGL for a full link goes from the pipe crown elevation up to the rim elevation of the node + the surcharge depth of the node.  The four terms are:

dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length or
dq2 = Time Step * Awtd * (HGL) / Link Length
Qnew = (Qold – dq2 + dq3 + dq4) / ( 1 + dq1)
when the force main is full dq3 and dq4 are zero and
Qnew = (Qold – dq2) / ( 1 + dq1)
The dq4 term in dynamic.c uses the area upstream (a1) and area downstream (a2), the midpoint velocity, the sigma factor (a function of the link Froude number), the link length and the time step or
dq4 = Time Step * Velocity * Velocity * (a2 – a1) / Link Length * Sigma
the dq3 term in dynamic.c uses the current midpoint area (a function of the midpoint depth), the sigma factor and the midpoint velocity
dq3 = 2 * Velocity * ( Amid(current iteration) – Amid (last time step) * Sigma
dq1 = Time Step * RoughFactor / Rwtd^1.333 * |Velocity|
The weighted area (Awtd) is used in the dq2 term of the StVenant equation:
dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length

The four terms change at each iteration and time step to determine the new flow (Figure 1) based on the two equations:

Denom = 1 + dq1 + dq5
Q = [Qold – dq2 + dq3 + dq4] / Denom

If you look at a table of the values you will see that the terms add up to zero when the flow is constant and to delta Q or the change in Q when the flow is NOT constant (Figure 2).


Figure 1.  The four terms define the new flow at each iteration in the dynamic wave solution of SWMM5


Figure 2.   The magnitude of the four terms determine the flow at the new iteration and ultimately the new Time Step.  If the flow is constant then the value of the term is constant.

Sunday, August 4, 2013

The Keep and Dampen options and their effect on the four main terms of the St Venant equation in SWMM5

Note:  The Keep and Dampen options and their effect on the four main terms of the St Venant equation

The four terms are are used in the new flow for a time step of Qnew:

Qnew = (Qold – dq2 + dq3 + dq4) / ( 1 + dq1)
when the force main or gravity main is full dq3 and dq4 are zero and  Qnew = (Qold – dq2) / ( 1 + dq1)

The dq4 term in dynamic.c uses the area upstream (a1) and area downstream (a2), the midpoint velocity, the sigma factor (a function of the link Froude number), the link length and the time step or
dq4 = Time Step * Velocity * Velocity * (a2 – a1) / Link Length * Sigma
where Sigma is a function of the Froude Number and the KeepDampen and Ignore Inertial Term Options.  Keep sets Sigma to 1 always and Dampen set Sigma based on the Froude number, Ignore sets Sigma to 0 all  of the time during the simulation

the dq3 term in dynamic.c uses the current midpoint area (a function of the midpoint depth), the sigma factor and the midpoint velocity.

dq3 = 2 * Velocity * ( Amid(current iteration) – Amid (last time step) * Sigma
dq1 = Time Step * RoughFactor / Rwtd^1.333 * |Velocity|

The weighted area (Awtd) is used in the dq2 term of the StVenant equation:
dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length or
dq2 = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length

Normally, dq1 (Friction Loss / Maroon in the Graph) balances dq2 (Water Surface Slope Term or Green in the Graph) but often for links with a large difference between upstream and  downstream depths dq4 (Red in the Graph) can have a significant value.  If dq4 or dq3 are important then the depth of water to increases to pass the same flow using the Keep option over the Ignore.   If you have a link with a Froude number near or over 1.0 (Supercritical) then using Keep or Dampen  for the Options may result in depth differences.   The effect of Keep is to increase the "loss" terms in the St VenantEquation.   The effect of Dampen and Ignore is to decrease the sum of the "loss" terms in the StVenant Solution and lower the simulated 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...