1 Introduction

A hydraulic transient, also known as water hammer or hydraulic shock, is a sharp pressure surge or a wave produced when water flow is forced to stop suddenly or change direction abruptly. Power failure of pumps, sudden valve actions and the operation of automatic control systems can cause a high pressure wave to propagate in pipeline systems, including domestic water-supply networks. If the necessary precautions are not taken, the transient conditions instigating high pressures can cause failures of pipes, valves and fittings and thus collapse of the pipeline systems. Hydraulic transients may adversely affect the quality of treated water. Surge tanks, expansion tanks, pressure safety valves or accumulators can be used to ease the impact of water hammer on pipelines and their fittings [1,2,3,4,5,6,7,8,9].

The experimental studies conducted by Weston [10], Carpenter [11] and Carpenter and Barraclough [12] are reported to be the first investigations on determining a correlation between the decrease in flow velocity in a pipe and the corresponding pressure surge. Frizell [13] studied water hammer in Ogden hydroelectric development with a 9.45 km long penstock. Joukowski [14, 15] has carried out extensive theoretical and experimental studies on the basic theory of water hammer. The pipelines which were used in the studies have the lengths of 7.62 km, 305 m and 305 m with diameters of 50 mm, 101.5 mm and 152.5 mm, respectively. Joukowski derived a formula for the wave velocity, taking into consideration the elasticity of both water and the pipe walls. The general theory of water hammer was developed by Allievi [16], presenting an expression for the pressure rise at the valve and produced charts for pressure rise and fall caused by a uniform valve closure.

Since then, a number of studies have been published, refining the governing equations of water hammer [9, 17,18,19,20,21]. Their combined efforts have resulted in the classical mass and momentum equations for one-dimensional water hammer flow which is usually the basis for the numerical simulations. Karney and Ruus [22] and Elansary and Contractor [23] have investigated the influence of uniform, parabolic, equal percentage and optimum valve closure operation on hydraulic transients in pipelines. Sharp and Sharp [24] stated that two-stage valve closure arrangement can be used to reduce transient pressure in pipes. Yu et al. [25] have advised to close a valve in two steps. The first segment of the pipe could be closed in a rapid manner, while the second segment should be closed in a slow way to avoid high transient pressures. Although water hammer effect has been studied since the beginning of the twentieth century [16], due to its complexity, several features of it still remain to be investigated. In this study, three different closure schemes of a butterfly valve and two diverse pipe types were considered in order to determine the best valve closure operation to minimize hydraulic transients in pipes.

Hydraulic transients in pipes have been analysed by a number of Eulerian- or Lagrangian-based methods. In this study, the method of characteristics (MOC) was utilized, which is one of the most widely used methods in simulation analyses and recognized to be producing accurate results. In MOC, the partial differential equations are reduced into a family of ordinary differential equations, along the characteristic line [1, 2, 26, 27]. The conventional approach of the method is to define a fixed grid in the distance–time plane. On the grid, the unknown pressure and velocity values are numerically computed in a time-arching procedure that begins from a given initial conditions. MOC predicts the maximum pressure in the system with a high precision. The maximum pressure generally occurs during the first surge. It also accurately forecasts the wave periods [1, 9, 28].

2 Governing equations

The momentum and the continuity are the two essential equations utilized to calculate the hydraulic transient in pipes. They are nonlinear and first-order partial differential equations [29, 30].

$$ {\text{Momentum}}:gH_{x} + UU_{x} + U_{t} + \frac{fU\left| U \right|}{2D} = 0 $$
(1)
$$ {\text{Continuity}}:UH_{x} + H_{\text{t}} - U\sin \beta + \frac{{C^{\prime 2} }}{g}U_{x} = 0 $$
(2)

where \( H_{x} \) is the head at any distance from the upstream reservoir, \( H_{\text{t}} \) is the head at any time from the beginning of the flow, \( U \) is the velocity of the flow, \( U_{x } \) is the velocity at any distance from the upstream reservoir, \( U_{\text{t}} \) is the velocity at any time from the beginning of the flow, \( f \) is the pipe friction coefficient, \( D \) is the pipe diameter, \( \beta \) is the pipe slope, \( C^{\prime } \) is the wave speed, and \( g \) is the acceleration of gravity.

These two partial differential equations are transformed into two ordinary differential equations (Eqs. 3 and 5) by using the method of characteristics, with the condition that the respective equations (Eqs. 4 and 6) are valid [18, 19, 31].

$$ \left. {\frac{g}{{C^{\prime } }}\frac{{{\text{d}}H}}{{{\text{d}}t}} + \frac{EU}{{{\text{d}}t}} + \frac{fU\left| U \right|}{2D} = 0} \right\}C^{ + } $$
(3)
$$ \left. {\frac{{{\text{d}}x}}{{ {\text{d}}t}} = + C^{\prime } } \right\}C^{ + } $$
(4)
$$ \left. { - \frac{g}{{C^{\prime } }}\frac{{{\text{d}}H}}{{{\text{d}}t}} + \frac{{{\text{d}}U}}{{{\text{d}}t}} + \frac{fU\left| U \right|}{2D} = 0} \right\}C^{ - } $$
(5)
$$ \left. {\frac{{{\text{d}}x}}{{ {\text{d}}t}} = - C^{\prime } } \right\}C^{ - } $$
(6)

where H is the piezometric head, x is the distance along the pipe, D is the pipe diameter, t is time, and C is the celerity of a pressure wave in the pipeline. At the instant of the water hammer, a pressure wave propagates through the pipeline with a velocity which is function of pipe type and fluid properties [1, 19, 32]. The physical depiction of two pairs of equations on x − t plane (C and C+) is shown in Fig. 1. In this study, the hydraulic transient propagation wave speed was analysed for a stainless-steel pipe and a ductile pipe. The parameters utilized as input for the MATLAB code developed for this particular investigation are given in Table 1.

$$ C^{\prime } = \sqrt {\frac{{\frac{{E_{{{\text{H}}_{ 2} {\text{O}}}} }}{{\rho_{{{\text{H}}_{ 2} {\text{O}}}} }}}}{{1 + \frac{{E_{{{\text{H}}_{ 2} {\text{O}}}} }}{{E_{\text{pipe}} }}.\frac{D}{e}.C1}}} $$
(7)

A pipeline is connected to two reservoirs with a certain head difference, and a butterfly valve is set at its downstream end. The pipe is divided into N segments of equal length ∆x, while the time step is determined by the increment in ∆t. The solution of the domain starts at the entrance of the pipeline, at \( x_{1} \) = 0 and ends at \( x_{n + 1} \) = L. Equations 3 and 4 should be satisfied and integrated along the C+ line and written in terms of unknown variables of U and H. If the dependent variables U and H are known at the upstream of a particular pipe segment, Eqs. 5 and 6 should be satisfied and integrated along the C line. Simultaneous solution yields conditions at the particular time and the positions in the x − t plane [19, 33, 34].

Fig. 1
figure 1

Characteristic lines in the x − t plane

Table 1 Parameters used as input for the MATLAB code

3 Valve closure schemes

The butterfly valve set at the end of the pipe connecting the two reservoirs is closed abruptly in sudden closure scheme. While, in linear closure scheme, the valve was shut in one linear step, in stepwise closure scheme, the valve was closed in three unequal time intervals. In both the linear and the stepwise operations, six different closure time steps were considered. These time steps were t = λ, 2λ, 5λ, 10λ, 20λ and 50λ, where λ = 2L/C′. The steps of the valve openings were fixed to be 100, 40, 30 and 0 percent of the valve opening area in stepwise closure scheme. The linear and stepwise valve closure operations are described in Fig. 2. The discharge coefficient of a valve is a function of the percentage of the valve opening area to its total area. The discharge coefficient of a classic butterfly valve is given in Tullis [35].

Fig. 2
figure 2

Valve closure schemes. a Linear. b Stepwise

4 Valve closure analysis

In pipeline systems, valve closures cause pressure surge just at the upstream of the valve. This phenomenon instigates a pressure wave, which travels back through pipes, causing hydraulic transients or water hammer. The travel time for the pressure wave to reach to the upstream reservoir is “L/C′” seconds after the closure of the valve. At this moment, the pressure at every point in the pipe (upstream of the valve) is equal to “H + ∆H.” This sudden increase in the head will continue until one round trip of the pressure wave. This travel time of the wave is 2L/C′ = λ s. The pressure head reduces after the first round trip of the wave [32].

4.1 Sudden valve closure

As it is shown in Fig. 3, when the valve is suddenly closed, the pressure just at the upstream of the valve increases immediately. The value of the maximum transient pressure in the pipeline is affected by several factors including the pipe material. In this investigation, two types of pipes were used, namely stainless steel and ductile. Under the same hydraulic conditions, the maximum transient pressure head observed in the stainless-steel pipe was 223.93 m, while it was 180.03 m for the ductile pipe. Particularly, in sudden valve closure scheme, a ramp occurs at the top of the transient pressure fluctuation line. This ramp is called the line packing of the pipe, which is the frictional pressure drop with the length of the pipe. The slope of the ramp depends on the pressure head loss coefficient of the valve [32, 36].

Fig. 3
figure 3

Transient pressure fluctuation in sudden valve closure scheme

4.2 Linear valve closure

Linear valve closure scheme was performed for six different closing time periods of λ, 2λ, 5λ, 10λ, 20λ and 50λ s, in ductile and stainless-steel pipes. Closure time periods are given in Table 2. Figure 4 illustrates the transient pressure fluctuations in the stainless-steel and ductile pipes just at the upstream of the valve. While, in stainless-steel pipe, the maximum and the minimum pressure heads were noted to be 217.62 m and − 43.64 m for closure time of λ s, they were found to be 84.77 m and 60.05 m for 50λ  s. On the other hand, the maximum and the minimum pressure heads were found to be 174.61 m and − 1.70 m and 83.43 m and 60.02 m for closure time intervals of λ and 50λ s, respectively, in ductile pipe. The effect of the closure time on the magnitude of the transient pressures is detected in both pipes (Fig. 4). In both pipes, the maximum transient pressure values were witnessed to decrease with the increase in closure time period. Under the same hydraulic and valve closure conditions, the transient pressure generated in the ductile pipe was observed to be less than it was in stainless-steel pipe. There were no line packings perceived in the transient pressure curves with closure time period equal or larger than t = 2λ. However, for closure time period of λ s, line packing was clearly noted.

Table 2 Linear valve closure times
Fig. 4
figure 4

Transient pressure fluctuation in linear valve closure scheme. a t = 2L/C. b t = 4L/C. c t = 10L/C. d t = 20L/C. e t = 40L/C. f t = 100L/C

4.3 Stepwise valve closure

Alike the linear closure scheme, six different closure time periods of λ, 2λ, 5λ, 10λ, 20λ and 50λ seconds were considered in the stepwise valve closure operation for both stainless-steel and ductile pipes. The percentages of the valve opening area were fixed to be 100, 40, 30 and 0. The valve closure time periods and the corresponding valve opening percentages are given in Table 3. In order to comprehend the influence of the closure time on the transient pressure, the time intervals for each step were chosen to be different in each operation. The maximum and minimum pressure heads were recorded to be 215.92 m and − 41.95 m for the closure time of λ s, and they were 82.36 m and 60.05 m for 50λ seconds, in stainless-steel pipe, whereas, in the ductile pipe, the maximum and the minimum pressure heads were calculated to be 172 m and 0.04 m for λ s and 81.70 m and 60.02 m for 50λ seconds closure time. The transient pressure fluctuations in the ductile and stainless-steel pipes caused by the stepwise valve closure scheme at different time intervals are shown in Fig. 5. The magnitude of the extreme transient pressure heads was found to be decreasing in the stepwise valve closure operation compared to the linear closure, for the same pipe and closing time periods. A weak line packing was noticed to develop at the crest of the maximum transient pressure line for λ closure time, for both pipes. However, for 2λ and higher closure time periods, the line packing was not perceived. In the stepwise closure schemes, alike the linear closure schemes, the value of the extreme transient pressures was noted to be decreasing with the increase in the closure time.

Table 3 Stepwise valve closure times and valve openings
Fig. 5
figure 5

Pressure fluctuations in stepwise valve closure for different closure times. a t = 2L/C. b t = 4L/C. c t = 10L/C. d t = 20L/C. e t = 40L/C. f t = 100L/C

4.4 Extreme transient pressures

The maximum and minimum transient pressure values recorded due to sudden, linear and stepwise valve closure schemes for different closing times in stainless-steel and ductile pipes are detailed in Table 4 and Fig. 6. As it is perceived from the figure and the table, the absolute value of the maximum and minimum hydraulic transient pressures decreases with the increase in the valve closure time. Moreover, the effect of the pipe material on the hydraulic transients was clearly noted. Under the same hydraulic conditions and the same valve closure time, the maximum value of transient pressure noted in the ductile pipe tends to be less than that generated in the stainless-steel pipe due to the influence of higher friction factor and the modulus of elasticity of the ductile pipe. In order to comprehend the effects of both valve opening percentage and the duration of a closing step, the stepwise valve closure scheme was performed with two scenarios; (1) fixed valve opening percentage with varying closing step duration and (2) fixed closing step duration with different valve opening percentages.

Table 4 Maximum and minimum transient pressures with different closure times
Fig. 6
figure 6

Transient pressures at different closure times. a Maximum. b Minimum

4.5 Stepwise valve closure with fixed valve opening percentage

The butterfly valve positioned at the end of the pipeline was closed in three fixed percentage opening steps with varied closure times (Table 5). In the first step, 60% of the full open valve was closed, then 10% and in the end the remaining 30%. Although the total closure time was set to be 5λ, each step was performed in different time intervals, leading to six closing scenarios. In order to determine the influence of stepwise closure on the hydraulic transients, different time step intervals were selected. The maximum transient pressure values were noted to vary from 193.88 to 125.12 m and 159.07 to 113.38 m for stainless-steel and ductile pipes, respectively. Furthermore, the magnitude of the transient pressures was found to be decreasing by closing the valve fast at the first step, in a period which is equal to one-fifth of the total closure time, in which 60% of the valve opening area was closed [25, 37]. Scenario A1 seems to the optimum solution in terms of the extreme (maximum and minimum) transient pressure values, among the cases considered here. The magnitude of transient pressure in both stainless-steel and ductile pipes is given in Table 6.

Table 5 Stepwise valve closure with fixed opening percentages
Table 6 Maximum and minimum transient pressures at different time steps

4.6 Stepwise valve closure with fixed closing step duration

In order to perceive the influence of valve opening percentage in a single closure step on the hydraulic transients, each closing step was performed with a fixed time period and different opening percentages, generating six closing scenarios, while the total closure time was set to be 5λ (Table 7). The variation of the maximum hydraulic transient pressure values was witnessed to be from 213.96–186.47 m and 171.70–157.09 m for stainless-steel and ductile pipes, respectively. The transient pressure values were perceived to be decreasing by closing 60% of the valve opening area in the first step, then closing 30% and 10% of it in the second and third steps, respectively (Scenario B2 in Table 8). The extreme transient pressure values are tabulated in Table 8. Figure 7 illustrates the maximum and minimum transient pressures obtained from all stepwise valve closure scenarios. Scenario A1 (Table 5) was found to be producing the lowest value of extreme transient pressures.

Table 7 Stepwise valve closure with fixed time steps
Table 8 Maximum and minimum transient pressures at different steps of valve openings
Fig. 7
figure 7

Extreme transient pressures due to variable valve opening percentage and time steps in a stainless-steel pipe; b ductile pipe

5 Conclusions

In this study, the hydraulic pressure transients in a simple pipeline, connecting to two reservoirs and a valve set at its downstream, were examined. The pressure transients were analysed under sudden, linear and stepwise valve closure schemes. Two types of pipes were used in the investigations, namely a stainless-steel and a ductile pipe. The maximum pressure transient values generated in sudden valve closure scheme were noted to be higher than that of linear and stepwise valve closure schemes. Both in linear and in stepwise valve closure, it was perceived that as the closure time period increases, the value of the maximum pressure transient decreases. Stepwise valve closure was found to produce less hydraulic transient than linear valve closure scheme. Also, it was found that in the case of stepwise valve closure, transients can be reduced significantly by closing the valve rapidly at the beginning then slowing down to the end. The influence of the type of the pipe was clearly noted in all three sets of the valve closure schemes. The values of the pressure transients detected in the stainless-steel pipe were observed to be higher than those of ductile pipe. Under the same hydraulic conditions, the maximum transient pressure head observed for the stainless-steel pipe was 223.93 m, while it was 180.03 m for the ductile pipe, which are within the pre-defined limits of the maximum allowable pressure head.