Professional Documents
Culture Documents
Second-Order Accurate Explicit Finite-Difference Schemes For Waterhammer Analysis
Second-Order Accurate Explicit Finite-Difference Schemes For Waterhammer Analysis
Second-Order Accurate Explicit Finite-Difference Schemes For Waterhammer Analysis
iVi. H. Chaudhry
Department of Civil
Finite-Difference Schemes for
and Environmental Engineering,
Washington State University,
Pullman, Wash. 99164
Waterhammer Analysis
Three second-order accurate explicit finite-difference schemes—MacCormack's
method, Lambda scheme and Gabutti scheme—are introduced to solve the
M. Y. Hussaini
quasilinear, hyperbolic partial differential equations describing waterhammer
Institute for Computer Applications in phenomenon in closed conduits. The details of these schemes and the treatment of
Science and Engineering,
boundary conditions are presented. The results computed by using these schemes for
NASA Langley Research Center,
Hampton, Va. a simple frictionless piping system are compared with the exact solution. It is shown
that for the same accuracy, second-order schemes require fewer computational
nodes and less computer time as compared to those required by the first-order
characteristic method.
Introduction
Waterhammer phenomenon in slightly compressible liquids the boundary conditions are then given. The results computed
flowing through closed conduits having linearly elastic walls is by using these schemes for the solution of a typical frictionless
described by a set of quasi-linear, hyperbolic, partial differen- piping system are compared with the exact solution.
tial equations. The coefficients of these equations, commonly
Governing Equations. The equations describing waterham-
referred to as waterhammer equations, are constant. Because
mer in closed conduits are [1, 2]:
of the presence of the nonlinear source term representing the
losses due to friction, these equations can only be numerically
H+
integrated. Steep waves or "shocks" may be generated at dif- ' jA~Q* =0 (1)
j Known
Conditions
Nomenclature
a = wave speed
A = cross-sectional areas of At = computational time step
compy -H^A/N x = distance
conduit ;'=1
C n = Courant number = Ax = reach length
N T) = unknown multiplier
aAt/AX
)2/N
D = conduit diameter
/ = Darcy-Weisbach friction
I>, comp,-
LI
-"exac,- X = characteristic direction
dx/dt
factor N = number of computational
g = acceleration due to gravity nodes Subscripts and Superscript
H = piezometric head Q = discharge / = node in x-direction
^comp = computed piezometric head R = f/(2DA) j = time level
H„ exact piezometric head t = time *, ~ = predictor values
/-VALVE
+—(X+e;+X-Q-)+JRQIQI=0. (13) -r
L
Adding equations (11) and (12) and rearranging: \" =5000m
1 Fig. 4 Piping system
H,+- (X + H*+\~ H-)+—--^~.
2 gA
(x + ft + -x-ft-) = o. (14)
H^'=-^[Hj+Ht-At[-^-
;+//,* -At (X+fl? + X-H-)
Equations (13) and (14) are referred to as equations in X-form.
From the viewpoint of partial differential equations, H+ = 1 a
+ (X+Qx+-X"QJ) (22)
Hx = Hx and Q+ = Q~ = Qx. By substituting these rela- 2 gA }•
tionships, it is clear that equations (13) and (14) are identical
to equations (1) and (2). However, this will not be the case if Gabutti Scheme. The Gabutti Scheme (7) is similar to the
we approximate H* and H~, and Qx and Qx by finite dif- Lambda Scheme. In this scheme, the partial derivations are
ferences in different ways. replaced by the finite-difference approximations as follows:
In the Moretti's Lambda Scheme the partial derivaties are Predictor Part. The predictor part is subdivided further into
replaced by the finite-difference approximations (Fig. 1) as two parts. Part 1:
follows: /v(_ Ji Ji—\
Predictor Part Jx (23)
Ax~
2fj-3fU+fU (15)
fi = Ax /*" = (24)
Ax
in which / is used for brevity for Q and H.
/* (16)
Ax By substituting these finite-difference approximations into
equations (13) and (14), the following equations are obtained
in which for brevity / is used for Q and H. By substituting for the predicted values of ft and H::
these finite-difference approximations into equations (13) and
(14), the following equations are obtained for the predicted ft = ft-At\4- — (x + //; -\-H- )
values ft* and H*: v 2 a
and
+
H*=Hj-At[-^-(\+ HI + X - H~) -rir ( X + e * + - x - Q7)\ (26)
Part 2:
+
+^r4r^
2 gA
G;-X- on). (18)
/; =
2 y?-3/1-1+^-2 (27)
Corrector Part Ax
ft-ll-i /,-=- (28)
ft Ax
(19)
By using these finite-differenceAxapproximations, the predicted
values of time derivations Q* and H* are determined from
•2fi' + 3/?+i-f?+2 (20) equations (13) and (14).
Ax
Corrector Part
1 gA 4. Ji J i— 1
ft (29)
Ax
fi+\ ~fi
+ 4 ~ <X+Q*+ + x ~ e * ) + R Q*'2*']) (21) f~x = Ax
(30)
200
1
Q 4 0 0 > -0--0-0 - o -0 -o- -o-- iv o - o - o -o -o- Q j-o-o-o-o-y-
<
UJ
1
300
200
600 T= 5.00 S
J 500 ^-0-0- o - o -o- -o- - o o -o- o* o - o - o - o - -o-o JY-O- o- o- o- o- o- o. O-O- o- a o. JX _ _ 0 - 0 . 0 - Q -Q.-Q.Q SL Q-Q.D_Q_
O 400
<
UJ
X
300
200
4 7 10 13 16 19 I 4 7 10 13 16 19 1 4 7 10 13 16 |9
SECTION SECTION SECTION
S5O0 0--0-0--0-0
a 400 > " 0 " 0 " 0 " 0 " ° " < > " 0 " 0 " 0 " 0 " 0 " J b-o-cro-o-oooo-o-^
uJ
* 300
200
600r T=2.50 S T»2.50 S
• 300
200
I 4 7 10 13 16 19 I 4 7 10 13 16 19 I 4 7 10 13 16 19
SECTION SECTION SECTION
p-O-O-O-O --o-o-o-o
Q 4 0 0 J-O-0-0--0-0-O-0-O-0--0-0--' )-o-o-a-o.4i-o-o-Q-0. t k w ^ ^ , ^
<
O 4 0 0 J-o-o-o-o-o-o-o-'
<
200
600r T=5.00S T= 5.00 S T= 5.00 S
a 400F
<
UJ
x
300
200
4 7 10 13 16 19 I 4 7 10 13 16 19 I 4 7 10 13 16 19
SECTION SECTION SECTION
N,=0.36Nl-- • 0A2NI (37)(i.e., / = 0), then this wave propagates to the reservoir, is
in which the subscripts refer to the order of the method. For reflected as a 100-m high negative wave and travels to the
example, if a second-order method gives an accuracy with N valve where it is reflected again.
= 32, then the same accuracy could be obtained by having N In order to compare the computed results with the exact
= 10 in a fourth-order method and N = 7 in a sixth-order solution, the system was assumed frictionless. Computations
method. Another advantage of the higher-order methods is were done using Courant number equal to 0.5, 0.8 and 1.0.
that they reproduce better and sharper discontinuities in the Boundary conditions, developed by solving the characteristic
solution. equations simultaneously with the conditions imposed by the
boundary and using first-order finite-difference approxima-
tions were used. At the nodes adjacent to the boundary, first-
Results order, one-sided finite differences were used whenever three
The piping system shown in Fig. 4 was analyzed using the points were not available in the Lambda and Gabutti schemes.
above numerical schemes. In this system, pipe length, L = Figures 5-8 show the computed results using each of the
5000 m, wave speed, a = 1000 m/s, pipe cross-sectional area, above schemes and the first-order characteristic method. With
2 3
A = 1 m , initial steady-state flow = 0.981 m /s and H0 = Cn = 1.0 the Lambda scheme produced unacceptable post-
400 m. The transient conditions were produced by instan- shock oscillations and became unstable; while the Gabutti,
taneously closing the downstream valve at t = 0. This instan- MacCormack, and first-order characteristic methods
taneous closure produces a 100-m high wave which travels in produced exact results. There was some smearing of the shock
the upstream direction. If the system is assumed frictionless in the MacCormack Method after the shock was reflected at
: 500
Q 400 i-oo-o-^-o.o- 0 J 0
UJ
1
300-
20O
T=2.44S T = 2.50 S
600
--^-o-o-o-o-o-o r- — XT 0--0- O O- O- O jOO-O-OO-O
J 500
>-CT7.-r-„-° ' " m *
Q 400
<
UJ
x
300
200
600 T=5.00 S T=4.88 S T=5.00S
O 400'
<
UJ
X
300
200
I 4 ? 10 13 16 19 I 4 7 10 13 16 19 I 4 7 10 13 16 19
SECTION SECTION SECTION
Fig. 8 Lambda scheme: comparison of exact and numerical solution