Numerical modeling of water hammer in long water transmission pipeline

In the present study, a water transmission pipeline under steady conditions is modeled followed by examining the transient flow created by the failure of pumps in the pipeline. This pipeline is 31 km from the water transmission pipeline of Kerman, Iran. The software analysis results were compared with those of a numerical model for a laboratory test to validate transient flow modeling. While transient flows are created by pump failure, various areas of the water transmission pipelines will be affected by the transient waves produced. Long water transmission pipelines, usually large in diameter and flow rate, will pose problems in the negative pressure phase. The negative pressure causes threatening problems like water column separation and cavitation. The results indicated that using equipment like air valves when the pumps fail alone does not have the appropriate efficiency in eliminating the hazards in the water transmission pipelines. More examination showed that installing equipment like water flow feed and hydropneumatic tanks along the pipeline length in the right places prevents the negative pressure created and the pipeline risk significantly reduces.


Introduction
Supplying high-quality drinking water is one of the most significant human needs and citizenship rights. Hence, the supply, transmission, treatment, and distribution of sanitary drinking water to meet the urban water demands and rural customers are essential responsibilities for governments, and this is done with water transmission lines (Lepono et al. 2003). Water transmission pipelines have several components: pumping stations, supply and storage tanks, and pipelines (Linaweaver and Clark 1964). Due to the high cost of transmission line operation, protection and risk mitigation is mandatory, and one of the most significant hazards is the water hammer phenomenon. The investigation of the occurrence and reflected pressure waves through transients can help discover, characterize, and locate irregularities in water transmission pipelines. Due to rapid variations in the flow field in pressurized systems, the water hammer phenomenon happens by rapid variations in pressurized systems, the fast and transient waves, which endanger the water supply system, occurred by pump failure or the abrupt valve closure. Water hammer can prompt numerous hazards such as pressure waves, pipe rupture, cavitation, and corrosion, breaking the pipes; consequently, it is vital to analyze this phenomenon during both the design and operation phases (EL-Turki 2013).
The most significant equation for transient flow in a pipe is Joukowsky (1898), which later became the base for studying transient flows in pipes (Ghidaoui and Zhao 2005). Various studies connected with factors affecting transient flow and its performance in pipes have been performed. To develop the classical equations of transient flow waves and numerical solution methods, Wylie et al. (1993) and Chaudhry (2014) studied the equations of positive and negative pressure surges caused by water hammer and the factors that cause rapid changes in pipe flow conditions. Simpson and Wylie (1991) studied the effects of the water hammer and the separation of the water column inside the pipes, and Bergant and Simpson (2006) tried to modify the past studies after years. By continuing the study process with further examining the features affecting the transient pressure waves, the pressure wave reflection in viscoelastic pipes was analyzed experimentally and numerically by Meniconi et al. (2012) that the abrupt change of the cross section had been considered. Because the area variation and wave velocity could be associated with the variation of diameter and thickness, some investigators studied the effectiveness of transient tests in the pipe condition assessment. The numerical and experimental test results verify that transient tests in a flexible pipe can detect even a negligible impedance variation.
Several studies have been conducted on the causes of the water hammer phenomenon. The immediate stop of the pump causes pressure surges across the water transmission pipeline. Also, this sudden stop leads to water column separation. Water column separation happens when the hydraulic gradient line is below the pipeline level (Zhang et al. 2019). According to the studies on water transmission pipelines, designers typically use pressure control equipment like air valves and surge tanks (Triki 2017;Karney and McInnis 1992;Vereide et al. 2016). The optimal location of the protective equipment of the transmission pipeline and water supply network was investigated by Yazdi et al. (2019). More specifically, Zhang et al. (2014) and Wan & Zhang (2018) conducted some studies on the risk assessment of long water transmission pipelines based on modern methods of controlling pressure surges using surge tanks. Pressurized tanks have been developed to reduce the potential risk of severe water waves forming inside the pipe. Excessive pressure in one area of the water supply system leads to a change in the operating time of the valves. For instance, after a rapid closing of the valve in a water hammer event, the downstream valve of a pipeline will be subject to high pressure. Meanwhile, when the pump stops working, the pump valve will withstand the least negative pressure in a produced water hammer (IEEE Working Group 1992). The significant point is that pressure control devices can only partially protect the pipeline from pressure surges (Riasi and Tazraei 2017).
Topographic and surface slope positions, in some cases, worsen the dangers of transient flows. Water transmission lines usually pass through some rugged lands, leading to vertical bends in the pipeline. Due to short-term suctions in the bends and release of dissolved air in the water caused by cavitation, the resulting air emerges as small and large moving bubbles or accumulates along the pipe ridgeline in the form of air volumes. (Vasconcelos and Wright 2008). Determining the size and location of the air valves regardless of system characteristics evaluation and selected valve dynamics will not solve the air problem and may lead to destructive phenomena such as water hammers. Some methods control the air within a water transmission line, such as avoiding negative slopes in project line design, additional excavation in some areas to remove natural lumps and subsequently remove slope changes, and accelerating water flow to drive the air masses forward. Nevertheless, the alternative is to use different air valves and avoid the exorbitant costs of excavation and flow acceleration. Air valves improve flow efficiency and reduce energy and maintenance costs (Zhou et al. 2011;Fahraji-Azad et al. 2021). Wu et al. (2015) studied air valve sizes for a water transmission line. They simulated different types of air valves and investigated the effect of water hammers on the transmission line. The result indicated that the two-step closing of an air valve reduces the negative pressure, and the positive pressure is reduced compared to the one-step closing of the air valve. Ramezani et al. (2015) scrutinized how to manage adequate air in water pipelines. They found that the air in water and drainage systems can be trapped under certain conditions, leading to considerable operating detriments if not appropriately controlled.
If the pump stoppage happens in long transmission pipelines, water hammer-controlling devices will not perform adequately, and the negative pressure and the volume of air within large-diameter pipes will be the main problem. Therefore, accurate models should be developed to assess different aspects of transient flow effects, which use characteristics method relations to determine the size and location of transient flow protection devices. In this study, a water transmission line with a large scale was modeled, the control devices are simulated, and possible scenarios to challenge each equipment are evaluated. The effectiveness of each device is also assessed. The most effective control methods for long transmission lines are introduced, and some efforts are made to optimize the location and number of control devices that have led to recognizing the least risky method and the cost reduction.

Governing equations
According to a study by Joukowski (1898), the reason for the pressure rise in the pipe was the changes in velocity and specific weight of the fluid and presented an equation for determining and calculating the velocity of the pressure surge caused by the water hammer. Equation (1) is known as the basic equation of a water hammer (Ghidaoui et al. 2005;Chaudry 2014).
where a is the wave propagation velocity, g the gravitational acceleration, V change velocity, and P the pressure change.
The pressure surge velocity is obtained from Eq. (2).
(1) ΔP = aΔV g Page 3 of 10 140 where is the density of the fluid, E is the modulus of elasticity of the tube, t w is the thickness of the tube wall, and K is the bulk modulus of the bulk. Basic transient flow equations are continuity and momentum equations. Equation (3) shows the coherence for fluid based on the principles of mass survival as follows (Streeter and Lai 1962;Chaudry 2014): where a is the average wave velocity, V is the average velocity in the tube whose direction is parallel to the x − axis , and H is the height of the hydraulic gradient line.
The momentum equation for a fluid can be determined by considering the forces acting on a small element or control volume, including shear stresses created by fluid motion and viscosity. Equation (4)  where f is the Darcy-Weisbach friction factor, D is the diameter inside the tube, and V is the velocity of the fluid.
Transient flow modeling has been done with HAMMER software. HAMMER software uses the characteristic line method to solve the governing equations and can graphically show the characteristic lines that show wave propagation on the time-location plane. The characteristic method is based on the conversion of partial differential equations to ordinary equations. Ordinary differential equations (ODEs) are discretized by the finite difference method (FDM) and solved by computer using numerical methods. The significant point in the numerical solution of equations is to have data on boundary conditions at the downstream and upstream points of the transmission line. In a complex water supply system, multiple pumps, water hammer control protection systems like air tanks, fittings, and various valves are used along the transmission line; thus, the system unknowns increase. For the boundary that has the pump, the characteristic curve of the H-Q pump (head and flow discharge) is used as the boundary condition of the system (Bentley manual 2015; Chaudry 2014).

Area and conditions of the studied water transmission pipeline
The geographical location of the water transmission pipeline in Kerman is in the southeast of Iran. Kerman Province, with geographical coordinates of 21°54' to 59°34' E and 29°26' to 58°31' N and an area of 181,714 km2, constitutes about 11.1% of the total area of Iran. Figure 1 shows the topography of the pipeline, the geographical area, and the location of the pumping station and reservoir in Kerman. The purpose of the project is to supply drinking water, agriculture, and industry of Kerman, Yazd, and Isfahan provinces for the next 20 years. The reason is that the implementation of this project will transfer 580 10 6 m 3 of water from the tributaries of the Karun River to the central plateau of Iran every year. Of this volume, 250 × 10 6 m 3 has been allocated to Isfahan, 150 10 6 m 3 to Yazd Province and 180 10 6 m 3 to Kerman. In this study, the last 31 km of this long water transmission pipeline located near Kerman was analyzed and examined. The flow needed by this pipeline is about 3.3 m 3 /s, the pipes are made of st52 steel with a diameter of 1800 mm, and the tolerable nominal pressure by the pipes is determined to be 30 bars. The pumping station is designed according to the available facilities, the flow rate needed, and the water height head. The last pumping station is about 31 km away from the tank at the end of the route, which is located in Kerman. Overall, 22 centrifugal pumps have been arranged in this station in parallel with two stations to produce the required flow rate and head to check the water transmission pipeline. The pipeline height range from the beginning to the end of the route is 1711.54 m to 1,866.49 m above sea level and its length is 30987 m.

Validation
Brunone laboratory reservoir-pipe-valve model was introduced in 2000 and was later used by other researchers, including Zhao and Ghidaoui, as a reference for developing their numerical method.
The dimensional specifications of the Brunone laboratory test are as follows: the length of the pipe used: 352 m, the pipe diameter: 93.8 mm, and the height of the tank: 15.43 m. Also, the nozzle installed at the bottom is a ball valve. A transient flow is created a pressure surge when the valve suddenly closes inside the pipe. The viscosity is 0.00000114 m 2 /s and the Reynolds number is 58748, suggesting a turbulent flow (Brunoneet al. 2000;Zhao and Ghidaoui 2003). Figure 2 shows the result of comparing the targeted software modeling created in the system examined with the numerical methods used by Zhao and Ghidaoui with acceptable consistency.

Effects of the various factors on the transient flow waves in pipes
In this section, different parameters which impact the shape of the water hammer waves inside the pipe have been investigated. The reservoir-pipe-valve model with the exact specifications of Brunones' test has been used; results are reviewed in an adjacent node to the valve or the middle node of the pipe.

Effects of the valve closing time on the transient flow waves
In this section, a ball valve is considered to demonstrate the effect of valve time closure on pressure wave. The closing time of the valve affects the wave shape in the modeling of transient flows. In order to better represent the impacts of the closing time, the closing times of 0.001 and 1.0 s were applied. Figure 3-a compares the effects of two abrupt valve closing times in the generation of transient waves. As can be observed, by increasing the closing time, higher minimum and maximum values of the waves are reported.

Effects of the friction coefficient on transient flow waves
Energy losses in pipes depend on the pipe material and the velocity profile in unsteady and transient flows. The friction coefficient is dimensionless and can be calculated in several ways. In a steady-state calculation, the heads and flows are computed for each time step in the system. Furthermore, in this case, the friction coefficient is assumed to depend on the mean flow velocity within the pipe, regardless of the flow type (laminar or  The wall expansion of viscoelastic pipes during the water hammer caused the pressure rise damps and the wave velocity in the pipe to decrease. As a result, viscoelastic pipes' pressures are lower than those of solid pipes. Several software programs, such as HAMMER, reduce the wave velocity to simulate the behavior of viscoelastic pipes. Evaluation has been done with the same setting as introduced in the validation section; for comparison, wave velocity was assumed 350 m per second, equal to the velocity within a viscoelastic pipe range, and wave pressure velocity in rigid pipes assumed 1000 m per second. As mentioned above, both of the waves' velocity ranges modeled in the pipe properties so that this method could approximate the impact of viscoelasticity. Figure 3-c depicts the effects of pipe wall damping and wave velocity on the pressure in a reservoir-pipe-valve system. The maximum pressure head in the pipe with a wave velocity of 350 m/s was 40 m, while the maximum pressure head in the pipe with the wave velocity 1000 m/s was 64 m. The significant difference arises from pipe wall property. As can be observed, the pressure wave was damped more rapidly in the viscoelastic pipe because of the pipe wall expansion created during pressure waves. 4. Effects of the valve type on the wave shape of transient flow A butterfly valve regulates the flow by a disk held by a bar in the middle of the valve. Butterfly valves have a short operation time and can be opened and closed by a 90-degree rotation. The inlet size and outlet size have a slight difference, leading to lower pressure loss in butterfly valves than other types of valves. In a butterfly valve, a disk is employed for closure and sealing. These valves are often utilized for the transmission of water and gas through large-diameter pipes. Ball valves can properly interrupt flows. A simple rotation of 90 degrees opens and closes a ball valve. These valves are typically recommended for fully open or fully closed positions and do not suit the regulation of flows since ring seats are used to design ball valve bottoms, and a partially open position would change the valve shape. These harm sealing and lead to leakage. A review of research on the modeling of transient flows through pressure pipes indicated that most studies modeled the flow by using abrupt closing valves. As a result, the pressure wave shape was modeled in the same computational node with a minimal closing time of 0.0001 s, as shown in Fig. 3-d.   Fig. 3 a Effects of the abrupt valve closing time on the transient flow waves adjacent node to the valve, b effects of the friction coefficient modeling factor on transient flow waves in the center of the pipe, c effects of wave velocity and viscoelasticity on the transient flow wave shape adjacent node to the valve, d effects of the valve type on the wave shape of transient flow adjacent node to the valve As can be observed, the two valves had similar performance in terms of pressure wave generation; however, they differed in the minimum and maximum pressures over time. The butterfly valve simulated higher values at negative and positive pressures due to the valves' different function and boundary conditions.

Water transmission pipeline modeling
The pipeline is modeled in Water GEMES software using the available information including ground surface profile and location of height changes, required pipe specifications and material, and the valves used according to the designing criteria. Regarding the flow velocity inside pipes, pressure, and friction drop, the results are in line with the conditions and standards of water supply. The software inputs needed for designing the model are pipe diameter, pipe material, calculation of Hazen-Williams drop and coefficient, height codes of pipeline profile, and H-Q curve (head and flow discharge) of the pumps used. The modeling is based on the steady-state of the flow. To examine the unsteady state of the transient flow, the modeling was transferred to the HAMMER software. In this software, it is possible to customize the coefficient of friction of pipes. Moreover, it is necessary to determine the velocity of the pressure surge and the wave generated in the pipeline, in case the sudden failure of the pumping station is the process of transient flow generation. Ultimately, the critical conditions created in the system affected by the transient flow were examined and the air vapor volume, maximum and minimum pressure, and hydraulic gradient for the computational nodes were analyzed. As previously mentioned, 31 km end of the route (i.e., the distance from the last pumping station to the tank at the end of the route) is examined for transient flow. The computational time for transient flow analysis was set to 300 s so that the pressure waves could travel back and forth in the system. The pressure wave velocity was considered 1200 m/s regarding the pipe material. The coefficient of friction was calculated using an unsteady approach, and the spatial and temporal steps were determined by the software. By examining the volume of air vapor generated and negative pressures, critical conditions like cavitation and separation of the water column can be identified by this modeling. According to the results obtained, the steady flow conditions in the studied pipeline are examined. Moreover, pressure and air volume caused by this event are examined during the process of abrupt cessation of water pumping in the pipe and creating transient flow conditions. Next, by making changes in the diameter of the pipes, as well as using tools like flywheels on the pumps, the pressure and volume of air produced inside the transmission pipeline are examined. Then, the efficiency of protection equipment like air valves, hydropneumatic tanks, and water tanks has been analyzed.
First, the water pipeline was examined without protection equipment to identify high-risk areas of the transmission line. For the first step, after analyzing the results, it was found that the volume of air vapor produced in the transmission pipeline was very high in some parts of the pipeline and its value will reach about 21 m 3 . As can be seen from Fig. 4, there are four critical areas located at 5740, 5860, 15,647, and 25,648 m from the pumping station. Moreover, the maximum pressure head of the generated wave reaches about 30 bars. According to the protection instructions, this value should not exceed 70% of the nominal tolerable pressure of the pipes. Consequently, there is a 9-bar excess pressure in this study. The largest volume of water vapor was created at a distance of 25,664 m from the pumping station. In this area, the length of the pipe section is about 2 km, which reaches 1825 m from a height of 1777 m. Indeed, the volume of air produced in this section has risen to a higher point.
In the second stage, it was tried to examine the effects of decreasing and increasing the diameter of the pipes on the maximum and minimum pressure created by the pressure surge inside the pipe. To this end, this problem was examined with three diameters of 1600, 1800, and 2000 mm with the same pipe material. The modeling results of the pipelines with different diameters are shown in Table 1. This table shows the results of changes in pressure and air volume due to changes in pipe diameter. The volume of vapor created and the maximum transient flow pressure increase with an increase in the diameter and decrease with a decrease in pipe diameter.
In the third stage, the inertia of the pump is increased using mechanical parts of the flywheel as a solution to prevent this phenomenon. The reason is that the separation of the water column is directly related to the speed of failure of the pumping system. The sudden failure of the pump is usually controlled by installing the flywheel between the engine and the speed pump. Thus, a wave is generated at a slower speed in the water transmission system. The results of modeling the pipeline by increasing the inertia of the pump to twice the initial state are shown in Table 2. At this Fig. 4 The air vapor volume generated along the water pipeline transmission without protective equipment Page 7 of 10 140 stage of the test, as the inertia of the pump increases, the maximum wave pressure generated decreases. However, it is not effective enough in reducing the volume of air vapor. Studies have shown that the maximum pressure of the pressure surge decreases by about 20 m of water, but the volume of air vapor does not significantly change.
In the last step, the transmission pipeline was analyzed with protective equipment from a variety of devices like air valves, hydropneumatic pressure vessels, and water supply tanks. The air valves have two small and large holes. The large holes are opened with pressure drop, leading to air injection into the pipe. Then, with an increase in pressure, the large hole closes and the air inside the pipeline goes out from a small hole. When the dewatering line is complete, and under the scenario of pump failure, a water hammer is created in the transmission line path. Thus, air valves alone cannot perform well. Indeed, the large volume of air generated along the pipeline overshadows the efficiency of air valves. The volume of water vapor created by the negative pressure with the air valves was not removed from the water transmission line system. Hence, it is necessary to solve this problem by using other pieces of equipment.
Hydropneumatic tanks and water supply tanks installed in the high points of the water transmission line path are used to reduce the negative pressure and separation of the water column on the pipeline. Hydropneumatic tanks operate in both negative and positive pressure phases: They prevent the water column from rupturing and absorb the increase in pressure. The system has a tank with approximately half the volume of water and the other half compressed air. The compressed air at the top of the tank dissolves in the water over time and its pressure reduces. Also, the small compressor installed in this system compensates for the dissolved air, so that the ratio of air-to-water volume inside the tank remains constant. To compensate for the lack of water flow in the pipeline, hydropneumatic tanks and feed tanks are included at high points of the pipeline topography in the modeling.
According to the length of the water transmission line and the proposed distances of each air valve from other valve according to the instructions, the number of air valves will reach at least 50. Air valves are employed when air is likely to be trapped in the pipeline. This likelihood is maximized during the initial charging of the pipeline. These valves are utilized when the pipes are horizontal and lie at a distance of 600 m. Hybrid valves are used in which air is likely to penetrate or leak at some points in the pipeline. Such valves are recommended to be positioned at pipe lengths with long, negative slopes with a distance of 600 m above ridges with a positive slope and a negative slope, horizontal ridges, or ridges with a zero slope and a negative slope. After using water flow feeding tanks, the required number of air valves efficient enough to eliminate air volume inside the pipes was reduced to 10, leading to more cost-effective results. Figure 5 illustrates protective equipment such as air valves, hydropneumatic tanks, and feeding tanks along the pipeline. Also, Tables 3 and 4 show the characteristics of the tanks are used. It is noteworthy that accurate calculation of the reservoir air volume is critical for designing reservoirs under hydropneumatic pressure. Moreover, the tolerable pressure of the transmission line and the tank must be closed. Due to the design of pressure tanks, designing the volume of hydropneumatic tanks was determined to be 20 m 3 , which is the most optimal possible for this water transmission line. Hydropneumatic reservoir effectively reduces the feed tank volume and installation cost; in the absence of a hydropneumatic reservoir and just utilizing feed tanks to eliminate negative pressures, the volume of the installed feed tank increases.
Positive and negative pressure states along the water transmission line were examined as well. Figure 6 shows the minimum pressure in terms of water head. The results are compared in both cases with protective equipment and  Fig. 5 The location of protective equipment in water transmission pipeline without protective equipment. As can be seen, when the pipeline is without protection equipment, negative pressure travels through the water transmission line, which is recorded up to -10 bars. As a result, this negative pressure will cause the separation of the water column separation and the cavitation phenomenon. By using proper equipment, the minimum transient flow pressure will increase and the separation of the water column will be prevented. With hydropneumatic tanks and feed tanks installed at the high points of the water transmission pipeline, the volume of air generated along the pipeline is affected by these devices. The problem of negative pressure and the water vapor generated in the water transmission pipeline is solved accordingly. Figure 7 shows the hydraulic gradient along the pipeline. The minimum position of the hydraulic gradient line is shown at the time before the protection devices are installed in the pipeline and after the protection devices are considered on the pipeline. Moreover, in Fig. 7, the initial head is the same as the pipeline level. As can be noticed, in most areas of the pipeline, the minimum head in conditions without protective equipment is lower than the initial head of the pipeline, leading to negative pressure. Moreover, the maximum head in these conditions shows a significant difference compared to the minimum head, increasing the risk in the pipeline. Using suitable air valves and tanks, as well as increasing the inertia of the pumps, the minimum pressure increases in all sections of the water transmission line. The maximum head is reduced compared to the state without control equipment and, consequently, the minimum and maximum pressure differences along the water transmission line significantly decline. Thus, pressure fluctuations along the pipeline are significantly controlled. In other words, the positive pressure curve is closer to the pipeline level and the positive pressure reduces, and the negative pressure curve moves away from the pipeline, reducing the probability of a vacuum phenomenon. Hence, the pipeline would be less vulnerable.

Conclusion
In this study, a long water transmission pipeline was examined followed by modeling transient flows and the phenomenon of water hammer by pump failure in the pipeline in four stages. The effects of protective equipment on  6 Minimum pressure changes after using protective equipment Fig. 7 The present simulated results for hydraulic gradient changes along the water pipeline transmission transient flow tubes were examined. Particularly, the negative pressure surge was analyzed during transient flow in a pipeline under pump stop conditions. The main findings can be summarized as follows: • The main problem of long water transmission pipelines with large diameter and high discharge volume in the phenomenon of water hammer is the negative pressure created, which leads to the phenomenon of cavitation and separation of the water column. In these cases, this problem must be prevented by using proper feeding tanks in high places. The volume of air created by the failure of the pumps inside the pipes will be increased to the high points of the pipeline route and thus trapped there. It is necessary to prevent this from happening using the tools required, including water supplies inside the pipes for water delivery to these places. • Air valves cannot perform well when the transmission line is completely dewatered. Under the scenario of pump failure, a transient flow is created in the transmission line. As a result, the line cannot perform well and the negative pressure along the pipeline will not be eliminated. It is noteworthy that the significant volume of air generated in the pipes plays a role in making this event. Moreover, using other protective devices, one can significantly reduce the number of air valves used in the pipeline. • The volume of air generated and the maximum pressure of the transient flow waves caused by the interruption of the pumps change are a function of the increase and decrease in the diameter of the pipes in the water transmission system. Indeed, the larger the diameter, the higher the pressure and volume of air produced will be, and vice versa. • By increasing the moment of inertia of the pump with standard design devices, one can reduce the maximum pressure created. The explanation is that the speed of failure of the pump with a higher moment of inertia is slower than normal. However, this cannot be effective in reducing negative pressure. • As the negative pressure in a large-scale long water pipeline is not eliminated by air valves, the best devices to reduce the negative pressure created in this pipeline pattern are hydropneumatic tanks and water supply tanks installed at high points along the route. Indeed, supplying the discharge with tanks built when the flow is stopped by the pumps is a far more suitable approach compared to the exit of air volume generated in the pipeline.
Funding The authors have no affiliation with any organization with a direct or indirect financial interest in the subject matter discussed in the manuscript. The authors received no specific funding for this work.