Professional Documents
Culture Documents
Modified Newton-Raphson Technique For Integrated Object-Oriented Water Pipe Network Analysis
Modified Newton-Raphson Technique For Integrated Object-Oriented Water Pipe Network Analysis
Abstract
In the proposed research, modified Newton-Raphson technique is developed for integrated object-
oriented analysis of water pipe network. An object-oriented concept is used for the integrated
simulation model of water pipe distribution network analysis for efficient data handling. This is
achieved by treating first the pipe network as a graph data structure with its nodes as the graph's
nodes and the pipes as the edges. The algorithm for cycle (real or pseudo cycles) extraction has been
developed using Nested Breadth First Search (NBFS) to give cycles in clockwise order. Pseudo loops
are found out using shortest path algorithm between two adjacent supply nodes. Pipes in cycles are
initialized using conservation of mass at nodes. Friction factor is updated for every change in
discharge in pipes. Modified Newton-Raphson technique is developed to obtain solution of the non-
linear equation for analyzing the water pipe network considering third order convergence in next step.
This technique is more efficient and takes less time to converge the final solution than the traditional
Newton-Raphson method. The pressure calculation has been done at last by using balanced
discharges and input parameters of pipe network. Balanced discharges and nodal pressure in the pipe
network are compared with simultaneous loop flow adjustment method and are found more efficient
for complex network. Results have been validated with the results obtained by EPANET software.
Keywords: Simultaneous loop flow adjustment method, Hydraulic analysis, Loop detection, NBFS,
Modified Newton-Raphson technique.
1 Introduction
Flow analysis of the water pipe network is done in the proposed work using modified Newton-
Raphon method in which non-linear equation is solved considering third order convergence. All
processes involved in flow analysis are integrated. Proposed analysis is necessary for water
resource management. Looped pipe network has been considered in proposed work for reliable pipe
distribution network analysis. To know details of pipes diameter, reservoir and pumps are necessary
for design analysis of water pipe network to provide required demand at suitable nodal pressure.
Continuity equation at nodes and energy conservation equation within the loops are two basic
equations for pipe network analysis. Energy equation gives the nonlinear system in which flow
adjustment in loops (∆Q) are the fundamental unknowns. For given network parameters (roughness,
length, diameters of pipes and elevation at nodes), solution for the unknowns mentioned above will
be obtained by the help of known initial pipe discharges using numerical techniques such as Linear
theory method [1], Newton- Raphson [2, 3], and Gradient global algorithm [4] . These techniques
are meant to solve linear and non-linear equations. H-Newton-Raphson method has been improved
by Spiliotis and Tsakiris [5] by evaluating the discharge in each branch of pipe network using
Swamee and Jain equation [6]. Several Newton-Raphson based algorithms have been developed by
Todini [7, 8] which have linearized the global algorithm [4]. Several new algorithms based on linear
theory have been developed by Todini and Rossman [9] which are an extension of the work [7, 8].
Lumped junction demand based technique has been developed by Giustolisi [10] which is not using
head loss equation. Gudin˜o-Mendoza et al. [11] have developed Hybrid Petri Nets based technique
for analysis of water pipe distribution network. Arsene et al. [12] have given loop-equations based
technique which uses DFS and works in real-time by improving numerical algorithms. Cerna and
1st International WDSA / CCWI 2018 Joint Conference, Kingston, Ontario, Canada – July 23-25, 2018
Pelanek [13] have detected the explicit fair cycle by a new distributed scalable algorithm using set
based approach which takes less time and detect the cycle’s on-the–fly. Nested Depth First Search
technique cannot use the parallelism, due to the successive nature and cannot be worked with many
processors. Brim et al. [14] have presented a Nested Depth First Search method, which locates the
directed graph with negative length. Verification of Temporal properties has been achieved in
Courcoubetis et al. [15] by developing efficient nested DFS algorithms which is sequential in nature
hence cannot be parallelized. Barnat et al. [16] have checked enumerative Linear Sequential Logic
model by practical parallel on-the-fly algorithm. To detect the loop, Breadth First Search is used to
obtain the signature edges and checked simultaneously by Depth First Search to confirm the
availability of a loop. Decomposition of the graph is done using a static partition function. The
graph is divided into sub graphs in that case where all cycle cannot be successfully extracted. Ivetic
et al. [17] have used ∆Q method for design optimization of water distribution network. BFS
propagation algorithm is used to identify the basis loops. In the next step number of loops having
smaller number of pipes are obtained by transformation of spanning tree. ∆Q method proposed is
more efficient than the GGA integrated in EPANET2. Singh et al. [18] have solved Hardy Cross
based iteration problem of reservoir and pipe network by finding the starting point of iteration using
topological similarity. Moosavian and Jaefarzadeh [19] have proposed a modified Hardy-Cross
method which implements an algorithm for initial discharge that is close to final discharge. The
mass conservation is obtained automatically. Multi-reservoir problems and nodal pressure
calculation are missing in this work which has been successfully done in the proposed work. Tabesh
et al. [20] have developed an algorithm for the relationship between nodal outflow pressure and
consecutive set of non-linear equations for the analysis of pipe network. A third-order convergence
Newton-Raphson technique is stated in [21] which has been used in [19] to solve water pipe
network problem. The present work also uses the third order convergence Newton-Raphson
technique [21].
Loops are extracted in the proposed work by NBFS traversal method without subdividing the pipe
network graph [22]. The proposed work is an extension of the previous work [23] and uses the
modified Newton-Raphson technique.
Order of Initialization of pipes in loop is done in reverse of the extraction. Initialization is done in
both the directions of loop to ensure that the unbalanced discharge in loop will be passed to the
uninitialized adjacent pipe of the loop. Continuity equation is used to initialize uninitialized pipes in
term of known pipe discharges and nodal demand. Balanced discharge in pipes is obtained by
modified Newton-Raphson method which converges faster than traditional Newton-Raphson
technique [1] and the simultaneous loop adjustment method [2, 3, and 23]. Friction factor is
calculated for all three cases of flow in pipes and updated for any change in pipe discharge. Finally,
nodal pressure is calculated at all nodes in terms of pressure at a reference (supply) node, balanced
discharge in pipes and network parameters using energy equation between the reference nodes and
the node where pressure will be calculated. Network parameters involved between the nodes are
obtained by shortest path traversal. Object-oriented concepts are used for efficient data handling.
Different classes are designed in the proposed water pipe network analysis whose objects interact
with each other for efficient data handling. The common classes are node, pipe, loop and pipe
network. Maintenance and modification of code can be done very easily to suit other requirements.
OpenGL and C++ language have been used for graphical user interface (GUI). Required accuracy
has been considered in development of GUI to control the complexity which is not available in
EPANET software. Finally, the pressure and discharge obtained by proposed work are compared
with traditional N-R Method and EPANET software. The proposed technique is efficient and takes
less time to converge the final solution.
1st International WDSA / CCWI 2018 Joint Conference, Kingston, Ontario, Canada – July 23-25, 2018
2 Methodology
Proposed work has been performed in four simultaneous steps. Pipe and node data are the prime
inputs to construct graph network, and cycles (closed and pseudo) are extracted by the (NBFS).
NBFS traversal is proposed to determine minimal loops and BFS traversal is used to extract pseudo
loops from graph network. First BFS searches the signature edges and for each signature the second
BFS is called for shortest cycle. In the present work graph is represented by adjacency list. Edges
are searched systematically to find each vertex approachable from the starting node. Initialization of
pipes in loop is performed next from the extracted cycles using continuity equation at each node.
During initialization, the mass conservation equation is used at all junctions and unknown pipe
discharge is calculated in terms of known discharges and nodal demand. If not a single value of
discharge or demand at the nodes of the loop is known than the initialization is performed assuming
an initial discharge in a pipe of any arbitrary node of the loop. If all the nodes cannot be initialized
successfully then it is performed by reordering the extracted loops. Pipe containing the supply node
is initialized at end to compensate the total unbalanced discharge. The network is analyzed using the
modified Newton-Raphson technique [19]. Pressure at network nodes are calculated in last step.
The computed data is compared with traditional Newton-Raphson technique which shows that the
proposed work converges faster. Validation of results has been performed with the similar results
obtained by EPANET software.
Fig 1. Flow chart of automatic minimal loop extraction Fig. 2. Dependent and independent loop
1st International WDSA / CCWI 2018 Joint Conference, Kingston, Ontario, Canada – July 23-25, 2018
extractions, because a boundary edge makes only one cycle. Cycle is formed by the edges which are
marked travelled by the first BFS. The starting node defines the order of cycle extraction. The other
vertices are not attempted, if starting node gives all the extracted cycle. In the proposed work, all
the nodes of the graph are recalled in a for-loop for successfully starting node. If every attempt of
starting vertices fails to extract all the loops in graph network, then the program will not execute
and will show a message that the graph network needs to be decomposed before applying current
algorithm. Minimal cycles are obtained using BFS. Queue is implemented for both the traversals.
The bounding edges are only the part of single cycle. An edge may be part of more than one loop. A
flow chart is shown in Figure. 1 to understand Automatic Minimal Loop Extraction algorithm
Where K 8 fL /( 2 gD 5 ) , L and D are length and diameter of pipe, g and f are acceleration due to
gravity and the friction coefficient, K is the pipe constant and n=2.
Minor losses are not considered in present work. Energy equation in loop is:
H L (Q) KQ n (2)
In any pipe Q Q0 Q
1st International WDSA / CCWI 2018 Joint Conference, Kingston, Ontario, Canada – July 23-25, 2018
Q is the update discharge, Q0 is the initial discharge and ∆Q is the corrective discharge.
Putting Q in equation 2
H L (Q) K (Q0 Q) n 0
Q modified = Q0 + ∆Q (7)
Iteration will be stopped if the incremental discharge (∆Q) is less than (0.0000001m3/s) for all
loops, which may be lowered further if needed.
Figure 4. Pipe network Figure 5. Extracted real loops Figure 6. Extracted psuedo loop
4 Conclusions
Modified Newton-Raphson technique has been formulated for integrated water pipe network
analysis. The proposed technique is more efficient than the Newton-Raphson technique [1] and
Simultaneous loop adjustment technique [2, 3, 23]. Third order convergence has been adopted in
the proposed research. Algorithms of automatic minimal loop extraction and initialization have
been implemented successfully for several graph networks (pipe network). Minimal loops are
extracted based on NBFS traversal. Heuristics are formulated to get proper loops. Friction factor is
calculated for every updated discharge for all type of flows. Present technique is simpler and takes
less time per iteration than technique adopted in [1, 2, 3, 23]. The present work uses object-oriented
concepts which are efficient in data handling and also handles multi reservoir problems which are
missing in [19]. Leak detection and monitoring of water pipe network for cities can be performed
by the proposed method.
1st International WDSA / CCWI 2018 Joint Conference, Kingston, Ontario, Canada – July 23-25, 2018
5 References
[1] Cross, Hardy. Analysis of flow in networks of conduits or conductors. University of Illinois at Urbana
Champaign, College of Engineering. Engineering Experiment Station. 1936.
[2] Shamir, Uri Y., and Charles DD Howard. "Water distribution systems analysis." Journal of the
Hydraulics Division 94, No. 1 (1968): 219-234.
[3] Wood, Don J., and Carl OA Charles. "Hydraulic network analysis using linear theory." Journal of the
Hydraulics division 98, No. 7 (1972): 1157-1170.
[4] Todini, E., and S. Pilati. “A gradient algorithm for the analysis of pipe networks”. In Computer
applications in water supply: vol. 1(1988):1-20.
[5] Spiliotis, M., and G. Tsakiris. "Water distribution system analysis: Newton-Raphson method revisited."
Journal of Hydraulic Engineering 137, No. 8 (2010): 852-855.
[6] Swamee, P. K., and Jain, A. K. (1976). “Explicit equations for pipe-flow problems.” J. Hydraul. Div.,
102(5), 657–664.
[7] Todini, Ezio. "On the convergence properties of the different pipe network algorithms." In Water
Distribution Systems Analysis Symposium (2006):1-16.
[8] Todini E. “A unifying view on the different looped pipe network analysis algorithms”. Computing and
Control for the Water Industry.—Baldock, UK, Research Studies Press Ltd(1999): 63-80,
[9] Todini, Ezio, and Lewis A. Rossman. "Unified framework for deriving simultaneous equation algorithms
for water distribution networks." Journal of Hydraulic Engineering 139, No. 5 (2012): 511-526.
[10] Giustolisi, Orazio. "Considering actual pipe connections in water distribution network analysis."
Journal of Hydraulic Engineering 136, No. 11 (2010): 889-900.
[11] Gudiño-Mendoza, Berenice, Ernesto López-Mellado, and Hassane Alla. "Modeling and simulation
of water distribution systems using timed hybrid Petri nets." Simulation 88, No. 3 (2012): 329-347.
[12] Arsene, C. T. C., A. Bargiela, and D. Al-Dabass. "Modelling and simulation of water systems based
on loop equations." IJ of Simulation 5, No. 1–2 (2004): 61-72.
[13] Cerna, Ivana, and Radek Pelanck. "Distributed explicit fair cycle detection.10th International Spin
Workshop 2003; 2648: 49-73. (2003).
[14] Brim, Lubos, Ivana Cerna, Pavel Krcál, and Radek Pelánek. "Distributed LTL model checking based
on negative cycle detection." In FSTTCS, Vol. 1(2001): 96-107.
[15] Courcoubetis, Costas, Moshe Vardi, Pierre Wolper, and Mihalis Yannakakis. "Memory-efficient
algorithms for the verification of temporal properties." Formal methods in system design 1, No. 2-3
(1992): 275-288.
[16] Barnat, Jiri, Lubos Brim, and Jakub Chaloupka. "Parallel breadth-first search LTL model-checking."
In Automated Software Engineering, 2003. Proceedings. 18th IEEE International Conference on, 106-
115. IEEE, 2003.
[17] Ivetić, Damjan, Željko Vasilić, Miloš Stanić, and Dušan Prodanović. "Speeding up the water
distribution network design optimization using the ΔQ method." Journal of Hydroinformatics 18, No. 1
(2016): 33-48.
[18] Singh, Mahavir, Suraj Krishan Kheer, and I. K. Pandita. "Improvement of water distribution
networks analysis by topological similarity." Alexandria Engineering Journal 55, No. 2 (2016): 1375-
1383.
[19] Moosavian, Seyed Abdolnaser, and Mohammad Reza Jaefarzadeh. "Hydraulic analysis of water
supply networks using a Modified Hardy Cross method." International Journal of Engineering 27 (2014):
1331-1338.
[20] Tabesh, M., T. T. Tanyimboh, and R. Burrows. "Head-driven simulation of water supply networks."
International Journal of Engineering 15, No. 1 (2002): 11-22.
[21] Darvishi, M. T., and Ali Barati. "A third-order Newton-type method to solve systems of nonlinear
equations." Applied Mathematics and Computation 187, no. 2 (2007): 630-635.
[22] Rahimi, Mohammad, and Ali Haghighi. "A graph portioning approach for hydraulic analysis-design
of looped pipe networks." Water resources management 29, No. 14 (2015): 5339-5352.
[23] Mishra M K and Jha K, “Graph-based loop extraction for automatic analysis of a water pipe
distribution network and comparison with EPANET”, Simulation, 93, No. 11, (2017), 921-933.