Journal of American Science 2013;9(12) http://www.jofamericanscience.org

Simulation of Water Hammer Oscillations in Single Pipe Line due to Sudden Closure

O. S. Abd El Kawi1,2, H. F. Elbakhshawangy1 and M. N. Elshazly1

1 Egyptian Nuclear Research Center- Egypt 2 Faculty of Engineering – Al Baha University, Saudi Arabia. [email protected]

Abstract: Modeling and simulation are very powerful tools and have become an integral part in the design and development of engineering systems. The objective of this research is to develop a computer program to simulate water hammer oscillations in a single pipe line. A mathematical model has been developed to simulate water hammer in one dimensional single pipe line. A new FORTRAN program called HAM01 is developed to achieve the present work goal. The program is used to predict the discharge and distribution in single pipe line. The predictive results are compared with previous numerical results. The results show the damping of pressure and discharge with time after fast close of the valve. [O. S. Abd El Kawi, H. F. Elbakhshawangy and M. N. Elshazly. Simulation of Water Hammer Oscillations in Single Pipe Line due to Sudden Valve Closure. J Am Sci 2013;9(12):247-380]. (ISSN: 1545-1003). http://www.jofamericanscience.org. 51

Keywords: water hammer, surge pressure, hydraulic transient.

1. Introduction pressurized piping systems) [1]. If sudden velocity Most engineers involved in the planning of and variations are caused in a pipe system, pumping systems are familiar with the terms for example when are shut off or are “hydraulic transient”, “surge pressure” or, in water closed, a pressure wave develops which is applications,” water hammer”. In a hydropower transmitted in the pipe at a certain velocity that is station, the hydro-turbine frequently adjusts the determined by properties and the pipe wall discharge according to the electricity load. In some material. This phenomenon, called water hammer, cases the unit will shutdown in emergency, and the can cause pipe and fittings rupture. The intermediate "water hammer" phenomenon will inevitable happen stage flow, when the flow conditions are changed in the pressure pipeline (penstock).This phenomenon from one steady state condition to another steady may occur in all of pressure pipeline system, often state, is called transient state flow or transient flow; bringing about strong vibration and damage on the water hammer is a transient condition caused by pipeline. Therefore, the calculation of water hammer sudden changes in flow velocity or pressure [2]. plays an important role in the design and operation of Figure (1) shows the water hammer description with a hydropower station (in a broad scope, including all different valve positions.

Figure (1) Water hammer phenomena

Unsteady flow in pipe networks is usually approximates the velocity profiles during the analyzed by means of one-dimensional models. transient flow and computes the actual energy Silva-Araya [3] developed a model to simulate dissipation. The ratio of the energy dissipation at any unsteady friction in transient flow which was tested instant and the energy dissipation obtained by the in simple pipe – valve systems only. The model quasi-steady approximation is defined as the Energy

374 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

Dissipation Factor. This is a time-varying, non- differences. One of these enables the method to be dimensional parameter that is incorporated in the used with much larger integration time steps than are friction term of the transient flow governing acceptable with Trikha’s [7] method. The other, a equations general procedure for determining approximations to Arangoitia Valdivia [4] developed a weighting functions, enables it to be used at mathematical model for the calculation of water indefinitely small times. The method is applicable to hammer considering the energy dissipation. He both laminar and turbulent flows. studied the water hammer produced by the Most of unsteady flow models with unsteady instantaneous closure of a valve, located at the end of friction have been tested in simple pipe systems, a pipe line connected to a constant head reservoir. typically a valve-reservoir system. Recently, some The model consists of linearizing the equations of attempts have been done to apply them in pipe transient flow, to establish an equation similar to the networks. In the present work a mathematical model one corresponding to an oscillatory mechanical has been established to simulate water hammer system and to use this equation as a boundary oscillations in single pipe line. A new computer condition, in the method of characteristics. program has been devolved to solve this model. Zhao and Ghidaoui [5] formulated, applied, and analyzed first and second order explicit finite 2. Mathematical model volume Godunov-type schemes for water hammer A mathematical model to simulate water problems. The finite volume formulation ensures that hammer in one dimensional single pipe line has been both schemes conserve mass and and developed. This is based on schematic diagram produce physically realizable shock fronts. The shown in Figure (2). The numerical set up for the implementation of boundary conditions, such as, present work is described in figure (3).The principles valves, pipe junctions, and reservoirs, within the of conservation of mass and momentum are used in Godunov approach is similar to that of the method of the present model. The following assumptions were characteristics approach. The schemes were applied considered: to a system consisting of a reservoir, a pipe, and a 1. Incompressible flow and constant viscosity valve and to a system consisting of a reservoir, two 2. The convective terms are not considered pipes in series, and a valve. 3. The second order spatial derivative term is not Vardy and Brown [6] presented a method considered. for evaluating wall shear stress from known flow 4. The velocities in the radial direction can be histories in unsteady pipe flows. The method builds neglected. on previous work by Trikha, but has two important

Hin Pressurized Tank Hout

Fast Closed Valve

L

Figure (2): Present work schematic diagram

1 2 3 4 N-2 N-1 N x

Figure (3): Numerical set up

375 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

The mathematical model used in this paper is as Q = flow discharge, ef = energy dissipation follows: factor which is a non-dimensional and time dependent parameter to compute the variation of the Continuity Equation friction losses in space and time. A = pipe cross sectional area, H = pressure static head, f = Darcy-

p p 2 V weisbach friction factor, This parameter is set equal  V   a  0 to one if the quasi-steady approach in transient pipe t x x (1) flow is used. The previous partial differential equations Where: p = pressure intensity, V = mean flow transforms into ordinary differential equations along velocity, a = wave speed, ρ = fluid density, t = time, x characteristics line. Equations5 and 6 are presented as = coordinate axis along conduit length. the following finite difference equations for pressure head H and discharge Q: Momentum Equation 2 j 1 j ta j j V V 1 p fV V Hi  Hi  Qi1  Qi  V   g sin   0 gAx (7) t x  x 2D (2) tfQ j Q j j 1 j tgA j j i i Qi  Qi  Hi 1  Hi  Where: g = acceleration due to gravity, θ = pipe angle x 2DA (8) with respect to the horizontal D = pipe diameter, f = The initial boundary conditions for the Darcy-Weisbach friction factor. above governing equations, which relate to one dimensional flow in a single pipe line with length "L" In most engineering applications, the convective and diameter "D" and subjected to sudden valve p V closure, are imposed as in the following description. V V x x Initial condition: acceleration terms, ( ) and ( ), are very The calculation starts from steady state small compared to the other terms and may be conditions towards transient conditions, so the initial neglected. Therefore by dropping these terms condition refers to steady state conditions: Equation (1 ) becomes: 2 0 H  H 2gdA  p 2 V in out   a  0 Qi  fL t x (3) (9)

,and Equation (2) becomes: 0 H  H H  H  in out i 1x i in L V 1 p fV V ,   g sin    0 (i=1,2,3,…………,N) (10) t  x 2D (4) Boundary condition: j j Expressing pressures in the pipeline in terms tgA tfQ1 Q1 At x 0, Qj1 Q j  H j H j  , H j1  H of the piezometric head, above a specified datum, and 1 1 x 2 1 2DA 1 in using the discharge, Q = VA, instead of the flow velocity and considering the energy dissipation factor 2 j1 j1 j ta j j in the equation of momentum. Equation (3) becomes: At x  L , QL  0, HL  HL  QLx QL  gAx 3. Program Algorithm H a 2 Q   0 The following steps describe the program algorithm: 1. Start program, t gA x (5) 2. Read the following input data : ,and equation (4) is modified as:  Length of the pipeline. Q H fQ Q  Diameter of the pipeline.  gA  e f  0 t x 2DA (6)  Inlet level and outlet level. Where:  Frictional coefficient.

376 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

 Wave velocity. pulse maintain at maximum and minimum water  .Total number of nodes. hammer pressure.  Time of finishing calculation. Figure (7) shows the change in water flow 3. Compute time step and cell width. discharge at the last 25 meter in the pipe line end 4. Calculate steady state and initial conditions. with different time at (0, 1, 2, 3,4,5,6, and 7 seconds). 5. Calculate transient state and boundary At the beginning the flow rate is constant on the conditions. whole conduit. The water hammer starts after one 6. Output data for a certain node. second of valve sudden closure and the flow change 7. If the time less than time of finishing calculation its magnitude and direction. Consequently the go to step 5 or go to step 8. fluctuation in direction and magnitude increases. 8. Output the variation of the head and flow rate The present work model results are in good with the change in pipe length. agreement with the results obtained by Li Jinping et 9. End program. al [8].

0 2 4 6 8 4. Results and discussion 2000 2000 The numerical results obtained by Li Present Work .Jinping et al [8] was used for the verification of the Refrence [9] mathematical model which is generalized in a single 1000 1000 pipe system with vale fast closure. The pipe length is ) O

600m, with diameter 1m. The results will be 2 H

compared to verify the validation of the simulation of m (

, 0 0 e water hammer. The initial condition is that, the r u s upstream pressure is 150m, and the downstream s e r pressure is about 143.45m. The acceleration of P 2 gravity is 9.806m/s and the velocity of the water -1000 -1000 hammer wave is 1200m/s. During the simulation, the friction is ignored, that is to say, taking the water as an inviscid flow. Boundary conditions of the -2000 -2000 numerical simulation are taken as described in the 0 2 4 6 8 previous section. Time , (s) Figure (4) shows the pressure fluctuation at Figure (4): Pressure fluctuations at the pipe line the outlet of pipe. Fair agreement between the present outlet model results and the numerical results obtained by 0 2 4 6 8 Li Jinping et al [8] for pressure fluctuation at the 30 2000 outlet of pipe with time is noticed. Present Work Refrence [9] Figure (5) shows a comparison between the 20 result of present model and results obtained by Li 1000 Jinping et al [8] for average cross-section velocity at ) s / the inlet. Good agreement in direction and magnitude 10 m (

,

for fluctuation of average cross-section velocity at the y 0 t i c o inlet with time is observed. l e 0 Figure (6) shows the present work results for V the change of pressure distribution at the last 25 -1000 meter at the pipe line end with different time at (0, 1, -10 2, 3,4,5,6, and 7 seconds). The pressure fluctuation at the outlet of pipe line is cleared. From the pressure -20 -2000 fluctuation at the outlet of pipe, we can know that, 2 4 6 8 the maximum and minimum water hammer pressure Time , (s) is very consistent at the first propagation stage of Figure (5): Water velocity fluctuations at the inlet water hammer wave. But with the time increasing (the water hammer is propagating), there has occurred a slight distortion when pressure fluctuating

377 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

Present model output

143.7 1900 1800 143.68 1700 143.66 1600 143.64 1500 143.62 1400 143.6 1300

143.58 1200 1100 143.56 1000 143.54 1 900 0 143.52 1 800 580 585 590 595 600 143.5 0 700 143.48 580 585 590 595 600 600 500 143.46 400 143.44 300 0 s 200 100 1 s

100 1900 0 1800 -100 1700 -200 1600 -300 1500 -400 1400 -500 1300 -600 1200 -700 1100 -800 1000 1 -900 0.5 900 -1000 1 0 -1100 800 0.5 582 584 586 588 590 592 594 596 598 600 -1200 700 -1300 0 600 -1400 582 584 586 588 590 592 594 596 598 600 500 -1500 400 -1600 300 -1700 200 2 s 100 3 s

1900 1900 1800 1800 1700 1600 1700 1500 1600 1400 1500 1300 1400 1200 1100 1300 1000 1200 900 1100 1 800 1000 0.5 700 1 900 0 600 0.5 582 584 586 588 590 592 594 596 598 600 800 500 0 400 700 582 584 586 588 590 592 594 596 598 600 300 600 200 500 100 400 4 s 300 200 100 5 s

100 1900 0 1800 -100 1700 -200 1600 -300 1500 -400 1400 -500 1300 -600 1200 -700 -800 1100 -900 1000 1 -1000 1 900 0.5 -1100 0.5 800 0 -1200 0 700 582 584 586 588 590 592 594 596 598 600 -1300 582 584 586 588 590 592 594 596 598 600 600 -1400 500 -1500 400 -1600 300 -1700 200 6 s 100 7 s

Figure (6): The change of pressure distribution at the last 25 meter at the pipe line end with different time

378 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

Present model output

0

-1

-2

-3

-4

1 1 -5

0 0 -6 580 585 590 595 600 580 585 590 595 600 -7

-8

-9

-10

-11 11.488 -12 0 s 1 s

11 0

10 -1

9 -2

8 -3

7 -4

1 6 1 -5 0.5 0.5 0 5 0 -6 582 584 586 588 590 592 594 596 598 600 582 584 586 588 590 592 594 596 598 600 4 -7

3 -8

2 -9

1 -10

0 -11 -1 -12 2 s 3 s

11 0

10 -1

9 -2

8 -3

7 -4

1 6 1 -5 0.5 0.5 0 5 0 -6 582 584 586 588 590 592 594 596 598 600 582 584 586 588 590 592 594 596 598 600 4 -7

3 -8

2 -9

1 -10

0 -11 -1 -12 4 s 5 s

11 0

10 -1

9 -2

8 -3

7 -4

1 6 1 -5 0.5 0.5 0 5 0 -6 582 584 586 588 590 592 594 596 598 600 582 584 586 588 590 592 594 596 598 600 4 -7

3 -8

2 -9

1 -10

0 -11 -1 -12 6 s 7 s Figure (7): The change in water flow discharge at the last 25 meter at the pipe line end with different time

5. Conclusion single pipe line when valve fast close. A new The present work creates a mathematical FORTRAN program called HAM01 was developed to modeling and numerical simulation of water hammer in achieve the present work goal. The program is used to

379 Journal of American Science 2013;9(12) http://www.jofamericanscience.org

predict the discharge and pressure distribution in single References pipe line. The results of the modeling and simulation 1. KSB Know–how, volume 1, Water Hammer, may be briefly summarized as: KSB Aktiengesellschaft, Johann-Klein-Strabe 9, 1. The present work model can be used for 67227 Frankenthal, Germany,2010. simulation of water hammer in single pipe line 2. J. S. Acuña, “ Generalized Water Hammer when valve fast close. Algorithm For Piping Systems With Unsteady 2. The present model describes the pressure Friction”, Master of science in mechanical fluctuation and the discharge fluctuation through engineering University of Puerto Rico Mayagüez the pipe line at different time. Campus ,2005. 3. W.S. Araya, “Energy Dissipation in Transient Nomenclature Flow”, Ph.D. Dissertation, Washington State Symbo Definition Dimension University, Washington, 1993. l Pipe cross sectional area m2 4. Av. Victor, “Disipación de Energía en Flujo A Wave speed m/s Transitorio en Conductos Cerrados”, M. Sc. a Pipe diameter m Dissertation, University of Puerto Rico, D Darcy-Weisbach friction factor - Mayagüez Campus, 2001. f Acceleration due to gravity m/s2 5. M. Zhao and M. Ghidaoui, “Godunov-Type g Pressure static head m Solutions for Water Hammer Flows”. J. Hydr. H Index indicate x-direction - Eng., Vol. 130, (4), 341 – 348, 2004. i Time step index - 6. A.E. Vardy, and, J. M. Brown, “Efficient j Total conduit length m Approximation of Unsteady Friction Weighting L Total node number - Functions”, J. Hydr. Eng., 1097 – 1107, 2004. N Pressure intensity N/m2 7. A. K. Trikha, “An Efficient Method for P Flow discharge m3/s Simulating Frequency-Dependent Friction in Q Time s Flow” J. Eng., Vol. 97(1), 97 – 105, t Mean flow velocity m/s 1975. V Coordinate axis along conduit m 8. Li. Jinping, W. Peng, and Y. Jiandong, " CFD x length kg/m3 Numerical Simulation of Water Hammer in ρ Fluid density . degree Pipeline Based on the Navier-Stokes Equation", V Ө Pipe angle with respect to the European Conference on Computational Fluid horizontal Dynamics, Lisbon, 14–17 June, Portugal, 2010.

11/24/2013

380