Flow parameters effect on water hammer stability in hydraulic system by using state-space method


 The water hammer (WH) phenomenon is one of the most dangerous phenomena in hydraulic systems, especially pipelines, gates, and locks on these lines. There are many analytical solutions to deal with the WH phenomenon, including the treatment of friction losses, but most solutions use linear arithmetic operations, which depart from the actual situation of the WH phenomenon. Also, the methods currently used are most challenging and complex and give imprecise results to treat the mentioned phenomenon. In order to reach a state closer to the situation of losses and stability of the hydraulic system that is close to the actual state, basic partial differential equations were used, taking into account the losses generated in the hydraulic system through mathematical conversion. MATLAB was used to program and solve equations, find mathematical results, draw system diagrams, and simulate a WH wave. Various parameters were investigated to show the stability behavior of the hydraulic system by using state-space Method. So, the effect of the pressure, flow rate, diameter, and fluid type were investigated to calculate the stability of the hydraulic system. The results evaluated showed that the system’s oscillation is less at lower pressure, and the stability period is longer than that at high pressures. In addition, the system needs a longer time to stabilize at the low flow speed due to pressure waves that occur. The stability of the system affected by the WH was examined, and the effect of fluid-specific variables such as velocity, pressure, and type of fluid in addition to the diameter of the pipe and their impact on WH stability was found. The behavior of stability at the WH is nonlinear, and that is why the linear and nonlinear parts of the governing equations of the structure are used to find system through the state-space method through programming and simulation of MATLAB program.


Introduction
A water hammer (WH) is a hydraulic pressure wave propagating inside fluid-carrying pipelines. This wave is generated due to the sudden shutdown of the fluid flow. Where the kinetic energy in the pipe carrying the liquid is converted into a pressure wave, this wave occurs when the hydraulic valves are closed and suddenly opened, or when the pump is started or stopped suddenly, as happens when the electric current or power source is disconnected from this pump, or the pump is running at its maximum speed at the start of operation. Another type of WH occurs, resulting from condensation, which is more complex, and in this type of WH, the pipe carrying the liquid is filled with water and steam at the same time. For example, when the pressure reaches saturation due to the increase in pressure in the steam part, the vapor region inside the pipe will condense, and the liquid water collapses. Due to this collapse, a pressure wave occurs. Another reason for the WH wave caused by condensation of steam is when the pipe contains hot steam with cold water, and due to the temperature difference, the water vapor will condense, and due to this condensation, there will be instability in the flow where the water vapor bubble is hot, and it is inside the cold liquid where the bubble bursts inside the liquid. A large number of bubbles and a large number of the collapses of these hollows lead to the occurrence of WH or pressure wave. WH waves cause massive and destructive damage to the pipelines, especially in power plants, and for this reason, many studies and research have been conducted on this phenomenon to reduce its damage.
Many researchers investigated the WH phenomena with different structures. Joukowsky [1] carried out some studies and research in the field of WH, where he studied the formula which represents the change in the velocity of the fluid and its effect on the change in pressure. Moreover, Allievi [2,3] determined particular equations for modeling single-phase flow in pipelines.
Furthermore, Sinha et al. [4] gave an example of the disasters caused by the WH phenomenon. This accident occurred in the middle of New York city, and the damage was a hole in the middle of the street 10 m long, 10 m wide, and 5 m deep, resulting from the WH due to condensation that occurred in the inner wall of the tube, where the weather was rainy and cold at that time, in addition to the defects in the sewage infrastructure and collection basins. All these reasons led to the condensation of the steam that was surrounded by cold water as a result of water contacting the wall of the outer tube, where the steam gained cold as a result, which led to rapid condensation and this condensation inside the tube prevented water vapor from flowing out, and a vapor bubble was formed surrounded by condensate vapor. When that bubble burst, it led to the phenomenon of the WH and caused the tube to rupture and create a cavity in the ground.
Angus [5] noted that the results of the WH are catastrophic, and the damage that occurs because of them cannot be neglected by any engineer, especially when designing long pipelines, especially those with low heads. He studied the occurrence of short pulses that lead to the collapse of vapor bubbles. The volume of these pulses may exceed the duration of the sudden closure of the tube or valve due to the increase in pressure. Then, in the modern years, in 2018, Jalut and Rasheed [6], in their study, used the momentum and energy equations that control the WH phenomenon which were solved numerically using the MATLAB program. A sensitive analysis was done using a number of variables such as wave velocity, friction factor, and pipe diameter. The MOC method was used to solve the equations. The results showed that when using a pipe with a diameter of 1.2 m instead of 1 m, the maximum pressure decreases by 31.5%, and decreases by 47.7% if a diameter of 1.4 m is used instead of 1 m. It was also found that the end of the tube represents the region most affected by this phenomenon.
Also, in the same year, Twyman [7], in his study, analyzed the phenomenon of WH in a network of pipes distributed with butterfly type valves and with circular, spherical, and square gates for the purpose of generating pressure waves that tend to split while spreading through these pipes. It was found that the maximum pressure values depend on the type of valve that was closed. It was found that the shape of the nut is not an important factor in mitigating the phenomenon of WH.
In 2019, El-Zahaby et al. [8] aimed to analyze and develop solutions and prevent the phenomenon of WHs by installing protection devices such as water and air tanks, such as overflow water tanks, air valves, and safety valves. The research dealt with a practical application on one of the irrigation systems in the State of Egypt, specifically in the Ismailia Governorate, and the work included practical measurements of pressures and behaviors inside pipes and valves in the case of regular flow. The air was analyzed using a mathematical method to obtain the results. The results obtained suggested the necessity of using water and air tanks and surplus water tanks for the purpose of protecting the irrigation system from the phenomenon of WHs. Also, Sankaranarayanan et al. [9], in the same year, dealt with the dynamic behavior of the WH in the occurrence of vibrations due to valve malfunctions, and the effect of vibrations on the movement and distribution of water was discussed. The current mathematical model of WH is represented by a partial differential equation format, which is incompatible with the water distribution system (WDS) model represented by an ordinary differential equation. The current partial differential equation (PDE) model does not take into account the rate of change in the dynamics of the valves. In order to overcome the mentioned complications, the PDE was converted into a set of ordinary differential equations, and the valve coefficient was integrated into the model. Various patterns of valve failure in pipelines were established, and the corresponding effects that spread throughout the WDS on the control aspects were studied.
Finally, in 2020, Dutta et al. [10], in his paper, used the predictive method to identify anomalies in the system in its early stages to keep the device from total damage and low power loss. The machine learning (ML) algorithm of the predictive control method was used to determine the WH in the pumping system with the help of simulation. The linear regression algorithm was used in this work, where the efficiency of the algorithm is approximately 90% when compared to other algorithms. Pumping system velocity and acceleration values were collected at different times of experimental analysis. When the valve suddenly closed, the kinetic energy in the system changed into elastic energy, causing a series of vibrations. The current study focuses on the WH problem in centrifugal liquidpumped AC drive systems.
Form the previous presented work can be conclusion that the WH problem investigated with various techniques as experimental and analytical, in addition to, investigation the control for WH with different parameters effect. In this work, the analytical mathematical model for controlling the stability of WH with the effects of all the variable parameters, such as water pressure, water velocity, diameter of pipes, and other important parameters are utilized. Therefore, this study uses the mathematical solution to calculate the WH stability for the hydraulic system, with various flow parameters effect, pressure, flow charge, pipe diameters, and different fluid types.

Analytical investigation
In order to gain a better understanding of the WH phenomenon, the Joukowsky formula was derived from a simple model in which this phenomenon occurs, a twoequation model that describes a single-phase liquid that is incoherent and floats. One balance of momentum equation and one equation for the mass conservation are used, The equation of state is is the density and c is the speed of sound, and K is the bulk modulus of the liquid. Furthermore, ≪ u c. It can be rewritten in terms of smooth solutions, Using Eq. (1), Using the equation of state . The model becomes, Because ≪ u c, And, this is rewritten as, These equations are called the Allievi equations or the WH equations [5,11]. Now the formula can be written in the matrix form, The matrix B eigen values are the velocities of the waves in the system, in this case, c and −c. To find the equation of Joukowsky from equation (7), rewritten as, Now the leap over time of value ξ is denoted as ξ Δ , and using the fact that Then, the formula of Joukowsky is obtained, Note, ±depends on the direction of the wave of pressure. The cross-section of the pipe is inserted to include the flexibility of the pipe, and through it the WH model can be extended as follows, The first equation of (10) can be rewritten if smooth solutions are considered in terms of variables u and p primitive, Because ≪ u c, the terms ∂ ρu A x and ∂ Au ρ x can be eliminated as being insignificant when compared to other terms, where the formula of Korteweg [11] for the adjusted speed is, Then, the 2nd equation of equation (10) can be rewritten for the solution of smooth as, Because ≪ u c and the pipe of deformation is assumed to be minimal, the terms So, the system is reduced to, This is identical to a rigid tube but with adjusted squared speed < c ĉ 2 2 . Also, for this case the Joukowsky equation can be derived as, There, In order to solve the presented analytical equation, the MATLAB program must be built to calculate the amplitude and stability system with the influence of different parameters, by using the state-space method, [12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28]. So, the state-space is a method of the generalized timedomain for analyzing, designing, and modeling the systems with wide range of control. The approach can deal with, 1. Multivariable systems, or Multiple input multiple output systems (MIMO).

Time-variant and nonlinear systems.
3. Approaches of the alternative controller design.
The state-space is a method of the generalized timedomain for analyzing, modeling, and designing the systems with wide range of control. The approach can deal with time-variant and nonlinear systems, approaches of the alternative controller design, and multivariable systems or MIMO. The lower number of states which are required to adjective the dynamic nature for the system is called the state variables, where it is not a necessary limitation that it is commensurable. That is why it is possible to define the state of a system as the set of variables where the input variables, together with some initial time t o , ultimately determine the system behavior for the time t o . When one state is the derivative of the other, the state-space of the two-dimensional is on occasion referred to as the phase-plane. The way the way the state variables change can be considered as a function of time can be considered a path in the n-dimensional space as shown in Figure 1, The first formula is taken as the state equation and the second formula as the output equation, where • u is the vector of the input • y is the vector of the output • x is the state vector • ẋis the differential state vector • A is the matrix of system • B is the control matrix (input matrix) • C is the output matrix • D is the matrix of feed-forward When, x is the n dimensional state vector A is the n × n system matrix, B is the n × m control matrix, . . C is the output matrix, .

(20)
The MATLAB 2020 program was used to solve the differential equations after derivation of details and compensated and then programmed appropriately in a way that the program can deal with to find the frequency and response, and therefore stability to the system of boundary conditions, as shown in Figure 2, and compared with the results of other researchers, [29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45]. The MATLAB requires the following input data, pipe properties (density of pipe, modulus of elasticity, and Poisson ratio), and dimensions of pipe (diameter, length, and thickness). The output of fundamental natural frequency is obtained from the program for different parameters, with different pipe variables, and boundary conditions of pipe which is (pin-pin) pipe.
3 Results and discussion

Flow parameters effect
The MATLAB 2018 program was used to program the equations (15)- (18) and find the resulting stability after the occurrence of the WH phenomenon and to find the highest and lowest amplitude that may occur in closed pipelines, and to know the critical point for the collapse of the hydraulic system by changing several main parameters controlling this system, namely, changing the hydraulic fluid pressure, second, changing the flow velocity, third, changing the diameter of the tube carrying the liquid, and fourth, changing the type of liquid, i.e., changing the density. Therefore, Figures 3 and 4 show the effect of various pressures and flow rates with different pipe diameters and different fluid types (petrol and water fluid). The figures show the peak amplitude and time amplitude and settling time with various parameters effect. The effect of different flow parameters on the system stability are described below.

The pressure of the hydraulic system effect
When changing the pressure of the hydraulic system, the main parameters below were considered fixed as follows. The diameter of the fluid conveying pipe is 300 mm, the fluid flow velocity is 1.5 m/s, and the liquid is water with a density of 1,000 kg/m 3 . It was found that the stability of the system is captured at a pressure of 12 bar, but the height or peak of the amplitude of the WH is higher when it starts to occur, and the absorption pressure of the system occurs-effect than it is at 12 bar. At a pressure of 4 bar, the lowest negative fluctuation occurs in the system, which is offset by the highest positive pressure oscillation caused by the WH compared to the rest of the pressures. The stability period is longer when compared with the pressure of 12 and 8 bar.

The flow rate of the hydraulic system effect
The diameter of the fluid conveying pipe is 300 mm, the pressure of the hydraulic system is 4 bar, and the liquid is Flow parameters effect on water hammer stability in hydraulic system  219  water with a density of 1,000 kg/m 3 . When the velocity of flow is 2.5 m/s, the highest oscillation of the WH occurs and coincides with the beginning of the sudden closure of the liquid transmission line or the closure of the valve of the pipe, and its impact is excellent and quickly disappears as absorbed by the wall of the pipe. Corresponding to the flow velocity of 1.5 m/s, less impact is caused to the WH and at the same time as the previous flow velocity, the stability time is extended due to the pressure waves that occur in this case, especially when there is condensation at the inner wall of the pipe. As for the flow velocity of 2 m/s, it is most appropriate in the case of the stability compared to the previous parameters. It is a medium oscillation with relatively little time for the WH to fade.

The diameter of the conveying pipe effect
The fluid flow velocity is 1.5 m/s, the pressure of the hydraulic system is 4 bar, and the liquid is water with a density of 1,000 kg/m 3 . Figure 5 shows the occurrence of the highest oscillation when the pipe diameter is 300 mm and at the start of the sudden closure of the conveyor pipeline, the system stability period is longer than the rest of the diameters, and this is due to the generation of significant pressure on the inner walls of the pipe. As for the diameter of 900 mm, the impact of the WH is minimal, but the hammer continues with its weak effect for a more extended period, and the results are close to that with the diameter of 600 mm, and the only apparent difference is that the pressure is positive at the diameter of 900 mm, and it is negative at the diameter of 600 mm, which is similar in the strength of the impact on the walls of the conveyor pipe for liquid. Figure 5 shows the stability of all the variables such as the type of fluid used, the pressure and velocity of the fluid, and the operational conditions, when changing the diameters of the fluid transporting tubes. Notice that when the diameter of the tube is 300 mm and the power source is suddenly cut off from the system in order to obtain the phenomenon of WH, notice that the highest peak of the water hammer wave that occurs in the first fractions of a second and is close to the source of generating the driving force of the fluid represented by the centrifugal pump, but the stability of the system is achieved after the state of the system when the diameter of the tube is 900 mm, and the amplitude of waves and frequencies are higher in small diameters as it is clear. The amplitude of the wave at the diameters of 900 mm and 600 mm is less than the amplitude of the wave at the diameter of 300 mm, and this is due to many reasons. One of the most important reason is the distance between the surface of the tube and its center is too long, due to which the amplitude of the wave decays, in addition to the ratio and proportion between the amount of water transmitted with the surface area of the inner tube wall. The higher this ratio, the greater the amplitude of the wave that causes the collapse in the system.

The fluid type in the hydraulic system effect
The fluid flow velocity is 1.5 m/s, the pressure of the hydraulic system is 4 bar, and the diameter of the fluid conveying pipe is 300 mm. The highest oscillation and the highest impact force may be catastrophic when the tube wall is weak and when the liquid transported through the closed tube is alcohol, which is a low-density liquid. Then, the WH's strength rapidly declines, noting that the pressure is positive, that is, towards the wall of the pipe, and this occurs as a result of the rapid condensation of the alcohol as it gains cold from the wall of the pipe very quickly. When the liquid is petroleum, the WH will be less effective, and the oscillation is weak, but the stability time of the system is longer even when compared with high-density water.

Comparison of current and reference work
Note the great convergence between the current work and the reference, as the stabilization time, the amplitude, oscillation shape, stability, and the hydraulic behavior of the system are very close, and the difference may be non-existent when the Finite Difference Method (FDM) was used. Wan et al. [46] which The FDM method of characteristics (MOC) is one of the most widely used methods recently, because of its convenience and accuracy. The comparison was applied when changing the pipe pressure and velocity of water flow, as in Figure 6. Due to the difference in the calculated agreement of the results, then, the analytical solution can be depending to calculate pipe stability with different flow parameters effect .

Conclusion
From the investigation of effects of different flow parameters on the WH stability, the following conclusions were derived, 1. At lower pressures, the fluid is less oscillating in the system. At low pressures, the stability period is longer compared to high pressures, that is, more than 4 bar. At a speed of 2.5 m/s, the highest oscillation of the WH occurs. The force of the WH will spread for a more extended period at lower pressures and medium flow velocities. 2. At a flow speed of 1.5 m/s, the system needs a longer time to stabilize due to pressure waves that occur at this speed. The most appropriate flow speed at which the system is more stable and the effect of the WH phenomenon is weak is 2 m/s. Therefore, the impact of the WH is greatest at high speed. 3. In small diameters, a WH occurs faster than it does at large diameters, and the wave is more significant, and its effect lasts longer. The highest oscillation of the WH occurs when the pipe diameter is 300 mm, and the system needs a more extended period of stability due to the generation of significant pressure on the walls of the pipe. 4. As for the highest fluctuation and the most dangerous effect of the phenomenon of WH occurs when the transported liquid is alcohol, which is a low-efficiency liquid. This occurs as a result of the rapid condensation of alcohol as it loses its heat upon contact with the walls of the pipe. In low-density liquids, the effect of a WH is disastrous if it neglects to reinforce the walls of the fluid-carrying pipes.

Conflict of interest:
Authors state no conflict of interest.