Detailed Overview of solveContinuity and evalContinuity Functions in SWMM5 ๐๐๐
solveContinuity Function: Solving the Continuity Equation ๐๐งฎ
Function Prototype ๐
- Input:
qin: Upstream normalized flow.ain: Upstream normalized area.aout: Downstream normalized area.
- Output: Updates
aoutand returns an error code. - Purpose: To solve the continuity equation for the normalized area
a, using the Newton-Raphson root finding method. - Return Codes:
>= 0: Number of function evaluations used.-1: Newton function failed.-2: Flow always above maximum flow.-3: Flow always below zero.
Key Steps ๐️
- Determine Bounds: Set upper and lower bounds on
aso that crosses zero. - Initial Bounds:
- Upper bound (
aHi) set to the area at full flow. - Lower bound (
aLo) set to the area where the section factor is maximal.
- Upper bound (
- Switch Bounds: If necessary, switch
aLoandaHibased on the sign of . - Root Finding:
- Start at the midpoint of bounds if the initial value of
aoutis outside these bounds. - Utilize the Newton root finder method.
- Start at the midpoint of bounds if the initial value of
- Error Handling: If the function fails to find a root, an error code is returned.
evalContinuity Function: Evaluating the Continuity Equation ๐๐
Function Purpose ๐ฏ
- Input:
a- Outlet normalized area. - Output:
f: Value of the continuity equation.df: Derivative of the continuity equation with respect to the normalized area.
- Functionality: Computes the value and derivative of the continuity equation for a given normalized outlet area
a.
Technical Aspects ๐ฅ️๐งช
- These functions are crucial for accurately modeling flow dynamics in stormwater systems in SWMM5.
- The
solveContinuityfunction is responsible for ensuring the physical feasibility of flow and area calculations. - The
evalContinuityfunction provides necessary computations for the Newton-Raphson method to accurately find the root.
Role in SWMM5 ๐๐ฐ
- Integral to simulating and predicting the behavior of drainage networks under various hydrological conditions.
- Essential for the precision and reliability of stormwater runoff and sewer system simulations in urban environments.
In conclusion, the solveContinuity and evalContinuity functions in SWMM5 play pivotal roles in ensuring the accuracy and reliability of kinematic wave flow routing, forming the backbone of complex hydrological calculations in urban drainage modeling. ๐๐๐ง๐ป๐ง️๐️๐