0% found this document useful (0 votes)
138 views

Water Hammer Analysis Using An Implicit Finite-Difference Method PDF

This article presents an Implicit Finite-Difference Method (IFDM) for solving water hammer problems in pipe networks. The IFDM allows modeling transient pipe flow with greater stability and accuracy than the Method of Characteristics, especially when the Courant number is less than 1. However, the IFDM requires optimizing weighting coefficients for each problem, which can make the analysis time-consuming. The article describes the governing equations for transient pipe flow and discusses how the IFDM and MOC approaches solve these equations.

Uploaded by

Omar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

Water Hammer Analysis Using An Implicit Finite-Difference Method PDF

This article presents an Implicit Finite-Difference Method (IFDM) for solving water hammer problems in pipe networks. The IFDM allows modeling transient pipe flow with greater stability and accuracy than the Method of Characteristics, especially when the Courant number is less than 1. However, the IFDM requires optimizing weighting coefficients for each problem, which can make the analysis time-consuming. The article describes the governing equations for transient pipe flow and discusses how the IFDM and MOC approaches solve these equations.

Uploaded by

Omar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018, pp.

 307-318

Water hammer analysis using an implicit finite-difference method

Análisis del golpe de ariete usando un método de diferencias finitas implícito

John Twyman Q.1*

Recibido 13 de junio de 2016, aceptado 31 de mayo de 2017


Received: June 13, 2016  Accepted: May 31, 2017

ABSTRACT

The Implicit Finite-Difference Method (IFDM) for the solution of water hammer in pipe networks is presented.
All the equations necessary to calculate the flow and pressure in each node of the network are shown in detail.
Section-by-section coupling through the Karney equation allows obtain a system of equations for each pipe
section which is easy to solve applying the Thomas’ algorithm. Also, there are presented the original expressions
in the form of finite differences are presented for: (1) the frictional term RQP|Q| of the dynamics equation, (2)
the transient friction factor proposed by Brunone-Vítkovský, and (3) the short pipe replacement elements which
allow increase the time step. It is demonstrated that the proposed methodology allows modelling the transient
flow with higher level of stability and numerical accuracy in comparison to the Method of Characteristics
(MOC), especially when the Courant number (Cn) is less than 1. However, because of IFDM works with
weighting coefficients (θ1 and θ2) which must adopt values generally close to 0.5 depending on the analyzed
problem, the achievement of the best near-to-exact solution requires to analyze each case separately, being
obligatory to apply a trial/error procedure that can make the analysis cumbersome and time consuming.

Keywords: Pipe replacement element, preissman scheme, transient friction factor, water hammer,
weighting coefficients.

RESUMEN

Se presenta un Método de Diferencias Finitas Implícito (MDFI) para la solución del golpe de ariete
en redes de tuberías. Se muestran en detalle todas las ecuaciones necesarias para calcular el caudal
y presión en cada nodo de la red (interno y de borde), y cuyo acoplamiento tramo-a-tramo, mediante
la ecuación de Karney, permite obtener un sistema de ecuaciones (por cada tramo) de fácil resolución
aplicando el algoritmo de Thomas. Se muestran, además, expresiones originales desarrolladas por el
autor válidas para modelar, en forma de diferencias finitas: (1) el término friccional de la ecuación
de la dinámica RQP|Q|, (2) el factor de fricción transiente propuesto por Brunone-Vítkovský y, (3) los
elementos de reemplazo de tuberías cortas que permiten incrementar la magnitud del paso de tiempo
computacional. Se demuestra que la metodología propuesta permite modelar el flujo transitorio con
mayor nivel de estabilidad y precisión numérica en comparación con el Método de las Características
(MC), especialmente cuando el número Courant (Cn) es menor que 1. Sin embargo, debido a que el MDFI
trabaja con coeficientes de ponderación (θ1 y θ2) que deben adoptar valores generalmente cercanos a 0,5
dependiendo del problema analizado, la obtención de una solución cercana a la exacta requiere analizar
cada caso por separado, siendo obligatorio un procedimiento de ensayo y error que puede hacer que el
análisis se torne lento y engorroso.

Palabras clave: Coeficientes de ponderación, elemento de reemplazo de tuberías, esquema de preissman,


factor de fricción transiente, golpe de ariete.

1 Twyman Ingenieros Consultores. Pasaje Dos # 362, Rancagua, Chile. E-mail: [email protected]
* Corresponding author.
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

INTRODUCTION and Streeter [29], conclude that major advantage


of the IFDM is that they are stable for large time
There is little literature dealing with the water steps. Computationally, however, implicit schemes
hammer simulation using finite difference increase both the execution time and the storage
methods of an implicit type, where the solution requirement and they need a matrix inversion
of the basic equations of transient flow requires solver because a large system of equations has to
solving a system of equations. This may be due be solved. Other authors [1, 14] recognize that HM
to two reasons: the IFDM implementation has a based on IFDM is a sophisticated method which
certain level of complexity because it is necessary has proven to be efficient to model water hammer
to solve a coupled set of equations (linear or non- in complex pipe networks, with greater flexibility
linear). The boundary conditions under the IFDM than MOC and other methods when the Courant
context are difficult to handle because it requires number is greater than 1. IFDM is unconditionally
adding fictitious grid points located beyond the stable; that is to say that its behavior is the same
pipe boundaries, being also necessary to establish regardless of time step size or adopted Courant
additional systems of equations that allow solve number. [15]. Sepehran and Badri [19] propose a full
the flow and pressure in each boundary node of implicit finite difference method that works using
the network. In general, IFDM is unconditionally a non-symmetrical staggered grid. The comparison
stable and is used for solving the transient flow in between experimental data and numerical results
those cases where it is necessary to adopt larger shows agreement with MOC approach. However,
time steps (Δt) without taking into account the the scheme uses pseudo parameters to calculate
limitations given by the Courant number (Cn). the state variables in the pipe boundaries that tend
Nevertheless, IFDM is not exempted dispersion to complicate the analysis unnecessarily.
and numerical attenuation even when the transient
flow is solved in a very simple pipe network [6]. GOVERNING EQUATIONS OF THE
Other authors [28] proposed solving the water TRANSIENT FLOW
hammer equations in a network system using the
implicit central difference method to permit large When analyzing a volume control it is possible
time steps, where resulting nonlinear difference to obtain a set of non-linear partial differential
equations are organized in a sparse matrix and are equations of hyperbolic type valid for describing
solved using the Newton-Raphson procedure. The the one-dimensional (1-D) transient flow in pipes
implicit centered method gives a solution which with circular cross-section [7]:
is marginally stable, where time increments may
be used in the solution [21]. Implicit computer ∂H a ∂Q
programs are somewhat more difficult to write and + =0 (1)
∂t c ∂x
debug, in that the simultaneous solution hides any
source of error in programming. Hybrid methods
∂Q ∂H
(HM) based on IFDM are more efficient to model +a⋅c⋅ + RQ Q = 0 (2)
the unsteady flow in complex pipe networks, with ∂t ∂x
greater flexibility and robustness than Method
of Characteristics (MOC), particularly for large Where: equations (1) and (2) correspond to the
Courant numbers [16, 17, 22]. This is because continuity and momentum (dynamics), respectively.
the HM avoids the interpolations required by Besides, ∂ = partial derivative, H = piezometric head,
the MOC, thus lessening dispersion problems. a = wave speed, c = (gA/a), g = gravity constant, A =
Samani and Khayatzadeh [18] propose a method pipe cross−section, Q = fluid flow and R = f/2DA
in which the implicit finite difference was coupled with f = friction factor (Darcy−Weisbach) and D =
with the Method of Characteristics to obtain the pipe diameter. The subscripts x and t denote space
discretized equations for the disproportionate and time dimensions, respectively. Equations (1) and
reaches. The developed numerical method has (2), in conjunction with the equations related the
a good fit-level when it is compared with the boundary conditions of specific devices, describe
exact solution available for many test examples. the phenomenon of wave propagation for a water
Some authors [9] reviewing the work of Wylie hammer event.

308
John Twyman Q.: Water hammer analysis using an implicit finite-difference method

WAVE SPEED H directly from previously known values [5, 30].


The main disadvantage of the MOC is that it must
For water (without the presence of free air or gas) to fulfil with the Courant stability criterion that can
the more general equation to calculate the water limit the time step magnitude (Δt) common for the
hammer wave speed magnitude in one-dimensional entire network. The MOC stability criterion states
(1-D) flows is [23, 24, 26]: that [26]:

K /ρ aΔt aNΔt
a= Cn = = ≤ 1.0 (4)
KD (3) Δx L
1+ Ψ
E e
With Δx = reach length, N  = number of reaches
With K = water bulk modulus; ρ = liquid density; and L = pipe length. In order to get Cn = 1.0, some
E = pipe elasticity modulus (Young); e  = pipe initial pipe properties can be modified (length and/
wall thickness and ψ = factor related with the pipe or wave speed). Another way is to keep the initial
supporting condition. conditions and apply numerical interpolations with
risk a of generating errors (numerical dissipation
METHOD OF THE and dispersion) in the solution [10]. In general,
CHARACTERISTICS (MOC) MOC gives exact numerical results when Cn =
1.0; otherwise, it generates erroneous results in the
The Method of Characteristics (MOC) is an Eulerian way of attenuations when Cn < 1.0 or numerical
numerical scheme [27] very used for solving instability when Cn > 1.0 [10].
the equations which govern the transient flow.
Because it works with “a” constant and, unlike IMPLICIT FINITE DIFERENCE METHOD
other methodologies based on a finite difference
or finite element, it can easily model wave fronts According to Figure 2, the state variables at time t
generated by very fast transient flows. MOC works have been calculated, being necessary to calculate
converting the computational space (x) - time new values at time t = t +Δt. To achieve this purpose,
(t) grid (or rectangular mesh, see Figure  1) in the partial derivatives in equations (1) and (2) may be
accordance with the Courant condition. It is useful approximated by finite differences, as follows [22]:
for modelling the wave propagation phenomena
in water distribution systems due to its facility for t+Δt t
introducing the hydraulic behavior of different ∂H (
H i+1 + H i+1 − H it+Δt + H it
) ( )
= (5)
devices and boundary conditions such as valves, ∂x 2Δx
pumps, reservoirs, etc. [16]. Some main advantages
of MOC are its ease of use, speed and explicit t+Δt
∂H (
H i+1 + H it+Δt − H i+1
) (t
+ H it )
nature, which allows calculate the variables Q and = (6)
∂t 2Δt

Figure 1. Space−time grid (Δx, Δt) with characteristic


lines (C+ and C–). Figure 2. Space-time grid for IFDM.

309
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

t+Δt t t+Δt t
(
∂Q Qi+1 + Qi+1 − Qi + Qi ) ( ) (7)
⎛ −gA ⎞⎡
c’4 = ⎜ t t
⎟ θ1H i+1 + (1− θ1 ) H i ⎤⎦
∂x
=
2Δx ⎝ Δt ⎠⎣
g
c4” = c’4 + Qit + Qi+1
( t
⋅ )
t+Δt
( t+Δt
∂Q Qi+1 + Qi
t
− Qi+1 + Qit ) ( ) 2Δx (19)
= (8) ⎡(1− θ ) H t − (1− θ ) H t ⎤
∂t 2Δt ⎣ 2 i+1 2 i ⎦

a 2 ⎡
On the other hand: c4 = c4” + t
. (1− θ 2 ) Qi+1 − (1− θ 2 ) Qit ⎤⎦
Δx ⎣
R t t
RQ Q = (
Qi + Qi+1 Qit + Qi+1
t
) (9) Where θ1 and θ2 are weighting coefficients, ε =
4
linearization constant and fav corresponds to an
⎛ t t ⎞
average value ⎜⎜ fi + fi+1 ⎟⎟.
Taking into account the equations (5) to (9), the
equations (1) and (2) can be represented as follows [22]:
⎝ 2 ⎠

d1Qit+Δt + d2Qi+1
t+Δt
− d3 H it+Δt + d3 H i+1
t+Δt
+ d4 = 0 (10) CALCULATION OF THE BOUNDARY
CONDITIONS
−c1Qit+Δt + c1Qi+1
t+Δt
+ c2 H it+Δt + c3 H i+1
t+Δt
+ c4 = 0 (11)
Karney [12] proposes a comprehensive and
Where the coefficients are the following [22]: systematic approach to model different boundary
conditions (with constant or variable consumption,
reservoirs, etc.). and which it allows linking the
θ 2 Δt Qit + Qi+1
( t
)+ f av Δtε Qit + Qi+1
t
hydraulic behavior of all piping, consumptions or
d1 = 2 (1− θ1 ) − (12)
AΔx 4DA tanks connected to each network node by:

θ 2 Δt Qit + Qi+1
( t
)+ f av Δtε Qit + Qi+1
t
H Pt+Δt = Cc − Bc ⋅Qext (20)
d2 = 2θ1 + (13)
AΔx 4DA
Where Cc and Bc are known constants and Qext is

d3 =
( 2θ 2 ) gAΔt the nodal consumption or flow rate that may be
(14) constant or a function of time. The importance
Δx
of equation (20) is that it enables to separate or
t decouple the pipelines of complex networks in
2 (1− θ 2 ) gAΔt H i+1 − H it
( )
d4’ = each node, restoring the flow continuity and the
Δx piezometric head in the node (when there is not
t
−2 ⎡⎣θ1Qi+1 + (1− θ1 ) Qit ⎤⎦ storage nor singular losses).
(15)
Δt
d4 = d4’ + t
.
( )
Qi+1 COUPLING EQUATIONS
AΔx
⎡(1− θ ) Q t − (1− θ ) Q t ⎤ Equations (10) to (19) and (20) can be used to
⎣ 2 i+1 2 i ⎦
construct a diagonal band system of dimensions
2X(N+1) -see Figure 3, which can be efficiently
a 2θ 2
c1 = (16) converted into a tri-diagonal system and then solved
Δx using the Thomas algorithm [17]. Figure 3 shows
the system of equations for a pipe divided into N
t t
c2 =
(1− θ1 ) gA − gθ 2 (Qi + Qi+1 ) reaches, where the first and last rows correspond to
Δt 2Δx
(17) H Pt+Δt value (equation 20) of each boundary node.
The remaining rows are generated from application
t t of the equations (10) and (11) in each pipe reach.
c3 = +
(
gAθ1 gθ 2 Qi + Qi+1 ) (18) All coefficients have a superscript that identifies the
Δt 2Δt reach number (for example, in c12 the superscript 2

310
John Twyman Q.: Water hammer analysis using an implicit finite-difference method

indicates that c1 is calculated using the reach 2 data). of approaches have been proposed for the friction
This indication is relevant because the state variables term of the dynamics equation, standing out the
may vary from one reach to another. For this reason, following approximation due to its general form [13]:
the matrix will not be always simmetrical although its
structure has a form of bands, as shown in Figure 3.
Each system of equations will have a different size
∫ Q Q dx = Qit Qit Δx + ε (Qit+Δt − Qit ) Qit Δx (21)
according to the number of reaches assigned to each
pipe. Once the network is disconnected, it generates Where dx = variation of x. The approximation given
a system of linear equations for each pipe of the by equation (21) can be represented in the dynamics
network. The calculation of the state variables is equation (10) by the IFDM as follows [22]:
realized in each pipe independently from the rest.
The algorithm works as follows for every pipe of θ 2 Qit + Qi+1
t
the system: d1 = 2 (1− θ1 ) −
( Δt ) +
AΔx
(22)
fav Δtε Qit + Qi+1
t

4SA

θ 2 Δt Qit + Qi+1
( t
)+ f av Δtε Qit + Qi+1
t
d2 = 2θ1 + (23)
AΔx 4DA

2θ 2 gAΔt
d3 = (24)
Δx
Figure 3. Band diagonal system for a pipe with N
reaches. t
(1− θ 2 ) 2gA ( H i+1 − H it ) Δt
d4 =
Δx
a) t = t + Δt t
− 2 ⎡⎣θ1Qi+1 + (1− θ1 ) Qit ⎤⎦ +
For each internal node i: Δt
(Qit + Qi+1
t
⋅ )
H it+Δt
and Qit+Δt for i = 2 to N using AΔt
• Compute
⎡(1− θ ) Q t − (1− θ ) Q t ⎤ + (25)
equations 10 to 19 arranged according to Figure 3. ⎣ 2 i+1 2 i ⎦
• Compute H Pt+Δt for each network node using
equation 20. fav Δt Qit + Qi+1
( t
Qit + Qi+1
t
) −
• Solve the system of equations (Figure 3) and 4DA
reassign doing H it = H it+Δt and Qit = Qit+Δt for
fav Δtε Qit + Qi+1
(t
Qit + Qi+1
t
)
i = 1 to N +1.
4DA
b) Back to a) until complete the simulation time.
Equation (21) provides an excellent way for
TERM RQ|Q| analyzing the effect of the friction factor on the
transient simulation [13]. It is suitable to adopt ε
Friction always acts against the direction of flow = 1.0 in equation (21) to obtain greater numerical
(reversal) and it must change its sign accordingly. stability, because when f value is high, instabilities
The effect of friction is expressed in terms of Q2 can be produced whenever Cn = 1.0 [11]. Hence the
in the basic differential equations, and it does not approximation of RQ|Q| using ε = 1.0 ensures a more
fulfill this requirement. Such difficulty can be stable value which is independent of f [11]. Wylie
eliminated by writing Q2 as Q|Q| which has the [28] has recommended the application of equation
same magnitude as just mentioned and it changes its (21) with ε = 1.0 to obtain an improved alternative,
sign automatically as flow reverses [20]. A number with only a minor penalty in computational effort.

311
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

Nevertheless, some authors [13] indicate that [4]. Brunone’s approximation has significantly
values of ε near 0.85 are almost optimal for most improved modeling of unsteady friction, and the
applications. The main advantage of equation (21) is decay coefficient k can be analytically deducted
which weighting term ε influences the friction factor from Vardy and Brown’s shear decay coefficient C*,
without requiring the discretization (Δx, Δt or a) obtaining with this procedure an unsteady friction
to be changed [13]. Hence, equation (21) provides model using a variable k based on instantaneous
an excellent way of assessing the sensitivity of a local conditions [25]. In general, equation (26) can
transient simulation to friction values. For example, be represented in the dynamics equation (2) by the
if two values of ε produce significantly different IFDM as follows [22]:
results, the MOC (or IFDM) grid is too coarse,
and smaller time step is required [13]. Finally, is θ 2 Δt Qit + Qi+1
( t
)+
convenient to state that the friction term analyzed d1 = 2 (1− θ1 ) −
AΔx (27)
in this section comes from stationary state that
introduces progressive distortion in the modeling of +k ⋅ ⎣(1− θ1 ) − θ 2Cn ⎦ ⋅ sign (Q )
⎡ ⎤
the phenomenon towards the middle and end cycles
of the transient wave, both in amplitude and phase. θ 2 Δt Qit + Qi+1
( t
) + k ⋅ [Q + Q C ] ⋅ sign (Q) (28)
d2 = 2θ1 + 1 2 n
AΔx
TRANSIENT FRICTION FACTOR
2θ 2 gAΔt
Another related problem with dynamics equation d3 = (29)
referrers to the determination of f, since the values Δx
of the friction factor of each pipe could affect the
t
magnitude of the water hammer pressures. In this 2 (1− θ 2 ) gAΔt H i+1 + H it
( )−
d4 =
sense some authors have stated a number of ways Δx
to determine f, going from theoretical approaches t Δt
up to others of practical nature. Among theoretical −2θ1Qi+1 + (1− θ1 ) Qit + Qit + Qi+1
( t
⋅ )
AΔx
methods highlights the following equation for j
modelling the transient friction factor [4]: ⋅⎡⎣(1− θ 2 ) Qi+1 − (1− θ 2 ) Qij ⎤⎦ +
(30)
fav Δt ⎡⎣Qit + Qi+1
t ⎤ t t
⎦ Qi + Qi+1
kD ⎛ ∂V ∂V ⎞
ft = fst + 2 ⎜ − a ⎟ (26) + −
V ⎝ ∂t ∂x ⎠ DA
t
−k ⎡⎣θ1Qi+1 + (1− θ )⎤⎦Qit +
Where ft = transient friction factor; x = axial
coordinate and k = decay coefficient which is
dependent on maximum piezometric heads (respect
( t
+kc1 1− θ 2 ⎡⎣ Qi+1 )
− Qit ⎤⎦ ⋅ sign (Q )

to the steady−state value). It must be noticed that


Where:
whenever k = 0 in equation (26), the friction factor
corresponding to steady state (fst) is obtained. In ⎛ Q t + Q t ⎞
equation (26) three parameters have to be estimated: sign (Q ) = sign ⎜⎜ i i+1
⎟⎟
the characteristic roughness size η (Colebrook- ⎝ 2A ⎠
White equation for fst), a and k [4]. Is important
to note that Colebrook-White’s formula is limited MODELING OF SHORT PIPES
to the range of the Reynolds’ number (Re) in the
transition regime (where both, Re and the pipe’s Water distribution systems (WDS) contain many
relative roughness have influence on the friction pipes with a great variety of lengths and wave
factor). In flow with Re > 2105 and rough pipes is speeds. MOC requires that each pipe has at least
suitable to apply the second formula of Karmann- one sub-section (N = 1) as a precondition to
Prandtl. The estimation of fs must be carried out discretize the pipe network from a common Δt to
taking into account both the pressure and discharge all pipes. However, the adopted discretization can
data in a steady-state condition, the periodicity of affect stability and/or convergence of MOC by not
pressure waves and the damping of pressure peaks ensuring that all sections of the network have Cn

312
John Twyman Q.: Water hammer analysis using an implicit finite-difference method

= 1.0. This can worsen when there are relatively E5 = c1 + c3 Bc2 (39)
“short” pipes limiting the magnitude of Δt and N,
so that the most pipes are discretized with Cn < 1.0, E6 = −c4 − c2Cc1 − c3Cc2 (40)
forcing the application of interpolation processes
that can degrade the solution or to make adjustments Known Qext1 and Qext2 is possible to obtain the
to the wave speed which means modify the initial t+Δt
piezometric heads H P1 t+Δt
and H P2 for Δt applying
conditions of the problem. Alternatively, some equations (33) and (34) in (31) and (32).
authors [12-13] propose to replace the shortest pipe
of the network for a mathematical representation EXAMPLE OF APPLICATION 1
called “pipe replacement element” PRE (Figure 4)
for obtaining a greater Δt without altering the The single pipe apparatus [3] used for investigating
optimum conditions of stability and convergence water hammer waveforms comprises a metal
of MOC. PRE can be represented as lumped inertia (copper) pipeline of length 37.2 m, 22 mm
element (PRE-LIE) or as finite difference (PRE- internal diameter and 1.6 mm wall thickness that
FD) approximation [22]. This last option works is upward sloping (Figure 5). The transient event
with the following equations taking into account is generated by a rapid closure of the downstream
the equation 20 [22] -see Figure 4: end valve. The apparatus is installed in Robin
hydraulic laboratory of the Department of Civil
and Environmental Engineering at the University
of Adelaide [3]. The initial flow velocity is V0
= 0.2 (m/s), static head in the tank 2, HT = 32
(m), valve closure time Tc = 0.009 (s), and water
Figure 4. PRE (Finite Difference approximation). hammer wave speed a = 1319 (m/s). The number
of reaches for each computational run is N = 32,
and the time step (Δt) = 0.00088135 (s).
t+Δt
H P1 = Cc1 − Bc1 ⋅Qext1 (31)

t+Δt
H P2 = Cc2 + Bc2 ⋅Qext 2 (32)

With:

E2 E6 − E 3 E5
Qext1 = (33)
E2 E4 − E1E5
Figure 5. Single pipe apparatus [3].
E3 − E1Qext1
Qext 2 = (34)
E2

Where Ei (i = 1, …, 6) are explicit coefficients which


are dependant of di (i = 1, …, 4) -see equations (12)
to (15), as follows:

E1 = d1 + d3 Bc1 (35)

E2 = d2 + d3 Bc2 (36)

E3 = d4 + d3Cc1 − d3Cc2 (37)


Figure 6. Results obtained by MOC and IFDM
E4 = −c1 − c2 Bc1 (38) when Cn = 1.0 (pipe midpoint).

313
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

Figure 7. Results obtained by MOC and IFDM Figure 9. Results obtained by IFDM (Cn = 0.5)
when Cn = 1.0 (valve). and exact solution (pipe midpoint).

Comparison between MOC and IFDM


Figures 6 y 7 compare the pressure vs. time curve
at the pipe midpoint and in the valve when the
transient flow is analyzed using both MOC and
IFDM (θ1 = θ2 = 0.501) with Cn = 1.0.

The average error in Figures 6 and 7 between the


results obtained by MOC and IFDM is just +0.4%
and +0.8%, respectively. In this case the computation
runtimes were: MOC = 3.3 (s) and IFDM = 15.9
(s). The software was carried out a PC with CPU Figure 10. Results obtained by MOC (Cn = 0.5) and
N280 @ 1.66 GHz. exact solution (valve).

Figures 8, 9, 10 and 11 compare the pressure vs.


time curve at the pipe midpoint and in the valve
when a transient flow is analyzed using both MOC
and IFDM (θ1 = θ2 = 0.550) with Cn = 0.5. In all
cases, the results are compared with exact solution
(MOC with Cn = 1.0).

Comparison between f steady and f transient


Figures 12 and 13 compare the pressure vs. time
curves when a transient flow is analyzed using

Figure 11. Results obtained by IFDM (Cn = 0.5)


and exact solution (valve).

MOC with f steady (fs) and IFDM with f transient


(ft) and θ1 = θ2 = 0.515.

Comparison between RQ|Q| and RQP|Q|


Tables 1 and 2 show a comparison of maximum and
minimum pressures when both MOC and IFDM (θ1
= θ2 = 0.510) are applied using the frictional term
Figure 8. Results obtained by MOC (Cn = 0.5) and approximated by RQ|Q| (ε = 0.0) and RQ|Q| (ε =
exact solution (pipe midpoint). 1.0) – see equation (21).

314
John Twyman Q.: Water hammer analysis using an implicit finite-difference method

EXAMPLE OF APPLICATION 2

Figure 14 shows the single pipeline which will be


used to verify the application of the PRE [30]. The
pipe network in Figure 14 consists in a single pipe
leading from a reservoir to a valve.

Figure 12. Results obtained by MOC (f steady) and


IFDM (f transient) in the pipe midpoint
(Cn = 1.0).
Figure 14. Single pipeline [30].

The input data for the problem are: L = 600 (m),


Q0 = 0.477 (m3/s), a = 1,200 (m/s), D = 0.5 (m), f =
0.017, HR = 150 (m). The valve closes in Tc = 2.1
(s) and its closure curve is defined by [30]:
1.5
⎛ t ⎞
τ = ⎜1− ⎟ (41)
⎝ Tc ⎠

Figure 13. Results obtained by MOC (f steady) and For analysis purposes, the initial pipe length was
IFDM (f transient) in the valve (Cn = 1.0). divided into three parts, and Table  3 shows the
adopted discretization in this case when Δt = 0.010
(s). Because pipe 2 is too short relative to pipes 1
Table 1. Maximum pressures comparison between
and 3, is convenient to replace it by a PRE in order to
MOC ( RQ|Q|, ε = 0.0) and IFDM (RQP|Q|,
avoid solving the problem using a too small time step.
ε = 1.0) when Cn = 1.0.
Maximum Pressure (m)
Table 3. Discretization for the single pipeline.
MOC IFDM
Node Pipe L (m) N Δx (m) Cn
RQ|Q| RQP|Q| RQ|Q| RQP|Q|
1 270 22 12.3 0.98
ε = 0.0 ε = 1.0 ε = 0.0 ε = 1.0 2  60  5 12.0 1.00
Midpoint 58.84 58.84 58.84 58.84 3 270 22 12.3 0.98
Valve 58.88 58.88 58.87 58.87

Figure 15 shows the response in the system when


Table 2. Minimum pressures comparison between
pipe 2 is replaced by a PRE, where it is possible
MOC (RQ|Q|, ε = 0.0) and IFDM (RQP|Q|,
to appreciate that the solution with PRE exactly
ε = 1.0) when Cn = 1.0.
coincides with the solution without PRE, even
Maximum Pressure (m) though the use of the PRE allowed to optimize
MOC IFDM the solution because it helped to re-discretize the
Node network (table 4) when Δt = 0.045 (s). Replacement
RQ|Q| RQP|Q| RQ|Q| RQP|Q|
of pipe 2 by a PRE allowed reduce the size of N
ε = 0.0 ε = 1.0 ε = 0.0 ε = 1.0 and increase the magnitude of Δt, allowing reduce
Midpoint 5.30 5.29 5.31 5.31 the execution time of the program from 26.4 (s)
Valve 5.26 5.26 5.27 5.27 to 5.8 (s).

315
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

create instabilities that can increase artificially the


numerical attenuation of the transient friction [25].
For this reason, the results obtained by the transient
f should be considered with caution. In the case of
the frictional term RQ|Q|, the IFDM obtains the
best solution when θ1 = θ2 = 0.510 (tables 1 and
2). Analyzing the results obtained using equation
(21) with ε = 0.0 and ε = 1.0 it verifies that the
friction factor influence on the results is irrelevant
because the differences in each and other case are
very small. For that reason, in this case the adopted
Figure 15. Results obtained by MOC (without PRE) grid (Δx, Δt) is adequate and a smaller time step is
and IFDM (with PRE) at the valve. not required. In example 2, the use of the two-node
boundary condition called PRE allows reaching a
more efficient and near-to-exact solution when θ1
Table 4. Re-discretization for the system. = θ2 = 0.500 (Figure 15). Some authors [30] have
Pipe L (m) N Δx (m) Cn recognized that the PRE can be used to know the
transient response of a system in which excessively
1 270 5 54.0 1.00
short tubes slow the program execution because of
PRE  60 1 60.0 –
the time step becomes smaller and the simulation
3 270 5 54.0 1.00
requires a greater amount of computational memory.
The general conclusion is that the IFDM must adopt
CONCLUSIONS different values for θ1 and θ2 depending on the
case, which forces to analyze each case separately
IFDM constitutes a useful tool for simulating the applying a trial and error procedure that can make
water hammer in pipe networks. Nevertheless, it the analysis slow and cumbersome. The need to
spends more computational memory and takes adopt different values of θ1 and θ2 to obtain the best
longer to complete the execution simulation time. solution in each analyzed case allows the conclusions
A main disadvantage of IFDM is that it must be of Arfaie and Anderson [2], who affirm that better
applied using different combinations of θ1 and θ2 results are obtained when the IFDM is applied
to achieve the best result. In example 1, when Cn using fixed values for the weighting factors equal
= 1 the IFDM gets a near-to-exact solution when to 0.500 and 0.515. Although these last values allow
θ1 = θ2 = 0.501 (Figures 6 and 7). When Cn = 0.5, control the spurious numerical peaks that appear in
IFDM obtains a smaller numerical attenuation with the IFDM when very fast transients are simulated,
respect to the MOC when θ1 = θ2 = 0.550 (Figures 8 this article shows that a more exhaustive analysis
to 11). IFDM obtains a result with transient f similar is required in each case.
to that reported in the literature [3] when θ1 = θ2 =
0.515 (Figures 12 and 13). In this case the transient REFERENCES
f was applied in tandem with the formulation for
variable f [8]. It is found that transient friction factor [1] I. Abuziah, A. Oulhaj, K. Sebari and D.
generates an attenuation of pressure, being anyway Ouazar. “Simulating Flow Transients in
a less conservative but closer to reality solution Conveying Pipeline Systems by Rigid Column
according to the results reported by some authors and Full Elastic Methods: Pump Combined
[3, 4, 25]. In other words, the simulation results with Air Chamber”. International Journal
show that the steady friction model underestimates of Mechanical, Aerospace, Manufacturing,
the damping observed in the experimental results. Industrial Science and Engineering. Vol. 7,
Additionally, the steady friction model does not Issue 12, pp. 1330-1336. 2013.
predict the evolution of the shape of the pressure [2] M. Arfaie and A. Anderson. “Implicit
oscillations, demonstrating steady friction’s inability Finite-Differences for Unsteady Pipe
to model frequency-dependent attenuation [3]. Flow”. Math. Engng. Ind. Vol. 3, Issue 2,
MOC use within a rectangular space-time grid can pp. 133-151. 1991.

316
John Twyman Q.: Water hammer analysis using an implicit finite-difference method

[3] A. Bergant, A. Tijsseling, J. Vítkovský, D. [14] Y. Kim. “Advanced Numerical and


Covas, A. Simpson and M. Lambert. “Further Experimental Transient Modeling of Water
Investigation of Parameters Affecting and Gas Pipeline Flows Incorporating
Water Hammer Wave Attenuation, Shape Distributed and Local Effects”. School of
and Timing Part 2: Case Studies”. Journal Civil, Environmental and Mining Engineering.
of Hydraulic Research. Vol.  46, Issue 3, PhD Thesis. The University of Adelaide.
pp. 382-391. July, 2008. Australia, pp. 146. 2008.
[4] B. Brunone, B.W. Karney, M. Mecarelli [15] A. Malekpour, B.W. Karney. “Spurious
and M. Ferrante. “Velocity Profiles and Numerical Oscillations in the Preissmann
Unsteady Pipe Friction in Transient Flow”. Slot Method: Origin and Suppression”.
Journal of Water Resources Planning and Journal of Hydraulic Engineering. ASCE,
Management. Vol. 126, Issue 4, pp. 236- pp. 12. 2015.
244. July/August, 2000. [16] R.O. Salgado. “Revisión de los Métodos
[5] M.H. Chaudhry “Applied Hydraulic Numéricos para el Análisis del Escurrimiento
Transients”. Van Nostrand Reinhold. 1st Impermanente en Redes de Tuberías a
Edition. New York. USA, pp.  266. 1979. Presión”. XV Congreso Latinoamericano de
ISBN 10: 0-442-21517-7. Hidráulica, AIHR, AIIH, IAHR. Cartagena,
[6] M.H. Chaudhry “Numerical Solution of Colombia. 1992.
Transient-Flow Equations”. Proc. Speciality [17] R.O. Salgado, J. Zenteno, C. Twyman and J.
Conf. Hydraulics Division, ASCE Jackson, Twyman. “A Hybrid Characteristics-Finite
MS, pp. 633-656. August, 1982. Difference Method for Unsteady Flow in
[7] M.H. Chaudhry and M.Y. Hussaini. “Second- Pipe Networks”. International Conference
Order Accurate Explicit Finite-Difference on Integrated Computer Applications for
Schemes for Waterhammer Analysis”. Journal Water Supply and Distribution. De Montfort
of Fluids Engineering. Vol. 107, pp. 523-529. University. Leicester. UK, pp. 139-149. 1993.
April, 1985. [18] H.M.V. Samani and A. Khayatzadeh.
[8] J.J.J. Chen and A.D. Ackland. “Correlation “Transient Flow in Pipe Networks”. Journal
of Laminar, Transitional and Turbulent Flow of Hydraulic Research. Vol.  40, Issue 5,
Friction Factor”. Proc. Instn. Civ. Engrs. Part pp. 637-644. May, 2001.
2, 89. 573-576. December. 1991. [19] M. Sepehran and M.A. Badri. “Water Hammer
[9] M.S. Ghidaoui, M. Zhao, D.A. McInnis, D.H. Simulation by Implicit Finite Difference
Axworthy. “A Review of Water Hammer Scheme Using Non-Symmetrical Staggered
Theory and Practice”, Applied Mechanics Grid”. Recent Advances in Fluid Mechanics,
Review, ASME. Vol. 58, pp. 49-76. January, Heat & Mass Transfer and Biology, pp. 47-52.
2005. ISBN: 978-1-61804-065-7.
[10] D.E. Goldberg and E.B. Wylie. “Characteristics [20] V.L. Streeter and C. Lai. “Water-Hammer
Method using Time-Line Interpolations”. Analysis Including Fluid Friction”. Journal
Journal of Hydraulic Engineering. Vol. 109, of the Hydraulics Division. ASCE. Vol. 88.
Issue 5, pp. 670-683. May, 1983. Paper HY3. 79-111. 1962.
[11] M.B. Holloway and M.H. Chaudhry. [21] V.L. Streeter, E.B. Wylie. “Waterhammer
“Stability and Accuracy of Waterhammer and Surge Control”. Annual Reviews Fluid
Analysis”. Adv. Water Resources. Vol. 8, Mechanics, pp. 57-73. 1973.
pp. 121-128. 1985. [22] J. Twyman. “Decoupled Hybrid Methods for
[12] B.W. Karney. “Analysis of Fluids Transients Unsteady Flow Analysis in Pipe Networks”.
in Large Distribution Networks”. PhD Thesis, Ed. La Cáfila. 1st Edition. Valparaíso, Chile,
University of British Columbia, Canada, pp. 185. 2004. ISBN 10: 956-8142-17-7.
pp. 146. 1984. [23] J. Twyman. “Golpe de Ariete en una Red de
[13] B.W. Karney and D. McInnis. “Efficient Distribución de Agua”. Anales del XXVII
Calculation of Transient Flow in Simple Pipe Congreso Latinoamericano de Hidráulica
Networks”. Journal of Hydraulic Engineering. (IAHR Spain Water & IWHR China). Lima,
ASCE. Vol. 118, Issue 7, pp. 1014-1030. 1992. Perú, pp. 10. Septiembre 2016.

317
Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018

[24] J. Twyman. “Wave Speed Calculation for of Environmental Engineering. ASCE.


Water Hammer Analysis”. Obras y Proyectos, Vol. 131, Issue 8, pp. 1123-1131. August,
UCSC, 20, 86-92, Spring 2016. 2005.
[25] J. Vítkovský, M. Lambert, A.R. Simpson [28] E.B. Wylie. “The Microcomputer and
and A. Bergant. “Advances in Unsteady Pipelines Transients”. Journal of Hydraulic
Friction Modeling in Transient Pipe Flow”. Engineering. Vol. 109, Issue 12, pp. 1723-
8th International Conference on Pressure 1739. 1983.
Surges. BHR. The Hague. The Netherlands. [29] E.B. Wylie and V.L. Streeter. “Network
pp. 13. April 12-14. 2000. System Transient Calculation by Implicit
[26] G.Z. Watters. “Analysis and Control of Method”. 45th Annual Meeting of the Society
Unsteady Flow in Pipelines”. Butterworth- of Petroleum Engineers of AIME. Houston,
Heinemann. 2nd Edition. pp. 368. Boston. Texas. 4-7. Paper Nº 2963. October, 1970.
USA. ISBN 10: 0-250-40492-3. March, [30] E.B. Wylie and V.L. Streeter. “Fluid
1984. Transients”. McGraw-Hill International
[27] D.J. Wood. “Water Hammer Analysis- Book Co. 1st Edition, pp. 206. USA. 1978.
Essential and Easy (And Efficient)”. Journal ISBN 10: 0-07-072187-4.

318

You might also like