An element by element algorithm for pipe network analysis

Similar documents
ABSTRACT 1 INTRODUCTION

Fluids Engineering. Pipeline Systems 2. Course teacher Dr. M. Mahbubur Razzaque Professor Department of Mechanical Engineering BUET

A Spreadsheet Tool for the Analysis of Flows in Small-scale Water Piping Networks

Научный потенциал регионов на службу модернизации. Астрахань: АИСИ, с.

Hydraulics Prof Dr Arup Kumar Sarma Department of Civil Engineering Indian Institute of Technology, Guwahati

An overview of the Hydraulics of Water Distribution Networks

STEADY FLOW THROUGH PIPES DARCY WEISBACH EQUATION FOR FLOW IN PIPES. HAZEN WILLIAM S FORMULA, LOSSES IN PIPELINES, HYDRAULIC GRADE LINES AND ENERGY

In all of the following equations, is the coefficient of permeability in the x direction, and is the hydraulic head.

Comparative Analysis of Techniques for Solving the Hydraulics of Pressurized Irrigation Pipe Networks. Numan Mizyed

Relationship between Hazen-William coefficient and Colebrook-White friction factor: Application in water network analysis

Viscous Flow in Ducts

Quasi-Newton Methods

STEP-DRAWDOWN DATA ANALYSIS. By Hund-Der Yeh 1

CHAPTER 4 HYDRAULICS OF WATER DISTRIBUTION SYSTEMS

COMPARISON OF TWO METHODS TO SOLVE PRESSURES IN SMALL VOLUMES IN REAL-TIME SIMULATION OF A MOBILE DIRECTIONAL CONTROL VALVE

Linear algebra issues in Interior Point methods for bound-constrained least-squares problems

LECTURE NOTES - III. Prof. Dr. Atıl BULU

Chapter 5 Control Volume Approach and Continuity Equation

UNCONVENTIONAL FINITE ELEMENT MODELS FOR NONLINEAR ANALYSIS OF BEAMS AND PLATES

EFFECTS OF RESERVOIR LENGTH ON DYNAMIC ANALYSIS OF CONCRETE GRAVITY DAMS

FOUNDATIONS OF ALGEBRAIC GEOMETRY CLASS 26

Newton s Method and Efficient, Robust Variants

Power System Analysis Prof. A. K. Sinha Department of Electrical Engineering Indian Institute of Technology, Kharagpur. Lecture - 21 Power Flow VI

Network Analysis at IIT Bombay

cha1873x_p02.qxd 3/21/05 1:01 PM Page 104 PART TWO

Journal of Hydraulic Engineering

Applied Fluid Mechanics

Transient Reactor Test Loop (TRTL) Model Development

Various ways to use a second level preconditioner

ITERATIVE METHODS BASED ON KRYLOV SUBSPACES

Chapter 8: Flow in Pipes

The Darcy-Weisbach Jacobian and avoiding zero flow failures in the Global Gradient Algorithm for the water network equations

The Conjugate Gradient Method

Incomplete LU Preconditioning and Error Compensation Strategies for Sparse Matrices

Iterative Methods for Solving A x = b

A SPREADSHEET TEACHING TOOL FOR ANALYSIS OF PIPE NETWORKS

Analysis of Complex Pipe Networks with Multiple Loops and Inlets and Outlets

Applying Solver Engine in Microsoft Excel to Analyze Water Distribution Network based on Linear Theory Method

NONLINEAR EQUATIONS AND TAYLOR S THEOREM

Reliability Assessment of Water Distribution Networks Considering Mechanical-Hydraulic Behavior Using Informational Entropy

Process Model Formulation and Solution, 3E4

CHAPTER 2 LOAD FLOW ANALYSIS FOR RADIAL DISTRIBUTION SYSTEM

Piping Systems and Flow Analysis (Chapter 3)

Chapter (3) Water Flow in Pipes

Lab 1: Iterative Methods for Solving Linear Systems

Design optimization of multi-point constraints in structures

Chapter 2 Finite Element Formulations

GODUNOV-TYPE SOLUTIONS FOR TWO-PHASE WATER HAMMER FLOWS

Quiescent Steady State (DC) Analysis The Newton-Raphson Method

The quadratic eigenvalue problem (QEP) is to find scalars λ and nonzero vectors u satisfying

An Efficient Low Memory Implicit DG Algorithm for Time Dependent Problems

On The Determination of Transmissibility and Storage Coefficients from Pumping Test Data

Modeling control valves in water distribution systems using a continuous state formulation

Flood Routing by the Non-Linear Muskingum Model: Conservation of Mass and Momentum

Chapter (3) Water Flow in Pipes

WATER DISTRIBUTION NETWORKS

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

A New Technique for Solving Sets of Coupled. Nonlinear Algebraic and Integro-Differential. Equations Encountered in Hydraulics

AMS Mathematics Subject Classification : 65F10,65F50. Key words and phrases: ILUS factorization, preconditioning, Schur complement, 1.

9.1 Preconditioned Krylov Subspace Methods

Line Search Methods for Unconstrained Optimisation

Chapter 1. Root Finding Methods. 1.1 Bisection method

Some notes about PDEs. -Bill Green Nov. 2015

Notes for course EE1.1 Circuit Analysis TOPIC 4 NODAL ANALYSIS

ENGI9496 Lecture Notes State-Space Equation Generation

Objectives. Conservation of mass principle: Mass Equation The Bernoulli equation Conservation of energy principle: Energy equation

Tribology Prof. Dr. Harish Hirani Department of Mechanical Engineering Indian Institute of Technology, Delhi

Lecture Fluid system elements

Iterative Solvers in the Finite Element Solution of Transient Heat Conduction

ENGI9496 Modeling and Simulation of Dynamic Systems Bond Graphs

spatial water demand (population density) spatial junctions distribution (building density) digital elevation map

COURSE Iterative methods for solving linear systems

Advanced Computational Methods for VLSI Systems. Lecture 4 RF Circuit Simulation Methods. Zhuo Feng

Investigation of a nonlinear dynamic hydraulic system model through the energy analysis approach

AN AUTOMATIC SCHEME ON THE HOMOTOPY ANALYSIS METHOD FOR SOLVING NONLINEAR ALGEBRAIC EQUATIONS. Safwan Al-Shara

In order to solve the linear system KL M N when K is nonsymmetric, we can solve the equivalent system

A MULTIGRID ALGORITHM FOR. Richard E. Ewing and Jian Shen. Institute for Scientic Computation. Texas A&M University. College Station, Texas SUMMARY

Algorithm for Sparse Approximate Inverse Preconditioners in the Conjugate Gradient Method

Improving homotopy analysis method for system of nonlinear algebraic equations

Course Notes: Week 1

Flow in Pipes Simulation Using Successive Substitution Method

A Novel and Precise Sixth-Order Method for Solving Nonlinear Equations

Reservoir Oscillations with Through Flow

Newton-homotopy analysis method for nonlinear equations

Termination criteria for inexact fixed point methods

Saudi Journal of Engineering and Technology. DOI: /sjeat ISSN (Print)

PDE Solvers for Fluid Flow

IsogEometric Tearing and Interconnecting

Energy minimization for the flow in ducts and networks

Chapter 7. Iterative methods for large sparse linear systems. 7.1 Sparse matrix algebra. Large sparse matrices

Comparison of Averaging Methods for Interface Conductivities in One-dimensional Unsaturated Flow in Layered Soils

The amount of work to construct each new guess from the previous one should be a small multiple of the number of nonzeros in A.

M.A. Botchev. September 5, 2014

Iterative Methods for Linear Systems of Equations

THE RELATIONSHIPS BETWEEN CG, BFGS, AND TWO LIMITED-MEMORY ALGORITHMS

Applied Fluid Mechanics

Optimal Pump Scheduling For Water Distribution Systems

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

Basic Aspects of Discretization

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Transcription:

An element by element algorithm for pipe network analysis M.H. Afshar* and A. Afshar^ Imam Higher Education Center, Tehran, Iran * University ofscience and Technology, Tehran, Iran Email: mahabnet@dci.rian.com Abstract In this paper we present a method in which the formulation of the network and solution of the resulting system of equations is so carried out to minimize both the storage and computational requirement for analyzing large scale systems. The method takes advantage of discrete nature of the system and formulates the behavior of the whole network by considering the behavior of individual pipes. A flow-head relation is established for each pipe or 'element' which are subsequently assembled to yield the required equations for the whole system. Inclusion of pumps, pressure reducing valves and check valves are carried out by introducing proper elements modeling the behavior of the pump, pressure reducing valve and check valve. The inclusion of the fixed head reservoirs is also easily considered during the solution stage by fixing the head at the corresponding junctions. Since the resulting coefficient matrix is symmetric and positive-definite, an efficient and economic iterative solution method namely' Conjugate Gradient Method' has been used to solve the linear system. Performing the solution procedure in an 'element-by-element' manner eliminates the need to explicitly form the coefficient matrix, which is of significant importance for large scale networks. The proposed method exhibits good convergence characteristics and is convergent with any arbitrary initial guess. The method is free of any limitation and can be used to analyze any piping network with arbitrary number of pipes, pumps, valves, reservoirs and any number of parallel pipes. The method is easy to implement and dose not require the explicit formation of the coefficient matrix and hence is a favorite choice for analyzing large scale networks. Introduction Steady state analysis of pressure and flow rate in pipe networks is an essential step in the design of piping systems and hence of great importance in engineering practice. The equation governing the steady state flow in pipe networks stems from two physical laws of mass and energy conservation enforced at junctions and loops, respectively. These equations can be expressed in two different ways. In thefirst,the energy balance in the loops are expressed in terms of the flow rates. These equations along with the continuity equations at the junctions constitutes the required equations known as 'flow equations'. In the second form, the continuity

174 Computer Methods in Water Resources IV equations at the junction are written in terms of the unknown junction heads leading to the so called 'head equations'. Pipe network formulation, in either form, leads to a system of nonlinear equations to be solved for the proper unknown. Many different methods, with different degree of success, have been suggested for the solution of these equations, some of which are being in wide use today. Methods proposed by Hardy Cross [1] in his original and classical paper is based on adjusting the flow in loops,or head at junctions, to individually satisfy the energy equations, or continuity equations. These methods, however, has been found by many researchers, as by the proposer, to suffer from some serious drawbacks. Poor convergence characteristics and frequent failure of the method to yield sensible results are the most common of all. Failure of attempts by others to eliminate these problems motivated the development of new methods. The so called 'Newton Raphson' method suggested by Epp and Fowler [2] and Martine and Peters [3] can be sought of as a generalization to the first method of Hardy Cross. In this method, the flow adjustments to all the closed loops is carried out simultaneously, resulting in a faster convergence. This method, however, still requires suitable initial guess for flow rates satisfying the continuity equations and close enough to the exact one to avoid divergence. Efforts to further improve the method for pipe networks analysis led to the development of yet another method by Wood and Charles [4] in which the continuity equations along with the loop equation are solved simultaneously. In this the nonlinear energy equations are linearized using a set of initial guessed flow rates and hence the use of 'linear theory method'. This method had the advantage of not requiring the setting of 'good' initial guess but still shows convergence problems when solving large scale networks. Several attempts [5,6] have been made to further improve the convergence characteristics of the method, but this problem still remains to be completely solved. A problem less noted in using the linear theory is the storage and computational effort required to store and inverse the nxn coefficient matrix where n is the number of pipes in the system. This is particularly important for large scale networks the solution of which can become a formidable task using personal computers. Another,but less popular, method has been developed by Shamir and Howard [7] based on Head equations. The method uses a set of guessed initial nodal heads to linearize the nonlinear energy equations at all nodes, leading to a system of linear equations. The solution of this system provides the improved guess for the next iteration and the process continues until the convergence is obtained. In this paper we present a method in which the formulation of the system and solution of the resulting system of equations is so carried out to minimize both the storage and computational requirement for analyzing large scale systems. The method takes advantage of discrete nature of the system and formulates the behavior of the whole network by considering the behavior of individual pipes. A flow-head relation is established for each pipe or 'element' which are subsequently assembled to yield the required equations for the whole system. The nonlinear system of equations is linearized using a set of arbitrary initial guess for the heads and the resulting linear system of equations are solved by an iterative solver. Since the resulting coefficient matrix is symmetric and positive-definite, an efficient and economic iterative solution method namely ' Conjugate Gradient Method' has been used to solve the linear system. The use of conjugate gradient method makes the way for an 'element-by-element' solution and hence eliminates the need to explicitly form the coefficient matrix, which is of significant importance for large scale networks. The proposed method exhibits good convergence characteristics and is convergent with any arbitrary initial guess. Inclusion of pumps, pressure valve and valves are carried out in a way to maintain the symmetry and the positive definitness of the system. The inclusion of the fixed head reservoirs is also easily considered during the solution stage by fixing the head at the corresponding junctions. The proposed method isfreeof

Computer Methods in Water Resources IV 175 any limitation and can analyze any piping network with arbitrary number of pipes, pumps, valves, reservoirs and any number of parallel pipes. Element By Element Method A pipe network is a collection of number of pipes connected at nodes. The discrete nature of the pipe network can be easily realized in many other engineering systems such as skeletal structures, electrical networks etc. It has been a common practice in structural engineering to take advantage of discrete nature of skeletal structures to develop algorithms for easy and computerized analysis of this structures, known as matrix method. Here we will employ the same concept in formulating the piping system. The advantages of the method will be outlined later. Consider a typical pipe, or element, of the network connecting node / andy with the respective heads H. and H. ft / j Assuming a head-loss relationship of the form q - written in terms of the nodal heads as, the nodal flows q. andg, can be and q,=k(h,-h,r for (1) for (2) The above relation can alternatively be written as (3) (Hj - Hi) (4) which hold for arbitrary values of the nodal head. These equations are conveniently written in a matrix form with -1 +1 H (5) (6) (7) where K* is the element coefficient matrix, H* is the element vector of nodal heads and q* represents the element vector of nodal inflow. Now consider a pipe network with nodes

176 Computer Methods in Water Resources IV ranging from I to A'. The state of the flow in the network is completely defined by the continuity equations at nodes. The continuity equation at a typical node / of the network is written as e=l where (?/ is the consumption at node/, q\ is the inflow at node / of the element e and the summation ranges over all the elements sharing node /. Writing the above equation for all the nodes, we have or in a matrix notation Q=KH (10) where Q is the Nxl vector of nodal consumption, H is the Nxl vector of nodal heads and K is the AMV coefficient matrix of the network defined by where the summation is carried out in an assembly sense. The resulting system of equations can be solved for unknown nodal heads. It can be easily seen that the only information required for the construction of the matrix K is the data corresponding to the nodal numbering of elements. Inclusion Of Pump, P.R.V. And C.V. In this section the inclusion of pumps, pressure reducing valves, check valves and fixed head reservoirs in the network will be considered. This will be done by introducing proper elements so that the symmetry and positive definitness of the system is maintained. As a result, the use of conjugate gradient method of solution is still possible for the resulting system. Pump Element: Consider the pipe element shown where / andy represent nodes introduced at the two sides of the pump. It is assumed the fluid is pumped from ; toy and the characteristic curve of the pump is give in the usual form by h^ - Aq^ -h Bq + C. (p) The above relation can be easily recast in a useful form defined by whereto is positive root of the pump's characteristic equation <7 =?o-v" (12)

Computer Methods in Water Resources IV 177 2A (13) and kp, a are found by a least squares fit to the characteristic curve. In this work a numerical fit is used to find the parameters, though, an analyticalfitseems also possible. This form is very similar to the head-flow relationship defined for the pipe element and will be shown to maintain the symmetry and positive definitness of the formulation. The above relation can be written in terms of the nodal heads and flows as which can be conveniently written in the matrix form (14) or "'^' "' 1-1 +1II #, (15) It is easily seen that the coefficient matrix of the pump element is symmetric and positive definite since the parameter k^ will always be positive for any pump. Pressure Reducing Valve Element: Consider a PRV which is positioned immediately after thefirstnode / of a pipe element. (PRV) '- j Assuming that the PRV is operational on the pipe, the flow relation can be written as or (17) and similarly q, =kh, -H, ' **j -H The above relation can be written in a matrix form H.-H,

178 Computer Methods in Water Resources IV ' =*' (18) where (1- H.-H. (19) Noting the definition of a PRV distribution in the pipe., three distinct situation may occur depending on the energy a) HI >-h^ >Hj, then the PRV sets the pressure just after the PRV equal to h^ and hence the above formulation holds. b) HI -< h^ > Hj, then the PRV plays no part in the network and hence the behavior of the PRV element can still be defined by the above relation where H -h **i "prv so that a pipe element is obtained. c) Hj > hpn or Hj > HJ, then the PRV acts as a CV and cuts theflow.the behavior of the PRV is then simply modeled by putting Check Valve Element: Consider a check valve situated on a pipe element. Considering the definition of a CV, two situation is realized: (CV) i -D- j a) HI >- Hj, then the CV plays no part in the network and hence the CV element is replaced by a pipe element where K is defined by equation (6). b) //j -< Hj, then the CV stops the flow and therefore the CV is properly modeled by Solution Method =0 The head equations, as seen from Eq. (5), constitutes a set of simultaneous nonlinear equations which is not amenable to direct solution and, therefore, an iterative method is required for its solution. A fixed-point iteration method is here used to iteratively solve the nonlinear (20)

Computer Methods in Water Resources IV 179 equations. The solution procedure starts with a guessed initial set of heads. The linearized system of equation are solved to get an improved set of values. The iterations are continued until a predefined level of accuracy obtained. Element by Element Solution Method The formulation presented above is essentially the same as the one proposed in [7] but has the advantage of not requiring the explicit formation of the full coefficient matrix. This can be fully exploited using a suitable iterative method of solution for solving the linear system of equations at each nonlinear iteration. This is particularly useful since the solution of linearized equations need not be calculated exactly and an approximate solution would suffice. In addition, Eq. (5) clearly reveals the usefulness of the proposed formulation since it leads to a symmetric and positive-definite coefficient matrix of the linearized system, a property which can be very useful when iterative solution of the linear equations is attempted. In this work a Conjugate Gradient method of solution is used to iteratively solve the linearized equations. The method is very efficient for positive definite matrices and is shown theoretically to converge at N iteration for a N equation system. It is also easily adaptable to an element by element solution method which considerably reduces the storage requirements of the method. This is very advantageous when analysis of the large scale networks are attempted. The method used here is a preconditioned version of the Conjugate Gradient Method (P.C.G) which can be combined,if desired, with an element by element preconditioning to substantially reduce the number of linear iterations. This method is presented as following: Given a linear system of equations Ax - b. a preconditioning matrix P and an initial guess XQ first compute: solve Pd$ = 7*0 for d^ Then for k=0,1,2, until convergence to a tolerance // repeat: /y =/>*/_ solve if p^, < /7/?o then terminate the iterations Since no preconditioning was required here, an identity matrix is used for P. The advantages of C.G method is clearly seen from the formulation presented. When no preconditioning is used, the method does not require any matrix inversion and only need the formation of vectors of the kind Ax. This can be easily and more efficiently computed by forming the element vectors A*x* for all the elements and then assembling them into the required vector. This means that the global coefficient matrix A need not be formed and considerable saving is achieved in computer storage.

180 Computer Methods in Water Resources IV Figure 1. Network considered to check the dependency of the convergence to the initial guess. Numerical Examples In this section we present two examples to show the effectiveness of proposed method. For the first example, only the geometry of the network is presented. The detailed data corresponding to this example can be found elsewhere [9]. The first example considers the dependence of the number of nonlinear iterations to the initial guessed nodal heads. The considered network is shown in Fig. 1. Three different initial sets are used for this purpose. The first set is defined by H. = loooi, while the second set is obtained from the relation//. --loooi and the third set is taken close to the exact solution. The number of nonlinear iterations for the three different initial guesses are 16, 16 and 15 respectively. The results clearly shows the independence of the convergence characteristics of the method from initial guess. The second example is presented to compare the result produced by the proposed method with the solutions obtained by other known methods. This example is used in [8] to assess the reliability of different algorithms for piping system analysis. The data corresponding to this network is shown in Fig. 2 while the results are presented in table 1 along with the solutions given in [8]. These results show that the proposed method produces solutions which compares well with the correct solution which is assumed to be produced by the Linear Theory. Concluding Remark A new algorithm for the analysis of the pip networks is presented. Exploiting the discrete nature of the network, the problem is formulated in an element by element manner which significantly simplifies the treatment of pumps, PRVs and CVs. The coefficient matrix of the resulting algebraic system of equation is symmetric and positive definite and hence a conjugate gradient method of solution is used to solve the system of equations. The iterative solver is also implemented in an element by element manner which avoids the explicit construction of the coefficient matrix, making the method a favorable choice for the solution of large scale piping systems. The convergence characteristics of the method is shown to be independent from initial guess used to start the analysis. An example is solved and the results presented which compare favorably with the results obtained by existing methods. Further research is being carried out to further improve the capabilities of the method and compare the reliability of the method with other methods. The early results are promising and the full conclusion will be presented in near future.

Computer Methods in Water Resources IV 181 131.9 17,6 pipe numbers junction numbers O minor loss coef f cient CZ1 Figure 3. Network considered by Wood et al. Total head at the reservoirs located on pipes 13, 11, 10(and 14) are 3.05, 30.48 and 33.53 respectively. pipe no. I 2 3 4 5 6 7 8 9 10 11 12 13 14 node no. 1 2 3 4 5 6 7 8 Linear 273.35 149.21 36.21 1.66-55.34 95.23-139.21-110.29 258.24 124.15 60.76-17.11 531.59 90.95 Linear 61.49 40.58 31.86 32.41 41.42 S-Path 273.36 149.21 36.21 1.66-55.34 95.23-139.21-110.29 258.24 124.15 60.76-17.11 531.59 90.95 S-Path 61.49 40.57 31.86 32.41 41.42 Path 273.31 149.25 36.25 1.71-55.29 95.07-139.24-110.26 258.23 124.06 60.79-17.22 531.54 90.97 Path 61.51 40.61 31.66 32.40 41.42 S-Node 273.36 149.22 36.22-4.04-55.25 95.18-139.24-110.28 258.24 124.14 60.72-17.08 531.59 90.95 S-Node 61.49 40.58 31.86 31.34 32.42 41.42 Node 272.60 149.16 36.72-6.87-56.40 9168-141.01-110.54 258.44 124.09 67.61-15.78 530.85 92.30 Node 61.73 40.84 32.06 31.47 31.35 32.53 41.58 E.B.E. 273.43 149.30 36.30 1.58-55.42 95.27-139.25-110.39 258.35 124.13 60.79-17.15 531.78 90.97 E.B.E. 61.50 40.57 31.85 31.32 31.32 32.41 41.42 Table 1. Comparison of flow rate (Ips) and grades (m) for different algorithms and the present method. References 1. Cross, H., "Analysis of Flow in Networks of Conduits or Conductors", Bulletin No. 286, University of llinois Engineering Experimental Station, Urbana, III., 1936. 2. Epp,R. and Fowler, A.G., "Efficient Code for Steady-State Flows in Networks, "Journal of the Hydraulics Division, Asce,Vol. 96, 1970, pp. 43-56.

182 Computer Methods in Water Resources IV 3. Martins, D.W. and Peters, G, The Application of Newton's Method to Network Analysis by Digital Computer, "Journal of the Institution of Water Engineers, Vol. 17, 1963, pp. 115-129. 4. Wood, D.J. and Charles, C.O.A., "Hydraulic Network Analysis Using Linear Theory, "Journal of the Hdraulics Division, ASCE, Vol. 98, 1972, pp. 1157-1170. 5. Chandrashekar,M. and Stewart, K.H., "Sparcity Oriented Analysis of Large Pipe Neworks," Journal of the Hydraulics Division, ASCE, Vol. 10, 1975, pp. 341-355. 6. Chin, K.K., et al., "Solution of Water Networks by Sparce Matrix Methods, "International Journal for Numerical Methods in Engineering, Vol. 12, 1975, pp. 1261-1277. 7. Shamir, U. and Howard,C.D.D., "Water distribution System Analysis", Journal of the Hydraulics Division, ASCE, Vol. 94, No. l,jan., 1976,pp. 219-234. 8. Wood, D.J. and Rayes, A.M., "Reliability of Algorithms For Pipe Network Analysis", Journal of Hydraulics Division, ASCE, Vol 107, No. HY10, October 1981, pp. 1145-1161. 9. Jorjor zadeh, M.,"Element-by-Element Analysis of Large Scale Networks", M.Sc. Thesis, Iran University of Science & Technology, 1996.