## Abstract

Pump power failure in pipelines is one of the most important factors causing water-hammer, which leads to sharp fluctuations in velocity and pressure. To prevent the destructive effects of this phenomenon, the use of pipe of appropriate compressive capacity and protective devices such as air-chambers and control valves is required. In a transmission system, increased diameter and decreased thickness of pipe leads to decreased flow velocity and compressive wave speed and reduction of water-hammer impact. Thus, although the increase of diameter leads to increased cost of pipe and decrease of thickness lowers its compressive strength, the resulting reduced fluctuation of water-hammer could minimize the cost by lowering the required pipeline class and decreasing the size and number of protective devices. In this paper, an optimization model has been presented for selection of the best diameter, thickness and pipe material and selection of positions and proper type of water-hammer controlling devices where a combined flowchart includes an optimization algorithm and flow analysis at steady and transient states. A self-adaptive real genetic algorithm has been used for this optimization, and its capability in cost reduction of pipelines has been approved in a case study.

## INTRODUCTION

Water transmission pipelines transmit considerable discharges from one point to another. These systems usually include long pipes with relatively large diameter and strong pumping stations to supply the required energy for water transmission. Water-hammer could occur in such systems for different reasons depending on the type of pipeline. One of its most powerful types occurs when the pump suddenly turns off due to unexpected power failure (Stephenson 2002); such an incidence could create considerable positive and negative pressures in fluid flow. In case of exceeding the allowed pressure, positive pressures could lead to pipe rupture. Moreover, negative pressures could lead to water evaporation when the pressure of the fluid decreases the water vapor pressure (Stephenson 2002) and create column separation in the pipe and seriously damage it. To prevent any damage to the system, it is required to use pipes with the appropriate compressive capacity and protective methods. Various strategies could be used for this purpose; the selection of proper strategy depends on the pipeline profile and the fluid features. If the water transmission head is relatively low, the use of a surge tank and pressure regulating valves could protect the system on the condition that the negative pressures with water-hammer could be tolerated by the pipe. However, in systems with high normal discharge and pressure, including large-scale transmission pipelines, the most appropriate way to prevent negative pressures and decrease positive pressure is usually with the use of an air-chamber (Stephenson 2002). In so far as the use of these chambers individually considerably increases the protection cost, the use of pressure control valves and air-inlet valves in the pipeline could reduce the required size for the air-chamber and leads to a lower protection cost. Thus, the use of a combination of protective devices and positioning them in appropriate places could lead to a reduction in the cost of pipe protection devices.

On the other hand, the flow velocity at normal state is one of the most important factors in intensity of water-hammer pressures. In pipelines with a certain steady discharge, the pipe diameter determines the velocity and has an important role in the mentioned pressures; thus, with an increase of pipe diameter and decrease of velocity, the intensity of fluctuations in water-hammer will decrease. However, in common designs of pipelines, concerning the criteria on minimum and maximum allowable velocity in steady state, attempts are made to use the lowest possible diameters for the lowest cost. However, this cost reduction leads to increased velocity and makes severe water-hammer pressures, and leads to an increase in the required pipe wall thickness and thus the application of more expensive protective devices for water-hammer control, which imposes huge costs on a project. Moreover, reducing the thickness of the pipeline could reduce the pressure wave speed and thus reduce the intensity of the fluctuations of water-hammer pressure. Thus, although this reduction of thickness reduces the compressive strength of the pipe, it could also be a strategy for mitigation of the water-hammer effects and reduction of the cost of protection devices.

Based on this, the dependency of total pipeline cost and water-hammer intensity on variations of pipe diameter and thickness on the one hand, and the influence of water-hammer intensity on the pipe class, location and type of control devices on the other hand, make it inevitable to use an optimization model for an optimum design with minimum total cost.

In recent years, various methods for the optimization of transmission pipelines have been studied. Lingireddy *et al.* (2000) developed an optimization model to determine the size of a surge tank based on a genetic algorithm. Jung & Karney (2004) considered the transient flow effect in the selection of optimum diameters in a network. They used a generic algorithm (GA) and particle swarm optimization (PSO). For optimization of size and position of hydraulic control devices for water-hammer effects in water distribution systems with various tanks, Jung & Karney (2006) used combined GA and PSO. They presented different strategies of protective methods by the combined use of surge tanks and pressure control valves. In another study, Jung *et al.* (2009) formulated the design of optimum diameters of a water distribution system under transient conditions by a multi-objective optimization algorithm. In their study, the two objectives of minimizing pipe cost and maximizing hydraulic reliability were considered. Moreover, Jung *et al.* (2011) used a two-objective optimization method for optimizing the diameter of pipes in a water distribution network with a tank. They selected a function as ‘surge damage potential factor’ as an objective function, and pipeline network cost as another objective. Jung & Karney (2013) optimized a water distribution system for the best transient flow states in two stages. Jazayeri Moghaddas *et al.* (2017a) developed an optimization model to find a reliable and cost-effective transient protection design for large scale pipeline systems subjected to a pump trip. The proposed model was applied to a real case study and it was found that careful allocation and sizing of the air-inlet valves along the pipe resulted in a significant reduction of air-chamber volume and, consequently, total cost of water-hammer protection design. Moreover, Jazayeri Moghaddas *et al.* (2017b) used a double-objective model to optimize protective devices to obtain the minimum of cost and the most appropriate level of operational parameters.

According to the above studies, it has been proved that in optimization of water transmission or distribution pipelines, an optimal design is only expected when a transient analysis is used in the process. However, the interaction between diameter and thickness of the pipe wall and its due intensity of water-hammer on the type and material of the pipe, and the type and placement of water-hammer controllers, have not been studied in previous research.

In this paper, an optimization model is presented where the diameter, thickness and material of the pipe, volume of the air-chamber and location and type of air-inlet valves have been considered as decision variables, the objective function is total cost of the water transmission system, and the keeping of pressures and velocities in an allowable range in transient and steady states are the constraints of optimization.

In the following, first steady and transient analysis due to water-hammer are briefly discussed and then the optimization model and applied algorithm will be explained. Finally, a problem case study is solved through the proposed model and its results are investigated and analyzed.

## FLOW IN STEADY STATE

*A*is the internal section area of pipe.

*L*is pipe length,

*D*is pipe diameter and

*g*is gravitational acceleration.

With the aim of water pressure at all points of the pipes being in the desired range in steady-state conditions, and due to the fact that the head loss increases with decreasing diameter, it is necessary to select a diameter for the pipe which, while complying with the permissible conditions for the velocity, also provides proper pressures.

## TRANSIENT FLOW DUE TO WATER-HAMMER

*x*is distance,

*t*is time, is fluid pressure head, is flow discharge,

*a*is fluid pressure wave speed,

*f*is the transient Darcy–Weisbach friction coefficient and

*g*is gravitational acceleration.

There are various methods for solving this equation system; in this paper Method of Characteristics (MOC) has been used. The details of this method and governing boundary conditions on tanks with fixed head, pump trip and water-hammer controllers are presented in Wylie & Streeter (1993) and Chaudhry (2014).

*f*in transient state is calculated using the model of unsteady friction (Brunone

*et al.*1991): To control water-hammer effects in high-capacity transmission pipeline, air-chambers are the best choice. The compressed air inside the chamber allows water to flow out of the tank and balance the outside pressure with negative pressure. Moreover, in the case of high positive pressure, water flow would be inversed toward the tank to reduce the pressure in the system. The size of air-chamber is highly dependent on the intensity of water-hammer fluctuations. In pipelines of high pumping capacity, where the fluctuation of water-hammer is relatively extreme, the required air-chamber volume will be relatively high, which increases the total cost of the system. Thus, any measure reducing the air-chamber volume while preserving technical considerations will have a considerable effect on the final cost. Concerning the significance of minimum pressures over maximum pressures in pump power failure, the use of air-inlet valves to maintain pressure above water vapor pressure could help the performance of the air-chamber. The mechanism of air-inlet valves is such that when in the valve location, fluid pressure becomes less than the outside pressure, the valve will open up and let air release inside the pipe, which prevents a further pressure drop in the pipeline. Since the air-inlet valve cost is much less than an air-chamber, simultaneous use of an air-chamber and air-inlet valve for reduction of air-chamber volume could be an economic solution for the transmission system.

## OPTIMIZATION THROUGH GENETIC ALGORITHM

The model presented in this paper consists of two parts. The first part is selection of appropriate pipe diameters and classes in terms of thickness of wall and material from the available trade list for the model. In this part, first, various pipes are introduced to the model as a trade list with details including internal diameter, wall thickness, absolute roughness, maximum allowed internal pressure, material properties and price of unit length. Having steady-state discharge, the model selects a number of pipes in the trade list which is then applied to Equation (2) in terms of allowable velocity. Also, using pipes from that list, the pressure in all parts of the pipeline is within the pressure limits concerning the friction losses of Equation (3).

In the second part, optimization will be carried out for pipe type, air-chamber, positioning and diameter of an air-inlet valve orifice using transient analysis due to pump failure. The best position for installation of an air-chamber is usually in the pipeline close to the pumping station. However, the location and number of air-inlet valves depends on the pressure loss intensity in water-hammer and the longitudinal profile of the pipeline. Thus, in this optimization, the location of air-chamber is fixed immediately after the pump and a decision variable will be defined for its volume that is selected from a trade list. Some locations will also be a candidate for air-inlet valves. For each of these locations, a decision variable will be introduced as its inlet orifice diameter that also selects from a trade list. In this part, the pipe type is one of the optimization decision variables, taking its value from the introduced pipe types in the first part.

The optimization model of this study uses the self-adaptive genetic algorithm (GA). GA is one of the most well-known and applicable evolutionary algorithms for complex engineering optimization problems (Jung & Karney 2006). The GA is inspired by biological evolution theory, in which a population of solutions evolves for searching the total allowed space and achieving the best solution (Haupt 2004).

*i*th air-inlet valve,

*n*is the number of air-inlet valves in the pipeline and is the penalty function. The penalty function is defined as follows: where

*M*is the magnification coefficient of the penalty function, is the number of computational nodes in the transmission system, and are the minimum and maximum pressures in the

*j*th computational node and and are the minimum and maximum allowed pressures in the

*j*th computational node that are respectively equal to the allowed compressive capacity of the pipeline and vapor pressure. When pressure is in the allowed range, the

*PF*value is zero and when the pressure is out of the allowed range it will be larger than zero. Since the model is a minimization model, GA seeks to make

*PF*equal to zero and in this way it will select values as decision variables in which the pressures will be in the allowed range in their transient analysis. Coefficient

*M*will be regulated concerning the conditions of the problem for making considerable influence of

*PF*in the objective function. The use of a self-adaptive GA automatically calibrates coefficient

*M*and in this way the precision and speed of convergence will increase in optimization.

The procedure of the real genetic algorithm is such that it randomly produces an initial population of chromosomes for optimizations where any chromosome includes values for decision variables. The values of objective function for this initial population are calculated and in the successive generations with evolution of population and gene mutation, it tries to produce better chromosomes with lower values of objective function.

Using this algorithm, in the second part of model, a step-by-step method has been used as follows:

Consideration of the spot immediately after the pump to insert the air-chamber and candidate suitable points for placing the air-inlet valves according to the operating conditions.

Determination of appropriate diameters for pipes that allow flow velocities to be kept within the limits of Equation (2) according to the flow discharge in steady state.

Generation of pipe choices list using the diameters of step 2.

Generation of a list of appropriate air-chambers and a list of suitable air-inlet valves for selection and placement in the candidate points.

Random production of initial population of chromosomes, and determination of values of variables for any chromosome.

Steady analysis of the system for any chromosome and determination of initial conditions of velocity and pressure for transient analysis.

Transient analysis of the pipeline system for any chromosome of population using the MOC method and obtaining the potential maximum and minimum pressures in transient state caused by a pump trip in all the computational points.

Calculation of

*PF*for any chromosome using maximum and minimum pressures in Equation (9).Calculation of the objective function of any chromosome in the population concerning the total cost of pipe, air-chamber and selected valves for the chromosome and based on Equation (8).

Sorting of chromosomes in the population based on the value of objective function (the rank of chromosome will be higher with fewer objective functions).

Convergence control of GA algorithm; in case of convergence going to step 9 and in case of non-convergence going to step 7.

Production of new generation through Binary Tournament Pairing and BLX-

*α*Crossover Method and building of new population by replacing good chromosomes instead of bad chromosomes.Application of gene mutation in population and returning to step 2.

Selection of best chromosome of population as optimum solution for type of pipe and water-hammer controllers.

For the above-mentioned step-by-step implementation, a programming code was written in Matlab software by which the problem was solved as a case study. In the following, the results of optimization of this case study will be presented, which is a pressurized transmission pipeline.

## CASE STUDY

The studied project in this paper is a water transmission pipeline of 4 m^{3}/s capacity from Vanyar Dam in northeast Iran to Mehranehrood River in Tabriz city. The length of this transmission pipeline is 8,070 m. The start and end levels of the pipeline are 1,508.5 and 1,690 m respectively. The plan and longitudinal profile of the transmission pipeline is shown in Figure 1.

The design of this pipeline by a designer company includes an ST52 metal pipe with a wall thickness of 16 mm. For protection against water-hammer effects due to sudden pump failure, it includes an air-chamber downstream of the pumping station and some air-inlet valves with a uniform orifice diameter in the pipeline. The total cost of pipes and protective devices is US$4,881,000. The general specifications of the pumping station, transmission pipeline and available protective devices are provided in Table 1.

Specification of pumping station . | Specification of transmission pipeline . | Specification of protective system of project . | |||||
---|---|---|---|---|---|---|---|

Type of pump | Horizontal centrifuge | Pipes' diameter | 1,800 mm | Total volume = 20 m^{3} | Air-chamber | ||

Number of pumps | 10 | Maximum allowed pressure | 32 bar | Diameter (mm) | Outlet pipe | Inlet pipe | Air-inlet valves |

Total pumps’ head | 205 m | Pipes’ material | ST52 steel | 450 | 37 | 36 | |

Total discharge | 4 m^{3}/s | Vapor pressure | –0.85 bar | 450 | 40 | 39 | |

Rotational speed of any pump | 1,450 rmp | Pipes’ diameter | 16 mm | 450 | 42 | 41 | |

Outlet valve diameter | 600 mm | Compressive wave velocity | 102 m/s | 450 | 44 | 43 | |

Unit length price | $US588 | 450 | 47 | 46 |

Specification of pumping station . | Specification of transmission pipeline . | Specification of protective system of project . | |||||
---|---|---|---|---|---|---|---|

Type of pump | Horizontal centrifuge | Pipes' diameter | 1,800 mm | Total volume = 20 m^{3} | Air-chamber | ||

Number of pumps | 10 | Maximum allowed pressure | 32 bar | Diameter (mm) | Outlet pipe | Inlet pipe | Air-inlet valves |

Total pumps’ head | 205 m | Pipes’ material | ST52 steel | 450 | 37 | 36 | |

Total discharge | 4 m^{3}/s | Vapor pressure | –0.85 bar | 450 | 40 | 39 | |

Rotational speed of any pump | 1,450 rmp | Pipes’ diameter | 16 mm | 450 | 42 | 41 | |

Outlet valve diameter | 600 mm | Compressive wave velocity | 102 m/s | 450 | 44 | 43 | |

Unit length price | $US588 | 450 | 47 | 46 |

For optimization of the system, the pipeline was divided into 50 computational elements such that the length of any piece does not exceed 200 m. According to Table 2, 12 steel choices with different diameters and thicknesses were considered for entering into the model. In any row of this table, the allowed pressure and price are shown for three thicknesses of 14.2, 16 and 17.5 mm for any diameter of pipe.

Number of choice . | Nominal diameter of pipe (mm) . | Steel pipe . | Wall thickness (mm) . | Allowed pressure (bar) . | Unit length meter price ($) . |
---|---|---|---|---|---|

1, 2, 3 | 1,800 | ST52 | 17.5-16-14.2 | 35-32-29 | 643-587-520 |

4, 5, 6 | 1,900 | ST52 | 1705-16-14.2 | 34-31-28 | 678-620-531 |

7, 8, 9 | 2,000 | ST52 | 17.5-16-14.2 | 32-29-26 | 714-653-554 |

10, 11, 12 | 2,200 | ST52 | 17.5-16-14.2 | 29-27-24 | 785-715-612 |

Number of choice . | Nominal diameter of pipe (mm) . | Steel pipe . | Wall thickness (mm) . | Allowed pressure (bar) . | Unit length meter price ($) . |
---|---|---|---|---|---|

1, 2, 3 | 1,800 | ST52 | 17.5-16-14.2 | 35-32-29 | 643-587-520 |

4, 5, 6 | 1,900 | ST52 | 1705-16-14.2 | 34-31-28 | 678-620-531 |

7, 8, 9 | 2,000 | ST52 | 17.5-16-14.2 | 32-29-26 | 714-653-554 |

10, 11, 12 | 2,200 | ST52 | 17.5-16-14.2 | 29-27-24 | 785-715-612 |

Moreover, concerning the existing facilities for protective devices, seven choices of air-chamber and three choices of air-inlet valve are shown in Table 3 with their specification and prices used in optimization.

Air-chamber . | Air-inlet valve . | ||||
---|---|---|---|---|---|

Choice number . | Price (thousand dollars $US) . | Total volume of tank (m^{3})
. | Choice number . | Price (thousand dollars $US) . | Inlet orifice diameter (mm) . |

1 | 50 | 8 | 1 | 7 | 300 |

2 | 55 | 10 | 2 | 9 | 450 |

3 | 100 | 20 | 3 | 12 | 600 |

4 | 250 | 25 | |||

5 | 300 | 30 | |||

6 | 340 | 35 | |||

7 | 367 | 40 |

Air-chamber . | Air-inlet valve . | ||||
---|---|---|---|---|---|

Choice number . | Price (thousand dollars $US) . | Total volume of tank (m^{3})
. | Choice number . | Price (thousand dollars $US) . | Inlet orifice diameter (mm) . |

1 | 50 | 8 | 1 | 7 | 300 |

2 | 55 | 10 | 2 | 9 | 450 |

3 | 100 | 20 | 3 | 12 | 600 |

4 | 250 | 25 | |||

5 | 300 | 30 | |||

6 | 340 | 35 | |||

7 | 367 | 40 |

The air-chamber has been considered immediately downstream of the pump. All connecting points of the pipes are also candidates for positioning of air-inlet valves.

To implement the genetic algorithm, 60 chromosomes were used and the gene mutation rate has been considered as 2%. The convergence criterion is considered as standard deviation <0.01 for objective functions of good chromosomes of the population, and the maximum number of allowed generation for complete implementation of the program is considered as 1,000.

The result of the program is choice number 4 for pipe, an air-chamber of volume 10 m^{3} and six air-inlet valves, at a total cost of US$4,382,170, which is a decrease of approximately 10% compared to the existing design. The differences of this proposed design with the current one are the pipe thickness, which has decreased from 16 to 14.2 mm, and the diameter, which has increased from 1,800 to 1,900 mm. Moreover, the air-chamber has decreased to half and the number of air-inlet valves has increased from five to six; however, the required orifice diameter has decreased from 450 to 300 mm. Table 4 presents a summary of the optimization results of the pipeline.

Type, diameter and thickness of pipe . | St52 steel pipe of diameter 1,900 mm and thickness 14.2 mm . | ||
---|---|---|---|

Air-chamber . | Total volume = 10 m^{2}. | ||

. | Orifice diameter (mm) . | Outlet pipe . | Inlet pipe . |

Air-inlet valves | 300 | 32 | 31 |

300 | 35 | 34 | |

300 | 38 | 37 | |

300 | 41 | 40 | |

300 | 44 | 43 | |

300 | 47 | 46 | |

Total cost of pipes and water-hammer controllers: US$4,382,170 |

Type, diameter and thickness of pipe . | St52 steel pipe of diameter 1,900 mm and thickness 14.2 mm . | ||
---|---|---|---|

Air-chamber . | Total volume = 10 m^{2}. | ||

. | Orifice diameter (mm) . | Outlet pipe . | Inlet pipe . |

Air-inlet valves | 300 | 32 | 31 |

300 | 35 | 34 | |

300 | 38 | 37 | |

300 | 41 | 40 | |

300 | 44 | 43 | |

300 | 47 | 46 | |

Total cost of pipes and water-hammer controllers: US$4,382,170 |

The variation trend of the objective function in various generations for specific implementation of the optimization program is shown in Figure 2.

To show the hydraulic function of the optimized system at water-hammer occurrence, the maximum and minimum pressures diagram in the pipeline have been compared with the allowed maximum and minimum pressure in Figure 3. It should be noted that the relative vapor pressure in Tabriz city is –8.67 mH_{2}O.

## CONCLUSIONS

For optimization of transmission pipelines and achieving minimum cost, it is necessary to consider the effects of transient flow due to water-hammer. In this regard, the effect of various factors, including the specification of pipe and its position and the type of water-hammer controllers that have mutual effects, is also important. In this paper, these mutual effects have been considered in the optimum design of a water transmission system in GA-based optimization. In the presented model, a combined flowchart has been used, consisting of a self-adaptive real genetic algorithm and flow analysis in transient and steady states that, in addition to obtaining the best diameter, optimizes the thickness and pipe class, and the position and type of water-hammer controller. The results of this model have yielded minimum cost while respecting constraints of fluid flow in transient and steady states and its features include the use of a penalty function for consideration of these hydraulic constraints in objective function and the use of a self-adaptive algorithm for regulation of these penalty functions. The advantage of using this model in designing the transmission pipeline of Vanyar Dam to the Mehranehrood River of Tabriz as a case study is a 10% reduction of total costs of pipes, air-chamber and air-inlet valves compared to the designer company results. Moreover, despite the fact that one of the weaknesses of the genetic algorithm is relatively slow convergence and it being time-consuming, the use of a self-adaptive algorithm and application of proper parameters, binary tournament pairing selection method and BLX-*α* Crossover Method, has led to a considerable increase in the convergence speed of the model in this case study. In addition to guaranteeing the velocity and pressure control in transient and steady states, the mentioned capabilities make use of the presented optimization model in transmission pipelines of long length leading to considerable cost saving in pipeline implementation.