Publication No.

77 PIPE NETWORK ANALYSIS By Mun-Fong Lee University of Florida Gainesville

PIPE NETWORK ANALYSIS

BY

MUN-FONG LEE

NON-THESIS PROJECT REPORT IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE MASTER OF ENGINEERING DEGREE

DEPARTT/iENT OF ENVIRONMENTAL ENGINEERING SCIENCES

UNIVERSITY OF FLORIDA NOVEMBER 1983

ABSTRACT Analyses of large scale pipe networks are needed whenever significant changes in patterns or magnitudes of demands or supplies occur in municipal water or gas distribution systems; Changes of this nature occur whenever new industrial and residen­ tial areas are being developed or new sources of supply are tapped, In the absence of such analytical tools to determine the perform­ ance of an existing system under new demands, needlessly large investments are made for larger than necessary pipesf redundant lines or duplicate facilities. Another cause for concern is the ability of the numerous algorithms to provide reliable results without which deficient engineering judgments may be made in engineering applications deal­ ing ' with large scale pipe networks,, Convergence and reliability problems of most of the algorithms are highlighted after the theoretical background has been presented* As an aid to more effective formulation of the loop and nodal equationsf the essential concepts of network theory are also presented together with the fundamental hydraulic principles forming the backbone of the state of the art iterative procedures. This report concludes with a new approach which employs opti­ mization techniques to solve the pipe network problem as a viable and perhaps more versatile alternative to the widely used iterative methods,

i

Dr. for their assistance and review of this report* I wish also to record my grateful thanks to my employer» the Public Utilities Boardt Republic of Singapore. for providing me this opportunity to further my studies* # •# # # # ii . Special thanks are due to the members of my committee.ACKNOWLEDGEMENT 1 wish to express my appreciation to my graduate committee chairmanf Dr« James P* Heaneyt'for his advice and enthusiasm in directing this report and my general course of study at the University of Florida. Wayne Cs Huber and Dr. Warren Viessmanp Jr..

#"¿ ... i i U U O ® ® e # ® * ® ® ® « ® * ® ® 9 *#.. ® ® .... • . iii .•..1..•. ♦ » ©«» e ® e * © » ( ? ( ? » iii • • ® ® ® * ® ® ® ® ® 1 2 2 3 Problem Definition .••••••••••.2 1. Motivation • • ® ® ® @ * 9 @ 9 H 6 e © s e 0 @ 9 A « # ® » • • 9 # ® I e e « 9 « ® e • ® « ® ® ® ® « ® ® e ® ® e # © CHAPTER 2 : NETWORK ANALYSIS & PIPE NETWORK HYDRAULICS 2„ 1 2.■/••...4 2.5 2.7 2...••..••. Application to Corrective Mesh Flow Equations . • Friction and Minor Losses •••••.. y ....2 CHAPTER 4 4...1 @ * @ ® B 5 5 7 9 11 13 14 Fundamentals of Network Theory . ® ® ® « » ® « > ® ® © ® < i * # ® e # « * # « ® TABLE OF CONTENTS "... CHAPTER 1 : INTRODUCTION . x U i n p o « ® ® « e ® ® # « « a » ® ® * ® « & i» ® © ® » ® # ® e e e ® * ® ® « ® ® ® « > # ® # e Pressure Regulating Valves •••..»•.. Significance ..1 1. XjXliJ~j^Xt lVi£j i....•..•♦..•••••••••....1.♦....•.■.......1........a....♦... 1....8 CHAPTER 3 3..••..1 4.2 2.. Single Path Adjustment (P) Method .-•• Node Analysis Loop Analysis e ® @ ® a o ® ® ® ® a « * • ® * ® * ® ® ® ® 15 » ® » ® # ® « » » ® ® » Corrective Mesh Flow Analysis ®*«® i ® 16 18 18 19 21 21 22 23 24 NEWTON--RAPHSON METHOD ...2 Simultaneous Path Adjustment (SP) Method .. ® ® » « i ii ACKNOWLEDGEMENT . Pipe Network Conservation Laws ' ....3 2. 4.'•.6 2.•.„.. Application to Node Equations ••••....*'» ® « ® e e ® * ® * « ® ® ® ® vjraciien*u MeXAOQ « » »® ® ® * ® ® ® < > # « « » ® ® ® ® ® a » » * ® ® * ® »® «® Algorithms for the Solution of Loop Equations .TABLE OF CONTENTS PAGE ABSTRACT ® H J § # ® ® ® « # ® » « ? # © • •• # ® « « @ * < » 0 © ® ® ® ® « J « » ® « « * • • » * • • « .1 3....3 * « ** • « • • « .

...1 5.2 ■h. 48 53 iv .2 Wood's Linear (L) Method .....3. .......1 4........2... Reliability of Algorithms • ••••••-••••••. Comments on Algorithms using Gradient Method ...2... 41 Computational Experience ••••••••...1............PAGE ■ ¿Kl...2 4...... Accuracy of Solutions .... Algorithms for Solving Node Equations .......•.••.2 4*3 4........2.•................■.••. CHAPTER 5 : ALTERNATIVE MATHEMATICAL APPROACHES & COMPUTATIONAL EXPERIENCE ^5 REFERENCES .. .1........ ' ..... Inclusion of Pressure Regulating Valves .2...1...••.1.3 4...••••••• Linear 'Theory Method by Wood and Charles -....1 4.Z 4.... Single Node Adjustment (N) Method .. 20 27 2? 28 31 31 31 33 34 36 37 37 5... Simultaneous Node Adjustment (SN) Method'-........ APPENDIX ...3«1 4. Inclusion of Pumps and Reservoirs ..2 Mathematical Programming Techniques ....'.

CHAPTER 1 INTRODUCTION Analyses and design of pipe networks create a relatively complex problem. 1978) uncovered a new approach to the pipe network analysis problem using optimization techniques which represent a radical departure from the traditional state of the art . which form a small but vital component for assessing the adequacy of a network* Such an analysis is needed each time changing patterns of consumption or delivery are significant or add-on features. Cooper. All of these techniques are iterative in nature. solving the network analysis problem is not a trivial exercise» For over four decades. or natural gas pipe networks«In the 1 absence of significant fluid acceleration. the behavior of a network can be determined by a sequence of steady state conditions. Helgason and Kennington. addition of booster pumps. pressure regulating valves. particularly if the network consists of a range of pipes as frequently occurs in water distribution systems' of large metropolitan areas. A recent study (Collins. differing only in the method In which an estimate of the true solution is obtained. or storage tanks change the system* The steady state flows of a network are governed by the laws of conservation of energy and mass and the classical pipe network analysis problem is to establish the steady state flows and pressures in a full flow closed conduit network of known physical characteris­ tics e Due to the complexity and the inherent non-linearity of net­ works. such as supplying new subdivisions. a number of algorithms have been developed since the pioneering work of Hardy Cross-.

Shamir. It can also be used to develop operating policies and strategies to not only reduce operating costs but also increase reliability and reduce water wastage (Brock.1 PROBLEM DEFINITION A pipe network is physically a collection of interconnected elements such as pipes. 1.2 methods. 1974. 1974. 1977. In most of the elements. 1970 . all other quantities of interest can be deduced therefrom. pumps» reservoirs. Mathematically. Hudson.2 SIGNIFICANCE Steady state network analysis is a basic tool in water dis­ tribution system management and design. valves* and similar appurtenances. This report attempts to provide a comprehensive writeup of the theory behind some of the more commonly used algorithms and their efficiency and reliability. Bree et al. a unique functional relationship between pressure and flow exists. a terminology which will be adopted throughout this report as is standard practice» The steady state condition of a network can be completely defined by the head at each node and the flow in each element. 1974? Rao et al. can be expressed in terms of an equivalent hydraulic head. Having determined this unique set of flows/ heads for a given set of inputs and withdrawals. pumps. 1. the network is represented as an edge set consisting of pipes. 1975)* Application of steady state network .. Pressuref in incompressible flow net­ works.» valves and similar elements and a node set comprising reservoirs and element intersections.

Gerlt and Haddix. Donaehie. Epp and Fowler. 1957. Rao et al. 1973. Collins and . Graves and Branscome.3 analysis in on-line system control is also receiving growing attention (Brock.Johnson.3 MOTIVATION Since Hardy Cross first provided a solution for the pipe network analysis problemt three general methods which are widely used"today. Liut 1969. Eggener and Polkowskif 1. 1972. Eggener and Polkowski. Fietz. Hudson. 197^. 1970. 1971. 194-9. 1976) (ii) Newton-Raphson (Martin and Peters. 1973. Wood. 1975. Marlow et al* Í966. Dillingham. Zarghamee. otherwisef the new solution becomes the trial solution and the procedure is repeated.' 1.976). Bellamy. and Charles. 1958. 1973? McPherson et alf 1974. Lam and Wolla. 1963. 1968. 1973? Chenoweth and Crawford. 1973. 1972. Shamir and Howard. 197^. 19. Rao et al. have evolved. Adams. 196l? Brock. Fietz. Williams. Differences in the above methods arise because of the strategies used to determine a new solution* . 1963. 197*M977) (iii) Linearization (Mcllroy. Lemieux. 1965. 1972. 1975)/ These methods solve a set of non-linear simultaneous equations iteratively beginning with an initial trial solution* The iteration is complete when a new solution differs from the trial solution by less than a specified amount.67. 1963. (i) Hardy Cross (Hoag and Weinberg.

methods for solving these systems of non-linear equations are described. Matrices associated with water distribution networks.* # & # - . Chapter 2 introduces graph theory which is useful in the formulation of pipe network simulators and also includes fundamental hydraulic principles governing pipe networks to provide the neces­ sary groundwork for the development of the loop and node system of equations. large scale networks with hundreds of nodes and elements require considerable computer efforts to solve* The choice of algorithm therefore.4 In view of the iterative nature of these methods.. In Chapters 3 and 4. most of the essential tools required for the analysis of incompressible flow in pipe networks are presented. depends on the computational speed and reliability of a particular solution procedure. Alternative mathematical approaches and the writer.1 s computational experience are presented in Chapter 5» # . like most man-made systemsf are sparse» One of the keys to faster conver­ gence and hence to greater computational efficiency and perhaps reliability for most! if not all. algorithms is the use of sparse matrix techniques in the solution procedures (Tewarsonf 1973)* In the following chapters.

1973. Shamir. with certain. Edges joining the same two nodes are multiple edges and a node without an edge connected to it is an isolated node. 1978)a For consistency. The complement of a subgraph is the collection of nodes and edges remaining after the removal of the subgraph. A subgraph is any collection of nodes and edges comprising only nodes and edges of a larger graph. Minieka. Belevitch. 1968.. Kami. in Chapter 3* 2. Also presented in this chapter are some of the fundamental hydraulic principles which form the foundation of the three tradi­ tional methods described.1 FUNDAMENTALS OF NETWORK THEORY According to network terminology. Bazaraatand Jarvisf 1977. 1971.. A path between two nodes is a subgraph whose terminal nodes . Clay. pairs of nodes being joined by line segments called edges (or arcs'.5 CHAPTER 2 NETWORK ANALYSIS & PIPE NETWORK HYDRAULICS There has been growing awareness that certain concepts and tools of network theory are very useful in the analysis of pipe networks especially in the formulation of computer simulators* The theory of network analysis is well established and several refer­ ences in this field are available (Gulliman. If a node has only one edge connected to it. the terminology used in this chapter has been adopted for pipe networks. that edge is a pendant* An edge and a node at the end of the edge are said to be incident. branches or links). 1971. 1953. a network is a graph consis­ ting of a set of junction points called nodes.

a graph are directed. A tree containing all nodes of a graph is a spanningtree. The flov/ capacity may be any nonnegative quantity. Thus* the rankf r.1 . A tree is a connected graph containing no loops. However$ a network need not be directed because it may be feasible to have flow in either direction along an edge. of A is at most n . The topology of a directed graph of yj nodes and £ edges can be described by a T) X £ node . An edge is directed if the flow capacity is zero in one direction. If all edges of.1. The flow capacity of an edge in a specified direction is the upper limit to the feasible magnitude of the rate of flow in the edge in that direction.incidence matrix» A element + 1. The comp­ lement of a tree is a cotree» Edges of a cotree are links. if edge j is directed away from node i a f with typical ) ) ij . if edge j is directed towards"node i ) ) 0f if edge j is not connected to node i ) For a connected graph it is apparent each column of A will contain a 1 and a -1 and all remaining elements will be zero* As a checkf addition of the rows of A should yield a zero row. A graph is said to be connected if there is a path connecting every pair of nodes* A connected subgraph in which each node of the subgraph is incident to exactly two arcs of the subgraph is called a loop (or cycle). including infinity. it is called a directed graph. An edge of a graph is said to be directed (or oriented) if there is a sense of direction ascribed to the edge. .6 each have only one arc incident and all other nodes are incident to exactly two arcs.

a flow Q. an identity sub-matrix of order. by adding links. it is apparent that each time a link is added a unique loop will be created. one at a time. to a given spanning tree.7 If loops are formed. implying the rank of B is A . The following notation shall be adopted for convenience. if edge j is not in loop i By performing elementary row operations on B. positive when the edge Is directed from node i to node j * .A H ^ . with typical element +1.Hj in which A % 4 3 . B. A directed network will be described by a node se% N and an edge set. an edge head loss is defined as -AHji a'H^ . can be described by a A matrix. say X£ fundamental loop bij = -1. containing A loops. Both the node incidence matrix and the fundamental loop matrix can be used to formulate the continuity and energy (or loop) sets of equations in a computer simulator. Such a loop is called a fundamental loop»» A fundamental loop set for any connected graph. In each edge. Each node n 6 N is associated with a unique number called the head. H n# For an edge directed from node i to node j. • exists. A » can be obtained. if edge j is in loop i and the direction of edge j is counterclockwise 0. if edge j is in loop i and the direction of edge j is clockwise. 2#2 PIPE NETWORK CONSERVATION LAWS Pipe network parameters are introduced to develop two conser­ vation laws utilizing g^raph theory. E of ordered pairs of nodes. one by one.

a redundant row still exists if a junction is assumed at the reservoir or pumps.. then the summation of head losses around a loop is zero* This obvious proposition is used as the basis for the second fundamental network lav/. say row 71t is defined as the reduced node incidence matrix. . Then A r q. as assumed.3) It should be noted.j)€.. k s 1.. df defined as «-3 » i1*! > V2 v • . = -■ d (2. •• • . As noted in section 2. ■ where r = (r f iv>. 2. If the nodal head is unique.1. equation (2. edges in fundamental loop k.r ln n all n£N (2.2). A has a rank of vj ~ 1.1) (i. Thus.. if L is the edge set for. in passing.£T A H iJ = (i.40 .»ry)-i ) i s introduced. -fs by q.E where r Q... The matrix A r # obtained by deleting one row of A. A corresponding element in P is also deleted and a demand vector.. However. implying one of the rows in A is redundant and can be arbitrarily omitted.1) can be rewritten as A q • '?■ (2.j) Lk 0 all k (2. that is f rank of A = TJ if pumps and reservoirs are present in the network. positive for inflows (supply) and negative for outflows (demand).j)ÍE is the requirement at node n. . 21 (n. r ^ ) . M M A * then Ss. that all the rows in A will be independent.S nJ Qin . 8 A "basic law to be satisfied by the flows in a network is mass conservation. Denoting the vector of Q.

diff.vector representing the.8) The H. A h and q completes the number of equation sets required to define the net­ work problemB Total head loss in a pipe.'following relationship can be written " ■ q .3 FRICTION & MINOR LOSSES ■' • The relation between head and discharge. is the sum of the line ^ n e l ° s s expressed' in terms where K p Is a pipe constant which is a function of line length.BT p (2.6) (2. h. a junction node is assumed at a reservoir or pump and a pseudo loop is assumed to connect 2 reser­ voirs. 2.Lpf and minor loss.pump head vector. If a mesh flow vector p ¿ (p1? P£t P3f*»fIL the . A E . diameter and roughness and n is an exponent» Commonly used head . h^M* of the discharge is given by: hLP . that is.5T P where h (2. equation (2#5) is generalized as followss A E = B A h .9 Equation (2*4) can he written as BAh a 0 if A h is defined as the vector of A H J M ' S . loss.- erence in total grade between two reservoirs» In this generalized case. the flow in any edge is a linear combination of the mesh flows for fundamental loops containing the edge in question.K p Q n ' (2.5) ) is defined. If pumps and reservoirs are included in the pipe network.7) . Thus if to each fundamental loop a unique mesh flow is associated.

diameter of pipe). Type of Pipe PVC pipe Very smooth pipe New cast iron or welded steel Wood. ES h. concrete Clay. 1977). P. .loss equations include the Darcy-Weisbach. which is. S is the slope of the energy line and equals h-rp/L.54 ) S.318 CHW AR 0. Table 2.I. brick Badly corroded cast iron or stee 1 HW 150 140 130 120 110 100 80 | C Table 2. 0. A.1 gives values for C„ w for some common materials used for pressure conduits (Jeppson.63 s0.1.54 \) m.52 X 1Q5L -Q1.87 L D HW with D in inches and L in feet.9) in which C ^ is the Hazen-Williams roughness coefficient.852 4. English System (ES) Q « 1.852 .63 O0.849 C H W AR ) (2. divided by the wetted perimeter.1 : Values of Hazen-Williams Coefficient Equations (2. Perhaps the most widely used of these equations is the Hazen-Williams equation. Units Q = 0. Hazen-Williams and Manning equations. and for full pipes equals D/4 (where D . new riveted steel Old cast iron.9) can be written in terms of hTp if Q is known. R is the hydraulic radius defined as the cross-sectional area. Thus. 'LP 8.

12) (2.- 10.2 (Jeppson. In some cases a constant power input is specified. (2. 2. its presence has profound influence on the flow rate. A number of alternative methods might be used to quantify the headp h ^ produced by a pump. P.SI h T P . . Minor losses are commonly expressed in the form h L M « KM Q 2 in which % 2 = M/(2gA ). It is apparent from these loss coeffi­ cients that minor losses can be neglected if relatively long pipe­ lines are analyzed. the relationship between pump head.4 PUMPS . 1977). In general.10) Nominal values of M for various common appurtenances are given in Table 2.(Q) s Z/Q (2. Howeverf in short pipelines9 they may represent the major losses in the system* or if a valve is partly closed.11) .7 L 1 B 85¿ n¿KB7 P hl*852 y ' Principles governing the flow of fluid as well as much exper­ imental evidence indicates that the head loss due to added turbu­ lence or secondary flow in the presence of fittings$ valvesf meters and other components in a network$ will be approxima-tely proportional to the square of the velocity or the flow rate squared. h and dischargef Qf can be expressed as • h p á P(Q) For a constant power pump.

1 Table 2.3 .8 1 ! 0. r 45° Elbow 0.6 70 15 2.8 .9 .2 2 Loss Coefficients for Valves and Other Pipe Fittings . Through Side Outlet Standard Short Radius Elbow Medium Sweep Elbow Long Sweep Elbow 5 0.6 .0. 2.D E V I C E - M 10 Globe Valve (fully open) Angle Valve (fully open) Gate Valve (fully open) Gate Valve (3/4 open) Gate Valve (1/2 open) Ball Check Valve (fully open) Foot Valve (fully open) Swing Check Valve (fully open) Close Return Bend Tee.2 1. 0.0 5.4 1 — .19 1.

Helgasont Kennington. and (2) if the down­ stream pressure exceeds the pressure setting of the valve so that if the PRV were not present. If the first condition occurs.constant. preventing reverse flov/ if the second condition occurs. useful pump » horsepower. By preventing reverse flov/.a constant.13) in which A. Other functions have been suggested. 2. and a common choice is a second order polynomial of the form P(Q) = AQ2 t BQ + HQ (2. does not exist for a PRV* Solution of pipe networks which include control elements with nonunique head discharge relationships using optimization techniques is still an active research area (Collinsf Cooper. The PRV acts as a check valve. 1978). Exceptions to the above occurrence are: (1) If the upstream pressure becomes less than the valve setting.5 PRESSURE REGULATING VALVES A pressure regulating valve (abbreviated PRV) is designed to maintain . the PRV . Therefore. B and HQ are constants for a given pump and might be determined by fitting Equation (2*13) to three points taken from a pump characteristic curve. Z = 550 HP/62.where the pump. the flow would be in the opposite direction to the downstream flow direction of the valve. the valve has no effect on flow conditions. it is apparent that the unique relationship that exists betv/een head and discharge for line lossesf minor losses and pumps.pressure downstream from it regardless of how large the upstream pressure is.4 and HP ¡.

H.1 unknown nodal heads. (Kp)ij * ' ( K M)ÍJ Substituting Equation (2.1 equations in i .14) (hLp)ij (hLM)i Kij =. using double subscript -notation. (J I ) ( K.of equations which contains the heads at the junctions/nodes of the network as unknownsf the rj ~ 1 independ­ ent continuity equations are written as in Equation (2.15) . ) m (2.14) into the junction continuity equations gives < «iH J >i/n ■Jout ( H. n Solving for Q from the exponential formula (Eqi^ation 2.6 NODE ANALYSIS To obtain the system. and may also be used to control from which sources of supply the flow comes under various demand levels.' gives Qij . Thusf PRV's can perform both functions of reducing pressures in portions of a pipe distribution system if the pressures would otherwise be excessive.allows the pressure immediately downstream from the valve to exceed its pressure setting. In the latter application9 the PRV acts as a check valve until the pressure is reduced to critical levels by large demands at which time additional sources of supply are drawn upon* The analysis of a pipe network containing PRV's must be capable of determining which of these conditions exist* 2.3)• The relationship between discharge and head loss is then substituted into the continuity equations yielding a set of T) . )Vn . .(AHij/K^y in v/hich A % and = 1/n (2.8). .

The amount . the head losses. from (H . It is apparent that each of these continuity equations is linear.in each pipe can be determined.1 ^ X) " * equations. or at any point along a pipe.2. B.1) to (n . this increase in the number of equations is somewhat compensated by a reduction in the number of non-linear equations in the system* The analysis of flow in networks of pipes is based on the energy and mass conservation laws discussed in section 2 e 2.7 LOOP ANALYSIS If the discharge in each pipe is initially considered unknown instead of the head at each junction$ the number of simultaneous equations to be solved is increased. Math­ ematically» the continuity equations are concisely expressed as 2 Ar q s ■ d ■ where A r is the reduced node incidence matrix. The remaining set of equations is formed by applying the energy conservation principle and expressed in terms of the funda­ mental loop matrix. However. as follows* BAh a 0 which has A independent non-linear equations• Having solved the system of equations for the discharge in each pipe. can be determined by subtracting the head loss from the head at the upstream junction* and accounting for differences in elevations if this be the case» " In some problems the external flows may not be known* Rather the supply of water may be from reservoirs and/or pumps. From a known head or pressure at one junction» the heads and pressures at each junction throughout the network.

Since these initial flow estimates generally will not simultaneously satisfy the A head loss equations. the corrective mesh flow system of equations consists of X equations. like the node analysis' method.8 CORRECTIVE MESH FLOW ANALYSIS . A . These equations consider a corrective mesh flow as the unknowns and as discussed in section 2. but also will depend upon the head losses throughout the system» 2. to the initially assumed flow in each pipe forming a loop of the network without violating continuity at the junctions. they must be corrected before they equal the true flow rates in the pipes.2f the system of equations to solve Is written as: ■ T - q a B p in which p is the mesh flow vector* Since there are A fundamental loops In a network. all the equations are non­ linear. This method of analysis yields the least number of equations. This method requires an initialization of the flow in each pipe which satisfies all junction continuity equations. ■However. A flow rate adjustment can be added with due regard for sign.16 of flow from these individual sources will not only depend on demands. This fact suggests * establishing energy equations around the \ loops of the network in which the initial flow plus the corrective mesh flow rate is used as the true flow rate in the energy equations» Upon satisfying these energy equations by finding the appropriate corrective mesh flow rates.

The corrective mesh flow rates may be arbitra­ rily taken positive in the clockv/ise or counter-clockwise direction^ but the sign convention must be consistent around any particular loop. .the T) .1 continuity equations v/ould remain satisfied as they initially were.

D replaces l/¿^ in the formula for solving a single equation. Any of the three sets of equations defining the pipe network problem.%{m) .CHAPTER 3 NÉWTON-RAPHSÜN METHOD The Newtpn-Raphson method is an iterative scheme which starts with an estimate to the solution and repeatedly computes better estimates. Generally if quadratic convergence occurs9 fewer iterations are needed to obtain the solution with a given precision than if linear convergence occurs. that is equations considering (1) the flow rate in each pipe unknown* (2) the head at each junction unknown and (3) the corrective mesh flow rate around each loop unknownr may be solved by this method. Unlike other methods which converge linearly» it has "quadratic convergence11. The unknown vectors x and F replace the single variable x and function F and the inverse of the Jacob*-* ~1 dF ian.<*+!>. Adapting Equation (3*1) to solving the set of equations with .D-1 P(x (m) ) (3. In addition to rapid convergence^ the Newton-Raphson method is easily incorporated into a computer algorithm.1) in which the superscripts within parentheses are not exponents but denote number of iterations. An initial guess is required for the Newton-Raphson method* It is the best method to use for larger systems of equations because it requires less computer storage for a given number of equations» 3*1 APPLICATION TO NODE EQUATIONS The iterative Newton-Raphson formula for a system of equations iS ' .

the heads as unknownsf Equation (3»1) becomes «(m+i) H s H (m) ~ D i F(H (m) ) (3..2) Making up' the Jacobian matrix Df are individual rows consist­ ing of derivatives of that particular function with respect to the variables making up the column headings.preferred for greater computational efficiency* 3*2 APPLICATION TO CORRECTIVE MESH FLOW EQUATIONS The Newtqn*-Raphson method when applied to this set of equations becomes p(m-+l)='p(m) < _ D -l F(p (m)) ■ {ytJ) in which the Jacobian is dFj 3P 1 » D = 9F 2 9F 2 3Pl » 8P2 9FL 3P »«'«(« 2£i 3F2 3PL Hi 3PL 3PI . For the system of head equationsf the Jacobian isf BF1 3F T dF1 3HÍ . 3H2 •••».. 3Hj 3F 2 9Hp • * * 9F 2 • gHj D 9 3Hi » 3H 2 ••••••••• 3Hj where J = number of junction nodes» The Jacobian is a symmetric matrix and an algorithm for solving a linear system of equations with a symmetric matrix may be... 3F?.

some of the loops around which the energy equa-» tions are v/ritten cannot correspond to the loops around which the corrective flow ratesf P» circulate* The individual Pfs will thus be assumed to circulate around the real loops satisfying continuity at all junctions.'that P in a pseudo loop would extract fluid from a junctionf but not add an equal flow through another pipe joining at that junction* Consequently. The energy equations will be written around loops containing pipes or other elements such as pumps or reservoirs whose head losses are functions of the discharge through them. the procedure of using identical loops for the corrective flow rates and energy equations must be altered* The reasons are (1) the head drop across a PR? cannot be expressed as a function of the Pfs circulating through that pipe. .where L ~ number of loops and P » corrective mesh flow for each ■ loop. The Newton-Raphson method suffers from a setback of requir­ ing a reasonably accurate initialization! otherwise it may not converge. When PRVfs are present in a pipe network. (2) continuity at some junctions will not be satisfied if the P*s are assumed to circulate through pseudo loops from artificial reservoirs created by the PRVfs to another reser^ voir in the network/ The reason is.

Chapter 3 has dealt with the straight-forward applica­ tion of the Newton-Raphson Method to linearizing the non-linear equations associated with the latter two methods.1) It is apparent from the"right hand side of Equation (4*1) that the approximation has reduced f(x) to a linear form* However. having X energy equations written around each loop of the network. This chapter will be devoted to other linearization techniquesf some of which are''variations of the Newton-Raphson Method. if f is a function of more than one variablet Equation (4. is derived from the first two terms of the Taylor series expansion. both involved non-linear equations in each of its entire system of equations. namely the node analysis and corrective mesh flow rate analysis9 each of which. Any function* f(x)f which is continuousf that is. ^ 1 GRADIENT METHOD The gradient methodf which is given extensive coverage by . Wood (Woodf 1981).1) can be generalized as followss . differentiable.CHAPTER 4 LINEAR METHODS Non-linearity of the function relating head and discharge is the crux of the problem in solving a pipe network* Recall that in the loop analysis. (4. there are TJ + X ~ 1 equations of which X number of equations describing energy conservation around loopsf are non-linear# The other two analyses. can be approximated as follows: f(x) PS f(x0) 4 f*(x0)(x^xQ) '■ .

1) equations constituting the set of energy equations are non-linear.X < 2 ) o ' + • • •• (4. including minor losses* hp = energy input " y pumps.1.difference in total grade between two fixed grade nodes. The energy conservation equation in Equation (2.(x(l)ofx(2)oft.)o) + Hl2T (X(2) .x(l.» x(2) of etc.number of pseudo loops.5) for fund­ amental loops without pumps$ is now rewritten to Include pumps as follows: Sh'L s zlhp ( l equations) i (4*4) where h-^ « energy loss in each pipe. 4..) + | ^ . Is rewritten as follows: EQout ÜQin Qe (j equations) (4. the .energy conservation equation written around this pseudo.loop is written as: A E ■ EhL ~ EhP (f-1 equations) (4.f(x(l)fx(2)"f-. j .í..1 ALGORITHMS FOR THE SOLUTION OF LOOP EQUATIONS To conform to the notation used in this chapter/ Equation (2.3) in which Q e denotes the external inflow or demand at the junction node.(x(l) . positive for Inflows.2) in which the partial derivatives are evaluated at some x(l) » x(l) 0> x(2).3) which neatly describes the mass conservation (continuity) equation for each of the j* nodes in the network. f . If p equals the number of pipes in the network. *for networks with reservoirs ..number of fundamental loops# b t For any two fixed grade (or reservoir) nodes.5) in whichAE .) . then the mass and energy equations form a set of p simultaneous equations of which (1 + f .

For a single pipe section* Equation (4.7) becomes % * f(Q±) s KpQj 4 KM Qf . (4.P(Q) (4. Method .PiQj).9) .1.n K p Q ^ 1 +.6) It can be seen that Equation (4.11) and (4.8)r (2.) Denoting ff(Q¿) Gi by G if thus (4.4) is a special case of Equation (4.7) which represents the grade difference across a pipe section carry­ ing flow Q. (2. Q. 4. Thusf s f'ÍQ'i) s nKpQ^ 1 "+ ■ 2K M Q ± .2KJJQÍ .P ' O ^ ) Both the function and its gradientf evaluated at Q s Q^f will be used in all three algorithms for solving loop equations.6).1 Single.This method was first described by Hardy Cross as the /'Balanc­ ing Head Method" which was limited to closed loop systems and included only line losses.5)t the energy equations expressed in terms of the dischargef Qf are A E a E ( K p Q n 4 % Q 2 ) . . The procedure is generalized and summar­ ized as follows: .P8(Q.1. Path Adjustment (P). .6) can be written as f(Q) * K P Q n * K M Q 2 ~ P(Q) (4.8) Differentiating Equation (4. Substituting an estimatef Qj_ $ f > . and denoting.6) where A E is zero for a fundamental loop.the non^linear terms in Equation (4. f(Qj ) ir" by Hi.Using Equations (2.7) and setting Q » -Q-t gives the gradient of the function at Q * Q. Three algorithms are presently in significant use and gradient method is employed to handle.10). Equation (4.

!>f-l) to satisfy the energy equation for that path and continuity must be maintained when applying the correction factor* (iii) Step (ii) is repeated using improved solutions. where Q¿ is the estimated discharge. f(Q.2 Simultaneous Path Adjustment (SP) Method: This algorithm is similar to the corrective mesh flow method . The numerator represents the imbalance in the energy relationship due to incorrect flow-rates and this procedure reduces this to a negligible quantity. satisfies continuity at each junction node is determined* (ii) A flow adjustment factor is computed for each path (.11) EGi. Applying Equation (4.6) and solving for A Q gives AQ « _ _ _ _ _ _ „ (4.10) to Equation (4.) = f(Qi) + ff(Qi) A Q in which A Q s (4.10) Q .1#1.until the average correction factor is within a specified limit.>4 (i) An initial set of flowrates which. Equation (4. Flov/ adjustment is carried out for all 1 fundamental (closed) loops and (f-1) pseudo loops in the network» 4.6) is used to compute the adjustment factor for a path using gradient method to linearize the non-linear energy equations» Thus. which is the flow adjustment factor to be applied to each pipe in the path.Qj.

1 equations is required f to determine the loop flow adjustment factors. f(Qi) « E . Each equation in­ cludes the contribution for a particular loop as well as-contri­ butions from all other loops which have pipes common to both loops.f(Qi) + -ff A Q j + -ff A Q k or» f(Q) = f(Qi) + f'CQi) A Q . (ii) A flow adjustment factor is simultaneously computed for each loop to satisfy the energy equations without disturbing the continuity balance* (iii) Step (ii.12) becomes . flow changes in adjacent loops ( A Q k ) as follows: .13) in which .E H .25 described in Section 2 # 8 f the only difference is that gradient method is used here instead to linearize the energy equations. It is developed to improve convergence by simultaneously adjusting the flowrate in each loop representing an energy equation.) is repeated using improved solutions until the flow adjustment factor is within a specified limit. f ( Q i ) * H G ^ Equation (4. + E(GíAQk) (4. « ( E G Í ) A Q . + f ( Q i ) A Qfc (4. The simultaneous solution of £ « f . 2_1HJ_ ¡ sum of the head changes for all pipes in loop j = ( 4 * r i A Ch ~ sum of all gradients for the same pipes times flow -C') . f(Q) .12) Substituting f(Q) = A E . For loopj f the head change required to balance the energy equation is expressed in terms of the flow change in loop j ( AQ-j) and the. % . The method is summarized as follows: (i) An initial set of flowrates which satisfy continuity at each junction node is determined. A E .

H (Gj_ A Q ^ ) » sum of gradients for pipes common to loops j and k multiply by the flow change for loop k. . the energy equations are linearized in terms of an approximate flowrate. A set of simultaneous linear equations i . as before. 1981) involves the solu­ tion of all the basic hydraulic equations for the pipe network.H) This relationship is employed to formulate (j\ 4 f .1) energy equations which together with the j continuity equations. can start the iteration.H±) *AE- (4. The solution is then used to linearized the equations and successive trials are carried out until the change in flowrates between successive trials become insignificant.-A flowrate based on a mean flow velocity of k ft/sec has been used by Wood (Wood.26 change for loop j. Using gradient approximation. form a set of p simultaneous linear equations in terms of the flowrate in each pipe. However. the above equation becomes (K Gi)Q = ZI(GiQi .1. Q¿ as follows: f(Q) = f(Qi) 4f'(Q^(Q-Qi) Introducing H4 and G. One significant advantage of this scheme is that an arbitrary set of initial flowrates. which need not satisfy continuity. only the energy equations need to be linearized as the continuity equations are all linear. formed in terms of sflow adjustment factors for each loop representing an energy equa­ tion* The solution of these linear equations provides an improved solution for another trial until a specified convergence criterion is met* ¿K 1. I98I).3 Wood's Linear (L) Method This method developed by Wood (Wood.

The procedure is outlined as follows: (I) A reasonable grade is assumed for each junction node in the system.1 Single"Node Adjustment (N) Method This method was also first described in the paper by Hardy Gross and is known as the "Balancing Flows Method". the required grade correction is expressed in terms of Q¿ v/hich is the flowrate based on the values of the grades at adjacent nodes before adjustment* Thusf using gradient approximation. For conven­ ience.2.1.27 4. (11) A grade adjustment factor for each junction node which tends to satisfy continuity is computed. A Q «" £ ( ! / % ) A H (¿K15) where A H * H — H^t the grade adjustment factor and A Q denotes the flow corrections required to satisfy continuity at nodes. f(Q) « fiQ^) + f'ÍQihAQ with the usual substitution* .3)» • ■ ■ .(4-.2 ALGORITHMS FOR SOLVING NODE EQUATIONS Two methods for solving the node equations are also widely used and are described here for completeness. 4.1. The better the initial assumptions9 the fewer the required trials. From Equation-. (ii'i) Step (ii) is repeated using improved solutions until a specified convergence criterion is met» The grade adjustment factor is the change in grade at a particular node (AH) which will result in satisfying continuity and considering the grade at adjacent nodes as fixed.

The numerator re­ presents the unbalanced flowrate at the junction node* Q.AQ ■ E Q Í .19) for any nodef at and b denotes an adjacent node.1. 1 6 ) . from E q u a t i o n s (4.) (4. Adjust­ ment of the grade for each junction node is made after each trial until a specified convergence criterion is satisfied. the flowrate in a pipe section prior to adjustment.2 Simultaneous Node Adjustment (SN) Method This method requires the linearization of the basic pipe net­ work node equations in terms of approximate values of the grade. (AHi/K)±/n in which A H ^ * grade change based on initial assumed values of If pumps are includedf the following expression is used to determine Q* $ 1 A H i .Hb Kab * Q e (4.KQ" . Equation (4.18) is solved using an approximation procedure.1?)$ : inflow is assumed positive.PiQi. The gradient method is again used to calculate the flowrate in pipe section* ab..16) Thus.2.it can be written ass H a .Qe (4.19) can be linearized with respect to' grades if the flowrates are Written in terms of some initial values of the gradest H ai and H bi» an( ^ ^ h e corrections in these grades. If the discharge in Equation (4.. Thus* . .Q e In Equation (4.15) and ( 4 . XlQi .18) Equation (4. 4. is computed from ./n j Qi = grade.3) is expressed in terms of the assumed heads.

* is computed based on the initial values of the grades.1/n) 4 The initial value >n _JÜ__ nK ab (Ha .(Ha . Henc e .H • ( adjustment factor for head at node A H ^ .20) (4. b:?1- ^ where N refers to all adjacent nodesf N y refers to adjacent variable grade nodes and Np refers to all adjacent fixed grade nodes. Q _ is j positive for outflow. if any. E b=l ~Jh~~ nK a t ) N Hb . Qi = « H ai ~ H bi)/ K ab) l / n ■ ' where Ka-b may include minor losses.Ha K '5-1 Nv Q i (4.20) and simplifying.H b ) (4. Thus.Q - Q i + | | a A H a + | | b A H b (4.% F E A_ n K b-1 . Equation (4.23) is written for each junction node in the system resulting in a set of linear equations in terms of junction node grades# If pumps are included9 two additional nodes may be .(.21) a) b) in which Q *.22). gives Q = Q i d . Using Equation (4. r % n . ^ adjustment factor for head at node Substituting the partial derivatives of the flowrate expression in Equation (4.nodes and the variable grade of junction.21) in Equation (4.H h " Hb'.H t ) / ^ ) 1 / ^ AH„ : H . a. the continuity equation for each junction node can be expressed as a linear function of the variable and fixed grades of adjacent.23) N„ Ql-n nK a b n Qe ♦ £ b*l Qi ♦ E.22) of the flowratef Q.

Vs and the procedure repeated until a specified convergence criterion is satisfied* .25) He .26) Substituting the partial derivatives in Equation (4«26) and simpli­ fying 9 we have the following linearized equations .assigned to a pump at the suction and discharge sides as shown schematically below: . .V 1/n p[((H c -H d )A c d)" H ab ■ <M*> (4..H d £ = o " C (4.25a) |^AH¿ (4.b * -K~.H b -.25) can be linearized using gradient method as follows: Let Y s PCQi) * H b . Qi )' / .2?) where oc and p depend on the relationship used to describe the pumpt P(Q).PMQ i )/(nK c d Qf 1 ) 3 A set of (j . and are given by <X = P(Qi) _ gip.(. — > Q i a \ W K c * ' d Two additional equations can be written: H a .2N ) simultaneous linear equations (where N » f number of pumps) is generated and solved starting with Qj_*s based on any assumed set of junction node grades# An improved set of junction node grades is then used to compute an improved set of Q. .H c ^ 0 Using the gradient approximation.<Hc . | ^ A H c + (4.H b = Equation (4/24) is just the continuity equation and Equation (4e25) relates the head change across the pump to the flow in either the discharge or suction linee Equation (4. Hc(l fJ8) . " Y = Yi + I ^ A H b 4 .

For the three methods based on loop equationst the continuity equations are exactly satisfied. RELIABILITY OF ALGORITHMS A study carried out by Wood..l 2 ^ COMMENTS ON "ALGORITHMS USING GRADIENT METHOD Node equations are easier to formulate because the equations include only contributions from adjacent nodes.2. On the other hand.2. The solutions are therefore only approximate although they can be very accurate^ The ability of an algorithm to produce an acceptable solution is of prime concern and studies have demons­ trated that convergence problems exist and an accurate solution is not always possible.. the loop equations require the identification of an appropriate set of energy equations which Include terms for all pipes in funda­ mental loops and between fixed grade nodes. • Each of the procedures described is iterative in nature and computations terminate when a specified convergence criterion is met. 4. ■ . For methods based on node equationsf iterations are carried out to satisfy con­ tinuity at junction nodes and the unbalance in continuity Is a significant indication of solution accuracy* 4. Each of these methods then proceeds to satisfy the energy equations iteratively and the unbalanced heads for the energy equations is evidence of solution accuracy. using an extensive data basef .1 ACCURACY OF SOLUTIONS A solution is considered accurate only when all the basic equations are satisfied to a high degree of accuracy.2. Computer formulation of this set of equations is considerably more difficult than form­ ulation of the node equations.

further trials are usually . since a gradient method is used to handle non-linear -terms. Ill-conditioned data such as poor pump descriptions are particularly prone. this is no easy task and as evidenced in the study. failure rates can be reduced if initial values closer to the correct values can be determined* However. great care must be exercised when using them. This is attributable to the fact that solution algorithms for these equations do not incorporate an exact continuity balance.» Convergence failure is "very rare» However. It has been established that algorithms based on node equations (N and SN methods) failed to provide reliable results because of the inability of these methods to handle low resistance lines. by the inability to meet a reasonable convergence criterion and if this occurs' in a limited number of trials. For each of the three methods singled out above.of no benefit. - Both the SP and L methods provide excellent convergence and the attainment of a reasonable convergence criterion is sufficient to assure great accuracy.. SN method failures are characterized.has shown that the P^ N and SN methods exhibited significant convergence problems (Wood. Assumed arbitrary flowrates need not satisfy continuity as the continuity conditions are already Incorporated Into the basic set of equations. 1981)♦ Since these methods are widely used. Failure rate was quite high and the use of results obtained employing this method is not recommended unless a good accuracy is obtained in a reasonable number of trials. even an excellent set of initial conditions does not guarantee convergence. there i always the possibility of convergence problems. . The L method has some advantages over the SP method.

and pressure regulating valves* Although the SP method has signi­ ficantly less equations to solve. it does not require an initialization.1.3.(K^ n-1 ) Q = K'Q £ in which QJ¡ is an estimate of the flowrate.1. as maybe implied. Combining these linearized loop equations with the j~l. and'K* (4. Firstly.) • Like the other linear method described in Section 4. and secondly. junction continuity equations provides a system of p linear equations which can be solved by Gaussian elimination in conjunction with sparse matrix techniques (Tewarson.28) n-1 KQ. according to Wood and Charles. it always converges in a relatively few Itera­ tions* However. .This method aláo allows a more straight-forward and reliable inclu­ sion of hydraulic components such as check valves. closed lines. it has several distinct advantages over the Newton-Raphson or Hardy Cross methods. Linear theory transforms the J non-linear loop equations Into L linear equations by approximating the head in each pipe by h L . Instead. 1973)» In applying the linear theory method it is not necessary to supply an Initial estimate. for the . I972) will be described and used In solving the system of equations formulated by loop analysis which considers flowrates as unknowns (hereafter referred to as the Q-equations. the use of sparse matrix techni­ ques to handle the larger matrix generated by the L method has somewhat negated this advantage» 4*3 LINEAR THEORY METHOD BY WOOD AND CHARLES In this section»• the-linear theory method (Wood and Charles. its use in solving the head oriented equations or the corrective loop oriented equations is not recommended.

If f fixed grade nodes exist in a network. The oscillation could be prevented by multiplying each K by its nf which involves more computation than averaging consecutive solutions as proposed by Wood* Thus.P(Q) .6). pipes become addi­ tional unknowns and therefore an additional equation is required beyond the j continuity equations and L fundamental loop equations* The additional equation is obtained from a pseudo loop. 4*3*1 INCLUSION OF PUMPS AND RESERVOIRS When pumps (not booster pumps) and reservoirs are connected to a network/ the flows in the two connected'.first iterati on eac h Kf is setxequal to Kf which is equivalent to setting all flowrates Q^ equal to unity. Reasons for the oscil­ lation can be understood by observing that the linear theory method is a variation of the Newton-Raphson method described in Chapter 3 whereby K1 in Equation (4..2-8) is simply the derivative of h if multiplied by n. Thus.final solution. the flowrate used in a trial is just the average flowrate for that pipe from the previous two solutions. there would be f-1 independent equations. Wood observed that successive iterative solutions tend to oscillate about the. or Q (m) s i C Qi(mwl) + Mm-2) 1 / 2 in which m within parentheses denotes a trial number.. In developing the linear theory method. which connects the two reservoirs (fixed grade nodes) by a "no flow11 pipe. Energy conservation around a pseudo loop (of which a fundamental loop is a special case) Is defined by Equation (4. A E = E ( K Q n ♦ KMQ2) .

After some simplification. hp where h ' o * » AG 2 + hQ H o ~ B2/4A ' (4.that i.If the expression for P(Q) in Equation (2. A consequence of using this typical pump relationship in Equation (4#6) is.30) in Equation (4.13) is adopted in Equation (4.31) Addition of Equations (4.29) is demon­ strated by solving it for Q and substituting in Equation (2.6)s the linear theory method does not give rapid conver­ gence as it does when pumps and/or reservoirs are not present» A modification will therefore have to be made to allow the linear theory method to converge rapidly.29) and (4.f the equation is solved by the linear theory method.6) gives E(KpQn + ly}2) .13') • T h e appropriateness of Equation (4.30) Obviously. Substituting Equation (4. The reason for the modification is that the head produced " y a typical centrifugal pump decreases b nearly proportional to the reciprocal of the snare root of the flowrate whereas the head loss in a typical pipe increases approxi­ mately proportional to the square of the flowrate.31) produces a system with as many equations as unknowns• . convergence may become very slow if at all* . This situation can be improved by a transformation of variables so that the new unknown has an exponent close to ne Such a trans­ formation is G a Q + B/2A (4#29) in which " is the new variable and A and B are the same constants G in Equation (2.C A G 2 a A E + E h 0 (4. 2) is close to the typical n.13). the exponent of G (that is.

analyzed by the linear theory method by initially assuming that the pressure (or head).2 INCLUSION OF PRESSURE REGULATING VALVES (PRV'S) Networks containing PRVfs may be.3. pseudo loop equation which includes terms for that pipe is modified with Q replaced by an unknown grade (head) immediately downstream from that PRV« * • # # & -f i . If there is any negative Qf the. To write the loop equations» pipes containing PRV1s are disconnected from the upstream nodes and the PRVfs are replaced by dummy reservoirs0 After each Iteration a check on the flowrate Qf in each pipe containing a PRV is made. Immediately downstream from a PRV Is constant and equal to the valve setting* Junction continuity equations are then written as if no PRVfs are present.4.

denote the flowrate from node i to.E n J YL ■ ' Q i n * r n n (ifn)£/E H % rn .3)£. * H¿ »AH^4 .CHAPTER 5 ALTERNATIVE MATHEMATICAL APPROACHES & COMPUTATIONAL EXPERIENCE 5. allnfiR (5A) Equation (5*1) is just a statement of mass conservation at each node while Equation (5*2) stipulates mass conservation for the network as a whole. n in the set N is associated with a hydraulic headf H # Let R# a subset of Nt be the set of nodes corresponding to reservoirs (fixed grade nodes) and let H^ for all n & R be the fixed head associated with a res­ ervoir.3) Hn = H* . Let the network topology he described by a node set N and an arc set (network element) E ♦ In each of the set E y • t let Qx . ±J o .1 MATHEMATICAL PROGRAMMING TECHNIQUES As a prelude to introducing the alternative approaches to solving the governing equations for a pipe network using optimi­ sation techniques9 it is convenient to define a network topology using notations which are consistent with those used In graph theory. j • Each node.Hj ^ 0 = F ij ( Q ia ) ¿ a11 f all n & N (5*1) (5*2) ( i »á5&E 0 " (5.f supply or demand) at node n« For an incompressible fluidt the governing network equations can be stated as: H Qni (n. Also let rr for all n &N denote the flow requirements (that is. Equation (5*3) states that the head loss H.

Most of these techniques are detailed in Chapters 3 and k* Each of these methods is simply a technique for solving a set of non-linear simultaneous equations which have been adapted to the network analysis problem. using straight­ forward procedures.j) in E is non-linear-. In some of the algorithms. solution differs from the trial solution by less than a specified amount then the iteration stops.) ^ Q. of the discharge through the j element while Equation (5-^) requires that at a reservoir nodef the head is constant* The functional form of F..across an element is some function P. The new approach by Collins. Cooper. A new solution is obtained by solving a set of linear equations.j * l j ■ i j ■ . (ii) Newton-Raphsonf and (iii) linearization. Each is iterative in nature and begins with an initial trial solution. . j ( Z^H. Otherwise. t-F« • for most or all (i.• is not specified and can represent any element ineluding simple pipes and minor loss devices as long as a unique relationship -between head and' discharge exists.. -. thus necessitating iterative techniques such as (i) Hardy Cross. Helgason and Kennington (19?8) represents a radical departure from the state of the art iterative methods as optimization models are employed to solve the network problem* Two alternatives models are formulated and these models play analogous roles to the node versus loop formulations . an initial trial solution sufficiently close to the true solution is required to en­ sure convergence.the use of different strategies to determine the new solution. to be used to solve the governing network equations. or its inverse E. If the new. the new solution becomes the trial solution and the procedure is repeated.. ■In general. The differences in the methods result from. .

It can be proven that the solution obtained by solving the E network will produce identical results as those v/hich would-be obtained by solving the original Eo netv/ork which permits Q. and Millar (1951)t " h above te problem is to find a set of flows which satisfies flow conservation and minimizes system content. all (i.j)£/EUE1 *nj E Q = r n (i. called the Content Model assumes the form Minimize G ~ >_> (i.netv/ork in which the arcs have been replaced by two equivalent oppositely directed one-way elements so that Qj_ i can assume only positive values. to be unconstrained# The arc • set E^ is ^ ij " i merely a set of arcs connecting all nodes in N to a ground node g and is introduced to satisfy mass conservation for the network as a who'le (Equation (5*2))» Using the terminology of Cherry. of the two optimization models.. hence the name Content Model* .n)£>EUE1 i n . all né>NU(g) Q i . . 39 The first. G..n)£>E1 *gn H*dt n ^ rr ngH* dt i n.g)£>E1LJ0 H n dt j Subject to (n. This replacement is done as a mathematical convenience so that Q. .for solution of the network equations used in the state of the art methods. can be treated as a constrained decision variable in the optimization model which has a non-negativity condition imposed on Q.J)&E "1JFjj(t)dt o rnQr (g.j)€>EU(E1) in v/hich E is the arc set for a . ^ 0..

. it is assumed that the F — and E ^ functions are monotonically increasing/ This assumption insures the convexity of the objective function which in turn guarantees the existence of a unique solution to the optimization problem. The proof is carried out by examining the derivatives of the objective function and show­ ing that the derivative conditions for a stationary point9 along with other constraintsp are identical to the network equations. The Content Model has the special structure of a convex cost network flow problem for which efficient routines are available. The monotonicity of F*• and E ^ merely implies the fact that energy losses In a network element increase with increasing discharge. Numerous non-linear algorithms such as (i) Frank-Wolfe method* . .The second optimisation modelf the Co-Content Model» is a complementary (but not dual) model which has the form Minimize fAHij J * zI _ E. that is$ the optimal solution satisfies the governing network equations. Using Kuhn-Tucker theory (Kuhn and Tucker* 1950). . Jf hence the name CoContent Model. A H i g = 0^ all ( i J ) 6 E A H n g ■ H* . n£ N ng r n dt subject to A H .j)&E | ) J-J r AH. it can be proved that the solution to either of these models yields the solution to the pipe network problem.(t)dt (i. + AHjg .H* « f all n & R In the terminology of Cherry and Millar (1951)> the above problem is to find a set of head losses which sums to zero around all loops and minimizes system Co-Content. In the proof.

(iii) Use of mathematical programming techniques. 1972) described in Section 4.head-discharge relationship in pipe network analysis. A computer program was written based on the linear theory method (Wood and Charles. (v) Development of an economic model to minimize the operation­ al costs for a flow network v/ith operational behavior given by one or more network.(ii) piece-wise linear approximation and (iii) convex-simplex method are available for solving such a problem* The use of mathematical programming techniques in pipe net­ work analysis has paved the way for potential research in the following areass (i) Extension of mathematical programming techniques to solution of compressible flow pipe network analysis problem. (ii) Incorporation of time variable storage in network elements to solve transient network problems.2 COMPUTATIONAL EXPERIENCE . the iterative procedure described by the method# Two features this FORTRAN computer program may have for general application Includes (i) the capability of handling networks containing pumps and reservoirst and (ii) an algorithm which analyzes networks containing pressure regulating valves. . 5. to solve complex open channel networks.3. (iv) Feasibility of using mathematical programming techniques to solve network parameter identification problems such as the.'The pro­ gram was designed to solve the system of loop and node equations using. problems.

The solution to the test problem and the solution reported by Jeppson (1977/ p.Qi-il i— < < ■ • ■ 0. The convergence criterion employed was:' . 5 node network. This appears to be a stringent requirement which may assure good accuracy if the condi­ tion.The use of the node incidence matrix and fundamental loop matrix described in Section 2. . This 8 pipe. the node equations and loop equations were formulated using the node incidence matrix and fundamental loop matrix respectively.110). friction losses in pipes were assumed to be described by the Hazen-Wllliams equation and pumps were described by the quadratic form (Equation 2.1 in the algorithm has provided an efficient means of translating information contained in any pipe network into a network simulator* Incidentally. is the flowrate obtained for a trial and Q^n is the flowrate obtained from the preceding trial. 10'9) a^d shown in Fig 5«lf was tested.13). A small . is satisfied. The results appear to be In good agreement. a pump and a *§ pressure regulating valve. However accuracy is achieved if and only if continuity at every node and the energy equations are exactly satisfied. In carrying out all computations.2 K . using the same theory are tabulated in Table 5*2. taken from Jeppson (1977» p.0005 _L——__ E|Qi| in which Q. with the properties given in Table 5 1 > bas 2 reservoirs.scale'network.

0 Pump C h a r a c t e r i s t i c s . | 500 500 Diameter (in) 6 6 6 6 6 6 8 8 3 k 5 6 7 8 130 1 Table 5*1 .0 cfs Fig 5«1 ~ Test Problem Hazen-Williams j Coefficient 110 120 110 120 120 120 130 Pipe 1 2 Length (ft) 1000 800 1000 800 1200 1000 .0 Head (ft) 40.Network Parameters Discharge (cfs) 1.0 1.5 2.0 cfs (7) [ 1 ] (1) w 200 f t i ssi oi (3) 2.0 26.'43 180 f t i 2.0 c f s m\ 1.0: 35.

Discharge, cubic ft per sec Pipe 1 Writer's Solution
1

Jeppson's Solution 2.56 -0.32 2,44 0.73 0.88 1.12 1.83 3.17

2.53 -0.38 2.47 0.72 0.92 1.08 1.81 3.19

2 3
L[

5
6 7 8
Table 5,2 -

Solution to Test Problem

The detailed solution and program listing are contained in the Appendix, With this programf * the test problem took 0.12 second of execution time on an Amdahl 470 computer» The number of iterations' required to meet the convergence criterion was 6. The subroutine used for solving the linearized set of loop equations and the linear node equations simultaneously was developed based on the Gaussian method of elimination improved by pivotal condensation (Tewarson, 1973). The capability of the program to handle a larger network has not been proven but it would have stretched the available storage of a computer to its limits if it has been tested. Storage space is primarily taken up by the final augmented matrix which comprises essentially the node and loop equations* The use of sparse matrix techniques instead of full matrix methods may extend the capability of the program to analyze larger networks of a few hundred pipes and nodes,
# # # # #

CHAPTER 6 CONCLUSION The Hardy Cross method which sparked off'the evolutioivof the numerous techniques of simulating pipe networksf is suitable only for relatively small networks. With the advent of the computer, arid as larger and more complex networks were analyzed. f the Hardy Cross method was found to frequently converge too slowly if at all. The classic method which is described in most hydraulics or fluid mechanics text booksf is an adaptation of the Newton-Raphson method which solves one equation at a time before proceeding to the next equation during each iteration instead of solving all equations simultaneously* The single path- and single node methods described in Sections ¿K 1.1*1 and 4.1.2.1 respectively, are basically the classic Hardy Cross methods. Procedures developed to improve the convergence of the single path method were described by Martin and Peters (1963) and later by Epp and Fowler (1970). The procedure involves the simultaneous computations of flow adjustments and was presented in Section 4.1.1.2. A similar approach has been developed for the node equations where all node equations are linearized and solved simultaneously/ This method is described by Shamir and Howard {1968). All of the four methods mentioned so far require an initial guess as to the solution and the rate of convergence depends to a degree on how close this initialization is to the correct solution, For the system of equations which is flowrate orientedt two linearization techniques (Wood, 1981 and Wood and Charles, 1972) were described in Sections 4.1.1.-3 and 4.3 respectively. Both of these procedures do not require an initialization and have been reported to converge in a relatively"few- iterations.

Significant convergence problems were reported for the Single Path, Single Node and Simultaneous Node Methods (Wood,. 1981). It

has been suggested that if a specified stringent convergence crit­ erion cannot be met using single adjustment methods, the solution is probably unreliable. For the simultaneous node adjustment method, it has been suggested that the best indication of an acceptable solution is that the average relative unbalanced flow at the junc­ tion nodes be less than 2%. Instances of failures have also been reported in cases where line losses vary greatly or pumps operate on steep curves even when good initial-approximations are available. The simultaneous path methods and the linear method using gradient approximations, were reported to provide excellent conver­ gence and the attainment of a stringent convergence criterion is sufficient to assure great accuracy in most cases. In the study carried out by Wood .(1981), in which a wide variety of situations was represented, some incorporating features which increase conver­ gence difficulties like low resistance lines; these methods were reported to attain accurate solutions in a relatively few Iterations. ■However, if gradient approximations are used to handle non-linearity, convergence problems are always a possibility, especially if illconditioned data such as poor pump descriptions are employed. Of all methods, the linear methods developed by Wood and Charles (1972) and a later version by Wood (1981), who used gradient approximations, offer more advantages. A balanced initial set of flowrates Is not required since the. continuity conditions are already incorporated Into the basic set of equations. These algor­ ithms permit a more direct and reliable Incorporation of hydraulic components such as check valves, closed lines and pressure regulat­ ing valves. For any pipe network simulators to be of general use,

or losses in individual elements. Traditional methods described previously give no good insight into the goodness of an approximate solution* particularly for large scale problems. heads. minor losses in pipes and pump heads must necess­ arily be convex functions for a solution to be guaranteed. The use of sparse matrix techniques has somewhat corrected this* disadvantage and has rendered it a more desirable algorithm to adopt for analysis of pipe networks. head loss must be a unique function of discharge* Such uniqueness may not exist for certain control elements such as check valves and pressure regulating valves. The use of mathematical programming techniques in pipe net­ work analysis holds a lot of promise for the future* One of the direct consequences of the theory described in Section 5*1 is the identification of a unitary measure by which the goodness of a solution can be gaged. However. its application will be limited in-scope.47 these components. One is that functions describing friction losses. which affect continuity. and their effects on the hydraulics of the network must be incorporated into the basic set of equations. . the set of equations solved by the linear methods involved significantly more equations which will be a setback if full matrix methods are used. In addition. Optimization techniques also have their setbacks.» The optimization models remove the vagueness that inherently surrounds a definition of " close M when an attempt is made to utilize a comparison of indi­ vidual flows. Until these problems are re­ solved.

971.. Markel.48 REFERENCES (1) Adams R. (3) Belevitch V«» Classical network theory. New York. and W. Australia. I968. 42(333) 1150-1177t 1951. 37(4-5).¿ Metropolitan water system operation subsequent to nuclear attack or natural disaster. 1965. Phil. 112-116. (Ser 7).C.' Dallas Water Utilities. Institution of Water Engineers. and JYJ# Jarvis. (4) Bellamy C. 15f" 415-428f 1961* (2) Bazaraa M. Non-linear networks and systems. Rao... and C. Report No. L. 66(1). & H.W-. Pipe network analysis. (7) Brock D. Mag. Final Technical Report to OV/RR Project No. Journal American Water Works Association. Texas.S. Inc. Systems Control. Distribution analysis by electronic computer.-Cohen.. . Crawford. Palo Alto. ■ (10) Clay R. Studies on operations planning and control of water distribution systems.. Journal American Water Works Association. Linear programming and network flows.. AD 711956." . 1970. Holden-Day. San Francisco» 1-22. (5) Bree D. 1977. 1975* (6) Brock D. Some general theorems for non^linear systems possessing resistance. Inc.J.C. Calif. The analysis of networks of pipes and pumps. .J. 1974. City of Dallas. 55(4)» 467-480.A.W. A. 1963. 364 pp..S. New York.Jr«. Wiley & Sons.. (8) Chenoweth H. 5214." Millar. Closed loop automatic control of water system operations.I. 55-58... Wiley ~'Interscience. (9) Cherry E. Journal Institution of Engineers. l-39t 1.

A. IEOR 77016-p 77001. . J Hydraulics Div# . 99 (HYll). 99 (HT5). Soc. Kennington. Journal American Water Works Asso­ ciation. Johnson. 43~56. Hydraulics Div8 . 100 (HY3)t 393-403t 1973. Solution of large-scale pipe networks by improved math­ ematical approaches. . Distribution system operation analysis model.and. Program application. (14) Donachie R*P. 114(2). Water and Sewage Works. 1970. 385-389/1975.G„F. Soc. 67(7) 381-384.H. part 2. (15) Eggener C # L ef and L/B» Polkov/ski. Proc* Amer.G». part 1. Amer* Soc. Digital program for water network analysis. 189-196. J* Amer. Proc* Amer.L. Computer analysis of water distribution systems. Soc. Procs Amer. Water Works Association.1967. Civil Engineers. Pro-c.L. 1973* (19) Gerlt J. Cooper» V. Helgasonf and J. J. Finite-element method for water distribution networks* Journal American Water Works Association.f. (17) Pietz T*R«. L. (18) Fietz TttR*f Discussion of "Efficient algorithm for distribution networks".. 96 (HY1). 141-142f. Journal Hydraulics Division. Civil Engineers. 43-45. Civil „ Engineers. 67(7). and A8G» Fowler.L. Hydraulics Div. (12) Collins N. and R. 1978.. 114(1). 1976. 2136-2138. Discussion of "Hydraulic network analysis using linear theory*'. 1-3. part 4. 1973. Network models and the impact of modeling assumptions.(11) Collins A. 114(4). Haddix. 1975- . Efficient code for steady-state flows in networks. 68(4). (13) Dillingham J. Civil Engineers. 855-857. (16) Epp R«. J..

f Intermediate network analysis. Amer. A modern metroplex looks ahead.f Proc. Mass.A.. Allyn and Bacon.5-10. J. 1972. part 1 . Ann Arbor Science. J# Transportation Engineering Div. Hydraulics Div.f Proc.F„f and M„L« V/olla. 1957r (23) Hudson V/. (28) Lam G#P«.Inc.. Wolla. 1950. Soc.'> and D. Amer. Nonlinear programming. Amer.B. 98 (HY2). and M.D. Civil Engineers.. (22) Hoag L.N.. 335-3^» 1972* (29) Lam C. 99(TE1) 73-32. 1973. 1958.f and G# V/einberg.. Boston..formulation of equations. J.50 (20) Graves O.r New York. . 98 (HY3). "4-9(5). Sanitary Engineering Div# . (24) Hudson W. 481-492. 1977* {2.f Proc.. Berkeley. 1974.W. in Proceedings of the Second Berkeley Symposium-on Mathematical Statistics and Probability. Pipeline network analyses by elec­ tronic digital computer.W. Inc. Soe. Civil Engineers. Analysis of flov/ in pipe networks. Calif. Branscome.W. part 11 -numerical solution. Computer analyses of water distribution systems. Computerizing pipeline design. 1953..L. Introductory circuit theory. Soc. 517-524. Tucker. Digital computers for pipeline network analyses.6) Kami S. 100(TE4) 801-814. Amer". Soc* Civil Engineers. '84-113• 1971/ (27) Kuhn-H. Amer. American Water Works Association. Computer analyses-of water distribution systems.. J. John Wiley & Sons. Soc9 Civil Engineers. and A.. Proc. (25) Jeppson R. J# Transportation Engineering Div#f Proc. 84 (SA2)f1-18.D*. J* Hydraulics Div. (21) Guillernin E.. Civil Engineers. 447-460.

Amer.S.. 1963* (3¿0 Mcllroy M. 507-509* 197¿K (36) Rao HaS. The application of Newton's method to netv/ork analyses by digital computer.. Cornell. Peters.A"#„ R. Thirteenth Congress of the International Association for Hydraulic Research. 98 (HYll)f 1911-1919. F. (31) Liu K. Water Works Association.T. Proc8 Amer. and G. . 1. 'J-3-&U 1966. and. Hyddraulics Div. and R. 422-428..W. 120 pp. Jr.V. 115-129. R. Proc# Amer.C. E..S. 1977..B# Cobb.Ae Brock. C-4164. Benzvi.W. J9 Amer.A.W. J. Jr.E. J r M D. 103 (HY3). Palo Alto.-Proc. 17(2).part A. (37) Rao H..# Efficient algorithm for distribution networks. H.. Systems Control Inc. 92 (HY4). J. Pipeline network flow analyses. 97-108.Improved design of fluid networks with computers. G. Flack. 41.. JriHydraulics Div... Calif. Jacobson and.. (33) Martin D. D. Bree.G.F.. Extended period simu­ lation of water distribution networks* Final technical report OWRR project no. D. J# Hydraulics Div. Civil Engineers-. Neill.L. and R.. Water Works Association. Extended period simu­ lation of water systems . 'McWhinnie.(30) Lemieux P. F0 Holden. 1974. 1972. 66(9). The numerical analyses of water supply networks by digital computer.R. Priorities in distri­ bution research and applied development needs.P* Linaweaver. Institution of Water Engineers...E. . Soc9 Civil Engineers. Bree. 36-43* 1969* (32) Marlow T.C.$ E. Soc. 19^9 • (35) McPherson M. . Hardison. Alson.. Beggs. J.B. Bolls.. Jr. J.. Soc* Civil Engineers. Benzvi. Amer. H..

Hydraulics Div. Hydraulics Div*. IBM Research Report RC' 4389 (No. reli­ ability.219-234. Ja Hydraulics Div.. 1971.. Civil Engineering. Optimal design and operation of v/ater distribution systems.W. 1972. and C. 103 (HY3). Proc.C. 97 (HY1). 1974. Amer. J . Charles. Soc. J. Enhancement of•convergence of pipe network solutions.. Pr-oc. i960.J*.. Proc. (46) Wood D..... 1157-1170. Soc* Civil Engineers.. 1973* (4-0) Shamir U.'Markel and D. Mathematical model for water distribution systems.Bree. J. 99 (HY7). Engineers.U.r Water distribution systems analysis. Academic Press. (42) TewarsonR*P M Sparse Matrices. Center» Yorktown Heights. 36(12). 1973* (44) Wood D . Civil Engineers. 1-14. . Amer. Inc. 27-36. 94 (HY1).. 1057-1067. Soc. 1981• - (47) Zarghamee M. Howard. Jr. . 1973* (43) Williams G>N„. . 60-61.. New York.52 (38) Rao H«S. . 1977..S. and C. 127. Amer» Soc. Hydraulics Div. 1968. (39) Shamir . Watson Research -. Hydraulic network analysis using . Soc» Civil .D.J' linear theory. L. (45) Wood D.. V/ater Resources Res. An explicit friction factor relationship.J. Civil Engineers. 19Ó7D* IBM Thomas J. Water distribution system analysis. (41) Shamir W. Proc* Amer. Water Resources Research Institute Research report lío. University of Kentucky. Proc.' 281-294. 10(1). Hydraulics Div. Extended period simu­ lation of water systems «part Bf' J. Amer. Algorithms for pipe network analysis and their.. Civil Engineers. 98 (HY7).

I-fKi-.:Y.APPENDIX 53 OF ? .f I .

54 S .

.

56 .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times