Known and Unknown Variables in the Node Continuity Equation of SWMM5
Node Continuity Equation
The fundamental principle behind the node depth calculation is the conservation of mass (continuity):
- Change in Storage = Inflow - Outflow - Losses
In the context of a SWMM 5 node, this translates to:
- Change in Node Volume = (Sum of Inflows) - (Sum of Outflows) - (Losses due to Evaporation and Infiltration)
Equation Breakdown:
The equation you provided is a discretized form of the continuity equation, specifically using the average of the old and new inflows and outflows:
New Iteration Node Depth = Old Node Depth + [ ½ * (New Inflow – New Outflow) + ½ * (Old Inflow – Old Outflow) - Node Losses ] / New Surface Area * Time Step
New Iteration Node Depth: The depth of water at the node at the current iteration (this is what we're trying to calculate). It is called the Iteration Node Depth because it will change on the next iteration until the Iteration Node Depth is within 0.005 feet of the previous Iteration Node Depth.Old Node Depth: The depth of water at the node at the previous time step.New Inflow: The sum of all inflows to the node at the current iteration. This includes external inflows (e.g., rainfall, user-defined inflows) and flows from connected links calculated in the current iteration.New Outflow: The sum of all outflows from the node at the current iteration. This includes flows to connected links calculated in the current iteration.Old Inflow: The sum of all inflows to the node at the previous time step.Old Outflow: The sum of all outflows from the node at the previous time step.Node Losses: The volume of water lost due to evaporation and infiltration at the current iteration.New Surface Area: The surface area of the node at the current iteration. This is calculated based on the node's geometry (e.g., depth-area curve for storage nodes, width and length for other nodes).Time Step: The simulation time step.
Known and Unknown Variables:
At the start of each time-step iteration:
-
Known:
Old Node DepthOld InflowOld OutflowTime Step
-
Calculated during the current iteration but based on values from the previous iteration:
New Inflow(Based on link flows from the previous iteration)New Outflow(Based on link flows from the previous iteration)New Surface Area(Based on theIteration Node Depthfrom the previous iteration or on the first iteration it is based on theOld Node Depth)Node Losses(Based on theIteration Node Depthfrom the previous iteration or on the first iteration it is based on theOld Node Depth)
-
Unknown:
New Iteration Node Depth(This is what the equation solves for). On the 2nd to 8th iteration the New Node Depth is found by averaging the New Iteration Node Depth and the Old Iteration Node Depth.
Iterative Process:
SWMM 5 uses an iterative process to solve for the New Node Depth because the New Inflow, New Outflow, and New Surface Area are dependent on the New Node Depth itself. This creates a circular dependency that requires iteration.
-
First Iteration:
- An initial estimate for
New Iteration Node Depthis made. It is based on theNew Iteration Node Depthequation and uses theOld Node Depth, the average of theNewandOldInflow, the average of theNewandOldOutflow, theTime Step, the NodeLossesand theNew Surface Area. - Based on this
New Iteration Node Depth, theNew Inflow,New Outflow, andNew Surface Areaare updated. TheNew Node Depthis set equal to theNew Iteration Node Depth.
- An initial estimate for
-
Second to Eighth Iterations:
- The
New Iteration Node Depthequation is used to calculate a newNew Iteration Node Depth. - The
New Inflow,New Outflow, andNew Surface Areaare updated based on theNew Iteration Node Depth. - The
New Node Depthis set equal to the average of the currentNew Iteration Node Depthand the previous iterationNew Node Depth. This averaging helps to stabilize the solution and prevent oscillations.
- The
-
Convergence Check:
- After each iteration, the
New Iteration Node Depthis compared to theNew Node Depthfrom the previous iteration. - If the absolute difference is less than a tolerance (0.005 feet in your case), the solution is considered to have converged, and the iteration stops.
- If the difference is greater than the tolerance, the iteration continues, up to a maximum of 8 iterations (in SWMM 5.0.020).
- After each iteration, the
Why Iteration is Necessary:
- Nonlinearity: The relationships between node depth, inflow, outflow, and surface area are often nonlinear. For example, the flow through a link might be related to the square root of the head difference between two nodes.
- Interdependence: The flow in each link depends on the depths at the connected nodes, and the depths at the nodes depend on the flows in the connected links.
Benefits of this Approach:
- Accuracy: The iterative approach allows for a more accurate solution of the node continuity equation, especially in situations with rapidly changing flow conditions.
- Stability: The averaging of the
New Node Depthin the second to eighth iterations helps to improve the stability of the numerical solution and prevent oscillations.

No comments:
Post a Comment