You are on page 1of 9

January, 1973

46
RN(z ; a)

HY 1

= wave generator period;

= velocity of wave generator;


= horizontal velocity component;
= horizontal velocity component of particle on free surface;
v = vertical velocity component;

Uc (t)
u
ua

w
(w i)
X(t)

x
(xi)
xa
y
Yo
ya

z
a

ox, Oy,

r
ot

t/x)
X

{aj}
T
<P

.<I>

ef>a(t)

r/>1'

r/> 2

l/I
l/l/x)

l/I T
...

January, 1973

HY 1

= residual Fourier series;

TN(z; a) = truncated Fourier series;


t = time;
t 0 = initial time;
t<T = arbitrary particular time;

Va

9472

= vertical velocity component of particle on fre e surface;


= diagonal matrix with weights (wi) on main diagonal;
= set of weights in quadrature formula;
= generator displacement;
= horizontal cartes ian coordinate
'
= set of interpolation points associated
with quadrature formula;
= horizontal position of particle on free surface;
= ver tical cartesian coordinate;
= constant free surface elevation at time t
'
= vertical position of a particle on free surface;
= dummy variable;
= Lagrangian coordinate of particles on free sur face;
= space curve designation of free surfac e;
= incremental change in variable;
=matrix with elements ~ij = ~j(xi) ;
= function defined by Eq. 20;
= wave length;
= set Lanczos correction facto r s;
= dummy variable;
= velocity potential;
= potential vector, i. e ., potential function evaluated at points on
free surface that correspond to interpolation points;
= time dependent distribution of potential along free surface;
= specific potential functions;
= matrix whose elements are defined by l/lij = l/J/xi);
= member of set of orthogonal function;
= transpose of l/I;
= instantanious coordinate or distance r elative to gener ator;
= predicted value;
= differentiation; and
= evaluated at.

Journal of the

HYDRAULICS DIVISION
Proceedings of the American Society of Civil Engineers

MATRIX METHOD FOR ANALYSIS OF HYDRAULIC NETWORKS


By Am ir N. Nahavandi 1 and George V. Catanzaro 2

INTRODUCTION
Computation of steady- state or transient mass flow rate and pressu re distribution in fluid net\vorks with given geometric configuration and dimensions
is a common problem in many branches of engineering. The design of municipal water and gas distribution systems as well as the dynamic analysis of
thermal systems in conventional and nuclear power plants are a few typical
examples.
The solutions to the aforementioned network problems gene rally have been
obtained on digital computers. Several difficulties have been observed in
these numerical solutions:
1. When the number of nehvork nodes and branches becomes large, the
computer storage requirement and running time for the solution become
excessive .
2. The iterative procedure, used for the solution of steady-state problems, does not always converge or may at times converge very slowly.
3. The time integration used for the solution of transient problems may
become numerically unstable or nonconvergent.
4. The computer programs are not sufficiently ge neral to treat networks
of any arbitrary configuration with all system compone nts encountered in
practice .

This situation indicates that new techniques for the solution of fluid networks are needed. A new technique for the solution of isothermal incom'
pressible fluid flow in networks under steady- state or transient conditions
is
presented herein. In contrast to conventional steady-state network analysis
methods, this new technique can be extended to the unsteady analysis of com.Note.-Discussion open until June 1, 1973. To extend the c losing date one month, a
written request must be filed with the Editor of Technical Publications, ASCE. This
paper is part of the copyrighted Journal of the Hydraulics Division, Proceedings of the
American Soc iety of Civil Engineers , Vol. 99, No. HYl, January, 1973. Manuscript was
submitted for review for possible publication on March 20, 1972.
1 Research Prof., Newark Coll. of Engrg., Newark, N.J.
2 Grad. Student, Newark Coll. of Engrg., Newark, N.J.

47

48

January, 1973

HY 1

pressible flow networks having an arbitrary configuration with heat transfer


and phase change. In the present work, the matrix method of network analysis
(5) is applied to the nodal continuity and branch momentum equations. In this
manner, explicit relations for the unknown nodal pressures and branch mass
flow rate s are obtained. The present formulation is set up for the solution of
isothermal, incompressible fluid flow problems in networks under transient
conditions. Employing the present formulation, problems involving the analysis of isothermal, incompressible fluid flow in networks under steady-state
conditions, can be readily solved by the application of the dynamic relaxation
technique (16) as shown later herein.
REVIEW OF PREVIOUS WORK
The most widely used method for the solution of isothermal, incompressible flow problems in networks under steady- state conditions, is the wellknown Hardy Cross iterative procedure. This procedure is commonly divided
into: ( 1) The nodal method and (2) the loop method (3) . Employing the Hardy
Cross relaxation techniques, Hoag and Weinberg (8), Graves and Branscome
(7), Adams (1), Dillingham (5), Rosenhan (19), and a number of other investigators developed digital computer programs to perform hydraulic network
analyses. These pr ograms are at times hampered by numerical instability
and a slow rate of convergence.
The second method used for the ana lysis of isothermal, incompressible
flow in networks under steady-state conditions is the direct solution method.
In this method, the continuity and momentum equat ions are combined to obtain a system of nonlinear simultaneous equations for nodal pressures. These
equations are then solved by using either the Newton- Raphson method or by
the direct solution of the simultaneous linearized equations. Employing the
direct solutions method, Martin and Pete rs (11), Pitchai (17), Shamir and
Howard (20), and Marlow, et al. (10) developed digital computer programs to
perform hydraulic network analyses. These programs r equire a larger computer memory storage, as compared to the programs based on the Hardy
Cross Method (3,20) and also are hampered by the divergence of the numerical solution.
A systematic approach to the analysis and synthesis of complex networks
involving unsteady flow has been reported by Reisman (18). This study presents a ge neralized structural and mathematical framework to analyze or
synthesize a large class of fluid systems where transient behavior is of primary interest. In this study, the need for the development of a computer program with sufficient flexibility to simulate fluid networks with an arbitrary
configuration is emphasized.
Analog computer methods, based on nonlinear electrical resistances, have
been employed by Mcllroy (12), McPherson and Radziul (13), Barker (2),
Kiyose (9), and many others. However, digital machines are considered more
flexible tha!1 analog computers' and generally are preferred in this type of
study.
The foregoing survey indicates that new techniques for the solution of fluid
networks are needed. Recently, a new method suitable for both transient and
steady-state analyses of isothermal, incompressible fluid networks was presented by Nahavandi (15) . The main distinctive features of this method are
that: ( 1) It lends itself to a linkage with the matrix method of network analy-

HY 1

MATRIX METHOD

49

sis and ( 2) the extension of the method to the unsteady analysis of compressible flow in nehvorks having an arbitrary configuration with heat transfer
and phase change, seems to be feasible. This method constitutes the foundation for the present study.
SCOPE AND OBJECTIVES OF PRESENT STUDY
The main objectives of the present study are as follows: (1) To expand the
method developed by Nahavandi (15) for the transient and steady- state analyses of isothermal, incompressible flow networks and to link this procedu re
with the matrix method of network analysis ( 5) often used in the study of d- c
ele ctrical networks; (2) to develop a digital computer program for the transient and steady- state analyses of complex hydraulic networks based on this
new technique; and (3) to verify the results of the present study against the
results of another computer program based on the Hardy Cross method.
The present study provides the following flexibilities:

1. The hydraulic network considered may consist of any arbitrary nu mber


of nodes and branches connected according to any desired configuration. A
node is defined as any point in the system at which either three or more flows
meet or network geometri c dimensions change . A branch is defined as the
line connecting any two nodes.
2. Any node may be connected to a number of other nodes.
3. Sources and sinks with given input and output mass flow rates may be
introduced at any node.
4. Every branch may include a transduce r , such as a pump or a turbine,
whose differential head versus flow characteristic is known.
The present analysis is based on the following simplifying assumptions:

1. The fluid flow in the system is considered incompressible, isothermal,


and turbulent. No mass storage is allowed at any node or within a ny branch.
Furthermore, the wave propagation effect, heat transfer, and phase change
are not considered in the analysis.
2. The friction factor for head loss calculations is based on correlations
developed under steady-state conditions. Two types of frictional head loss
correlations are employed-the Darcy-Weisbach frictional head loss equation
with cu rve-fitted Moody's friction factor correlation (4 ,14) and the HazenWilliams frictional head loss equation (8 ,20).
The present study may be applied to the solution of steady-state problems.
To understand this particular application, it should be borne in mind that the
hydraulic transient solution can be made to approach asymptotically to the
steady- state solution if the system boundary condi tions are kept unchanged
during the dynamic study. This particular application is commonly known as
dynamic relaxation (16) and is further elaborated herein.
MATHEMATICAL FORMULATION
In the present analysis, the pressure drop versus pressure, nodal continuity, and branch momentum equations are exp r essed first in matrix form .

Januar y, 197 3

50

HY 1

These equations are then solved to obtain explicit relations for unknown nodal
pressures and branch mass flow rates in the following way.
The branch pr e ssure drop array, t::..p, de s igna ting the pressure drop in the
posit ive flow direction, is related to nodal pressures p by
{ t::..p}

= [A ] {P} .. . ................. . .... . ....... ..

(1)

i n which A = the connection matrix defined as foll ows. Every branc h of the
network, unde r investigation, is first given an arbitrary positive orie nta tion
or dire ction (see Fig. 1) . The connection matrix for branches and nodes is
then defined as a matrix whose elements are + 1, - 1, or 0 only. The r ows of
the connection matrix correspond to the network branches such that the maximum number of r ows are equal to the maximum number of system branches.
The columns of the connection matrix correspond to the network nodes s uch
that the maximum number of columns are equal to the maximum number of
2

SUPPLY
10

10

0
32

12

OUTPUT

19
11

12

11

33

31

41

19

31
OUT PUT

IS

30

38

OUTPUT

15

20

0
21

35

18

17 17

The branch momentum equation in finite differen ce form in time, relating


the contributions of inertia, elevational , frictional, and pump head to the
branch pressure drop, is given by the following matrix equation:

{. . l {
m - m0
h

ag
L

(144 AP + p ~ + pH - F)

.mwh1ch
. {F} = {1 (!DL')
2

and {!}

gp

= { 0 . 0055 [

1 +

0
1;l

2 x

Im 0 11

a2

10

... . . .. . . . . . .. (3)

106) 0 .333]

D + Rn

(4)

lf .. . . (5)

In the forego ing relations , a, D, L, and L ' = the branch flow c r oss- sectional
area, hydraulic diameter, length, and equi valent length, respectivel y. The inertia term is based on a forward fi nite difference form in time as the difference between the updated and the present values of the mass flow rates (m
and 0 ) divided by the time increment, h. A criterion for the selection of this
time increme nt will be presented later. Values of ~, H , F , and Rn = the
branch elevational head, pump head rise, frictional head loss , and Reynolds
number; while E, f , and p = pipe absolute roughness, fluid friction factor,
and density .
Eqs. 4 and 5 represent Moody' s method (4, 14) for the calculation of frictional head loss. In or der to be able to check the results of the prese nt
a nalysis against those of Ref. 19, provis ions to r eplace Moody's method by
Hazen- Williams method (8,20) are incorporated in the program. In the context of the present formulation, the Hazen-William formu lation is g iven by
3.02
( L' )
{F} - !l ci.ss
PO.BS DllBS

16

34

26

29

51

22

21

20

MATRIX METHOD

HY 1

28

.,noalB
lmol
o.esl
S

... . . . . (4a)

24

OUTPU T
35

F IG. 1 .-TYPICAL CITY WATER DISTRIBUTION SYST EM EMPLOYED TO VERIFY


NEW COMPUTATIONAL TECHNIQUE PRESENTED IN THIS STUDY

system nodes . If the branch orie ntation is away from the node, the corresponding e lement of the connection matrix is + 1. If the branch orientation is
toward the node, the corresponding ele ment of the connection matrix is - 1.
If the branch and the node do not meet, the corresponding eleme nt of the conne c tion matrix is 0.
The nodal continuity equation, considering both the branch flow and the
nodal source and sink (input and output) fl ows is give n by the following matrix equation:
. } = {O} .. . . ... .. .. .. .. .. . . . . . . . . . . . (2)
[A T J {m' } + {mio

in which AT = the transpose of the connection matrix and 1n and mio = the
branch flow and the noda l source and s ink (input and output) flow arrays,
re spectively.

T he quantity, C, the Hazen-Williams coefficie nt, depends on the type and the
condition of the condui t and is tabulated i n Ref. 19.
If a network consists of j branches and i nodes, Eqs. 1, 2, and 3 constitute
a set of 2j + i algebraic equations in 2j + i unknowns . These unknowns are
b r anch pressure drops, branch mass flow rates, and nodal pressures. To
solve the preceding system of algebraic equations , it is necessary to eliminate the pressure drops and ma ss flow rates among Eqs. 1, 2, and 3 to obtain
a single matrix equation for the unknown nodal pressures. Solving the matrix
equation 3 for
array, the result is

ni

{m} = {m 0 } + {144 yt::..p + pyt::..Z + pyH - yF} . . . . . . . . . . . .. (6)


in which {y} = {agh/L}. Substituting the t::.. p array from Eq. 1 into Eq. 6 a nd
substituting the resulting equation into Eq. 2 yields
[AT]

{m 0 } +[AT] [144y) (A) {p} +[AT] {py t::..Z

+ pyH - yF} + {mio}

= {o} ............. . . . ......... ..

Solving Eq. 7 for the unknown nodal pressure array gives

(7)

L ~G "'"'L ENGINEER
January, 1973

52

HY 1

in which [M) = [AT] [144y) [A] . .. . . . . ............ .. . ... . (9)


Having the nodal pressures from Eq. 8, it is possible to calculate readily the
branch pressure drops and mass flow rates from Eqs. 1 and 6, respectively.
It is important to realize that [144y J is a diagonal matrix having branch y
terms along its diagonal, and zero elsewhere.
The main distinctive feature of the pre sent analysis is that the steadystate as well as the transient nodal pressures and branch mass flow rates
are calculated by the time - integration of the network transient equations as
previously given. Initial values of the branch mass flow rate array, in, 0 , are
assumed such that continuity equations are satisfied at each node between
branch flows 0 and nodal source and sink flows
Care must be taken not
The former quantity represents the present
to confuse values of 0 and
values of the mass flow rates which vary during the problem solution, while
the latter designates fixed known flow quantities entering or leaving the system at various nodes. Following every application of Eqs. 8, 1, and 6, the up dated values of the branch mass flow rates are computed. The present values
of the branch mass flow rates are then set equal to the updated values and the
application of Eqs. 8, 1, and 6 are continued. For steady- state analyses, this
procedure is continued until the values of branch mass flow rates converge
within a prescribed error.
To perform a transient analysis, the converged steady- state mass flow
rates are entered as the initial values for m0 array. The problem solution is
then restarted under the new prevailing conditions until a new set of steadystate mass flow rates are reached.
Note that the calculation of nodal pressures from Eq. 8 involves the inversion of matrix M. The elements of this matrix are independent of flow and the
inversion procedure can be performed only once at the beginning of analysis.
Furthermore, multiplications of M inverse by A transpose and M inverse by
mio are al so independent of time and can also be performed once at the beginning of the analysis. The remaining operations indicated by Eqs. 8 are
time dependent and should be performed once in every time increment during
the transient calculations. For large networks, the order of matrix A becomes
large. This will obviously increase the computer running time for inversion,
multiplications, ~nd other operations described previously. This situation,
however, will not create any complication in the analysis.

mio.

mio.

NUMERICAL SOLUTION

MATRIX METHOD

HY 1

53

The numeral calculations can be conveniently divided into two groups. The
first group consists of mathematical operations performed once at the beginning of the program. The assembly of the connection matrix and its transpose, the formation of matrix M defined by Eq. 9 and its inverse as well as
the calculation of all flow-independent terms in Eqs. 8 and 1 are among this
group. The second group consists of iterative operations performed after
each time increment. The calculation of branch frictional head loss and pump
pressure rise as well as the computation of all flow-dependent terms in Eqs.
8 and 1 are among this group. Cl assification of the numerical calculations
into the aforementioned groups increases the computational efficiency of the
program and reduces the computer running time .
To perform the required mathematical computations, a number of matrix
operation subroutines, such as matrix addition, subtraction, multiplication,
inversing, and transposing were needed. T hese subroutines were obtained
from Ref. 21.
NUMERICAL STABILITY ANALYSIS
The present analysis is based on the numerical integration of the branch
momentum differential equations (Eq. 3). To obtain a convergent solution, it
is necessary that the selected time increment, h, for this integration be
smaller than the minimum time constant associated with these equations by a
good margin. The momentum equations are nonlinear and an accurate calculation of their time constants cannot be made readily prior to their numerical
solution. Fortunately, the accurate calculation of these time constants is not
necessary and a conservative estimate is all that is needed for the purpose of
obtaining a convergent solution. This objective can be achieved by making a
number of simplifying assumptions. First, as the dependence of the friction
factor and the pump head on mass flow rate is generally weak, it is reasonable to assume that these two var iables are flow- independent. Secondly, the
stability analysis will be performed on the linearized momentum equations.
This assumption is heuristically j1ustified because the linearized equations
approximate the nonlinear equations in small time regions. If the linearized
solution is convergent for every time increment, the overall nonlinear solution also will be convergent. It should be further emphasized that these simplifying assumptions are made only for the stability analysis and not for the
actual analysis presented herein.
Based on the preceding assumptions, the branch momentum equation may
be expressed by

The numerical solution to the problem is obtained by solving Eqs. 8, 1, and


6 on a digital computer. The input data for this analysis consist of network

topography, geometric dimensions, hydraulic properties, problem initial conditions, and control variables. The main input data in this study are as follows: ( 1) The connection matrix, A (only the nonzero terms are entered as
input data); (2) the branch actual length, L, equivalent length L', hydraulic
diameter D, nodal elevation Z arrays; (3) the fluid density, p, viscosity, and
pipe absolute roughness E; (4) the pumps' locations and their head versus
volumetric flow characteristics; ( 5) initial branch mass flow rates 0 ; ( 6)
nodal sink and source mass flow rates
and ( 7) integration time increment h and steady- state flow convergence error.

mio;

L din + [( in,2
ag dt
in which K =

= c .. .... . . . . . . . . . . . . .. . . . . . . . . . . .

2 ~P (!;') ;

(10)

(11)

and c = the sum of the pressure drop, the e levational head, and the pump
head rise. Because the linearized equation will be used only within a small
time increment, both K and c are treated as constants and thus the variation
of Eq. 10 is

54

January, 1973

. d(om)
ag

dt

2K

mo

om = 0

HY 1

. . . . . ( 12)

mo

Eq. 12 defines a linear differential equation in om at each value of


for
each time increment, h . The time constant for this linear differential equation is
L

T0

= 2Kag m0

13)

Substituting Eq. 11 into Eq. 13, the final expression for branch time constants
become
To

7TD 3 PL

4/ L,

mo

( 14)

Experience with the operation of the present program has indicated that if for
each integration step, the time increment is smaller than the minimum time

constant by a margin of 20, i.e ., if:


min
h < To20
. . . . . . .

. . . . . . . . . . . . . . . . ( 15)

the numerical integration is conve rgent. Thus, to obtain a convergent solution, the branch time constants are computed from Eq. 14 prior to each integration step and their minimum value i s selected. The time increment for
the next time interval is then chosen to be 1/20 of the minimum time constant. This margin of 20 has proved to be satisfactory for the present analysis and has resulted in a convergent solution. In the event that approximate
values of the steady- state flows are known from a previous run, it is more
economical to compute the time increment on the basis of these flows. The
time increment can then be held constant throughout the dynamic analysis.
The reason for using the minimum time constant can be made clear by the
following argument. Any arbitrary network consists of a number of parallel
and series branches. For parallel branches, the line with minimum time constant has the fastest time response and therefore should be used for numerical stability purposes. For a j number of series branches, the equivalent time
constant can be shown easily to be

(~t

l
n =1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (16)

2ni 0

(K)n

n=1

This equivalent time constant can be shown to be larger than the smallest
time constant among these branches. Consequently, the minimum time constant branch provides a conservative estimate for usage in the numerical
stability ana lysis.
When the transient solution is of no interest and only the final steady-state
values are desired, the time increment criterion is not as stringent as indicated by Eq. 15. The time increment can be increased to the order of the system minimum time constant or even higher, leading to a large reduction in
computer running time . The increase in the time increment reduces the actual
branch time constants without adversely affecting the steady-state results.

HY 1

MATRIX METHOD

55

It should be further emphasized that numerical instability and lack of convergence constitute two major hazards of any numerical integration scheme.
Numerical oscillations are caused by computational round- off errors, and the
lack of convergence is the result of integration truncation error. Both the numerical instability and the lack of convergence problems can be overcome by
the introduction of an appropriate upper bound for the integration time step,
h, as indicated by Eq. 15.
Although the numerical stability criterion presented herein, lacks a rigorous proof, it provides a reasonable estimate of the time interval, which appears to give stable results in all cases considered.

PRESENTATION OF RESULTS
The new computational technique developed herein is verified by employing lhe present d igital program to determine the flow and pressure d i stribution in the hydraulic network shown in Fig. 1. A steady-state numerical

solution, to this problem, based on the Hardy Cross method is available (19)
and is used to check the correctness of the present dynamic analysis. The
hydraulic network, shown in Fig. 1, represents a typical city water distribution system. All system nodes and branches are numbered independently, and
positive flow directions are shown by arrows. Water enters the system
through branch 1, at a rate of 2,825 gpm (0.1 782 m 3/s) with a constant pressure of 60 psi, and leaves the system through branches 30, 31, 32, 34, and 35
at 450 gpm, 400 gpm, 500 gpm, 650 gpm, and 825 gpm (0.0284 m 3/s, 0 .0252
m 3/s, 0.0316 m3/s, 0.0410 m3/ s, and 0 .0520 m3 /s), respectively. The length,
internal diameter, and elevational difference for every system branch is
specified in Table 1. In order to be able to match the present results against
those of Ref. 19, no booster pump is placed in any branch and the equivalent
length of each branch is taken equal to its actual length. It should be pointed
out that the present analysis is not restricted by these assumptions. These
restrictions are introduced to obtain a meaningful comparison between the
results of the present study and those of Ref. 19.
Typical transient results are demonstrated in Figs. 2 and 3. The final
steady- state results are shown in Tables 2 and 3 for all system branches.
Figs. 2 and 3 show the typical time - variation of mass flow rate and fric tional head loss for branches 11 and 23. An examination of these curves and
Tables 2 and 3 reveals the following features:
1. Application of Moody's and Hazen-Williams' frictional head loss formulas affects the shape of the system response curves. This is to be expected as the coefficients and power appearing in Eqs. 4 and 4a are somewhat
different. The difference between values obtained from the application of
Moody and Hazen- Williams is a function of branch diameter and mass flow
rate . For certain branches, the combination of diameter and mass flow rate
results in a closer agreement between the response curves. The choice between Moody's or Hazen-Williams' frictional head loss formulas is a matter
of personal preference . In any event, both correlations yield comparable re sults for practical purposes.
2. The steady- state values of branch flows and frictional head losses obta ined from the present analysis, using Hazen-Williams' formula are in good

January, 1973

56

HY 1

...
~

TABLE 1.-GEOMETRIC SPECIFICATIONS FOR HYDRAULIC NETWORK SHOWN IN


F IG. 1

10

vi
V)
0
.....

...c

Diameter, D, in inchesa

Branch number

(1)

(2)

1
2
3
4
5

20
20
20
20
20
20
10
10
10
10
8
8
8
6

Elevation difference,
Length, L, in feetb
D.Z, in feet
(4)
(3)

57

MATRIX METHOD

HY 1

:z:

z
0
;:::

,.

-----------------------

L)

...
a:

0
BRANCH 11

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

5
5
5
8
6

44

45
a 1 in. = 25 .4 mm.
b l ft = 0.305 m .

6
6
5
5
8
5
5
5
5
6
8
5
6

6
5
10
10
5
6

6
5
5
5
5
5

1
200
150
120
130
100
200
50
100
100
80
50
200
70
80
72
16
130
120
85
100
70
30
205
90
20
30
205
100
200
75
300
100
100
100
200
300
200
1 00
100
5
5
50
5
6

0
0
-10
+5
+5
-10
- 10
-5
.,.40
-40
-10
+5
0
0
+10
0
0
-10
-10
+10
+20
+5
+5
-10
0
0
-5
0
+15
-15
+5
+20
-5
-5
+10
0
-30
+5
-10
-5
-5
-5
0
-5
-5

300

_ - - STEADY STATE RESULT OF REFEIH NCE 19


BASED ON HAZEN-WILLIAMS HEAD LOSS EQUATION

275

...~ 250
c..)

- - - - - - PRESENT ANALYSIS BASED ON MOODY'S


HEAD LOSS EQU ATION

V)
Cl)

.....
..; 225
~
a:
3:

- - - PRESENT ANALYSIS BASED ON HAZEN-WILLIAMS


HEAD LOSS EQUATION

200

.:
.,,
.,,

175

; 150
125
100 L-~---li-----+-~--+-~~-+-~~-1-~~-+-~~-1-~~4

20

15

10

25

30

35

40

TIME, SEC.

FIG. 2.-TYPICAL TIME VARIATION OF MASS FLOW RATE AND FRJCTJONAL


HEAD LOSS FOR BRANCH 11 (l ft = 0.305 m and 1 lb per sec = 0.454 kg/s)

t: 1.0
vi
en
0

.....

...
0

.5

:z:

z
0
;:::
L)

...a:

0
BRANCH 23

40
-

...~ 30

- -

- STEADY STATE RESULT OF REFERENCE 1'1.


BASED ON HAZEN-WILLIAMS HEAD LO SS EQUATION

L)

- - - - - -

PRESENT ANALYSIS BASED ON MOODY'S


HEAD LOSS EQUATION

- --

PRESENT ANALY SIS i!ASED ON HAZEN-WILLIAMS


HEAD LOSS EQUATION

en
Cl)

.....

...;
~
a:

20

~
.....
......
en
en

10
0

L-~---4-~-+~~--+-~~-+~~-+-~~--+-~--+-~--'

10

15

20

25

30

35

40

TIME. SEC.

FIG. 3.-TYPICAL TIME VARIATION OF MASS FLOW RATE AND FRICTIONAL


HEAD LOSS FOR BRANCH 23 (1 ft = 0.305 m and 1 lb per sec = 0.454 kg/s)

58

January, 1973

HY 1

TABLE 2.-STEADY-STATE MASS FLOW RATES, IN POUNDS PER SECOND, a FOR


HYDRAULIC NETWORK SHOWN IN FIG. 1

Present analysis using


Moody' s head loss
equation
(2)

Branch
number
(1)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

392.7
274.0
176.8
176.8
74.9
59 .3
59.3
101.9
97.1
118.7
134.2
75.3
42.1
27.4
47 .5
27. 9
27 .9
27 .9
108.2
43 .8
31.7
71.1
8.5
19.7
61.1
80.8
33.9
25 .3
1 2.1
15.6
11.8
1 9.7
8. 5
13.2
12.1
15.5
26.5
33.2
52.6
62.6
55. 6
69.5
90.3
90.3
114.7

a 1 lb per sec = 0.454 kg/s.

Present analysis using


Hazen-Williams'
head loss equation
(3)
392.7
271.6
174.5
174.5
74.1
58 .5
58.5
100.4
97.1
121.1
133.9
76.7
42.9
26.6
47.5
28 .0
28 .0
28.0
1 08.0
43. 6
31.7
71.4
8.8
19.5
61.8
81.3
33.4
24. 6
11.9
15. 6
11.0
1 9.5
8.8
12.7
11.9
12.8
23.7
33.8
52.4
62. 6
55 .6
69.5
90 .3
90.3
114.7

HY 1

MATRIX METHOD

TABLE 3.-STEADY- STATE FRICTIONAL HEAD LOSS, IN FEET, a FOR HYDRAULIC


NETWORK SHOWN IN FIG. 1

(1)

Present analysis using


Moody' s head loss
equation
(2)

P resent analysis using


Hazen-Williams'
head loss equation
(3)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

0.0
0.1 63
0.052
0.042
0.008
0. 004
0. 294
0. 213
0.387
0.575
1.884
0.375
0.048
0.321
1.085
0.881
0.196
1.591
1.843
0.982
0.609
2.106
0. 036
1.264
0.447
2. 022
0.539
2.079
0.479
0.305
0. 015
1.850
0. 047
0.109
0.239
0.022
0.093
3.468
1.655
2.335
0. 240
0.374
6.321
0. 631
1.218

0. 0
0. 239
0. 079
0.063
0.014
0.007
0.409
0.278
0.523
0.787
2. 249
0.500
0.068
0.402
1.341
1.105
0.245
1.996
2.267
1. 214
0.792
2.493
0.054
1 .604
0.605
2.201
0.638
2.474
0.627
0.429
0.021
2.348
0.074
0.146
0.313
0. 024
0.115
4.338
2. 012
2.791
0.272
0.412
6.696
0. 669
1.249

Ref. 19

Branch
number

(4)
392.7
271.1
173.7
173.7
73.9
58.3
58 .3
99.8
97.5
121.3
133.8
76.7
42.9
26.7
47.5
28. 0
28 .0
28.0
107.9
43 .5
31.7
71.3
8 .8
19.5
61.7
81. 2
33.4
24.6
11.9
15.7
10.8
19.5
8 .8
12.7
11.9
12.5
23 .1
33.7
52.4
62.5
55 .6
69.5
90.3
90.3
114.7

59

al ft = 0.305 m.

Ref. 19
(4)
0.0
0.23
0. 08
0.06
0. 01
0.01
0.40
0.27
0.52
0.77
2.20
0.49
0. 07
0.39
1.31
1.08
0.24
1.96
2.22
1.19
0.78
2.44
0. 05
1.57
0.59
2.1 6
0. 63
2.43
0.61
0.43
0.02
2.30
0.07
0.14
0.31
0.02
0.11
4.25
1.97
2.74
0. 27
0.40
6.56
0. 66
1. 22

60

January, 1973

HY 1

agreement with those of Ref. 19, which is also based on the same formula.
This close agreement between this analysis and Ref. 19 verifies the correctness of the new technique presented herein. The apparent discrepancy between two frictional head losses (for branch numbers 5 and 6) is most likely
due to data round- off in Ref. 19.
3. Referring to the numerical stability analysis presented earlier, and
noting that the system minimum time constant, based on steady-state flow, is
2 sec (for branch 26), it can be concluded that the application of a constant
time increment equal to 2.0/20 or h = 0.1 sec throughout the analysis ensures
a convergent solution for the problem at hand. Setting h = 0.1 sec, the steadystate conditions are reached after 482 iterations with a relative flow convergence error of less than 0.0006. Decreasing the time increment to h = 0.05
sec does not appreciably change the dynamic results, while increasing the
time increment to h = 0.2 sec affects the system r esponse curves. This test
verifies the correctness of the numerical stability analysis presented earlier.
4. To provide a comparison between the computational time required by
this new method against the computer program presented in Ref. 19, both
programs were run on an RCA Spectra 70/45 digital computer. For the
steady- state analysis, as the dynamic behavior is of no interest, the time incre ment can be increased to the same order of the system minimum time
constant (3 sec) . This increase in the time increment changes the dynamic
response and speeds up the computer running time without adversely affecting
the steady- state results. The computer running time required to obtain
steady- state solutions for the aforementioned hydraulic network problem is
108 sec for the present program and 134 sec for the program presented in
Ref. 19. For problems in which tran sient behavior is of primary interest, the
running time is generally longer and = 0.36 sec for 1 sec of real time pe r
branch .
5. The dynamic curves shown in Figs. 2 and 3 have the following physical
significance. Assume that at time t = 0 the branch mass flow rates are those
typically indicated in the figures, and the input pressure and flow at branch 1
as well as the output flows at branches 30, 31, 32 , 34, and 35 remain constant.
The mass flow rate time histories in the system branches will then undergo a
transient behavior typically shown in the previously mentioned figure s and
will approach asymptotically to final steady-state values. In other words , in
the present study, both the steady- state and transient solutions are obtained
by a time-dependent dynamic analysis. Values of dependent variables at intermediate time points represent the actual system behavior during a transient and are, therefore, physically meaningful. In contra st, the Hardy Cross
and the direct solution methods obtain the final steady- state values after a
number of iterations (8). For these analyses, values of dependent variables
at these intermediate points have no physical significance. As stated earlier,
the initial values of branch flow rates are arbitrary provided that an initial
mass balance at each node is obtained.

CONCLUSIONS
A new technique for the steady- state and transient analyses of isothermal,
incompressible flow in networks is presented. In this method, the pressure
drop versus pressure, nodal continuity, and branch momentum equations are

HY 1

MATRIX METHOD

61

expressed in matrix form for networks with any arbitrary configuration.


These equations are then solved to obtain explicit relations for unknown nodal
pressures and branch mass flow rates.
In contrast with the conventional steady-state network analysis methods,
the present technique can be extended to the transient analysis of compressible flow in networks with heat t ransfer and phase change.
To ascertain the accuracy of the solution, a nume r ical stability and convergence analysis is performed. This analysis provides an estimate for the
upper bound of the time inc rement needed for a stable and convergent solution.
The new technique is applied to the analysis of a water distribution network. The results obtained are in agreement with the available solution.

APPENDIX !.- REFERENCES

I. Adams , R. W., "Distribution Analysis by Electronic Computer," Journal of the Institute of

Water Engineers, Vol. 15, 1961, pp. 415-428.


2. Barker, C. L., "Use of the Mcllroy Analyzer on Water Distribution Systems ," Journal of
tl1e American Water Works Association, Vol. 50, Jan., 1958, pp. 15-20.
3. Barlow , J . F., and Markland, E., "Computer Analysis of Pipe Networks ," Proceedings of
tlte Institution of Civil Engineers, Vol. 43, May-Aug., 1969, pp. 249-259.
4. Benedict, R. P., and Carlucci, N. A., " Flow with Losses," Joumal of Engineering for Power,
Paper No. 63-WA-105, 1963, pp. 1- 13.
5. Branin, F. H., Jr., " The Algebraic-Topological Basis for Network Analogies and the Vector
Calculus ," IBM Technical Report TR 00.1495, July 25 , 1966 pp. 1-66.
6. Dillingham, J . H., "Computer Analysis of Water Distribution Systems, Part 2," Water and
Sewage Works , Vol. 114, No. 2, Feb., 1967, pp. 43-45.
7. Graves , Q. B., and Branscome, D., "Digital Computers for Pipeline Network Analysis," Journal
of the Sanitary Engineering Division, ASCE, Vol. 84, No. SA2 ,,Proc. Paper 1608, Apr., 1958,
pp. 1608-1- 1608-18.
8. Hoag, L. N., and Weinberg, G., " Pipeline Network Analysis by Electronic Digital Computer,"
Journal of tlte American Water Works Association, Vol. 49, 1957, pp. 517-524.
9. Kiyose, J., "Development of Flow Computers for Network Analysis in Japan ," Journal of
the American Wat er Works Association, Vol. 57, Oct., 1965 pp. 1346-1353.
10. Marlow, T. A., et al., " Improved Design of Flujd Networks with Computers,' Journal of
tlie Hydraulics Division, ASCE, Vol. 92, No. HY4, Proc. Paper 4866 , July, 1966, pp. 43-61.
11. Martin , D. W., and Peters, G., "The Application of Newton's Method to Network Analysis
by Digital Computers," Journal of tlte Institute of Water Engineers, Vol. 17, 1964, pp. 11 5-129.
12. Mcllroy, M. S., " Direct Reading Electric Analyzer for Pipeline Network Analysis," Journal
of the American Water Works Association, Vol. 42, Apr., 1950, p. 347.
13. McPherson, M. B., and Radziul, J. V., "Water Distribution Design and the Mcllroy Network
Analyzer," Journal of the Hydraulics Division, ASCE, Vol. 84, No. HY2, Proc. Paper 1588,
Apr., 1958, pp. 1588-1-1588-15.
14. Moody, L. F., "Friction Factors for Pipe Flow," Transa ctions, American Society of Mechanical
Engineers, Vol. 66, 1944, p. 671.
15. Nahavandi, A. N., " The Loss-of-Coolant Accident Analysis in Pressurized Water Reactors ,"
Nuclear Science a11d Engi11eeri11g, Vol. 36, 1969, pp . 159-188.
16. Otter, J. R. H ., "Dynamic Relaxation of Shell Theory Equations for Arch Dams," Theory
of Arch Dams, J . R. Rydzewski , ed., Proceedings of the International Symposium held at
Southampton University, England, 1964, pp. 313-318.
17. Pitchai , R., " A Model for Designing Water Distribution Pipe Networks," thesis presented

January, 1973

62

HY 1

to Harvard University, at Cambridge, Mass., in 1966, in partial fulfillment of the requirements


for the degree of Doctor of Philosophy.

18. Reisman, A., "On a Systematic Approach to the Analysis and Synthesis of Complex Systems
Involving the Unstea~y Flow of Fluids," American Society of Mechanical Engineers Publication
No. 64-WA / FE-36, 1964, pp. 1- 12.
19. Rosenhan, A. K. , "Computer Analysis of Flow in Pipe Networks,'' American Society of Mechanical
Engineers Publication No. 69-WA / PVP-9, 1%9, pp. 1-23.
20. Shamir, U., and Howard, C. D. D. , "Water Distribution Systems Analysis," Journal of the
Hydraulics Division, ASCE, Vol. 94, No. HYI , Proc. Paper 5758, Jan., 1968, pp. 219-234.
21. System / 360 Scientific Subroutine Package (360A-CM-03X) Version III, Programmer's Manual,
International Business Machine Corporation.

APPENDIX II.-Nar ATION

MATRIX METHOD

HY 1

(e levation of node at end of arrow minus elevation of node


at head of arrow), in feet (meters) ;
= small variation of branch mass flow rate, in pounds per
second (kilograms per second);
E = pipe roughness, in feet (meters);
= fluid viscosity, in pounds per second per foot (kilograms
per second per meter);
p = fluid density, in pounds per cubic foot (kilogramsper cubic
meter);
T = branch time constant, in seconds;
[ J = matrices; and
{ } = arrays.

om

Superscripts .
o = present value, and
T

The following symbols are used in this paper:


A = connection matrix for branches and nodes;
a = branch flow cross-sectional area, in square feet (square
meters);
C = Hazen- Williams coefficient;
c = constant defined in text;
D = branch hydraulic diameter, in feet (meters);
F = pressure loss due to friction, in pounds per square foot
(Newtons per square meter);
f = friction factor;
g = acceleration of gravity ;::: 32 .2 ft/sec 2 (9 .82 m/s 2) ;
H = transducer pressure differential (pump pressure rise), in
feet (meters);
h = time increment, in seconds;
{( = constant defined by Eq. 11;
L = branch actual length, in feet (meters);
L' = branch equivalent length (branch actual length plus additional lengths allowed for fittings) , in feet (meters);
M = matrix defined by Eq. 9;
= branch mass flow rate, in pounds per second (kilograms
per second);
mio = nodal source and sink (input and output) mass flow rate
(positive for source and negative for sink) , in pounds per
second (kilog rams per second);
p = nodal pressure, in pounds per square inch (Newtons per
square meter);
Rn = D m0 /a = branch Reynolds number;
t = time, in seconds;
Z = nodal elevations, in feet (meters);
y = quantity defined in text;
6.p = pressure drop along positive flow direction, in pounds per
square inch (Newtons per square meter);
6.Z = branch elevational difference along positive flow direction

63

= transpose

of matrix.

You might also like