MATHEMATICAL MODELING FOR WATER HAMMER IN PIPE FLOW

Water hammer phenomenon is a transient flow in pipes that was created by rapid changes of velocity in pipelines. This phenomenon can be caused strong positive and negative pressures in water pipelines. Overall, water hammer creates by suddenly closing valves, shutting off or suddenly restarting pumps. In this study, momentum (Euler) and continuity equations of water hammer is numerically simulated using MATLAB software. Sensitivity analysis has been investigated using several variables such as pipe diameter, wave’s velocity and friction factor. Method of characteristics (MOC) has been implemented in this study. Through the results obtained, it has been shown that when using pipe with diameter (1.2m) instead of (1m), the maximum pressure head decreased by 31.5%, and decreased by 47.7% in the case of using (1.4m) instead of (1m). In case of changing the values of friction factors, it has been shown that the maximum pressure head decreased by 0.86% when using the friction factor value (0.008) instead of (0.007), and decreased by 0.81% when using friction factor value (0.009) instead of (0.007). While for the effect of wave's velocity on the pressure head, it has been shown that the maximum pressure head increased by (10.6%) when using the wave's velocity (300 m/sec) instead of (250 m/sec) and increased by (19.13%) when using (350 m/sec) instead of (250 m/sec) and increased by (26.1%) when using (400 m/sec) instead of (250 m/sec). Also, it has been found that the ending section of pipe is the critical zone for water hammer.


Introduction
Transient flow is the transition from one steady state to another in a fluid flow system where the velocity and pressure change rapidly with time [1]. Transient flow occurs in all fluids, confined and unconfined. In a confined system, such as a water pipeline, a sudden change to the flow that causes large pressure fluctuations is called water hammer [2].
The Italian engineer Lorenzo Allievi was the first one who successfully investigate the water hammer phenomenon, which water hammer can be analyzed by two different approaches, rigid column theory which ignores compressibility of the fluid and elasticity of the walls of the pipe, by full analysis including elasticity [3]. The velocity of pressure wave may exceed (1000 m/s) and the values of pressure may fluctuate from very high to very low values. The values of pressure fluctuate from very high to very low, often causing noises and serious damages in pipelines, different forms of cavitation and other negative consequences. Finally giving a new steady state value for the flow under consideration [4].
The causes of water hammer are varied. There are four common causes that usually make large changes in pressure: abrupt power failure at pump station, starting or stopping of pumps, rapid changes in valve setting and unstable pump characteristic curve. Hydraulic systems must be designed to accommodate both normal and abnormal operations and be safeguarded to handle all the above causes [5].
In the present study, momentum (Euler) and continuity equations numerically solved using MATLAB software. PVC-U flexible pipe with multi uplifting pumping station along the pipeline. The flow is unsteady with possibility of water hammer generation such as raped valve closing. Fluctuations of pressure were investigated by changing the pipe diameter, wave's velocity and friction factor for Mandali pipeline system which beginning from Al-Sader Al-Mushtarak in the left of Diyala River (branched from the left of provider Diyala Fixed Dam) to (Wadi abi Naft) for length (54Km). Where the Mandali pipeline project is considered a proposed project to eliminate the water crisis in the city. Sensitivity analysis of the numerical model has been implemented for thorough understanding of the behavior of water hammer phenomenon.

Literature Review
Kodura and Weinerowska [6] presented the results of water hammer phenomenon for chosen experiments (for simple positive water hammer run in pressure pipeline of different diameters, water hammer run in pressure pipeline with the local leak). They conclude that the maximal value of pressure is not always the value of the first amplitude. The maximal value is usually higher than theoretical value obtained from Zukowski's formula in case of diameter extension in the pipeline. But the maximal value of pressure is the value of the first amplitude for the case of diameter contraction in the pipeline, and it is comparable with theoretical value obtained from Zukowski's formula. Mansuri, Salmasi, & Oghati, [7] simulated governing equations of water hammer numerically using MATLAB software. Numerical simulation is based on characteristic method. It has been concluded that with increasing pipe diameter, the pressure fluctuation range would be small. In the other words the transiency of waves would be more and the pressure fluctuation range would remarkably decrease by using shorter pipes. While with wave's velocity increment, the pressure fluctuation range would decrease. It has been concluded that the maximum and minimum pressure occurs at the end of the pipe. Thus, end of the pipe is critical point in design criteria. Chen,, Ren, Xu & Loxton [8] model the problem to mitigate water hammer phenomenon during valve closure by an optimal boundary control problem involving a nonlinear hyperbolic partial differential equations system that describes the fluid flow along the pipeline. The method is based on a combination of the control parameterization method (for discretizing the boundary control function) and the method of lines (for discretizing the fluid flow partial differential equations). Simulation results showed that this approach is very effective at mitigating water hammer. It has been concluded that the simulation results demonstrated the capability of optimal boundary control to significantly reduce flow fluctuation.
In Iraq, Zuhair [9] was one of the first researchers who work on the water hammer using the characteristics method at one pipe at Baiji Water Pipeline. Then, Abd Al-Abbas [10] came later and work on the water hammer using the same method but at four pipes at Najaf -Kufa water supply project. Also, Gubashi and Kubba [11] used approximate method of characteristics for solution of the transient flow situations of water hammer and application on a main pipeline joining the intake and water treatment plant for the residents in Bakhma Dam. A case study is used to simulate the water hammer effect by simulating the sudden closure of a valve at the outlet or sudden shut down of the system along the pipeline. The results of the computer program show the maximum and minimum head occurs in a definite location is in the pipe due to sudden shutdown of the pump in the system.

Governing Equations
Method of characteristics is the commonly used method because of its simplicity and superior performance in comparison with other methods. Its thrust lies in its ability to convert the two partial differential equations (PDEs) of momentum (Euler) and continuity of unsteady flow in pipe systems into four ordinary differential equations that are solved numerically using finite difference techniques [12]. These equations are: The equations express the flow and head for small time steps (∆t) at numerous locations along the pipe sections. Calculations during the transient analysis must begin with a known initial steady state and boundary conditions. In other words, flow and head at time ( ) will be known along with flows and/or head at the boundaries at all times. To find the initial conditions at time zero will be used energy or Bernoulli equation that assumes the total volumetric or mass inflows at any node must equal the outflows. A head loss due to pipe friction can be calculated by using Darcy-Weisbach formula. Now, with method of characteristics and finite difference numerical solution, the equations for interior values of ( ) and ( ) is:

Boundary Conditions
The boundary conditions used to determine the (H) and (V) values at the ends of the pipe. These conditions are:

Reservoir Boundary Condition (upstream end of pipe)
Where a pipe exits from a reservoir, the head (H) assumes the value corresponding to the head of the reservoir water surface.
The (H) is constant, if the water surface elevation is constant in time. If the reservoir water surface elevation changes with time, so too does (H), if the local pipe entrance loss is neglected. This is represented in equation form as: The expression for velocity is: | |

Velocity Boundary Condition (downstream end of pipe)
Assume a valve is closed, so that the velocity decreased linearly from to zero in seconds. The velocity behavior is: ( ) The equation for is: For any value of including zero. " Fig. 1" shows the case study and the limitation of boundary conditions.

Case Study
Since long time, Mandali region within Diyala Governorate suffers from water scarcity for watering orchards and lack of drinking water especially during the summer season. Which led to the shrinking of orchards area that famed of it, and migration of the population from it because the Mandali irrigation channel does not meet the minimum demand of the city water because it is emptied of its importance because of the many abuses when it passed through Muqdadiya city.
So, it became necessary to solve this problem that is through the implementation of the Mandali irrigation project with using pipeline system, which will include the provision of water for irrigation in all seasons of the year for the orchards and fields Mandali.
The length of the project path is (54 Km) from Al-Sader Al-Mushtarak in the left of Diyala River (branched from the left of provider Diyala Fixed Dam) to (Wadi abi Naft) (within the villages of Clans Neda) in the outskirts of Mandali as shown in " Fig. 1 ". The city's population in 2010 is estimated as (29765 capita). This number is taken from the Statistics Division in Diyala Governorate. Design lifetime of the project is (25 year) from 2016 until 2041, with population growth rate is (3%) per year. Then the population in (2041) will be (57447 capita). On assumption that the rate of per capita consumption of water per day is (300 liters). So, the total consumption rate for population is (0.2m 3 /sec).
As for agricultural land that will be irrigated in this project, the estimated area of about (37234 acres), according to the information that has been obtained from the Water Resources Department in Diyala Governorate.
The necessary amount of discharge of farmland is (3.2 m 3 /sec). Therefore, the total discharge for domestic and agricultural purposes is (3.5 m 3 /sec). Circular unplasticized polyvinyl chloride (PVC-U) pipeline will be used in the design of the pipeline path depending on DIN 8062 specifications for (2009). [13] Figure (2) The pipeline transport path

Results and Discussion
The behavior of water hammer on a system including a pipe within variable diameter, friction factor and wave's variable velocity, would be assessed. For this purpose, a code in MATLAB language has been written which in the parameters are allowed to be replaced as shown in " Fig. 3".
This code was applied on a published case study (Gubashi and Kubba, in (2010)) and the results were quite satisfactory as shown in " Fig. 4". The equations of method of characteristics have been solved. The fluctuation of pressure is calculated in 4 statuses (pipe's full length, pipe's 3/4 length, pipe's 2/4 length and pipe's 1/4 length).
In this study, diameters of the pipes that are used is (1m), (1.2m) and (1.4m). The steady state calculations showed that in case of diameter (1m), the pipeline needs (6) pumping stations, while the pipeline needs (3)   According to " Fig. 8", it has been shown that when using pipe with diameter (1.2m) instead of (1m), the maximum pressure head decreased by (31.5%), and decreased by (47.7%) in the case of using (1.4m) instead of (1m). And it could be extracted that within diameter increment the range of pressure design fluctuation decreased and as a result the energy dissipation occurred faster. In the other words, with diameter increment the transiency of flow would dissipate promptly. It is clear that the designer must consider the expenses of the bigger diameter and must prepare the optimized design for decreasing pressure and decreasing expenses of purchasing and setting up the pipeline. Also, when pipe diameter decreases, the number of pumping stations increase. Now, the wave's velocity is variable and other parameters are constant. The values of wave's velocity are (250m/sec), (300m/sec), (350m/sec) and (400m/sec). The constant parameters are: diameter of pipe is (1200mm), friction factor (0.008) and the time of valve closure is (10sec).
The steady state calculations showed that the pipeline system need three pumping station. "Figs. 9, 10, 11 and 12" showed the pressure fluctuations when the waves' velocity equal (250m/sec), (300m/sec), (350m/sec) and (400m/sec) respectively at first pumping station. using (350 m/sec) instead of (250 m/sec) and increased by (26.1%) when using (400 m/sec) instead of (250 m/sec). Again within an exact look at " Fig. " 25 it can be seen that increasing wave's velocity would results in more increasing transiency.  According to " Fig. 17" it is visible that within rougher pipes the range of pressure fluctuation would decrease and energy dissipation would occur much rapidly. In the other words within increasing of (f( ,instability of the water hammer waves would be further Through the results obtained, it has been shown that when using friction factor equals (0.008) instead of (0.007) the maximum pressure head decreased by 0.86%, and decreased by 0.81% when using friction factor value (0.009) instead of (0.007). it is obvious (f) does not have much impact on pressure waves. It is clear that the designer must consider the expenses of the pipeline's roughness and must perpend the optimized design about decreasing pressure and decreasing expenses of purchasing and setting up the pipeline.

Conclusions
From the simulation results of case study we can conclude: 1. The diameter of the pipe has a significant impact on the results of water hammer.
Where when increasing the diameter of the pipe the pressure fluctuations would be small, in other words, that the transiency of the waves would be more. 2. The increment of the wave's velocity would be decrease the pressure fluctuations. 3. The increment of friction factor decrease the pressure fluctuations and energy dissipation would occur much rapidly. In other words within increasing of friction factor, instability of the water hammer waves would be further. 4. Maximum and minimum pressure would occur at the end of the pipe. So that the ending section of the pipe is critical zone for design.

MOC
The Method of Characteristics PVC-U Unplasticized Polyvinyl Chloride DIN Deutsches Institute for Normung Wave celerity (m/sec) ) m Inner diameter of pipe work ( Darcy-Weisbach coefficient Pressure of water in pipes (Pa) Velocity of water in pipes (m/sec) Pressure head of water in pipes (m) ) m/s² Acceleration due to gravity ( Elevation head or potential energy (m) ρ The bulk modulus of density of the fluid