+ All Categories
Home > Documents > Head- and Flow-Based Formulations for Frequency Domain Analysis of Fluid Transients in Arbitrary...

Head- and Flow-Based Formulations for Frequency Domain Analysis of Fluid Transients in Arbitrary...

Date post: 16-Oct-2016
Category:
Upload: martin-f
View: 213 times
Download: 1 times
Share this document with a friend
13
Head- and Flow-Based Formulations for Frequency Domain Analysis of Fluid Transients in Arbitrary Pipe Networks John P. Vítkovský 1 ; Pedro J. Lee 2 ; Aaron C. Zecchin 3 ; Angus R. Simpson, M.ASCE 4 ; and Martin F. Lambert 5 Abstract: Applications of frequency-domain analysis in pipelines and pipe networks include resonance analysis, time-domain simulation, and fault detection. Current frequency-domain analysis methods are restricted to series pipelines, single-branching pipelines, and single-loop networks and are not suited to complex networks. This paper presents a number of formulations for the frequency-domain solution in pipe networks of arbitrary topology and size. The formulations focus on the topology of arbitrary networks and do not consider any complex network devices or boundary conditions other than head and flow boundaries. The frequency-domain equations are presented for node elements and pipe elements, which correspond to the continuity of flow at a node and the unsteady flow in a pipe, respectively. Additionally, a pipe-node-pipe and reservoir-pipe pair set of equations are derived. A matrix-based approach is used to display the solution to entire networks in a systematic and powerful way. Three different formulations are derived based on the unknown variables of interest that are to be solved: head-formulation, flow-formulation, and head-flow-formulation. These hold significant analogies to different steady-state network solutions. The frequency-domain models are tested against the method of characteristics (a commonly used time-domain model) with good result. The computational efficiency of each formulation is discussed with the most efficient formulation being the head- formulation. DOI: 10.1061/(ASCE)HY.1943-7900.0000338. © 2011 American Society of Civil Engineers. CE Database subject headings: Hydraulic transients; Unsteady flow; Pipe networks; Numerical analysis; Fourier analysis. Author keywords: Transients; Unsteady flow; Pipes; Networks; Numerical analysis; Fourier analysis. Introduction The use of time-domain or frequency-domain analyses depends on the problem at hand. Suitable problems for frequency-domain analysis are those that are linear in nature or involve a small per- turbation about a reference state. Frequency-domain analysis is used in applications such as resonance analysis (Chaudhry 1987; Wylie and Streeter 1993), leakage detection (Ferrante and Brunone 2003; Lee et al. 2005a, b, 2006; Covas et al. 2005; Kim 2005, 2007, 2008), and blockage detection (Mohapatra et al. 2006a, b; Sattar et al. 2008). Additionally, certain time-domain solutions can be calculated via the frequency-domain solution allowing many applications, which involve time-domain analyses, to utilize fre- quency-domain analyses. Suo and Wylie (1989) presented the impulse response method (IMPREM) where the frequency-domain response is transferred into a time-domain response. The technique assumes that the system is driven by a discharge perturbation at the downstream boundary and the solution requires a formulation of the impedance equations for the particular system. Kim (2007, 2008) presented a matrix-based implementation of the impedance method for a simple network, although the method is closely related to the transfer-matrix method. These applications, as described in the previous paragraph, have been limited to single pipelines, pipelines with single branches, and single-loop networks. This paper derives different formulations for frequency-domain analysis for an arbitrary pipe network. For the purposes of clearly establishing the type of network considered in this paper, the network elements considered include pipes, nodes, demands, and reservoirs. Excitation to the system can be made through perturbations in either demand (or flow) at a junction or head at a reservoir. Analysis in the frequency domain, for a suitable problem, can be efficient and accurate provided that the nonlinearities involved are small. Additionally, frequency-domain analysis allows convenient inclusion of unsteady friction and vis- coelastic behavior where their solution is efficient. The solution for a transient response, when calculated using frequency-domain analysis, requires the solution of the system response at many single frequency components; therefore, it is desirable that each frequency component be solved as efficiently as possible. Three sets of network equations are derived in this paper: the continuity of flow at a node, the unsteady-state equations of continuity and motion for a pipe, and pipe-node-pipe and reservoir-pipe pairs. From those three sets of equations, three formulations are derived based on solutions for the complex perturbations in heads and flow, heads only, and flow only. The computational merits of each for- mulation and similarities to steady-state solution formulations are discussed. 1 Hydrologist, Hydrology Group, Water Planning Sciences, Environ- ment and Resource Sciences, Dept. of Environment and Resource Manage- ment, Queensland Government, Australia (corresponding author). E-mail: [email protected] 2 Lecturer, Dept. of Civil Engineering, Univ. of Canterbury, Christch- urch, New Zealand. 3 Lecturer, School of Civil and Environmental Engineering, Univ. of Adelaide, Adelaide, Australia. 4 Professor, School of Civil and Environmental Engineering, Univ. of Adelaide, Adelaide, Australia. 5 Professor, School of Civil and Environmental Engineering, Univ. of Adelaide, Adelaide, Australia. Note. This manuscript was submitted on December 8, 2008; approved on October 8, 2010; published online on April 15, 2011. Discussion period open until October 1, 2011; separate discussions must be submitted for individual papers. This paper is part of the Journal of Hydraulic Engineer- ing, Vol. 137, No. 5, May 1, 2011. ©ASCE, ISSN 0733-9429/2011/5-556568/$25.00. 556 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 J. Hydraul. Eng. 2011.137:556-568. Downloaded from ascelibrary.org by Saskatchewan University on 10/24/12. Copyright ASCE. For personal use only; all rights reserved.
Transcript

Head- and Flow-Based Formulations for FrequencyDomain Analysis of Fluid Transients in Arbitrary

Pipe NetworksJohn P. Vítkovský1; Pedro J. Lee2; Aaron C. Zecchin3; Angus R. Simpson, M.ASCE4; and Martin F. Lambert5

Abstract: Applications of frequency-domain analysis in pipelines and pipe networks include resonance analysis, time-domain simulation,and fault detection. Current frequency-domain analysis methods are restricted to series pipelines, single-branching pipelines, and single-loopnetworks and are not suited to complex networks. This paper presents a number of formulations for the frequency-domain solution in pipenetworks of arbitrary topology and size. The formulations focus on the topology of arbitrary networks and do not consider any complexnetwork devices or boundary conditions other than head and flow boundaries. The frequency-domain equations are presented for nodeelements and pipe elements, which correspond to the continuity of flow at a node and the unsteady flow in a pipe, respectively. Additionally,a pipe-node-pipe and reservoir-pipe pair set of equations are derived. A matrix-based approach is used to display the solution to entirenetworks in a systematic and powerful way. Three different formulations are derived based on the unknown variables of interest thatare to be solved: head-formulation, flow-formulation, and head-flow-formulation. These hold significant analogies to different steady-statenetwork solutions. The frequency-domain models are tested against the method of characteristics (a commonly used time-domain model)with good result. The computational efficiency of each formulation is discussed with the most efficient formulation being the head-formulation. DOI: 10.1061/(ASCE)HY.1943-7900.0000338. © 2011 American Society of Civil Engineers.

CE Database subject headings: Hydraulic transients; Unsteady flow; Pipe networks; Numerical analysis; Fourier analysis.

Author keywords: Transients; Unsteady flow; Pipes; Networks; Numerical analysis; Fourier analysis.

Introduction

The use of time-domain or frequency-domain analyses depends onthe problem at hand. Suitable problems for frequency-domainanalysis are those that are linear in nature or involve a small per-turbation about a reference state. Frequency-domain analysis isused in applications such as resonance analysis (Chaudhry 1987;Wylie and Streeter 1993), leakage detection (Ferrante and Brunone2003; Lee et al. 2005a, b, 2006; Covas et al. 2005; Kim 2005,2007, 2008), and blockage detection (Mohapatra et al. 2006a, b;Sattar et al. 2008). Additionally, certain time-domain solutionscan be calculated via the frequency-domain solution allowing manyapplications, which involve time-domain analyses, to utilize fre-quency-domain analyses. Suo and Wylie (1989) presented theimpulse response method (IMPREM) where the frequency-domain

response is transferred into a time-domain response. The techniqueassumes that the system is driven by a discharge perturbation at thedownstream boundary and the solution requires a formulation ofthe impedance equations for the particular system. Kim (2007,2008) presented a matrix-based implementation of the impedancemethod for a simple network, although the method is closelyrelated to the transfer-matrix method.

These applications, as described in the previous paragraph, havebeen limited to single pipelines, pipelines with single branches, andsingle-loop networks. This paper derives different formulations forfrequency-domain analysis for an arbitrary pipe network. For thepurposes of clearly establishing the type of network consideredin this paper, the network elements considered include pipes,nodes, demands, and reservoirs. Excitation to the system can bemade through perturbations in either demand (or flow) at a junctionor head at a reservoir. Analysis in the frequency domain, for asuitable problem, can be efficient and accurate provided that thenonlinearities involved are small. Additionally, frequency-domainanalysis allows convenient inclusion of unsteady friction and vis-coelastic behavior where their solution is efficient. The solution fora transient response, when calculated using frequency-domainanalysis, requires the solution of the system response at manysingle frequency components; therefore, it is desirable that eachfrequency component be solved as efficiently as possible. Threesets of network equations are derived in this paper: the continuityof flow at a node, the unsteady-state equations of continuity andmotion for a pipe, and pipe-node-pipe and reservoir-pipe pairs.From those three sets of equations, three formulations are derivedbased on solutions for the complex perturbations in heads and flow,heads only, and flow only. The computational merits of each for-mulation and similarities to steady-state solution formulations arediscussed.

1Hydrologist, Hydrology Group, Water Planning Sciences, Environ-ment and Resource Sciences, Dept. of Environment and Resource Manage-ment, Queensland Government, Australia (corresponding author). E-mail:[email protected]

2Lecturer, Dept. of Civil Engineering, Univ. of Canterbury, Christch-urch, New Zealand.

3Lecturer, School of Civil and Environmental Engineering, Univ. ofAdelaide, Adelaide, Australia.

4Professor, School of Civil and Environmental Engineering, Univ. ofAdelaide, Adelaide, Australia.

5Professor, School of Civil and Environmental Engineering, Univ. ofAdelaide, Adelaide, Australia.

Note. This manuscript was submitted on December 8, 2008; approvedon October 8, 2010; published online on April 15, 2011. Discussion periodopen until October 1, 2011; separate discussions must be submitted forindividual papers. This paper is part of the Journal of Hydraulic Engineer-ing, Vol. 137, No. 5, May 1, 2011. ©ASCE, ISSN 0733-9429/2011/5-556–568/$25.00.

556 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

Background

The analysis of pipelines in the frequency domain (which alsoincludes Laplace domain analysis) began in the 1950s (summarizedin Goodson and Leonard 1972; Stecki and Davis 1986). This workwas typically limited to a single pipeline. The development ofgeneral frequency-domain solutions in more complicated pipelinesinvolves two main methodological streams. The first method isthe transfer-matrix method (Chaudhry 1970, 1987). This methoddevelops field matrices, which relate to the solution along the pipe,and point matrices that consider junctions, hydraulic devices,, andchanges in pipe characteristics. A block diagram is used to formu-late the matrices, usually by hand, for more complicated systemslike pipes in series, single-branches, and single loops. While theseunits could be manipulated to solve small and restricted problems(limited to networks that do not have second-order loops), in a com-plex network, the number of units required can quickly becomeoverwhelming. The second method is the impedance method(Wylie 1965; Wylie and Streeter 1993). This method solves forthe impedance that is equal to the complex head perturbationsdivided by the complex flow perturbations. Again, this methodis usually formulated for each system by hand, and although isuseful in forming explicit relationships in simple systems, it ispoorly suited to complex network analysis.

The behavior of various hydraulic devices and phenomena in thefrequency-domain has been addressed by many authors. Chaudhry(1987) and Wylie and Streeter (1993) present a summary of solu-tions for different hydraulic elements, such as valves, orifices, andjunctions. Suo and Wylie (1990a) present solutions for viscoelasticpipe material. Viscoelasticity was incorporated using a frequency-dependent wave speed. Similarly, Suo and Wylie (1990b) presentfrequency-domain solutions for rock-walled tunnels. Unsteady fric-tion has been dealt with by, among many others, Brown (1962) andD’Souza and Oldenburger (1964). Vítkovský et al. (2003) presentfrequency-domain solutions for weighting function-type unsteadyfriction models. Finally, Tijsseling (1996) presents a number ofstudies where fluid-structure interaction has been considered inthe frequency (or Laplace) domain.

In terms of network analysis, Wylie and Streeter (1993) presentthe frequency-domain solution for a simple network, although notexpressed in an arbitrary way for general network analysis. Othernetwork-type analyses do not directly consider the frequency-domain solution but are nonetheless relevant. Ogawa et al. (1994)present frequency-domain solutions in networks with respect to theeffect of earthquakes on water distribution networks. They used amatrix-based approach, but were solving for different responsemodes resulting from sinusoidal ground movement. Shimada et al.(2006) present an exploration into numerical error for time-lineinterpolations in pipe networks. Although this work relates to errorsin time-domain methods, the errors are assessed in the frequency-domain where exact solutions exist. More recently, Kim (2007,2008) presents a more generic approach to the application of theimpedance method in networks but with respect to a particular net-work. Recently, Zecchin et al. (2009) formulated a Laplace-domainnetwork admittance matrix formulation of the fundamental networkequations, which shares a similarity to the h-formulation derived inthis paper.

The remainder of this paper presents a systematic, matrix-basedapproach for frequency-domain analysis in arbitrary pipe networks.

Formulations for Frequency-Domain Analysis

The formulations for the frequency-domain solution investigated inthis paper consider a simplified network. There is no consideration

of hydraulic elements such as leaks, pumps, valves, etc. Addition-ally, there is no consideration of column separation, fluid–structureinteraction, minor losses, or convective terms, etc. This paper isprimarily concerned with the problem of finding the frequency-domain solution for an arbitrarily configured and basic network.As a matter of nomenclature, uppercase denotes a full variablein the time domain, lowercase denotes a perturbation variable inthe time domain, and lowercase with a caret denotes a perturbationvariable in the frequency domain.

Network Quantities

The network considered consists only of pipes, junctions, reser-voirs, and demand nodes. For an arbitrary network the quantitiesof each of these components are linked by

np ¼ nnþ nr þ nl� nc ð1Þwhere np = number of pipes; nn = number of nodes; nr = number ofreservoirs; nl = number of loops; and nc = number of (separate)components. This relationship is useful when considering the top-ology of an entire network. An arbitrary network consists of pipe(links) and node elements. The following sections define the rela-tionships for these elements.

Frequency-Domain Equations for Node Elements

The head is common at a node and can be either known orunknown. Also, a node element represents a junction of pipesand demands. The continuity of flow is applied for pipes, p,connected to node k as X

p

Qp;k ¼ Dk ð2Þ

where Qp;k = flow into node k from pipe p; and Dk = demand out ofnode k. Each pipe requires an arbitrarily set flow direction (notrelated to the actual flow direction). In terms of continuity, pipeflows are taken as positive into a node and demands are positiveout of a node. Taking the perturbation of Q and D about steady-state conditions as q ¼ Q� Q0 and d ¼ D� D0, gives the continu-ity of perturbations at node k.X

p

qp;k ¼ dk ð3Þ

The Fourier transform gives the frequency-domain continuity atnode k X

p

qp;k ¼ dk ð4Þ

The relationship in Eq. (4) is now complex-valued and repre-sents the continuity of flow at a node for different frequencycomponents.

Frequency-Domain Equations for Pipe Elements

Each pipe element represents the behavior of unsteady pipeflow between two nodes. The equations of continuity and motionfor unsteady pipe flow, including unsteady friction and a viscoelas-tic pipe material (Wylie and Streeter 1993; Gally et al. 1979;Vítkovský et al. 2006), are

∂H∂t þ a20

gA0

∂Q∂x þ α0ρ0D0a20

e0

�∂H∂t � ∂Jr∂t

�ðtÞ ¼ 0 ð5Þ

∂H∂x þ 1

gA0

∂Q∂t þ

f 0QjQj2gD0A2

0þ 16vgD2

0A0

�∂Q∂t �W0

�ðtÞ ¼ 0 ð6Þ

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 557

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

where H = head; a = wave speed; g = gravitational acceleration;D = pipe diameter; A = pipe cross-sectional area; e = pipeline thick-ness; ρ = fluid density; α = pipe restraint coefficient; ν = kinematicviscosity; Jr = retarded component of creep compliance function;W = unsteady friction weighting function; x = distance along pipe;and t = time. The subscript “0” on some variables denote that it isbased on an initial or steady-state value. The operator “∗” repre-sents convolution. Taking a perturbation in flow (q ¼ Q� Q0)and head (h ¼ H � H0) and linearizing the steady friction term,the equations of continuity and motion become

∂h∂t þ

a20gA0

∂q∂x þ

α0ρ0D0a20e0

�∂h∂t �

∂Jr∂t�ðtÞ ¼ 0 ð7Þ

∂h∂x þ

1gA0

∂q∂t þ

f 0jQ0jgD0A2

0

qþ 16vgD2

0A0

�∂q∂t �W0

�ðtÞ ¼ 0 ð8Þ

Taking the Fourier transform with respect to time and simplify-ing the resulting equation gives the following frequency-domainequations for a pipe element:

iω� α0ρ0D0a20ω2Jre0

!hþ a20

gA0

d qdx

¼ 0 ð9Þ

d hdx

þ

iωgA0

þ f 0jQ0jgD0A2

0

þ iωvW016gD2

0A0

!q ¼ 0 ð10Þ

where i = imaginary unit; and ω = angular frequency. Eqs. (9) and(10) are a set of coupled ordinary differential equations with fullderivatives only in space (x). The transfer-matrix solution for thissystem of coupled ODEs can be derived for a pipe element (p)relating the upstream (U) head and flow to the downstream (D)head and flow for given frequency perturbation as(

ðqDÞpðhDÞj;p

)¼ coshðγpLpÞ �Z�1

p sinhðγpLpÞ�Zp sinhðγpLpÞ coshðγpLpÞ� �( ðqUÞp

ðhUÞk;p

)

ð11Þ

where L = pipe length; propagation constant

γ ¼ iωa0

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffið1þ RS þ RUÞð1þ RV Þ

pð12Þ

and where the characteristic impedance Z is

Z ¼ a0gA0

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffið1þ RS þ RUÞð1þ RVÞ�1

qð13Þ

and where the steady friction component RS is

RS ¼8<:

32νiωD2

0for laminar flow

f 0jQ0jiωD0A0

for turbulent flowð14Þ

and where the unsteady friction component RU is

RU ¼ ν16W0

D20

ð15Þ

and where the viscoelastic component RV is

RV ¼ iωα0ρ0D0a20Jre0

ð16Þ

The elastic wave speed is

a0 ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiKρ0

�1þ α0D0JeK

2e0

��1s

ð17Þ

where Je = elastic component of the creep compliance function(Je ¼ 1=E, where E = Young’s modulus of elasticity); and α0 =dimensionless pipe constraint coefficient, which depends on therelative pipe wall thickness e0=D0, Poisson’s ratio of the pipe wallmaterial, and the type of pipe anchoring. Note that for elastic pipematerials, such as steel, cast iron, copper, etc., the convolution termin Eq. (5) is removed making the term RV in Eqs. (12) and (13)equal to zero, and the constant α0=2 in Eq. (17) can be replacedby C1, resulting in the more common form of the equations of con-tinuity and motion for unsteady pipe flow (Wylie and Streeter1993). Eq. (11) can be directly compared to the field matrix fora pipe element in the transfer-matrix method (Chaudhry1970, 1987).

Frequency-Domain Equations for an Arbitrary Network

The preceding sections have presented the relationships for individ-ual node elements and pipe elements. This section outlines howthose elements can be combined and organized for an arbitrary net-work of pipes. A topological matrix-based approach is consideredallowing the presentation of relationships that apply to an entirenetwork.

The organization of all node elements is considered first, essen-tially specifying flow continuity at all nodes in a network. Thecomplex unknown upstream and downstream flow perturbationsfor each pipe written as column vectors are

qD ¼ fqD1;…; qDnpgT qU ¼ fqU1;…; qUnpgT ð18Þ

The complex demand perturbations at each node written asa column vectors are

d ¼ fd1;…; dnngT ð19Þ

Two topological matrices are required that define if a pipeis connected to a node by its downstream or upstream end.These pipe-node incidence matrices are defined as B1D and B1U ,respectively.

ðB1DÞpk ¼�1 if pipe p enters node k0 otherwise

ðB1UÞpk ¼�1 if pipe p exits node k0 otherwise

ð20Þ

Using Eqs. (18)–(20), the frequency-domain nodal continuityequations [Eq. (4)] can be written in matrix form as

B1TDqD � B1TU qU ¼ d ð21Þ

In a similar manner, the relationships for all pipe elements in anetwork can be written in matrix form. The complex unknown headperturbations at each node written as a column vector are

h ¼ fh1;…; hnngT ð22Þ

558 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

The complex known head perturbations at each reservoir writtenas a column vector are

r ¼ fr1;…; rnrgT ð23Þ

An additional topological matrix is required to relate the con-nectivity of pipes and reservoirs. Two pipe-reservoir incidencematrices, B2D and B2U respectively, are defined for pipes thatconnect to a reservoir by its downstream or upstream end.

ðB2DÞpk ¼�1 if pipe p enters reservoir k0 otherwise

ðB2UÞpk ¼�1 if pipe p exits reservoir k0 otherwise

ð24Þ

Using Eqs. (20) and (22)–(24), the frequency-domain pipeelement equations for an entire network [Eq. (11)] can be writtenin matrix form as

qD ¼ c qU � z�1sðB1U hþ B2U rÞðB1Dhþ B2DrÞ ¼ �zs qU þ cðB1U hþ B2U rÞ

ð25Þ

The matrices c and s are diagonal matrices that represent thehyperbolic functions cosh and sinh for each pipe (for completenesst represents the tanh function, which is used later), and the diagonalmatrix z represents characteristic impedance for each pipe, that is,

c ¼ diag½coshðγ1L1Þ;…; coshðγpLpÞ�s ¼ diag½sinhðγ1L1Þ;…; sinhðγpLpÞ�t ¼ diag½tanhðγ1L1Þ;…; tanhðγpLpÞ�z ¼ diag½Z1;…;Zp� ð26Þ

Eqs. (21) and (25) define all of relationships for all of the nodeand pipe elements in an arbitrary pipe network. This set of equa-tions can be solved for different frequency inputs, allowing thedevelopment of the frequency response function. This paper con-siders three different formulations for the frequency-domain solu-tion. All formulations are organized into the generic linear systemAX ¼ B that can be solved using existing complex matrix solvers.Comments relating to the solution efficiency of each formulationare discussed.

Frequency-Domain q h-Formulation

The first formulation is the qh-formulation, which solves for thecomplex flow and head perturbations. This is the most straightfor-ward approach that uses Eqs. (21) and (25) as they are. Putting this

set of equations into matrix form gives

B1TD �B1TU 0nn�Inp c �z�1s B1U0np �z s c B1U � B1D

24

358<:

qDqUh

9=;

¼8<:

dz�1s B2U r

ðB2D � c B2UÞr

9=; ð27Þ

This can be written in a simplified form as

Mqh

8<:

qDqUh

9=; ¼ Nqh ð28Þ

The matrix Mqh is complex, sparse, and asymmetric. Both Mqhand Nqh depend on frequency, although some elements of each areindependent of frequency. The number of unknowns, and hence thesize of Mqh, is 2npþ nn.

Frequency-Domain h-Formulation

The second formulation is the h-formulation. This formulationbegins by rearranging the pipe element equations from Eq. (25)in terms of the complex flow perturbations, that is,

qU ¼ ðzsÞ�1½ðc B1U � B1DÞhþ ðc B2U � B2DÞr�qD ¼ ðzsÞ�1½ðB1U � c B1DÞhþ ðB2U � c B2DÞr�

ð29Þ

Substituting the result into the node element equations[Eq. (21)] gives the solution of the complex head perturbations as

½B1TDðztÞ�1B1D � B1TDðzsÞ�1B1U � B1TUðzsÞ�1B1D

þ B1TUðztÞ�1B1U �h¼ ½B1TDðzsÞ�1B2U þ B1TUðzsÞ�1B2D�r� d ð30Þ

Written in a simplified form as

Mh h ¼ Nh ð31Þ

The structure of the Mh matrix can affect how efficiently thelinear solution can be solved. The Mh matrix is constructed as

ðMhÞjj ¼Xndp

½Zp tanhðγpLpÞ��1for all pipes p connected to node j

ðMhÞjk ¼8<:

�Pp½Zp sinhðγpLpÞ��1for all pipes p connecting node j to node k

zero if node j is not connected to node k

¼ ðMhÞkj ð32Þ

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 559

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

The matrix Mh is complex, sparse, and symmetric and sharesthese similarities with the H-formulation for the steady-state solu-tion (as discussed later). The number of unknowns, and hence thesize of Mh, is nn. The Nh vector can be constructed as

ðNhÞj ¼ �dj þXp

rk½Zp sinhðγpLpÞ��1 for all pipes p connectingnode jwith reservoir k

ð33Þ

Both Mh and Nh are functions of frequency. Once the complexhead perturbations have been determined, the complex flow pertur-bations can be calculated using Eq. (29).

Frequency-Domain q-Formulation

The final formulation is based on solving for the complex flowperturbations. The q-formulation begins by rearranging the pipeelement equations in Eq. (25) such that all known and unknowncomplex head perturbations are on the left side of the relationshipand all unknown complex flow perturbations are on the right:

B1U hþB2U r ¼ zs�1ðqD � c qUÞB1Dhþ B2Dr ¼ zs�1ðc qD � qUÞ

ð34Þ

Together with the node element equations, Eq. (34) can bereformulated to link both the upstream and downstream complexflow perturbations between two pipes, provided they are connectedby a common node or reservoir. There arises the need to generate allof the pipe-node-pipe (PNP) pairs and reservoir-pipe (RP) pairs inan arbitrary network.

The flows in pipes joined at a common node can be equated toform a set of equations representing pairs of pipes joined by acommon head, i.e., the PNP pairs. Fig. 1(a) shows an exampleof a node connected to four pipes. Also shown is a graph (inthe mathematical sense) of all of the possible pipe pairings calledthe complete graph [see Fig. 1(b)]. If the degree of the node isdn, then the total number of pipe pairings is ð1=2Þðdn2 � dnÞ. Thiscomplete set of pipe pairings would form an overdetermined set ofequations in terms of pipe pairs, but all that is required is a set ofpipe pairs that are nondegenerative when solving the linear system.A nondegenerative set of PNP pairs can be found by finding anyspanning tree of the complete graph. In a pipe network sense, theset of PNP and RP pairs must form a continuous coverage acrossthe whole network (no isolated areas). For a node with dn pipesconnected to it, the minimum number of nondegenerative PNPpairs is dn� 1, from a total number of possible nondegenerativePNP-pair sets of dndn�2.

A logical method to generate a nondegenerative set of PNP pairsis to (1) selectively consider each node in order of node number;(2) determine the degree of the node (how many pipes are con-nected); (3) select the pipe with the lowest pipe ID number andform a set of pairs with that pipe and all other pipes connectedto the node; and then (4) move to the next node and repeat. Anexample of this approach gives the selected spanning tree shownin Fig. 1(c).

The total number of PNP pairs depends on the connectivity ofthe network as does the number of RP pairs; however, the sum ofPNP and RP pairs must equal 2np� nn. The PNP pairs can bedefined in matrix form by first defining the following topologicalincidence matrices B3D, and B3U for pipe-pairs as

ðB3DÞpk ¼8<:

1 if the 1st pipe p in PNP pair k enters common node�1 if the 2nd pipe p in PNP pair k enters common node0 otherwise

ðB3UÞpk ¼8<:

1 if the 1st pipe p in PNP pair k exits common node�1 if the 2nd pipe p in PNP pair k exits common node0 otherwise

ð35Þ

The PNP-pair equations [a rearrangement of Eq. (34)] can bewritten in the following form:

ðB3TDcþ B3TUÞzs�1qD � ðB3TD þ B3TUcÞzs�1qU ¼ 0 ð36Þ

Similarly, the RP pairs can be defined in matrix form by firstdefining the topological incidence matrices B4D, B4U , and B5for RP pairs:

ðB4DÞpk ¼�1 if pipe p in RP pair k enters reservoir0 otherwise

ðB4UÞpk ¼�1 if pipe p in RP pair k exits reservoir0 otherwise

ðB5Þjk ¼�1 if pipe connects reservoir j in RP pair k0 otherwise

ð37Þ

The RP pair equations can be written [a rearrangement ofEq. (34)] in the following form:

ðB4TDcþ B4TUÞzs�1qD � ðB4TD þ B4TUcÞzs�1qU ¼ B5T r ð38Þ

The q-formulation uses the node-element equations, the PNP-pair, and RP pair equations, Eqs. (21), (36), and (38), respectively.Putting the set of equations into matrix form gives

B1TD �B1TUðB3TDcþ B3TUÞzs�1 �ðB3TD þ B3TUcÞzs�1

ðB4TDcþ B4TUÞzs�1 �ðB4TD þ B4TUcÞzs�1

24

35� qD

qU

¼8<:

d0

B5T r

9=; ð39Þ

560 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

Written in a simplified form as

Mq

�qDqU

�¼ Nq ð40Þ

The matrixMq is complex, sparse, and asymmetric. The numberof unknowns, and hence the size of Mq, is 2np. A differencebetween the q-formulation and the other two formulations is thatonly the Mq matrix depends on frequency. The Nq matrix is inde-pendent of frequency and would need to be calculated only once forthe full calculation of the transfer function. Once the complexupstream and downstream flow perturbations have been solved,Eq. (25) can be used to calculate the complex head perturbations.

Numerical Verification

The previous section presents three formations for the frequency-domain solution of an arbitrary pipe network. This section pro-vides numerical verification of those formulations [Eqs. (27),(30), and (39)]. Because all formulations produce exactly the samesolution, no comparison in terms of accuracy can been made amongthe methods. However, the validity of the frequency-domain solu-tion can be tested against a rigorously tested time-domain method.In this paper, the method of characteristics (MOC) is used generatethe frequency response function for validation. The perturbationsize was kept small to not incur errors from the linearization ofnonlinear terms. Additionally, a very finely discretised MOC dia-mond grid was used to reduce numerical error.

The first validation is performed on a simple pipeline (Fig. 2)with parameters given in Vítkovský et al. (2006). The pipeline isbounded by a known head at one end and a perturbed flow at theother end. Three cases are considered: (1) steady-state friction only,(2) steady and unsteady friction, and (3) steady friction, unsteadyfriction, and a viscoelastic pipe material. The results are shown inFigs. 3–5, respectively, for the frequency response function at theflow boundary (node 2). The weighting function model for theunsteady friction is from Vardy and Brown (2003, 2004). The creepcompliance function is for polyethylene at 25°C from Gally et al.

11

4 5

5

2

Complete Graph ondn Labeled Nodes (by pipe number)

All Spanning Trees in Complete Graph on dn Labeled Nodes

H2

4

Pipes Sharing aCommon Node

(degree of node, dn = 4)

No. possible pipe pairs = ½(dn2–dn) = 6 No. pipe pairs required to form a non-degenerative set = dn–1 = 3 No. possible non-degenerative sets of pipe pairs = dndn–2 = 16

)b()a(

(c)

Fig. 1. Pipe pairings around a node in example network

0.3 m/s (+perturbation)

211

Fig. 2. Example pipeline (data from Vítkovský et al. 2006)

102

103

104

105

106

0 5 10 15 20 25 30

Frequency-Domain SolverTime-Domain Solver (MOC)

abs(

)

(m

)/(m

3/s

)

(rad/s)

Fig. 3. Frequency- and time-domain solutions for example pipelinewith steady friction only

102

103

104

105

106

0 5 10 15 20 25 30

Frequency-Domain SolverTime-Domain Solver (MOC)

abs(

ΘΘΘΘ )

(m

)/(m

3 /s)

ωωωω (rad/s)

^

Fig. 4. Frequency- and time-domain solutions for example pipelinewith steady and unsteady friction only

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 561

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

(1979). As observed, the frequency-domain analysis and thetime-domain analysis match.

The second validation considers a small pipe network fromLiggett and Chen (1994), as shown in Fig. 6. This network has

11 pipes and 7 nodes that are supplied from a single reservoir(node 1) and supplies two demands (nodes 4 and 6). The systemis excited by a perturbation in the demand at node 6. Fig. 7 showsthe match between the frequency-domain and time-domain analy-ses for the head response at node 6.

Both validations show an excellent match between thefrequency-domain and time-domain analyses. Of course, this is tobe expected as both analyses are solving the same set of equations.

Discussion of Frequency-Domain Analysis

This section provides a further discussion of frequency-domainanalysis in arbitrary networks. This includes the properties offrequency-domain network matrices, a comparison to steady-stateanalysis in arbitrary networks, and the efficiency of frequency-domain formulations.

Properties of Frequency-Domain Network Matrices

During the formulation of the frequency-domain solution, a numberof matrices were defined. Selected properties of these matrices arenow discussed. Consider the diagonal matrices that contain thehyperbolic functions for each pipe in a network, c, s, and t, whichare related by

c2 � s2 ¼ Inp t ¼ sc�1 ð41Þ

Many topological matrices share relationships based on basicsystem connectivity ideas. The matrices B1, B2, B3, and B4 sharerelationships by noticing that no pipe can simultaneously enter areservoir and enter a node at the same time, giving

B1TDB2D ¼ 0 B1TDB4D ¼ 0B3TDB2D ¼ 0 B3TDB4D ¼ 0

ð42Þ

Similarly, no pipe can simultaneously exit a reservoir and exit anode, giving

B1TUB2U ¼ 0 B1TUB4U ¼ 0B3TUB2U ¼ 0 B3TUB4U ¼ 0

ð43Þ

Additionally, the B5U , B5D, and B5 matrices can be formedfrom existing matrices B2U , B2D, B4U , and B4D as

B5D ¼ B2TDB4DB5U ¼ B2TUB4U

ð44Þ

Similar relationships can be found in topological matrices forsteady-state analysis [see Eqs. (89) and (90)]

Comparison to Steady-State Analysis

Given that both steady-state analysis and frequency-domain analy-sis can be performed in networks sharing the same topology, itcomes as no surprise that some matrices from both analyses arerelated. The appendix outlines three formulations (head, flow,and loop) for the steady-state solution in an arbitrary pipe network.The relationship between the B1D and B1U matrices and the steady-state topological node incidence matrix A1 [see Eq. (53)] is

A1 ¼ B1D � B1U ð45Þ

The relationship between the B2D and B2U and the steady-statetopological reservoir incidence matrix A2 [see Eq. (57)] is

A2 ¼ B2D � B2U ð46Þ

102

103

104

105

106

0 5 10 15 20 25 30

Frequency-Domain SolverTime-Domain Solver (MOC)

abs(

Θ ΘΘΘ )

(m

)/(m

3 /s)

ωωωω (rad/s)

^

Fig. 5. Frequency- and time-domain solutions for example pipelinewith steady and unsteady friction and viscoelastic pipe material

1

2

7

5

3 6

4

1

4

9

20 L/s (+perturbation)

58 L/s

Fig. 6. Example pipe network (data from Liggett and Chen 1994)

100

101

102

103

104

105

0 5 10 15 20

Frequency-Domain SolverTime-Domain Solver (MOC)

abs(

ΘΘ ΘΘ )

(m

)/(m

3 /s)

ωωωω (rad/s)

^

Fig. 7. Frequency- and time-domain solutions for example pipenetwork

562 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

Other similarities occur in the shape of the linear systemsformed when finding solutions in terms of heads (or complex headperturbations). The Mh matrix in the h-formulation [Eq. (30)] haselements in identical locations to the JH of the steady-stateH-formulation [see Eq. (83)] and the P matrix of the steady-stateQH-formulation [see Eq. (74)]. Zecchin et al. (2009) term the JHmatrix a “hydraulic admittance matrix” because it maps from pres-sure to flow. A more in-depth comparison of the element locationscommon to the formulations can be observed in Eq. (32) andEq. (84). The similarity occurs when a node-pipe incidence matrixis multiplied by its transpose. The resulting matrix is sparse andsymmetric, and in the case of the steady-state formulation ispositive definite.

Other similarities are that the formulation for the frequency-domain q-formulation [see Eq. (39)] and the steady-stateQ-formulation [see Eq. (85)] are sparse and asymmetric. Bothformulations require node-element equations (continuity arounda node); however, the steady-state formulation adds the loopequations (head-loss corrections around a loop), whereas thefrequency-domain formulation adds the pipe-node-pipe pair andreservoir-pipe pair equations. Both the frequency-domain qh-formulation [see Eq. (27)] and the basic steady-state QH-formulation [see Eq. (70)] are sparse and asymmetrical.

Computational Considerations

Given the three different formulations, a number of factors relatethe linear solution to its computational efficiency, the most impor-tant being the number of unknowns of the linear system (seeTable 1). In general, for a dense matrix, the solution complexityis Oðn3Þ, whereas for a sparse matrix, the use of sparse matrixsolvers will give a comparatively faster solution approachingOðn2Þ. A small increase in the dimensionality of the problemresults in a large increase in computational effort. This means thatthe h-formulation, with the smallest number of unknowns, will bethe computationally fastest formulation. Timing of the frequency-domain analysis for the network in Fig. 6 gave the h-formulation asthe fastest, followed by the q-formulation (43% slower), and theqh-formulation (60% slower), although this is generally problemdependent. (Note that the timings were performed by running10,000 simulations on a PC with an Intel Core2 Duo CPU runningMicrosoft Vista. Relative measures are utilized to negatePC-specific results.)

For moderate and large networks, the M matrices are sparse.Sparse-matrix solvers should be used for efficient solutions. Mostsparse solvers have a preconditioning (or reordering) phase thatwould only need to be performed once because the topology ofthe M matrix does not change for different frequencies. An addi-tional computational saving can be made for the h-formulation,which has a symmetric M matrix that could be exploited.Sparse-matrix solvers also reduce the amount of memory requiredto solve large matrices. General relationships for the number ofnonzero elements of M are shown in Table 1 (where nrc = number

of reservoir-pipe connections, and nruc = number of reservoir-pipeconnections that connect at the upstream end of the pipe). In termsof the network in Fig. 6, the percentage of nonzero elements inM is11, 67, and 17% for the qh-, h-, and q-formulations, respectively.

Another efficiency consideration is that some of the formula-tions, in particular the qh-and q-formulations, have significantfrequency-independent parts of their M matrix. These parts wouldonly be required to be computed once when solving for differentfrequencies, thus saving time. Table 1 shows relationships for thenumber of frequency-independent and frequency-dependent ele-ments of M. In terms of the network in Fig. 6, the percentageof frequency-independent elements compared with the nonzeroelements inM is 51, 0, and 25% for the qh-, h-, and q-formulations,respectively.

With regard to the solution of the linear equations, the conditionnumber ofM provides information about the computability of theirsolution using numerical methods. If the condition number issmaller than ∼106, then the solution is computable using single-precision variables; and if the condition number if less than∼1012, then the solution is computable with double-precisionvariables. Fig. 8 shows the condition number for each formu-lation across a range of frequencies for the network in Fig. 6.The h-formulation has the smallest condition numbers and shouldbe most amenable to numerical solution. The qh-formulation hasthe largest condition numbers and should be computed usingdouble-precision variables.

It is trivial to solve for intermediate locations along a pipe froma known h and q using Eq. (11). Hence, it is only necessary tosolve for points in a network where there is a change in the pipe’sproperties or there is a hydraulic device. Therefore, trimming thoseintermediate points that do not represent a change in pipe properties

Table 1. Properties of Coefficient Matrix M

Matrix M property qh-formulation h-formulation q-formulation

Unknowns 2npþ nn nn 2np

Total elements ð2npþ nnÞ2 nn2 ð2npÞ2Nonzero elements 8np� 2nrc� nruc 2npþ nn� 2nrc 10np� 4nn� 3nrc

Frequency-independent elements 4np� 2nrcþ nruc 0 2np� nrc

Frequency-dependent elements 4np� 2nruc 2npþ nn� 2nrc 8np� 4nn� 2nrc

100

102

104

106

108

1010

1012

1014

1016

0 5 10 15 20

qh-Formulationh-Formulationq-Formulation

Co

ndit

ion

Nu

mb

er

ωωωω (rad/s)

Double Precision Limit

Single Precision Limit

Fig. 8. Condition number of coefficient matrix for example pipenetwork

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 563

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

(and their associated h and q) from the linear system will reduce itssize thus increasing computational efficiency. The intermediatepoints are then calculated using Eq. (11) after the linear systemhas been solved.

Conclusions

This paper presents formulations for the frequency-domain solutionin arbitrary pipe networks. The formulations focus on the topologyof arbitrary networks and do not consider any complex networkdevices or boundary conditions, other than head and flow bounda-ries. The frequency-domain equations are derived for pipe net-works, including the effects of unsteady friction and viscoelasticpipe material. A topological-matrix-based approach is useful toorganize the system of equations. Three sets of equations have beenderived: (1) node element equations, (2) pipe element equations,and (3) pipe-node-pipe pair and reservoir-pipe pair equations.Three formulations: the qh-, h-, and q-formulations, are derivedand their various merits discussed. Of the three formulations, theh-formulation should be the most computationally efficient andaccurate. The frequency-domain solution formulations share manycharacteristics with the steady-state solution formulations, allowingthe reuse of some of the topological matrices. The systematicapproach for the frequency-domain solution in pipes networks pre-sented in this paper does not consider other hydraulic elements,such as valves, pumps, leaks, air vessels, etc., or other boundarycondition types. It is envisaged that future research will considerthese other hydraulic elements and boundary conditions, althoughtheir incorporation may not be straightforward. The calculationof the frequency response function is integral to other transient ana-lysis applications, e.g., resonance studies, time-domain simulation(IMPREM), and fault-detection methods, which will benefit fromthe methods presented in this paper.

Appendix: Formulations for Steady-State Analysis

This section contains a basic derivation of different formulations forthe steady-state solution for arbitrary pipe networks. The section’spurpose is for comparison against the different frequency-domainsolution formulations. The following sections outline the basicequations and three different solution formulations. Note that theloop flow correction formulation for steady-state analysis is notpresented here.

Steady-State Basic Equations

The equations of WDS analysis are based on three relationships.The first considers flow continuity at a node, which is a statementof the conservation of mass. The sign convention adopted is thatall flows entering a node are positive and flows exiting a nodeare negative. Given the sign convention, the summation of the flowsentering and exiting a node must equal zero (no accumulation ofmass). The continuity equation applied at a node k (or junction) forpipes p is

Xp

ðQ0Þp;k ¼ ðD0Þk ð47Þ

The second equation for WDS analysis describes the head lossattributable to friction along a pipe. For a particular pipe in a WDS,the Darcy-Weisbach head loss relationship (including reservoirs)for pipe p from node k to node j is

ðH0Þk;p � ðH0Þj;p ¼f pLp

2gDpA2pðQ0ÞpjðQ0Þpj ð48Þ

A third set of equations can be formulated based on the propertythat head loss around a loop is equal to zero. AWDS has two typesof loops: simple loops and path loops. The simple loop is aninternal loop of pipes. The equation that describes the summationof the head loss in pipes p around a simple loop l is

Xp

f p;lLp;l2gDp;lA2

p;l

ðQ0Þp;ljðQ0Þp;lj ¼ 0 ð49Þ

There are many different simple loops that can be defined for anetwork; however, they form a nondegenerative set (sometimescalled a fundamental cycle basis). Typically, the set of loops thatcontain the smallest number of pipes is most desirable, the numberof which is nl. The path loop considers the head loss around a loopcontaining two reservoirs linked by a path. The head differencebetween the reservoirs acts like an additional head loss element.The head loss in pipes p between reservoirs k and j around a pathloop l is

Xp

f p;lLp;l2gDp;lA2

p;l

ðQ0Þp;ljðQ0Þp;lj ¼ ðR0Þk;l � ðR0Þj;l ð50Þ

There are many different combinations of reservoirs and pipe-paths that constitute a set of path loops. Again, the multiple pathloops must form a nondegenerate set with the number of path loopsequal to np� nn� nl.

Steady-State Equations for an Arbitrary Network

The three basic relationships (node elements, pipe elements, andloop elements) for the steady-state solution in an arbitrary pipe net-work are written in matrix-form in this section. The node elements,representing flow continuity, are considered first. The unknownsteady-state flows for each pipe are

Q0 ¼ fðQ0Þ1;…; ðQ0ÞnpgT ð51Þ

The known steady-state demands at each node are

D0 ¼ fðD0Þ1;…; ðD0ÞnngT ð52Þ

The topological node-pipe incidence matrix A1 is defined as

A1pk ¼8<:

1 if pipe p enters node k0 if pipe p and node k are not connected�1 if pipe p exits node k

ð53Þ

Using Eqs. (51)–(53), the flow continuity around a node[Eq. (47)] for an arbitrary pipe network can be written in matrix-form as

A1TQ0 ¼ D0 ð54Þ

In a similar manner, the head loss for all pipe elements in a net-work can be written in matrix form. The unknown steady-stateheads at each node are

H0 ¼ fðH0Þ1;…; ðH0ÞnngT ð55Þ

The known heads at each reservoir are

R0 ¼ fðR0Þ1;…; ðR0ÞnrgT ð56Þ

564 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

The topological reservoir-pipe incidence matrix A2 is definedas

A2pk ¼8<:

1 if pipe p enters reservoir k0 if pipe p and reservoir k are not connected�1 if pipe p exits reservoir k

ð57Þ

The head loss for each pipe [Eq. (48)] for an arbitrary pipenetwork can be written in matrix-form as

A1H0 þ A2R0 ¼ �G1Q0 ð58Þ

where G1 is a positive-valued diagonal matrix that is dependent onQ0 and is defined as

G1 ¼ diag

"f pLp

2gDpA2pjðQ0Þpj

#p ¼ 1;…; np ð59Þ

Finally, the loop equations are considered. The loop-pipe inci-dence matrix (for both simple and path loops) for pipes p thatbelong to loop l is defined as

A3pl ¼8<:

1 if pipe p belongs to loop l and its direction is with the loop direction0 if pipe p does not belong to loop l�1 if pipe p belongs to loop l and its direction is against the loop direction

ð60Þ

The direction of the path linking two reservoirs in a loop is defined as identical to the simple loop’s direction. The loop-reservoir incidencematrix for reservoirs k that belong to loop l is defined as

A4kl ¼8<:

1 if reservoir k belongs to loop l and its path exits the reservoir0 if reservoir k does not belong to loop l�1 if reservoir k belongs to loop l and its path enters the reservoir

ð61Þ

The head loss for both the simple and path loops are written inmatrix form for an entire network as

A3TG1Q0 þ A4TR0 ¼ 0 ð62Þ

The number of loop equations (including path loops) is equal tonp� nn. Eqs. (54) and (62) form the basis for formulation to solvethe steady state in an arbitrary network.

Steady-State Solution Algorithm

The three steady-state solution formulations are considered inthis section: the Q-formulation, the H-formulation, and the QH-formulation. Unlike the frequency-domain equations, the setof steady-state equations are nonlinear. The Newton-Raphsonalgorithm can be used to determine a set of unknown variables froma set of nonlinear equations. The iterative solution by the Newton-Raphson algorithm is derived by making a Taylor-series expansionof a set of nonlinear functions YðXÞ about some initial vector ofvariables Xk [such that YðXk) does not need to equal zero] as

YðXk þ δXÞ ¼ YðXkÞ þ JðXkÞδXþ OðδX2Þ ð63Þ

Ignoring the higher-order terms and assuming that the perturba-tion of Xk by δX, results in the correct steady-state solution [i.e.,YðXk þ δXÞ ¼ 0] produces

0 ¼ YðXkÞ þ JðXkÞδX ð64Þ

where J is the Jacobian matrix that is defined as

JðXÞ ¼ ∂∂XYðXÞ ð65Þ

Rearranging for δX gives

δX ¼ �J�1ðXkÞYðXkÞ ð66ÞThe final set of unknowns is calculated by addition of δX to

Xk as

Xsolution ¼ Xk þ δX ð67ÞIf the vector of functions YðXÞ is linear, then the solution vector

of variables is

Xsolution ¼ Xk � J�1ðXkÞYðXkÞ ð68ÞIf the vector of functions YðXÞ is nonlinear, then the vector of

variables X is iterated using the formula

Xkþ1 ¼ Xk � J�1ðXkÞYðXkÞ ð69ÞThe Newton-Raphson algorithm exhibits quadratic convergence

in the neighborhood of the solution. The iterative solution pro-cedure concludes when convergence criteria are met. The mostcomputationally intensive component of the Newton-Raphsonalgorithm is dealing with the inversion or decomposition of theJacobian matrix. The following sections consider the form ofthe Jacobian derived for each formulation.

Steady-State QH-Formulation

The first formulation considers the solution of both heads and flowssimultaneously. The two relationships required to form a solvablesystem are Eqs. (54) and (58), which can be written in matrixform as

G1 A1A1T 0

� ��Q0

H0

�¼��A2R0

D0

�ð70Þ

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 565

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

where both Q0 and H0 are required to be solved. RearrangingEq. (70) gives a set of nonlinear equations Y, the roots of whichcan be solved for using the Newton-Raphson algorithm

YQH ¼ G1 A1A1T 0

� ��Q0

H0

�þ�A2R0

�D0

�ð71Þ

The Jacobian matrix is equal to

JQH ¼ 2G1 A1A1T 0

� �ð72Þ

The Jacobian matrix in Eq. (72) is sparse and symmetric for theDarcy-Weisbach head-loss formulation used in this paper, but canbe a difficult to invert or decompose. A more efficient way to dealwith the Jacobian matrix was shown by Todini and Pilati (1988),which was originally based on the Content Model (Collins et al.1978). Todini and Pilati developed an efficient approach to theinversion of the Jacobian matrix by partitioning, as

T�1 A1A1T 0

� ��1¼ T� TA1P�1 A1T T TA1P�1

P�1 A1T T �P�1

� �ð73Þ

where the positive diagonal matrix G1 is dependent on Q0, andwhere the submatrices T and P are defined as

P ¼ A1T TA1 and T ¼ ð2G1Þ�1 ð74Þ

The critical and time-consuming step in the inversion of theJacobian matrix is inverting the submatrix P. The matrix P is sym-metric, diagonally dominant, has positive diagonal elements, haseither zero or negative off-diagonal elements, and is positive def-inite and of the Stieltjes type. Also, for large networks, P is sparse.Todini and Pilati (1988) suggest the use of the ICF/MCG algorithmfor the efficient inversion of P

ðPÞjj ¼ n�1Xi

G1�1ii for all pipes i connected to node j

ðPÞjk ¼(�n�1

PiG1�1

ii for all pipes i connecting node j to node k

zero if node j is not connected to node k

¼ ðPÞkj ð75Þ

The method of solution is applied in the following steps. First,the following system of equations is solved for ðH0Þkþ1 as

PkðH0Þkþ1 ¼12A1TðQ0Þk � D0 � A1TTkA2R0 ð76Þ

Then, ðH0Þkþ1 is used to calculate ðQ0Þk þ 1 by

ðQ0Þkþ1 ¼12ðQ0Þk � TkðA1ðH0Þkþ1 þ A2R0Þ ð77Þ

Steady-State H-Formulation

An alternative to the Q-formulation is to formulate the WDS equa-tions in terms of the heads. To achieve this, Eq. (48) is rearranged interms of the flows as

ðQ0Þp ¼�

f pLp2gDpA2

p

��0:5hðH0Þk;p � ðH0Þj;p

iðH0Þk;p � ðH0Þj;p�� ���0:5

ð78Þ

For an entire network, the matrix-based form of Eq. (48) interms of H is

Q0 ¼ �G2ðA1H0 þ A2R0Þ ð79Þ

where the positive valued diagonal matrix G2 is defined as

G2 ¼ diag

" f pLp

2gDpA2pjðH0Þk;p � ðH0Þj;pj

!�0:5#

p ¼ 1;…; np

ð80Þ

Now that a relationship exists for the flows in terms of the heads,this relationship can be substituted in the continuity equation[Eq. (54)] giving

A1TG2ðA1H0 þ A2R0Þ þ D0 ¼ 0 ð81Þ

The preceding set of equations represents the steady-state equa-tions for a WDS in terms of the heads. Rearranging gives the set offunctions Y for the Newton-Raphson algorithm as

YH ¼ A1TG2ðA1H0 þ A2R0Þ þ D0 ð82Þ

The Jacobian matrix for the Newton-Raphson algorithm is

JH ¼ A1T�12G2�A1 ð83Þ

The matrix JH is symmetric, diagonally dominant, has positivediagonal elements, and has either zero or negative off-diagonalelements and is, therefore, positive definite and of Stieltjes type.Also, for large networks JH is sparse. After solving for the heads,the solution flows can be calculated using Eq. (58). More directly,the matrix JH is defined as

ðJHÞjj ¼ n�1Xndp

G2pp for all pipes p connected to node j

ðJHÞjk ¼(�n�1

Pndp G2pp for all pipes p connecting node j to node k

zero if node j is not connected to node k

¼ ðJHÞkj ð84Þ

This matrix is similar to the Jacobian matrix in the QH-formulation. In fact, both are of identical dimension and have identically locatedelements, which is obvious since both have similar components (i.e., P ¼ A1TðG11�ÞA1 and JH ¼ A1T ½ð1=2ÞG2�A1).

566 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

Steady-State Q-Formulation

Rearranging the basic WDS equations to be in terms of the flowsonly produces the Q-formulation. The Q-formulation considers thecontinuity equations [Eq. (54)] and the head loss around a loopequations [Eq. (62)], both of which are only dependent on Q0.Eqs. (54) and (62) can be written in a matrix form as

A1T

A3TG1

� �Q0 ¼

�D0

�A4TR0

�ð85Þ

In terms of the Newton-Raphson algorithm, the set of functionsY is

YQ ¼ A1T

A3TG1

� �Q0 þ

� �D0

A4TR0

�ð86Þ

and the Jacobian is

JQ ¼ A1T

A3T 2G1

� �ð87Þ

The Jacobian for the Q-formulation is sparse, but neithersymmetric nor positive definite.

Steady-State Matrix Relationships

Some relationships exist between the steady-state topologicalmatrices. Substituting Eq. (58)–(62) results in

A3TA1H0 þ A3TA2R0 ¼ A4TR0 ð88ÞBy observation, the following relationships can be realized:

A3TA2 ¼ A4T ð89Þ

A3TA1 ¼ 0 ð90ÞAlthough not presented here, other graph-theoretic relationships

exist for topological matrices, such as derivation of the A3 and A4pipe-loop incidence matrices from the pipe-node incidence matri-ces A1 and A2.

Notation

The following symbols are used in this paper:A = cross-sectional pipe area;

A1 = steady-state topological matrix (pipe-node incidence);A2 = steady-state topological matrix (pipe-reservoir

incidence);A3 = steady-state topological matrix (pipe-loop incidence);A4 = steady-state topological matrix (reservoir-loop

incidence);a = wave speed;

B1 = frequency-domain topological matrix (pipe-nodeincidence);

B2 = frequency-domain topological matrix (pipe-reservoirincidence);

B3 = frequency-domain topological matrix (common nodepipe-pair incidence);

B4 = frequency-domain topological matrix (reservoir pipe-pair incidence);

B5 = frequency-domain topological matrix (reservoir pipe-pair incidence);

D = pipe diameter, demand;

d = perturbation in demand;E = Young’s modulus of elasticity;e = pipe wall thickness;f = Darcy-Weisbach friction factor;

G1, G2 = steady-state diagonal matrices for steady frictioncomponents;

g = gravitational acceleration;H = head (unknown head);h = perturbation in head (unknown head);I = identity matrix;i = imaginary unit ð¼ ffiffiffiffiffiffiffi�1

p Þ;J = Jacobian matrix (Newton-Raphson algorithm);Je = elastic component of the creep compliance function;Jr = retarded component of the creep compliance function;K = bulk modulus of elasticity of fluid;L = pipe length;M = coefficient matrix;N = right-hand-side vector/matrix;nc = number of network components;nd = degree of node;nl = number of loops;nn = number of nodes (unknown heads);np = number of pipes;nr = number of reservoirs (known heads);nrc = number of reservoir-pipe connections;

nruc = number of reservoir-pipe upstream connections;Q = flow (unknown flow);q = perturbation in flow (unknown flow);R = reservoir head (known head);RS = steady friction coefficient;RU = unsteady friction coefficient;RV = viscoelastic coefficient;r = perturbation in reservoir head (known head);

s, c, t, z = frequency-domain diagonal matrices for sinh, cosh,tanh, and Z components;

T, P = steady-state matrices for Todini and Pilati algorithm;T, Y = steady-state solution matrices (Newton-Raphson

algorithm);t = time;

W = weighting function;x = distance;Z = characteristic impedance;α = pipe constraint coefficient;γ = propagation constant;ρ = density of liquid;ν = kinematic viscosity; andω = angular frequency.

Subscripts

D = downstream end of pipe;H = relating to the steady-state H-formulation;h = relating to the frequency-domain h-formulation;Q = relating to then steady-state Q-formulation;

QH = relating to the steady-state QH-formulation;q = relating to the frequency-domain q-formulation;

qh = relating to the frequency-domain qh-formulation;U = upstream end of pipe; and0 = initial or steady-state quantity.

References

Brown, F. (1962). “The transient response of fluid lines.” J. Basic Eng.,84(3), 547–553.

JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011 / 567

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.

Chaudhry, M. H. (1970). “Resonance in pressurized piping systems.”J. Hydraul. Div., 96(9), 1819–1839.

Chaudhry, M. H. (1987). Applied hydraulic transients, Van NostrandReinhold, New York.

Collins, M., Cooper, L., Helgason, R., Kennington, J., and Le Blanc, L.(1978). “Solving the pipe network analysis problem using optimizationtechniques.” Manage. Sci., 24(7), 747–760.

Covas, D., Ramos, H., and Almeida, A. B. (2005). “Standing wave differ-ence method for leak detection in pipeline systems.” J. Hydraul. Eng.,131(12), 1106–1116.

D’Souza, A. F., and Oldenburger, R. (1964). “Dynamic response of fluidlines.” J. Basic Eng., 86, 589–598.

Ferrante, M., and Brunone, B. (2003). “Pipe system diagnosis and leakdetection by unsteady-state tests: Harmonic analysis.” Adv. WaterResour., 26, 95–105.

Gally, M., Güney, M., and Rieuford, E. (1979). “An investigation ofpressure transients in viscoelastic pipes.” J. Fluids Eng., 101, 495–499.

Goodson, R. E., and Leonard, R. G. (1972). “A survey of modelingtechniques for fluid line transients.” J. Basic Eng., 94, 474–482.

Kim, S. (2007). “Impedance matrix method for transient analysis ofcomplicated pipe networks.” J. Hydraul. Res., 45(6), 818–828.

Kim, S. H. (2005). “Extensive development of leak detection algorithm byimpulse response method.” J. Hydraul. Eng., 131(3), 201–208.

Kim, S. H. (2008). “Address-oriented impedance matrix method for genericcalibration of heterogeneous pipe network systems.” J. Hydraul. Eng.,134(1), 66–75.

Lee, P. J., Lambert, M. F., Simpson, A. R., Vítkovský, J. P., and Liggett,J. A. (2006). “Experimental verification of the frequency responsemethod for pipeline leak detection.” J. Hydraul. Res., 44(5), 693–707.

Lee, P. J., Vítkovský, J. P., Lambert, M. F., Simpson, A. R., and Liggett,J. A. (2005a). “Frequency-domain analysis for detecting pipelineleaks.” J. Hydraul. Eng., 131(7), 596–604.

Lee, P. J., Vítkovský, J. P., Lambert, M. F., Simpson, A. R., and Liggett,J. A. (2005b). “Leak location using the pattern of the frequencyresponse diagram in pipelines: A numerical study.” J. Sound Vib.,284(3), 1051–1073.

Liggett, J. A., and Chen, L.-C. (1994). “Inverse transient analysis in pipenetworks.” J. Hydraul. Eng., 120(8), 934–955.

Mohapatra, P. K., Chaudhry, M. H., Kassem, A. A., and Moloo, J. (2006a).“Detection of partial blockage in single pipelines.” J. Hydraul. Eng.,132(2), 200–206.

Mohapatra, P. K., Chaudhry, M. H., Kassem, A. A., and Moloo, J.(2006b). “Detection of partial blockages in a branched piping systemby the frequency response method.” J. Fluids Eng., 128(5), 1106–1114.

Ogawa, N., Mikoshiba, T., and Minowa, C. (1994). “Hydraulic effects on alarge piping system during strong earthquakes.” J. Pressure VesselTechnol., 116(2), 161–168.

Sattar, A. M., Chaudhry, M. H., and Kassem, A. A. (2008). “Partial block-age detection in pipelines by frequency response method.” J. Hydraul.Eng., 134(1), 76–89.

Shimada, M., Brown, J., Leslie, D., and Vardy, A. (2006). “Time-line in-terpolation errors in pipe networks.” J. Hydraul. Eng., 132(3), 294–306.

Stecki, J. S., and Davis, D. C. (1986). “Fluid transmission-lines—Distributed parameter models: 1. A review of the state-of-the-art.”Proc., Inst. Mech. Eng. Part A—J. Power Energy, 200(4), 215–228.

Suo, L., and Wylie, E. B. (1989). “Impulse response method for frequency-dependent pipeline transients.” J. Fluids Eng., 111(December), 478–483.

Suo, L., and Wylie, E. B. (1990a). “Complex wavespeed and hydraulictransients in viscoelastic pipes.” J. Fluids Eng., 112(4), 496–500.

Suo, L., and Wylie, E. B. (1990b). “Hydraulic transients in rock-boredtunnels.” J. Hydraul. Eng., 116(2), 196–210.

Tijsseling, A. S. (1996). “Fluid-structure interaction in liquid-filled pipesystems: A review.” J. Fluids Struct., 10, 109–146.

Todini, E., and Pilati, S. (1988). “A gradient algorithm for the analysis ofpipe networks.” Computer applications in water supply, Research Stud-ies Press, Letchworth, Hertfordshire, UK, 1–20.

Vardy, A. E., and Brown, J. M. B. (2003). “Transient turbulent friction insmooth pipe flows.” J. Sound Vib., 259(5), 1011–1036.

Vardy, A. E., and Brown, J. M. B. (2004). “Transient turbulent friction infully-rough pipe flows.” J. Sound Vib., 270(1-2), 233–257.

Vítkovský, J. P., Bergant, A., Lambert, M. F., and Simpson, A. R. (2003).“Frequency-domain transient pipe flow solution including unsteadyfriction.” Pumps, electromechanical devices, and systems applied tourban water management, E. Cabrera and E. Cabrera Jr., eds.,International Association for Hydro-Environment Engineering andResearch (IAHR), Valencia, Spain, 773–780.

Vítkovský, J. P., Stephens, M. L., Bergant, A., Simpson, A. R., andLambert, M. F. (2006). “Numerical error in weighting function-basedunsteady friction models for pipe transients.” J. Hydraul. Eng., 132(7),709–721.

Wylie, E. (1965). “Resonance in pressurized piping systems.” J. Basic Eng.,87, 960–966.

Wylie, E. B., and Streeter, V. L. (1993). Fluid transients in systems,Prentice-Hall, Englewood Cliffs, NJ.

Zecchin, A. C., Simpson, A. R., Lambert, M. F., White, L. B., andVítkovský, J. P. (2009). “Transient modeling of arbitrary pipe networksby a Laplace-domain admittance matrix.” J. Eng. Mech., 135(6), 538–547.

568 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / MAY 2011

J. Hydraul. Eng. 2011.137:556-568.

Dow

nloa

ded

from

asc

elib

rary

.org

by

Sask

atch

ewan

Uni

vers

ity o

n 10

/24/

12. C

opyr

ight

ASC

E. F

or p

erso

nal u

se o

nly;

all

righ

ts r

eser

ved.


Recommended