Water hammer simulation by implicit method of characteristic M.H. Afshar, M. Rohani * Department of Civil Engineering, Iran University of Science and Technology, Narmak, Tehran, Iran article info Article history: Received 12 September 2007 Received in revised form 12 June 2008 Accepted 19 August 2008 Keywords: Water hammer Method of characteristics Pipeline system Implicit method Explicit method Boundary conditions abstract An Implicit Method of Characteristics is proposed in this paper to alleviate the shortcomings and limi- tations of the mostly used conventional Method of Characteristics (MOC). An element-wise definition is used for all the devices that may be used in a pipeline system and the corresponding equations are derived in an element-wise manner. The proper equations defining the behavior of each device including pipes are derived and assembled to form the final system of equations to be solved for the unknown nodal heads and flows. Proposed method allows for any arbitrary combination of devices in the pipeline system. The method is used to solve two example problems of transient flow caused by closure of a valve and failure of a pump system and the results are presented and compared with those of the explicit MOC. The results show the ability of the proposed method to accurately predict the variations of head and flow in all cases considered. Ó 2008 Elsevier Ltd. All rights reserved. 1. Introduction Water hammer is produced by a rapid change of flow velocity in the pipelines that may be caused by sudden valve opening or closure, starting or stopping the pumps, mechanical failure of a device, rapid changes in demand condition, etc. It could result in violent change of the pressure head, which is then propagated in the pipeline in the form of a fast pressure wave leading to severe damages. The velocity of this wave may exceed 1000 m/s and the values of pressure may oscillate from very high to very low values. Design and operation of any pipeline system requires that the distribution of head and flow in the system is predicted at different operating conditions. Many researchers have attempted the simu- lation of transient flow in pipeline systems with different methods. Chaudhry and Hussaini [1] solved water hammer equations by MacCormak, Lambda and Gabutti explicit Finite Difference (FD) schemes. They found that these second-order FD schemes result in better solutions than the first-order MOC. Izquierdo and Iglesias [5] developed a computer program to simulate hydraulic transients in a simple pipeline system by mathematical modeling [5]. They also presented the users with a powerful tool to plan the potential risks to which an installation may be exposed and to develop suitable protection strategies. Their model produced good numerical results within the accuracy of the used data. This model was later gener- alized to include a pumping station fitted with check valve, delivery valve and two air vessels [8]. Ghidaoui et al. [6] proposed a two- and five-layer eddy viscosity model for water hammer simulation. A dimensionless parameter, i.e. the ratio of the time scale of the radial diffusion of shear to the time scale of wave propagation, was proposed to estimate the accuracy of the assumption of flow axisymmetry in the water hammer phenomenon. Filion and Karney [7] proposed a method that combined a numerical integration method with a transient simulation model to improve the accuracy and capabilities of extended-period simulations in pipe networks. This method analyzes a water distribution system for short time periods near the start and end of a time step using a transient model, and then uses a modified Euler’s method to predict the behavior of the system. Their method leads to a significant increase in simulation accuracy, but requires more system information and computational effort. Zhao and Ghidaoui [9] formulated first- and second-order explicit finite volume (FV) methods of Godunov-type [9] for water hammer problems. They compared the performances of FV schemes and MOC schemes with space line interpolation for three test cases with and without friction. They modeled the wall friction using the formula of Brunone et al. [17]. It was found that the first-order FV Godunov-scheme produces the same results with MOC using space line interpolation. It was also shown that, for a given level of accuracy, the second-order Godunov-type scheme requires much less memory storage and execution time than the first-order Godunov-type scheme. Recently, Kodura and Weiner- owska [11] investigated the difficulties that may arise in modeling of water hammer phenomenon. Sibetheros et al. [3] showed that in numerical analysis of water hammer in a frictionless horizontal pipe, the performance of method of characteristics (MOC) could be considerably improved by interpolations using spline polynomials. Wood [10,13] compared MOC and Wave characteristics Method (WCM) showing that for the same modeling accuracy, the WCM * Corresponding author. E-mail addresses: [email protected](M.H. Afshar), [email protected](M. Rohani). Contents lists available at ScienceDirect International Journal of Pressure Vessels and Piping journal homepage: www.elsevier.com/locate/ijpvp 0308-0161/$ – see front matter Ó 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.ijpvp.2008.08.006 International Journal of Pressure Vessels and Piping 85 (2008) 851–859
9
Embed
Water hammer simulation by implicit method of characteristic
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
lable at ScienceDirect
International Journal of Pressure Vessels and Piping 85 (2008) 851–859
Contents lists avai
International Journal of Pressure Vessels and Piping
journal homepage: www.elsevier .com/locate/ i jpvp
Water hammer simulation by implicit method of characteristic
M.H. Afshar, M. Rohani*
Department of Civil Engineering, Iran University of Science and Technology, Narmak, Tehran, Iran
a r t i c l e i n f o
Article history:Received 12 September 2007Received in revised form 12 June 2008Accepted 19 August 2008
Keywords:Water hammerMethod of characteristicsPipeline systemImplicit methodExplicit methodBoundary conditions
0308-0161/$ – see front matter � 2008 Elsevier Ltd.doi:10.1016/j.ijpvp.2008.08.006
a b s t r a c t
An Implicit Method of Characteristics is proposed in this paper to alleviate the shortcomings and limi-tations of the mostly used conventional Method of Characteristics (MOC). An element-wise definition isused for all the devices that may be used in a pipeline system and the corresponding equations arederived in an element-wise manner. The proper equations defining the behavior of each device includingpipes are derived and assembled to form the final system of equations to be solved for the unknownnodal heads and flows. Proposed method allows for any arbitrary combination of devices in the pipelinesystem. The method is used to solve two example problems of transient flow caused by closure of a valveand failure of a pump system and the results are presented and compared with those of the explicit MOC.The results show the ability of the proposed method to accurately predict the variations of head and flowin all cases considered.
� 2008 Elsevier Ltd. All rights reserved.
1. Introduction and five-layer eddy viscosity model for water hammer simulation.
Water hammer is produced by a rapid change of flow velocity inthe pipelines that may be caused by sudden valve opening orclosure, starting or stopping the pumps, mechanical failure ofa device, rapid changes in demand condition, etc. It could result inviolent change of the pressure head, which is then propagated inthe pipeline in the form of a fast pressure wave leading to severedamages. The velocity of this wave may exceed 1000 m/s and thevalues of pressure may oscillate from very high to very low values.Design and operation of any pipeline system requires that thedistribution of head and flow in the system is predicted at differentoperating conditions. Many researchers have attempted the simu-lation of transient flow in pipeline systems with different methods.
Chaudhry and Hussaini [1] solved water hammer equations byMacCormak, Lambda and Gabutti explicit Finite Difference (FD)schemes. They found that these second-order FD schemes result inbetter solutions than the first-order MOC. Izquierdo and Iglesias [5]developed a computer program to simulate hydraulic transients ina simple pipeline system by mathematical modeling [5]. They alsopresented the users with a powerful tool to plan the potential risksto which an installation may be exposed and to develop suitableprotection strategies. Their model produced good numerical resultswithin the accuracy of the used data. This model was later gener-alized to include a pumping station fitted with check valve, deliveryvalve and two air vessels [8]. Ghidaoui et al. [6] proposed a two-
A dimensionless parameter, i.e. the ratio of the time scale of theradial diffusion of shear to the time scale of wave propagation, wasproposed to estimate the accuracy of the assumption of flowaxisymmetry in the water hammer phenomenon. Filion and Karney[7] proposed a method that combined a numerical integrationmethod with a transient simulation model to improve the accuracyand capabilities of extended-period simulations in pipe networks.This method analyzes a water distribution system for short timeperiods near the start and end of a time step using a transientmodel, and then uses a modified Euler’s method to predict thebehavior of the system. Their method leads to a significant increasein simulation accuracy, but requires more system information andcomputational effort. Zhao and Ghidaoui [9] formulated first- andsecond-order explicit finite volume (FV) methods of Godunov-type[9] for water hammer problems. They compared the performancesof FV schemes and MOC schemes with space line interpolation forthree test cases with and without friction. They modeled the wallfriction using the formula of Brunone et al. [17]. It was found thatthe first-order FV Godunov-scheme produces the same results withMOC using space line interpolation. It was also shown that, fora given level of accuracy, the second-order Godunov-type schemerequires much less memory storage and execution time than thefirst-order Godunov-type scheme. Recently, Kodura and Weiner-owska [11] investigated the difficulties that may arise in modelingof water hammer phenomenon. Sibetheros et al. [3] showed that innumerical analysis of water hammer in a frictionless horizontalpipe, the performance of method of characteristics (MOC) could beconsiderably improved by interpolations using spline polynomials.Wood [10,13] compared MOC and Wave characteristics Method(WCM) showing that for the same modeling accuracy, the WCM
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859852
requires less execution time. In addition, he showed that thenumber of calculations per time step required by WCM does notincrease when more accuracy is required while for the MOC, thenumber of calculations per time step is roughly proportional to theaccuracy. Ghidaoui and Kolyshkin [4] performed linear stabilityanalysis of the base flow velocity profiles for laminar and turbulentwater hammer flows. They found that the main parameters thatgovern the stability of the transient flows are the Reynolds numberand a dimensionless time scale. Saikia and Sarma [12] presenteda numerical model using MOC and Barr’s explicit friction factor [14]for solution of the water hammer problems. The proposed modelwas examined for rapid valve closure in downstream of a longconduit with a reservoir upstream. The stability and accuracy of themethod was tested by comparing the results with those of the LaxDiffusive Method [2]. Greyvenstein [16] proposed an implicit finitedifference method based on the simultaneous pressure correctionapproach. The method could be indiscriminately used for bothliquid and gas flows based on isothermal and non-isothermalbehaviors.
In what follows, the explicit method of characteristic is firstdescribed along with the boundary conditions required for reser-voirs, valves and pumps in Section 2. In Section 3, the basicconcepts of proposed implicit method of characteristics (IMOC) isfirst described for pipe elements and is then extended to derive theequations governing reservoir, valve and pump elements. Theapplication of the proposed method to two benchmark examplesfrom the literature is described in Section 4. And finally the paper isconcluded with the conclusions in Section 5.
2. Conventional explicit MOC
Analyses of the most hydraulic transients are based on one-dimensional continuity and momentum equations. Variousnumerical approaches have been introduced for the simulation ofthe pipeline transients. These include the Method of Characteristics(MOC), Wave Characteristics Method (WCM), Finite Volume Method(FVM), Finite Element Method (FEM) and Finite Difference Method(FDM). Among these methods, MOC is the mostly used method forits simplicity and superior performance over other methods.
In the MOC, the convection terms are omitted from the gov-erning differential equations to arrive at the following relations:
vQvtþ gA
vHvxþ RQ jQ j ¼ 0 (1)
a2vQvxþ gA
vHvt¼ 0 (2)
where R¼ f/(2DA)¼ term of friction factor, Q¼ discharge,H¼ pressure head, A¼ area of the pipe, a¼ velocity of the pressurewave, g¼ acceleration due to gravity, t¼ time, f¼ friction factor ofthe pipe, D¼ diameter of the pipe, and x¼ distance along the pipe.The MOC approach transforms the water hammer partial differ-ential equations into the ordinary differential equations along thecharacteristic lines defined as
Cþ :dQdtþ Ca
dHdtþ RQ jQ j ¼ 0
dxdt¼ a (3)
C� :dQdt� Ca
dHdtþ RQ jQ j ¼ 0
dxdt¼ �a (4)
where Ca¼ gA/a.Integrating these equations on the characteristic lines between
time steps t and tþDt, shown in Fig. 1, and solving them for theknown variables lead to
in which QP¼ unknown flow at point P at time tþDt,HP¼ unknown head at point P at time tþDt, QA, QB¼ flows atneighboring sections of P at the previous time t, and HA, HB¼ headsat neighboring sections of P at the previous time t. Discretising eachpipe of the pipeline system into segments of length Dx, the aboveequations can be used to calculate the pressure head and flow at allthe interior points of the pipes. Calculation of flow variables at twoend-points of each pipe segment requires appropriate boundaryconditions depending on the type of device used in the system.
2.1. Boundary conditions
There may be different types of devices such as check valves,junctions, pressure-reducing valves, surge tanks, pumps, etc.,located between pipes in a pipeline system. In the MOC, theseapparatuses are usually treated as the boundary conditions forequations governing the transient flow in pipes. For this, thecharacteristic equations are combined with the proper boundaryconditions to arrive at the final equations for the boundary nodes.This, however, means that only one device can be used between anytwo pipes, which is a serious limitation if the simulation ofa general pipeline system is required. In what follows the boundaryconditions imposed by the most common devices in pipelinesystems are briefly addressed. A comprehensive discussion of theseboundary conditions can be found elsewhere [15].
2.1.1. ReservoirReservoir is one of the most important devices used in the
pipeline systems. The main characteristic of a reservoir, shown inFig. 2, is that the water level in the reservoir remains constantduring the transient conditions. For a reservoir at the upstream endof a pipeline system, the following equation holds [15]:
Fig. 4. Pump at the upstream end of the system [15].
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859 853
in which Hres¼ height of the reservoir water surface above thedatum, k¼ coefficient of entrance loss, HPi;1
¼ head at the first pointof the ith pipe that is connected to the reservoir. Solving the aboveequation with the negative characteristic equation, the flow at thefirst point of the pipe can be obtained as
The head at the first point of the pipe, downstream of the reservoir,can now be calculated by Eq. (7). The same procedure can be usedto derive the appropriate relations when the reservoir is located atdownstream of a pipe or when the flow is reversed in the pipetowards the reservoir [15].
2.1.2. ValveThe boundary condition imposed by a valve located at the end of
a pipeline system, shown in Fig. 3, can be written as
Q2Pi;nþ1
¼�Q0i;nþ1
s�2
H0i;nþ1
HPi;nþ1(9)
where s¼ relative valve opening, QPi;nþ1¼ transient head at
the last point of the ith pipe connected to the valve, andH0i;nþ1
;Q0i;nþ1¼ steady-state pressure head and flow at the last point
of the ith pipe. Substituting HP from the positive characteristicequation (Eq. (5)) into the above equation yields the followingequation for the flow at the last point of the pipe:
The head at the last point of the pipe is then calculated using Eq. (9).The same procedure can be used to derive the boundary conditionfor a valve located between two pipes [15].
2.1.3. PumpsFor a pump, located upstream of a pipeline system pumping
from a fixed head reservoir into the pipeline system, shown inFig. 4, the appropriate boundary condition can be written asfollows:
HPi;1¼ Hsuc þHPP � DHPv
DHPv¼ CvQPi;1
���QPi;1
��� (11)
QPi;1¼ QPP (12)
where HPi;1;QPi;1
¼ pressure head and flow at the first point of the ith
pipe connected to the pump, Hsuc¼ height of the liquid surface inthe suction reservoir above the datum, HPP, QPP¼ pumping headand flow at the end of time step, DHPv
¼ head loss in the dischargevalve, and Cv¼ coefficient of the head losses in the discharge valve.Calculation of the unknown values of HPi;1
and QPi;1requires that the
Hydraulic Grade Line
iPipe
Valve
Datum
(i,n+1)
H0i,n+1
Fig. 3. Valve at downstream end of the system.
pumping head and flow, HPP and QPP, are known. The pumpinghead and flow can be calculated using the characteristic equationsof the pump, which are usually defined graphically in the terms ofthe four non-dimensional quantities:
yP ¼QPP
npQRhP ¼
HPP
HRaP ¼
NP
NRbP ¼
TP
TR
in which HR, QR¼ pumping head and flow at rated condition, thesubscript P denotes the values in the current time, and NR,TR¼ rotational speed and net torque of the pump at rated condi-tion. Equation governing the net torque of a pump during transientsis also defined as
T ¼ �Idwdt¼ �I
2p60
dNdt
where I¼ combined polar moment of inertia of the pump, and N,w¼ rotational speed of the pump in rad/s and in rpm. Combiningthe above equations and using the average values lead to
aP � C6bP ¼ aþ C6b (13)
where C6¼�(15TRDt)/(pINR) and TR¼ (60gHRQR)/(2pNRhR),g¼ specific weight of liquid, hR¼ pump efficiency at rated condi-tion, and a, b¼ the values on non-dimensional rotational speed andtorque at previous time step.
Pump characteristic data depend upon the type of pump andoften, specific speed is used to classify the pump type. The char-acteristic curves are usually plotted in terms of tan�1(a/b) and h/(a2þ y2) or b/(a2þ y2). A linear extrapolation is usually used toarrive at the following relations:
hP
a2P þ y2
P
¼ a1 þ a2 tan�1aP
yP(14)
bP
a2P þ y2
P
¼ a3 þ a4 tan�1aP
yP(15)
where a1, a2, a3, a4¼ constants for the straight lines representingthe head and torque characteristic curves, respectively. Simulta-neous solution of Eqs. (11)–(15) yields the required values of HPi;1
and QPi;1[15].
3. Proposed implicit method of characteristics
Computer implementation of conventional explicit MOC, asdescribed earlier, faces some serious shortcomings. First, applica-tion of this method requires that only one device is located between
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859854
any two pipes. Otherwise, a new boundary condition has to bederived for each combination of the devices that may be used in thepipeline system. This is very restrictive when different design andoperation policies are to be examined for the best performance ofthe system. Second, the boundary condition derived for the devicessuch as valves, pumps and reservoirs is very much dependent onwhether these devices are located at the end of the system orwithin the system. Furthermore, these boundary conditions alsochange depending on whether these devices are located at theupstream or downstream end of the system. To further complicatethe situation, the boundary conditions imposed by these deviceschange if the flow reverses its direction.
An Implicit Method of Characteristics (IMOC) is proposed in thissection as a remedy for the above-mentioned shortcomings of theconventional MOC. For this, an element-wise definition is used forall of the devices that may be used in a pipeline system and thecorresponding equations are derived in an element-wise manner.These equations are derived independent of the location of thedevices and flow direction. These equations are then assembled toform the final system of equations to be solved for the unknownhead and flow at nodes at each time step. Proposed formulation,therefore, allows for any arbitrary combination of the devices in thepipeline system. In what follows, the equations describing thetransient behavior of different components of a pipeline system arederived.
3.1. Pipe
Consider a pipe segment defined by two end-points of i and jshown in Fig. 5. The starting points of the proposed formulation forpipes are the characteristic equations (Eqs. (3) and (4)). Here,a second-order central differencing is used to arrive at the requiredalgebraic form of the positive characteristic equation:
Cþ :dQdtþ Ca
dHdtþ RQ jQ j ¼ 0
����nþ1=2
�1þ 1
4RDtQnþ1
j Sign
Qnþ1j þ Qn
i
þ 12
RDtQni Sign
Qnþ1
j þ Qni
�Qnþ1
j þ CaHnþ1j
¼ Qni þ CaHn
i �14
RDt�Qn
i
�2 Sign
Qnþ1j þ Qn
i
ð16Þ
An analogous treatment allows writing the equivalent equationsfor the negative characteristic equation:
Sepipe ¼
�0 C 0 CaD 0 �Ca 0
�
bepipe ¼ �
"Qm
j þ14
RDt�
Qni
�2þ
Qmj
2Sign
Qm
j þ Qni
þ 1
2RDtQm
j Q
Qmi þ
14
RDt�
Qmi
�2þ
Qnj
2Sign
Qm
i þ Qnj
þ 1
2RDtQn
j Q
with C ¼ 1þ 12
RDtQmj Sign
Qm
j þ Qni
þ 1
2RDtQn
i Sign
Qmj þ Qn
i
and D ¼ 1þ 1
2RDtQm
i Sign
Qmi þ Qn
j
þ 1
2RDtQn
j Sign
Qmi þ Qn
j
C� :dQdt� Ca
dHdtþ RQ jQ j ¼ 0
����nþ1=2
�1þ 1
4RDtQnþ1
i Sign
Qnþ1i þ Qn
j
þ 12
RDtQnj Sign
Qnþ1
i þ Qnj
�Qnþ1
i � CaHnþ1i
¼ Qnj � CaHn
j �14
RDt
Qnj
2Sign
Qnþ1
i þ Qnj
ð17Þ
These equations totally describe the hydraulic behavior of a pipesegment, element, which can be written in a matrix form asfollows:
SepipeXe
pipe ¼ bepipe (18)
with XT¼ [Qi, Qj, Hi, Hj]nþ1. Here Xpipe
e is the vector of pipeunknowns, Spipe
e is the stiffness matrix and bpipee is the right-hand
side vector.The above equations are clearly nonlinear and their solutions
require a linearization scheme. Here a Newton–Raphson formula-tion is used to linearize the above equations leading to thefollowing system of equations:
SepipeDXe
pipe ¼ bepipe (19)
with DXT¼ [DQi, DQj, DHi, DHj]nþ1. Here DQ¼Qmþ1�Qm,
DH¼Hmþ1�Hm, m is the nonlinear iteration index, and
ni Sign
Qm
j þ Qni
þ CaHm
j � Qni � CaHn
i
mi Sign
Qm
i þ Qnj
� CaHm
i � Qnj þ CaHn
j
#(20)
Hi
Datum
ij
Hydraulic Grade Line
Hj
Fig. 6. Reservoir element used in implicit MOC.
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859 855
3.2. Reservoir
Now consider a reservoir considered as a hydraulic elementshown in Fig. 6. The hydraulic behavior of this element can bedefined via the head loss equation due to the orifice and continuityof flow defined as
Qnþ1i ¼ Qnþ1
j (21)
Hnþ1i �Hnþ1
j ¼ ð1þkÞ8gA2
Qnþ1
i þQnþ1j
2Sign
Qnþ1
i þQnþ1j
(22)
where Hi, Hj¼ values of the pressure head at the first and secondnode of the reservoir element, and Qi, Qj¼ values of the flow at thefirst and last node of the reservoir. A Newton–Raphson formulationof this element leads to the following stiffness matrix and right-hand side vectors:
SeresDXe
res ¼ beres
Seres ¼
"1 �1 0 0
�2ð1þkÞ8gA2
Qm
i þ Qmj
Sign
Qm
i þ Qmj
�2ð1þkÞ
8gA2
Qm
i þ Qmj
Sign
Qm
i þ Qmj
1 �1
#
beres ¼ �
" Qmi � Qm
j
Hmi � Hm
j �ð1þkÞ8gA2
Qm
i þ Qmj
2Sign
Qm
i þ Qmj
#(23)
3.3. Valves
The equations governing the behavior of a valve stationed at theend of a pipeline system can be defined as follows:
Sevalve ¼
"1 �1
�2k8gA2
Qm
i þ Qmj
Sign
Qm
i þ Qmj
�2k8gA2
Qm
i þ Qmj
Sign
Q
bevalve ¼ �
" Qmi � Qm
j
Hmi � Hm
j �k
8gA2
Qm
i þ Qmj
2Sign
Qm
i þ Qmj
#
Qnþ1i ¼ Qnþ1
j (24)
Hnþ1iðsQ0Þ2
H0¼ Qnþ1
i
���Qnþ1i
��� (25)
Hnþ1jðsQ0Þ2
H0¼ Qnþ1
j
���Qnþ1j
��� (26)
where Q0, H0¼ steady-state flow and pressure head at theupstream of the valve, s¼ relative valve opening and indexes i and jrefer to the first and second node of the valve element, respectively.These equations can be written in a matrix form using a Newton–Raphson linearization scheme with the following stiffness andright-hand side matrices:
Sevalve¼
264
1 �1 0 0�2Qm
i Sign�Qm
i
�0 ðsQ0Þ2
H00
0 �2Qmj Sign
Qm
j
0 ðsQ0Þ2
H0
375
bevalve¼�
2664
Qmi �Qm
j
HmiðsQ0Þ2
H0��Qm
i
�2 Sign�Qm
i
�Hm
jðsQ0Þ2
H0�
Qmj
2Sign
Qm
j
3775
(27)
For a valve situated at the middle of a pipeline system, thegoverning equations are written as
Qnþ1i ¼ Qnþ1
j (28)
Hnþ1i � Hnþ1
j ¼ k8gA2
Qnþ1
i þ Qnþ1j
2Sign
Qnþ1
i þ Qnþ1j
(29)
in which k¼ friction factor of the valve which is defined in terms ofthe opening ratio of the valve. The stiffness and right-hand sidematrices for the valve located at the middle of the system are nowdefined as
0 0mi þ Qm
j
1 �1
#(30)
Hi
ij
Hydraulic Grade Line
Hj
HP
Datum
Fig. 7. Pump element used in implicit MOC.
0
200
400
600
800
1000
1200
0 50 100 150 200 250 300time(s)
head
(ft)
Fig. 8. Pressure head vs time at valve obtained by implicit MOC (first example).
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859856
3.4. Pumps
For a pump element shown in Fig. 7, two following equations ofpumping head and continuity of flow are used to define thebehavior of the pump in terms of the nodal parameters as follows:
Hnþ1i � Hnþ1
j ¼ �HPnþ1P (31)
Qnþ1i ¼ Qnþ1
j ¼ QPnþ1P (32)
where QPp and HPp are pumping head and discharge. Theseequations, however, cannot be used in their present form to derivethe pump element matrices since pumping head and discharge arenot known. This problem is resolved by using the normalizedparameters and the characteristic pump equations to arrive at thefollowing equations:
Hnþ1i � Hnþ1
j ¼ � HRhnþ1P ¼ �HR
0@anþ1
P
2þ
Qnþ1
i
2
n2pQ2
R
1A
�
a1 þ a2 tan�1anþ1P QRnp
Qnþ1i
!ð33Þ
Hnþ1i � Hnþ1
j ¼ � HRhnþ1P ¼ �HR
0@anþ1
P
2þ
Qnþ1
j
2
n2pQ2
R
1A
�
a1 þ a2 tan�1anþ1P QRnp
Qnþ1j
!ð34Þ
where np¼ number of parallel pumps. A Newton–Raphsonformulation is again used to arrive at the following stiffness andright-hand side matrices for the pump element:
Sepump ¼
�C 0 1 �10 D 1 �1
�
bepump ¼ �
264 Hm
i � Hmj þ HR
��anþ1
P
�2þðQmi Þ
2
n2pQ2
R
�a1 þ a2 tan�1anþ1
P npQR
Q mi
Hmi � Hm
j þ HR
��anþ1
P
�2þðQmj Þ
2
n2pQ2
R
��a1 þ a2 tan�1anþ1
P npQR
Q mj
with C ¼ HRnpQR
h2a1
Qmi
npQR� a2anþ1
P þ 2a2Qm
inpQR
tan�1anþ1P npQR
Qmi
#
and D ¼ HRnpQR
�2a1
Qmj
npQR� a2anþ1
P þ 2a2
Qmj
npQRtan�1anþ1
P npQR
Qmj
#
Calculation of these matrices, however, requires that the value of aP
is known. Here the value of aP is calculated using the information atthe previous iteration via following equation:
aP � C6a2P
�a3 þ a4 tan�1aPnpQR
Qi
�
� C6Q2
i
n2pQ2
R
�a3 þ a4 tan�1aPnpQR
Qi
�¼ aþ C6b ð36Þ
It should be noted that Eq. (36) is derived from Eq. (13) by usingproper definitions of bP, vP.
4. Numerical application
The efficiency of the proposed model is now examined againstfour benchmark examples from the literature. The first exampleconsiders transients caused by a rapid valve closure downstream ofa long conduit with a reservoir upstream. The following informa-tion is used for the pipeline system: steady head of reservoirH0¼ 600 ft (182.88 m), pipe length L¼ 12,000 ft (3657.6 m),diameter of pipe D¼ 2 ft (0.6096 m), pipe friction factor f¼ 0.02,valve closure time t¼ 4 s, wave velocity a¼ 3000 ft/s (914.4 m/s).Figs. 8 and 9 show the variation of pressure head and discharge atthe upstream of the valve up to 300 s obtained using the proposedIMOC. These solutions compare well with the solutions obtained bySaikia and Sarma [12] using explicit MOC, which are shown in Figs.10 and 11.
The second example considers the case of transient flow causedby a pump failure devised by Chaudhry [15]. The pipeline systemconsists of two parallel pumps, two pipes, a frictionless junction,and a reservoir as shown in Fig. 12 with the following character-istics: length of the first pipe L¼ 450 m, first pipe diameterD¼ 0.75 m, friction factor f¼ 0.01, wave velocity a¼ 900 m/s;
Fig. 10. Pressure head vs time at valve obtained by Saikia and Sarma [12] (firstexample).
Fig. 11. Discharge vs time at valve obtained by Saikia and Sarma [12] (first example).
Pipe 1
Pipe 2Re servoir
Two Pumps
Fig. 12. Sketch of the piping system for the second and third examples.
-20
-10
0
10
20
0 50 100 150 200 250 300
time(s)
flo
w (cfs)
Fig. 9. Discharge vs time at valve obtained by implicit MOC (first example).
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859 857
length of the second pipe L¼ 550 m, second pipe diameterD¼ 0.75 m, friction factor f¼ 0.012, wave velocity a¼ 1100 m/s. Thesuction head of the pump is considered to be 59 m. The followingvalues were used for pump parameters: QR¼ 0.25 m3/s, HR¼ 60 m,NR¼ 1100 rpm, I¼ 16.85 kg m2 per pump. The characteristic curvesof the pumps can be found in Chaudhry [15]. Figs. 13 and 14 showthe variation of the pumping head and discharge during 15 sobtained by proposed IMOC. This problem is also solved using theconventional MOC; so that a comparison can be made with the re-sults obtained using the proposed method. Fig. 15 shows the relativedifference of the pumping head obtained with the proposedmethod. This figure indicates a good agreement between explicitand implicit MOC.
0102030405060708090
100
0 2 4 6 8 10 12 14 16time (s)
pu
mp
h
ead
(m
)
Fig. 13. Pumping head vs time obtained by implicit MOC (second example).
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
0 2 4 6 8 10 12 14 16
time (s)
pu
mp
flo
w (m
3/s)
Fig. 14. Pump discharge vs time obtained by implicit MOC (second example).
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0 5 10 15Time (s)
Relative D
ifferen
ce (%
)
Fig. 15. Relative difference of pumping head obtained by explicit and implicit MOC(second example).
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859858
The third example is similar to the previous example with thedifference that two pumps of Example 2 are now considered inseries. Figs. 16 and 17 show the variation of pumping head anddischarge with time obtained using the proposed method whileFig. 18 shows the relative difference of the pumping head obtainedwith respect to those of the conventional MOC.
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0 5 10 15Time (s)
Relative D
ifferen
ce (%
)
Fig. 18. Relative difference of pumping head obtained by explicit and implicit MOC(third example).
Pipe 1
Pipe 2 Re servoir
Two Series Pumps
Re servoir
Fig. 19. Sketch of the piping system for the fourth example.
-20
0
20
40
60
80
100
0 5 10 15
time (s)
pu
mp
h
ead
(m
)
Fig. 16. Pumping head vs time obtained by implicit MOC (third example).
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
0 5 10 15
time (s)
pu
mp
flo
w (m
3/s)
Fig. 17. Pump discharge vs time obtained by implicit MOC (third example).
The fourth example considers again the transient caused bya pump failure in which two series pumps of Example 3 are nowsituated in the middle of the pipeline system as shown in Fig. 19.Figs. 20 and 21 show the variation of the pumping head anddischarge while Fig. 22 shows the relative difference of thepumping head obtained by proposed method with respect to thoseof the conventional explicit MOC. It should be noted that in theexplicit MOC, a special boundary condition different from the oneused in the third example, as suggested by Chaudhry [15], had to bederived for the pumps while this problem was easily resolved in theproposed method simply by introducing two pumps in series intothe pipeline system via the data file.
-20
0
20
40
60
80
100
0 5 10 15
time (s)
pu
mp
h
ead
(m
)
Fig. 20. Pumping head vs time obtained by implicit MOC (fourth example).
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
0 5 10 15
time (s)
pu
mp
flo
w (m
3/s)
Fig. 21. Pump discharge vs time obtained by implicit MOC (fourth example).
00.20.40.60.8
11.21.41.61.8
2
0 5 10 15Time (s)
Relative
D
ifferen
ce (%
)
Fig. 22. Relative difference of pumping head obtained by explicit and implicit MOC(fourth example).
M.H. Afshar, M. Rohani / International Journal of Pressure Vessels and Piping 85 (2008) 851–859 859
5. Conclusions
An Implicit Method of Characteristics (IMOC) was proposed inthis paper as a remedy to the shortcomings and limitations of theconventional Method of Characteristics (MOC). An element-wisedefinition was used for three devices, namely, valves, reservoirs andpumps, which are mostly used in the pipeline systems and thecorresponding equations were derived in an element-wise manner.The equations defining the behavior of each device including pipesare then assembled to form the final system of equations to besolved for the unknown nodal heads and flows. Proposed methodwas shown to allow for any arbitrary combination of devices in thepipeline system without any special treatment. The method wasapplied to four example problems of transient flow caused byclosure of a valve and failure of three pumping systems and theresults were presented and compared with those of the explicitMOC. The results showed the ability of the proposed method toaccurately predict the variations of head and flow in all the casesconsidered.
Appendix
The following symbols are used in this paper:R¼ f/(2DA) term of friction factorQp dischargeHp pressure headQPp pumping flowHPp pumping headA area of the pipea velocity of the pressure waveg acceleration due to gravityt timef friction factor of the pipeD diameter of the pipex distance along the pipeHres height of the reservoir water surface above the datumk coefficient of entrance loss in reservoirs relative valve openingHsuc height of the liquid surface in the suction reservoir above
the datumhR pump efficiency at rated conditionI combined polar moment of inertia of the pumpN, w rotational speed of the pump in rad/s and in rpmy, h, a, b non-dimensional quantities of flow, head, rotational speed
and net torque of the pump, respectivelyDHPv
head loss in the discharge valveCv coefficient of head losses in the discharge valveg specific weight of liquida1, a2, a3, a4 constants for the straight lines representing the head
and torque characteristic curves, respectively
np number of parallel pumpsm nonlinear iteration indexX vector of the element unknownsS stiffness matrixb right-hand side vector
SubscriptsP point P at time tþDtA, B neighboring sections of P at the previous time ti, 1 first point of the ith pipe that is connected to the elementi, nþ 1 last point of the ith pipe that is connected to the elementR rated conditioni upstream nodej downstream node0 steady-state condition
References
[1] Chaudhry HM, Hussaini MY. Second-order accurate explicit finite-differenceschemes for water hammer analysis. Journal of Fluids Engineering1985;107:523–9.
[2] Streeter VL. Water hammer analysis. Journal of the Hydraulics DivisionNovember 1969;95(6). ASCE.
[3] Sibetheros IA, Holley ER, Branksi JM. Spline interpolation for water hammeranalysis. Journal of Hydraulic Engineering 1991;117(10):1332–51.
[4] Ghidaoui MS, Kolyshkin AA. Stability analysis of velocity profiles in waterhammer flows. Journal of Hydraulic Engineering 2001;127(6):499–512.
[5] Izquierdo J, Iglesias PL. Mathematical modeling of hydraulic transients insimple systems. Mathematical and Computer Modeling 2002;35(7):801–12.
[6] Ghidaoui MS, Mansour GS, Zhao M. Applicability of quasi steady and axisym-metric turbulence models in water hammer. Journal of Hydraulic Engineering2002;128(10):917–24. ASCE.
[7] Filion YR, Karney BW. Sources of error in network modeling: a question ofperspective. Journal of the American Water Works Association 2003;95:119–30.
[8] Izquierdo J, Iglesias PL. Mathematical modeling of hydraulic transients incomplex systems. Mathematical and Computer Modeling 2004;39(4):529–40.
[9] Zhao M, Ghidaoui M. Godunov-type solutions for water hammer flows. Journalof Hydraulic Engineering 2004;130(4):341–8. ASCE.
[10] Wood Don J. Water hammer analysis – essential and easy (and efficient).Journal of Environmental Engineering 2005;131(8):1123–31.
[11] Kodura A, Weinerowska K. Some aspects of physical and numerical modelingof water hammer in pipelines. In: International symposium on watermanagement and hydraulic engineering; 2005. p. 125–33.
[12] Saikia MD, Sarma AK. Numerical modeling of water hammer with variablefriction factor. Journal of Engineering and Applied Sciences 2006;1(4):35–40.
[13] Wood Don J, Lindireddy S, Boulos PF, Karney B, Mcpherson DL. Numericalmethods for modeling transient flow. Journal of the American Water WorksAssociation 2005;97(7):104–15. AWWA.
[14] Barr DIH. The transition from laminar to turbulent flow. In: Proceedings of theInstitution of Civil Engineers, Part 2, vol. 69; June 1980. p. 555–62.
[15] Chaudhry HM. Applied hydraulic transients. New York: Van Nostrand Rein-hold; 1987.
[16] Greyvenstein GP. An implicit method for analysis of transient flows in pipingnetworks. International Journal for Numerical Methods in Engineering2006;53:1127–48.
[17] Brunone B, Golia UM, Greco M. Some remarks on the momentum equationfor fast transients. In: Proceedings of International Conference onHydraulic Transients with Water Column Separation, IAHR, Valencia, Spain;1991. 201–209.