Application of Central Force Optimization Method to Design Transient Protection Devices for Water Transmission Pipelines

One of the major challenges in designing under pressure water transmission pipeline is the system protection against water-hammer pressures due to a pump trip. The best strategy is to use air-chamber; which imposes considerable costs. To mitigate the air-chamber volume, the use of air-inletvalvesis also suggested. Determination of air-chamber volume as well as the type and proper locations of air-inlet valves, aiming at the cost reduction, introduces an optimization problem. To solve this problem, this study exploitsthe central force optimization (CFO) method. Herein, a case study pipeline is optimized using the proposed model based on the CFO and is compared with results of a genetic algorithm (GA) based model. Both methods yielded almost the same results and led to about 30% saving in the system protection cost. However, a comparison between the methods showed that the CFO dramaticallyoutperforms GA in both terms of computational efficiency and reliability of the results.


Introduction
An important issue in designing a water transmission pipeline is the system protection against water-hammer effects mainly caused by sudden pump trip.This event could create severe positive and negative oscillations in the system.The pressure exceeding the allowed capacity of the pipe would lead to cracking and the pressure less than vapor pressure would result in cavitation.The protection devices in pipelines are required for avoidance of undesired pressures.Of the best protective devices against water-hammerissues is the air-chamber (Stephenson, 2002) consisting of an under pressure vessel with a dual function.Theair-chamberis connected to the pipeline via a conduit with the automatic control valve.At significant positive pressures, the fluid is introduced into thevessel through the open valve and the pipeline pressure shall decrease.At negative pressure, the valve gets open, and the fluid shall discharge from the vessel to the pipe to compensate for the negative pressure.The best position for the installation of an air-chamber and connection to the pipeline is as much close to the outlet of pump station (Wang et al, 2013).In high-capacity large transmission pipelines, a high-volume air-chamber is needed due to the largewater-hammer issues.The increase of air-chamber volume would impose significant costs on the project.In order to decrease the protection costs, it is recommended to use other devices to help the air-chamber performance in the system and reduce its volume.Concerning the main effect of pump trip that is negative pressure in the pipeline, the use of air-inlet valves is a good choice.Air-inlet valves could be installed along the pipeline so than when the inside pressure is less than outside; the air-inlet valve would balance the pressure by letting air into the pipeline and avoids negative pressure.Due to lower cost of air-inlet valves, its use in the pipeline could decrease the air-chamber volume and minimize the total cost of the system transient protection.Determination of the suitable type, number and proper position of air-inletvalves as well as obtaining a proper air-chamber that could minimize the total cost subject to the safe bound of transient pressures introduces a constrained nonlinear optimization problem.
The design of transmission pipelines considering the transient flow consequences has attracted many researchers in the field of hydraulic engineering.Laine and Karney (1997) applied the optimization to a simple pipeline connecting a pump and a storage reservoir and used complete enumeration and a Probabilistic Selective Simulation (PSS) method for analysis of steady and unsteady states to obtain a hydraulically optimal protective method.Lingireddy et al. (2000) developed an optimization model to optimize the surge tank size using GA while satisfying a specified set of pressure constraints.Jung and Karney (2004) studied the effects of unsteady flow on the selection of optimum diameters of a pipe network with the consideration of design criteria of both steady and unsteady flow states.They used both GA and particle swarm optimization (PSO) method.Jung and Karney (2006) used the combined GA and PSO to optimize the size and position of water-hammer protection devices in a water distribution network.They showed that in most cases, simpler optimal methods act better than more complex water hammer protection methods.In another study, Jung et al. (2009) formulated the optimum design of a water distribution system in unsteady state conditions using a multi-objective optimization scheme and considered the minimization of pipeline cost and maximization of hydraulic reliability as the objective functions.Jung et al. (2011) used a multi-objective optimization method to optimize the pipe diameters in a water distribution network.They selected the surge damage potential factor as one objective function and the pipe network cost as another objective function.They used the non-dominates sorting genetic algorithm (NSGA) to obtain the optimum trade-off between the problem's objective functions.The decision variables were the pipe diameters and no transient protection device was optimized there.Jung and Karney (2013) performed two-step optimization for design of a water distribution system for the worst unsteady flow scenarios.First, the PSO method was used for identification of a set of critical nodes with the highest effects in unsteady flow.Then, a multi-objective optimization was used to determine the optimal pipe sizes with consideration of two objective functions of minimizing the total cost and damage of unsteady flow.Jazayeri Moghaddas et al. ( 2016) developed an optimization model to find a reliable and cost-effective transient protection design for large scale pipeline systems subjected to a pump trip.They used the self-adaptive real genetic algorithm as an optimization tool was linked to the transient simulation solver which is based on the method of characteristics.The proposed model applied to a real case study and was found that careful allocating and sizing of the air-inlet valves along the pipe results in a significant reduction of air-chamber volume and consequently, total cost of water-hammer protection design.But using GA method in their work cause the restriction that is the time consuming and slow converging of optimization model.This restriction becomes so bold when the pipeline is very long and the number of required devices is high.
In this study, the capability of the Central Force Optimization (CFO) method to design of transient protection devices is investigated.CFO has been originally developed by Formato (2007) and extended by him through several papers (Formato 2009;2010 and2011).The method then drew the attention of many researchers in various disciplines such as Ding et al. (2012), Leu and Tian (2015), Chen et al. (2016) as well as inverse transient analysis for leakage detection in piping systems (Haghighi and Ramos 2012).This study aims at applying the CFO to the problem of air-chamber and air-inlet valves optimization.For this purpose, the CFO is coupled to a transient flow simulation model based on the method of characteristics (MOC).This model is used to analyze the water-hammer in the pipeline as a function of the air-chamber volume and the type, number and location of air-inlet valves as the problem decision variables.The objective is to minimize the transient protection cost.
In following, first the equations governing transient flow in pipelines as well as the numerical method of MOC are briefly explained.Then, the optimization problem and the CFO method are introduced.Afterward, the model is applied to a real pipe system, and results are presented and compared with results of a genetic algorithm(GA) based model.Finally, the results are discussed, and the main findings are concluded.

General Water-Hammer Analysis
The continuity and momentum equations governing the unsteady flow in an under pressure pipe are as follow (Wylie and Streeter, 1993).
where, is the distance along the pipe; is time, = ( , ) is the total head; = ( , ) is the flow discharge; is the pipe inside diameter, is the pipe cross-sectional area; is the wave speed; is Darcy-Weisbach friction factor and is the gravity acceleration.
These equations are classically solved by the Method of Characteristics (MOC).The MOC has become popular and is extensively used for the solution of one-dimensional, hydraulic transient problems, especially if the wave velocity is constant.This method has proven to be superior to other methods in several aspects, such as highly accurate simulation of steep wave fronts, the illustration of wave propagation, ease of programming, and efficiency of computations (Chaudhry, 2014).The MOC method is well developed and described is standard references like Wylie and Streeter (1993) and Chaudhry (2014).

Optimization Method
In combined design of system protection against transient pressures, the position of air-chamber should be constant and close to the pump; however, the position and number of air-inlet valves should be determined concerning transient pressure profile affected by the protection devices.Thus, regarding the problem's goal that is the protection cost minimization, the decision variables are the type and positions of air-inlet valves and the air-chamber volume.To this end, some points along the nominated for locating the air-inletvalves.A real-valued number is assigned by the optimization to each variable which is then decoded to select one of the pre-defined options for the valve.When the assigned number to a candidate location iszero it means that there is no valve there.The other decision-making variable is the air-chamber type whose value could be selected from several pre-defined options.Thus, the value of this variable is a number between 1 and the number of air-chamber options.Accordingly, the mathematical programming of the problem is introduced as the following: Subject to: where, is the objective function, C is the cost of air-chamber, C is the cost of air-inlet valve number i, n is the number of air-inlet valves in the system, is the number of computational nodes of the pipeline, and is are respectively the minimum and maximum pressures at node , .
is the minimum allowable pressure at node , i.e., a safe pressure value far enough from the water vapor pressure at that node, and . is the maximum allowable pressure at node , which is determined according to the wall thickness of the pipe.

While the decision variables are:
which is related to volume of air-chamber and for i=1 to n that are related to types and number of air-inlet valves.
The main objective function (Eq.3) in this optimization model is the cost of protection devices that should be minimized.This minimization should be along with maintaining pressures in a safe bound.To make the optimization unconstrained, the pressure constraint is included in the objective function using a proper penalty function.This means that in the case of the deviation from the pressure constraint, the objective function is added a considerable penalty value.Accordingly, the objective function is defined as the following.
where, is the modified objective function and the is the penalty function.It is worth noting that since the optimization model in this study, the CFO, is a maximization approach the objective function is multiplied by −1.Also, the penalty function is defined as follows.
where, is the penalty factor.Penalty value is zero when the pressure is in the allowed bound and bigger than zero when it is out of the safe bound.

CFO Method
In this research, the CFO algorithm is used to solve the above problem.This method is based on the probes movement toward each other in a decision space by Newton laws.This algorithm is sensitive to the initial distribution of probes.Many suggestions have been proposed for initial distribution such as uniform distribution in any direction, distribution on the diagonal space, uniform orthogonal distribution in any direction or random distribution.This sensitivity to initial distribution always adds to the strength of method in contrary to the topology of the problem.In this method, after determination of the input parameters of algorithm and the border bounds of the problem, the probes should be initially distributed in decision space by any of methods mentioned above such that for any probe, a dimensional vector is allocated as situation vector R and a dimensional vector as acceleration vector A.
is the number of decision variables.Firstly, elements of vectors A is assumed to be zero for all probes and having R for any probe determined from early distribution, the calculation of objective function value for any probe will be done to be stored in variable M.Then, the algorithm enters time steps cycle and computes the new positions of probes.Determination of new position of probes is possible using equation of motion.This equation for any decision variable in any probe is according to following relationship.
where, ( , , ) is the position of i th decision variable for p th probe in time j, ( , , − 1) is position vector in time − 1, ( , , − 1) is acceleration vector in time − 1 and ∆ is length of time the interval that is usually considered as unit (∆ = 1).
Acceleration vector for any j time moment could be calculated from the following equation.
where, ( , ) is the objective function for p th probe inj th moment and, where, , is coordination of probe in direction of th decision variable in th moment and ̂ is unit vector in direction of th decision variable.Constant values , and should be determined by calibration.If the obtained values for ( , , ) in equation ( 6) is outside the minimum and maximum range, they are returned to allowable bound using equations ( 11) and ( 12): Where, and are minimum and maximum values of th decision variable and whose value for any problem should be determined by trial and error.
Fig. 1 presents a flow diagramto explain better how the above equations are used in the CFO to update the probes positions and move them toward the optimum results.
On this basis, the CFO is applied to solve the problem of transient protection devices as explained in the next paragraphs.
Before the optimization, the pipeline is designed for normal conditions to obtain the initial values of velocity and pressure.Then, the candidate points for locating the air-chamber and air-inlet valves are decided.The pipeline transient simulation model is developed knowing the pipe material, diameter size, thickness of pipe wall, the length of pipeline pieces and specifications of pump station as well as the list of available options for any protection device.Then the CFO is used to obtain the cheapest air-chamber and air-inlet valve combination for the protection of the system for a given scenario of pump trip.

Figure 1. Flow diagram of CFO method
As discussed earlier, the CFO is deterministic, and no randomness is used in it to disturb the starting positions.Therefore, the initial distribution of probes is crucial and can highly influence the final results.In this study, three methods of uniform distribution, diagonal distribution and uniform orthogonal distribution on axis as proposed by Formato (2011) are used to select the best starting position for the problem at hand.As this optimization is for selection of the best air-chamber and air-inlet valve from the available options, decision variables are discrete while the CFO is a continuous method.Thus, in the implementation of the algorithm, the variables are assumed continuous and real but, when a variable is introduced to the commercial list to choose a device, it is rounded to an integer number according to the list length.On this basis, the problem is solved through the following main steps.The position of air-chamber is considered close to the pump.Based on several initial implementations and after specifying that the critical area of negative pressures is the end half of the pipeline, the connection points of 19 reaches at the end part of system are candidate for locating air-inlet valves.For optimization of the problem through the CFO, the number of probes is decided twice the number of decision variables.In this study, there is a variable for the air-chamber volume size and 19 variables for the locations of air-inletvalves; accordingly 40 probes are used for the CFO modeling.
For the initial distribution of probes in decision space, three methods of uniform distribution, diagonal and orthogonal distributions were used.The best values for other parameters of the CFO method were calibrated by some initial trial and error runs as presented in Table 3 and applied to the model.

Preferences in CFO method
Jazayeri Moghaddas et al.(2016) for the implementation of the model by GA, considered the population size to be 80 chromosomes, the mutation rate 2%, and the binary tournament pairing and the blending crossover methods.
The best result of the CFO implementation was obtained from the orthogonally locating of the initial probes.The best result introduces an air-chamber of volume 10 m 3 and six air-inlet valves of differing diameters to the protection system design.The total cost of the optimum protection design is obtained 101,000.The interesting point is that this result is the same as the GA optimization result.The total cost of the optimum protection design is about 30% cheaper than the existing design (145,000 dollars).Parameter 0 ≤ ≤ 1 determines where along the diagonal the orthogonal probe array is placed (Formato, 2011).As seen in Table 5, the results of CFO are significantly under the influence of the initial distribution of probes.In 12 different implementations of table 5, the best result is associated with the initial distribution method of uniform orthogonal in any direction by = 0.8 parameter.Fig. 3 shows the trend of objective function optimization versus the iteration number for the best runs of CFO and GA.As the number of CFO probes is 40 and the size of GA population is calibrated 80, for the same number of iterations, the total number objective function evaluations in GA are twice the evaluations in the CFO.Furthermore, fig. 3 manifests that the CFO has reached the global optima only after 109 iterations while the GA has come to the same result after 270 iterations.Accordingly, it is concluded that in the current problem of pipeline optimization, the CFO is much faster than GA.Also, the GA is a stochastic method implying that to achieve the global optima the optimization is required to be repeated several times each run may not necessarily lead to a unique response.By contrast, the CFO is deterministic and once its parameters were calibrated there is no need to repeat the optimization since no randomness is usedin its procedure.Nevertheless, the CFO is very sensitive to its parameters as well as the initial probes distribution.A decision on the proper parameters highly needs the user attention and experience in the application of CFO.This method is still in its infancy and required more development and application to be popular and easy to parameter setting like the well-known methods of GA and PSO.

Conclution
The protection of water transmission pipelines against transient pressures caused by water hammer is quite necessary.These pressures impose significant costs on the project construction and operation.An optimal combination of the protective devices for this issue can considerably reduce the system costs.Determination of the least-cost protective design for water-hammer issues introduces a constrained nonlinear optimization problem.In this study, a recently developed nature inspired optimization method namely the Central Force Optimization (CFO) was applied to the problem.The CFO is deterministic and easy to understand and implement.Application of the method to a real piping system reveals its efficiency in both terms of speed and accuracy when optimizing the combination of air-inlet valves with the air-chamber in the system.The CFO was also compared to a standard genetic algorithm (GA).Computations manifested that for the case study optimized here the CFO outperforms the GA regarding the convergence speed.Finally, both optimization methods resulted in about 30% reduction in the pipeline protection costs compared to the existing design.Accordingly, the optimization of the water-hammer protection devices for long pipeline systems is found crucial and highly recommended.

Figure 3 .
Figure 3.The trend of problem optimization in CFO and GA

Table 5
Table4shows the results of optimized protection design yielded from both optimization methods.also presents the results of CFO for different methods of initial distribution of probes.