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

Sunday, August 4, 2013

Surcharged Node and the Link Connection in SWMM 5

Subject:   Surcharged Node and the Link Connection in SWMM 5

surcharged node in SWMM 5 uses this point iteration equation (Figure 1):

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

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

Figure 2.  The value of dQ/dH in a link as the roughness of the link increases.

An Example of the Importance of the Term DQ4 in the SWMM 5 St Venant Solution

Subject:   An Example of the Importance of the Term DQ4 in the SWMM 5 St Venant Solution

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 Keep, Dampen 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 value of dq4 increases when there is a significant difference in the cross sectional  area of the downstream end of the link and the upstream end of the link.  In this  example, the downstream storage node causes a backflow in the link.   The flow may look unstable in the link  flow time series but the change in flow is simply due to the water sloshing back and forth.  There is not continuity error as the term dq4 keeps the water in the link  in balance.






How to Search These Blogs for Information about SWMM5, InfoSWMM or InfoSewer

Note:  How to Search These Blogs for Information

In each of the blogs search  for a term or a set of terms using the search button.   For example, here is http://swmm5.blogspot.com with a search for venant or SWMM5.NET


An equivalent Search in http://www.swmm2000.com



An equivalent Search in http://swmm5.wordpress.com/  or SWMM5.ORG


An equivalent Search in http://swmm5.posterous.com


Saturday, August 3, 2013

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


Link Simulated Parameters used in either the Normal Flow or St Venant Equation of SWMM 5

Subject:  Link Simulated Parameters used in either the Normal Flow or St Venant Equation of SWMM 5

StVenant equation – this is the link attribute data used when the StVenant Equation is used in SWMM 5.  Simulated Parameters from the upstream, midpoint and downstream sections of the link are used.
Normal Flow Equation – this is the link attribute data used when the Normal Flow Equation is used in SWMM 5. Only simulated parameters from the upstream end of the link areused if the normal flow equation is used for the time step.

Monday, July 29, 2013

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 St. Venant 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 St. Venant 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, July 28, 2013

Four cross sectional areas are used in a link of SWMM 5

Note: Four cross sectional areas are used in a link of SWMM 5. The weighted hydraulic radius (Rwtd) is a function of the Froude Number of the link and the upstream and downstream hydraulic radius.  The Rwtd value is used in the computation of the friction slope or the dq1 term in the file dynamic.c

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

 

St. Venant Terms in SWMM 5 and how they change for Force Mains

Note:  An explanation of the four StVenant Terms in SWMM 5 and how they change for 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.  dq1 is calculated differently based on full or partially full force mains and gravity mains

            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

 



Saturday, July 27, 2013

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.



Friday, July 26, 2013

What are the Units for the five St. Venant Flow Terms in SWMM 5 and InfoSWMM?

Subject:  What are the Units for the five StVenant Flow Terms in SWMM 5 and InfoSWMM?

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

The five components calculated at the each time step and at each iteration during a time step and together predict the new Link Flow (Q) in SWMM 5.  The value of the different components can be seen over time in Figure 1 and as a component percentage in Figure 2 and 3.

Figure 1:  The Five StVenant Components over time.

Figure 2:  The relative magnitude of the St Venant terms over time for the same for the same link as in Figure 1.



Figure 3:  The relative magnitude of the St Venant terms over time for the same for the same link as in Figure 1 shown in an area chart normalized to 100 percent.  Normally the DQ1 and DQ2 terms balance each other except for backwater conditions or reverse flow in which the terms DQ3 and DQ4 can dominate.


Hysteresis Effect in the Link Flow versus Depth Relationship in SWMM 5

Subject:  Hysteresis Effect in the Link Flow versus Depth Relationship in SWMM 5

You can often get a hysteresis effect for the Flow versus Depth relationship in SWMM 5 due to the five component St. Venant equation used to simulate the flows (http://swmm5.blogspot.com/2010/12/what-are-units-for-five-st-venant-flow.html) .  A hysteresis effect is having two or more flow values for the same depth value in the link. For example, this image shows how the link 8100 has a different flow for the same depth in the rising and falling limb's of the hydrograph.  This is due to the different values for the upstream and downstream head, hydraulic radius and cross sectional area during the falling and rising hydrograph, respectively.

Saturday, November 24, 2012

SWMM 4 and SWMM 5 St. Venant Solutions Contrasted

SWMM 4 and SWMM 5 St. Venant Solutions Contrasted

SWMM 4 and SWMM 5 St. Venant Solutions Contrasted

by dickinsonre
SWMM 4 and SWMM 5 St. Venant 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 SWMM 4 Dynamic Wave Solution

The SWMM 4 Dynamic Wave Solution


The SWMM 4 Dynamic Wave Solution

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

Saturday, October 6, 2012

Lambda Calculus and Link Variables in the InfoSWMM, H2OMAP SWMM and SWMM 5 Dynamic Wave Solution

Subject:  Lambda Calculus and Link Variables in the InfoSWMM, H2OMAP SWMM and SWMM 5 Dynamic Wave Solution

Successive under-relaxation for the SWMM 5 Dynamic Wave Solution

by dickinsonre
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 1stiteration NOT using the under-relaxation parameter omega.

St. Venant equation – this is the link attribute data used when the St. Venant Equation is used inSWMM 5, H2OMAP SWMM and InfoSWMM.  Simulated Parameters from the upstream, midpoint and downstream sections of the link are used.


Normal Flow Equation – this is the link attribute data used when the Normal Flow Equation is used in H2OMAP SWMM. Only simulated parameters from the upstream end of the link are used if the normal flow equation is used for the time step.  The normal flow equation is used if the flow is supercritical or the water surface slope is less than the bed slope of the link.


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 non linear terms or dq3 and dq4 in this graph.
Reblog this post [with Zemanta]

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