International Journal of Chemical Engineering
Volume 2017 (2017), Article ID 1640303, 9 pages
https://doi.org/10.1155/2017/1640303

Research Article

Route Optimization of Pipeline in Gas-Liquid Two-Phase Flow Based on Genetic Algorithm

Jun Zhou,¹ Guangchuan Liang,¹ Tao Deng,² and Jing Gong³

¹Southwest Petroleum University, Chengdu 610500, China
²China National Petroleum Corporation Guangzhou Petroleum Training Center, Guangzhou 510510, China
³China University of Petroleum (Beijing), Beijing 102249, China

Correspondence should be addressed to Jun Zhou; 201599010096@swpu.edu.cn and Guangchuan Liang; lgcdjr@163.com

Received 23 October 2016; Accepted 13 December 2016; Published 19 January 2017

Academic Editor: Jose Alberto Romagnoli

Copyright © 2017 Jun Zhou et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

This paper describes the problems in route optimization of two-phase pipelines. Combining the hydraulic calculation with route optimization theory, this paper establishes an automatic route optimization model and adopts the general genetic algorithm (gGA) and steady-state genetic algorithm (ssGA) to solve the model, respectively, gets the optimal route, and discusses the influence of parameters setting to the result. This algorithm was applied in determining pipelines routes in coalbed methane gathering and transporting system in Shanxi Province, China. The result shows that the algorithm is feasible, which improves the hydraulic properties by reducing the pressure drop along the line while the pipeline length is still acceptable.

1. Introduction

In a recent decade, to meet the constant need of energy, although the global economy has come through a downturn, the oil-gas pipelines construction is still prosperous around the world. In 2013, the total length of pipelines under construction or planned to be constructed is about 188,108 km, and the length of those under construction is 53,180 km, 11.4% longer than that in the year 2012, 47,732 km. During the construction, the first step is to determine the pipeline route. The task is frequent and time-consuming and plenty of attempts have been made. Traditionally engineers would determine the route manually on a printed map or solve the problem with optimization theory. Early in the year 1971, Shamir [1] used dynamic programming to determine the optimal route on manual mesh. In years 2004 and 2012, Meisingset et al. [2] and Marcoulaki et al. [3] established the mathematical optimization models in terms of minimum investment separately for submarine pipelines and ground pipelines and solved the models with simulated annealing, but those models did not involve the hydraulic properties.

In the problem of oil-gas pipeline route optimization, pipe flow may be single-phase or multiphase. Multiphase pipe flow is different from single-phase pipe flow; the pressure drop is closely related to the height along the line. Both uphill section and downhill section can be energy-consuming, yet the energy loss in the uphill section cannot be replenished by the gravity effect of downhill section. Thus with the same starting/ending location and pipeline length, but different routes and different topographic reliefs, different pipelines possess different hydraulic properties. In literature, Xiao et al. [4] used algorithm to study the optimal route of gas-liquid two-phase flow pipeline, yet algorithm is not a global optimization algorithm, which is based on a combined algorithm between Dijkstra’s algorithm and Best-First-Search algorithm. In this paper, the authors would use a global optimization algorithm-genetic algorithm (GA) to discuss the optimal route programming of gas-liquid two-phase flow pipelines.

2. Gas-Liquid Two-Phase Pipe Flow

In oil-gas field, people would usually use one pipeline to transport the product of several wells. As long as two-phase flow exists in the pipeline, the pipeline is defined as two-phase pipeline. In an oil-gas mixture transportation pipeline, the oil-gas ratio may vary a lot in different parts. In drainage pipes of oil-gas separators, the flowing liquid is basically crude oil, but along the pressure drop some dissolved gas would come out. In venting pipes of oil-gas separators, the flow inside is basically natural gas, yet along the flowing there may be water or heavy hydrocarbon condensated. For example, in the coalbed methane gas fields which are largely exploited, the gas came out from the well; along the gas flow there would be water condensation; then gas-liquid two-phase flow would appear. At the same time, in gathering and transporting process, it is not economic to use two pipelines separately transporting crude oil and natural gas in small quantities. Thus in the surface gathering and transporting system, mixture transportation pipelines are widely used. Moreover, in some specific conditions, mixture transportation has some advantages that single-phase pipeline cannot compare with. For instance, in some places that are not suitable for installing gas-liquid separators and processing facilities (such as urban areas, desserts, lakes, ecological reserves, and swamplands), mixture transportation pipelines are necessary. Those pipelines tend to go through hills or mountainous areas, which does not cause any problems when the pipelines are single-phase, because the pressure energy loss during uphill section would be replenished during downhill section. Yet in two-phase flow the situation is much different. Since the liquid holdup and the density of the gas-liquid mixture in downhill section are much smaller than those in uphill section, the pressure cannot be regained that much in downhill section. Therefore, as far as multiphase pipeline route determination is concerned, engineers must give high priority to the hydraulic properties of the pipe flow and combine it with the route optimization.

The distribution of gas and liquid in the two-phase pipe flow varies a lot, and flow patterns vary a lot too. These would influence not only the mechanical relationship of the two-phase flow but also the heat and mass transfer; thus the gas-liquid two-phase flow is very complicated. Currently there are plenty of calculation models of gas-liquid two-phase flow with their own advantages and disadvantages. Yet the research of two-phase models goes beyond our study in the paper. This paper plans to use existing gas-liquid two-phase Beggs-Brill [5] model to integrate hydraulic simulation with route optimization algorithm.

3. Optimization

Route determination involves many aspects, such as like pipeline’s design, construction, operation, and maintenance, which include the security of the pipeline, hydraulic and thermal conditions, environmental conservation, historical sites, soil and hydrological conditions, and construction requirements. For route optimization based on intelligence algorithm, the route programming of oil-gas pipelines mainly deals with the following factors: oil-gas production; oil-gas physical properties; the starting point and terminal of the pipeline; the starting and ending pressure of the pipeline; the areas that the pipeline goes through; heights of different places; land types (rocky soil, sandy soil, etc.); forest covered area; source of water, rivers, roads, railroads, and impenetrable areas. The material and labor costs of pipeline construction; the pipes; regional regulation; constructing techniques; construction goal (usually minimum investment); and other factors influencing the pipeline construction.

We need to find the pipeline route from the starting point to the terminal, satisfy the gas-liquid two-phase flow characters and other constraint conditions, and then make the object function minimum. This paper focuses on the two-phase pipeline route on complex topography, using digital topographical data to decide the optimal route. The overview of the optimization tool is shown in Figure 1.

Figure 1: Optimization tools.

3.1. Topographical Data

Digital Map. Automatic route optimization is carried out on digital maps, using discrete data (see Figure 2) to represent the continuous surface. Discrete data is the approximation of continuous surface. The higher the resolution is, the closer the approximation is to the real topography and the more accurate the route tracing is. Yet there is a highest resolution limitation. This form has a good compatibility and is consistent with the grid data of GIS (Geographic Information System).

Figure 2: Topographical sample (approximately showing real topography).

3.2. Algorithm

On the issue of shortest route, the researchers studied several intelligence algorithms [6–8]. Among them, genetic algorithm was established simulating Darwin’s evolution theory, which can be used to solve the problems of function optimization or machine learning. It imitates the procedure of inheritance and evolution, that is, selection, replication, crossover, and variation, and introduces the concept of “survival of the fittest” into the algorithm. The block diagram of genetic algorithm is shown in Figure 3.

Figure 3: The block diagram of genetic algorithm.

To carry out the hydraulic calculation of gas-liquid two-phase pipeline, we adopt the method of segmentation to calculate the pressure drop of different sections one by one.

The symbol of discretization is shown in Figure 4. The starting point is , ending point is , and the nodes divide the pipeline into many sections. The starting and ending points of pipe section are and . If only hydraulic calculation is conducted, it means to do hydraulic simulation on a determined route and to manually set the mesh spacing (usually equal mesh spacing). However, in three dimensions, the route is not determined. Therefore at the same time with route optimization, hydraulic calculation must be taken into consideration.

Figure 4: Discretization sketch of gas-liquid two-phase pipeline.

During the optimization, each route represents a pipeline. The nodes on the route divide the pipeline into pipe sections with different lengths, as shown in Figure 5. Calculation accuracy can be guaranteed when the mesh spacing is small enough.

Figure 5: Discretization sketch of pipeline route.

In route optimization, assuming that there is a ground area with limited boundaries, starting point is A and ending point is B . There are many routes going from A to B. Assuming that the investment of pipeline is proportional to the pipeline length, the route optimization is to find a route that can minimize the construction investment or optimize other object functions.

The initial population contains routes; the route in generation is expressed as

The length of route in generation is expressed as

Taking hydraulic conditions into consideration, we have the following.

The pressure drop between adjacent nodes is , so the pressure drop along the route in generation is expressed as

Pressure drop can be calculated by many methods.

Fitness function is expressed as

Due to the grid data, in genetic algorithm we use integer coding, roulette wheel selection, single-point crossover, and single-point variation for calculatation; repeat the procedure in Figure 3 till the best individual is found.

3.3. Realization

Due to the complexity of terrain pipeline optimization, it is often unable to obtain the best path. As we all know, under the plane condition, straight line between two points is the shortest [9]. To test the program, we first optimize the shortest path between two points on the plane.

Supposing the population size and the maximum number of iterations are 200 and 1000, respectively, crossover probability and mutation probability are 0.95 and 0.2, respectively. Figure 6 shows the algorithm convergence; as can be seen from the figure, the algorithm converges quickly and approaches the best solution after 250 iterations. Figure 7 shows the path graphs under different generations, and the path approaches a straight line between two points after 500 iterations.

Figure 6: Performance of the GA in finding the best solution.

Figure 7: Routes sketch of different generations in optimization.

3.4. Test Results and Discussion

General and steady-state genetic algorithms with roulette wheel selection, arithmetic crossover, and uniform mutation are adopted. The computer is Samsung R408, Intel Pentium dual T3400, 2.16 Hz, 1 G RAM.

Generate the digital map with topographical model function.

Parameters of topographical function are shown in Table 1.

Table 1: Parameters of topographical function.

1
25
87
1.5
1.5
30
20
57

2
64
28
2
3.5
65
12
19

3
34
53
3
2
21
13
−32

4
77
92
2
2
6
25
38

5
94
55
3
3
11
14
24

6
65
24
1.5
1.5
13
9
−22

7
15
11
3
2
11
16
−14

8
93
14
3
3
13
11
−17

Here is the route programming of complex topography with grid data. The example digital map is in Figure 8. Mesh number is 20 × 20 and mesh size is 5 × 5.

Figure 8: Digital profile of topographical surface.

For genetic algorithms, crossover probability (CP) and mutation probability (MP) are extremely important parameters, which directly affect the optimization quality of the algorithm. In this paper, to analysis the sensitivity of the two GAs to the parameters, CP ranges from 0.4 to 1.0 and MP ranges from 0.0005 to 0.3. Figure 9 shows the averages results of ten independent operations at different probabilities. Two genetic algorithms are sensitive to CP and MP. Both of them can obtain best function evaluation values when CP is big. Yet the MP of GN GA is small but that of SS GA is big.

(a)

(b)

Figure 9: Effect of variations of CP and MP on the performance of gGA (a) and ssGA (b).

The optimal results of two GA are shown in Table 2. The average and best result of GN GA both are a little smaller than those of SS GA. The best evaluation value is 163.18. In Figure 10, the red curve is optimal route and it bypasses the low areas in the middle.

Table 2: Best result obtained from ssGA and gGA.

GN GA
SS GA

CP, MP
0.9, 0.005
1.0, 0.1

Average evaluation value (over ten times)
172.19
173.09

Best evaluation value (over ten times)
163.18
167.34

Figure 10: Result of route curves.

4. Example Analysis

The existing pipeline data and simulation parameter is shown in Table 3.

Table 3: Parameter of pipeline simulation.

Parameter
Parameter value

Volume flow rate of gas, m³/d
4000

Volume flow rate of liquid, m³/d
0.3

Starting pressure, MPa
1.5

Pipe diameter, m
0.2

The calculation model of gas-liquid two-phase pipe flow is Beggs-Brill [8] model to calculate liquid holdup and pressure drop. For more detailed information of the model, please refer to Appendix A.

The topographical data comes from digital map, whose file format is TIF shown in Figure 11 and the pixel size in grid information is 21 m × 136.21 m. The elevation model of this block (red box in Figure 11) is shown in Figure 12, with an area of 27.5625 km² and mesh number of 250 × 250.

Figure 11: Topography file in TIF of some block.

Figure 12: Pipeline route in contour map.

In Figure 12, point A is the starting point, point B the ending point, and dotted line the existing pipeline. It is obvious in the figure that the line passes through high mountains in the middle. With the model in this paper we can get the optimal route represented by solid line. From the starting point, the line goes down and bypasses the hills to the ending point. The route under three-dimension topography is shown in Figure 13.

Figure 13: Pipeline route in 3D topographical map.

The calculation results are presented in Table 4. Table 4 lists out the pipeline length and pressure drop of both optimal route and real route. From Figures 14 and 15, the variation of existing pipeline elevation is big while the optimal pipeline elevation goes gently. Pipeline length increased to 5570.194 m from 5433.804 m by 2.45%, yet which is still acceptable, and the pressure drop along the line reduced to 0.644 MPa from 1.021 MPa by 36.92%. This greatly improves the hydraulic properties of the pipeline.

Table 4: Calculation results.

Real value
Calculation result

Pipeline length
5433.804 m
5570.194 m

Pipeline pressure drop
1.021 MPa
0.644 MPa

Figure 14: Elevation along the line.

Figure 15: Pressure along the line.

5. Conclusions

(1)This paper establishes a pipeline route determination model combined hydraulic calculation in complex topography. With the digital topographical data, the optimal route can be automatically determined.(2)Genetic algorithm can be used to select an optimal route for gas-liquid two-phase pipeline. The parameters of genetic algorithm would have an influence on optimization result. If topographical data and pipeline parameters are known, with a program the optimal route can be determined. As the example in paper, this method can reliably seek out the route.(3)This paper gives a structure of pipeline route design. It is a reference for the engineers. They can add other expenses according to the real situation.

Appendix

A. Beggs-Brill Liquid Holdup Relative Expression

Beggs-Brill relative expression (BB relative expression) can be used to calculate the liquid holdup. When dip angle , the calculation result is the liquid holdup of horizontal pipes; when , the result is the liquid holdup of inclined pipes, which has a correction factor.

Before calculating liquid holdup, first identify flow pattern, and Table 5 presents the rules of flow pattern identification.

Table 5: Rules of flow pattern identification.

Flow pattern
Identification rules
Calculating method of

Fr

Separated flow
<0.01
<

≥0.01
<

Transition flow
≥0.01
> & <

Intermittent flow
≥0.01 & <0.4
> & <

≥0.4
> & ≤

Dispersion flow
<0.4
≥

≥0.4
>

The equation to calculate liquid holdup of horizontal pipe is

In the equation, is volume liquid holdup and is Froude dimensionless number.

With different flow pattern, we use different coefficient to calculate , , and . The results are listed in Table 6.

Table 6: Different coefficient of a, b, and c.

Flow pattern
a
b
c

Separated flow
0.980
0.4846
0.0868

Intermittent flow
0.845
0.5351
0.0173

Dispersion flow
1.065
0.5824
0.0609

Correction factor is

When ,

In the equation, is liquid apparent velocity index.

The coefficients , , , and depend on flow patterns, as shown in Table 7.

Table 7: Coefficient values.

Flow pattern

Uphill separated flow
0.011
−3.768
3.539
−1.614

Uphill intermittent flow
2.96
0.305
−0.4473
0.0978

Uphill dispersion flow

ϕ = 1

Downhill flow
4.70
−0.3692
0.1244
−0.5056

The correction factor ϕ represents the liquid holdup ratio of inclined pipe to horizontal pipe:

B. Beggs-Brill Pressure Drop Relative Expression

B.1. Pressure Drop Gradient Calculating

In the equation, is liquid holdup, dimensionless; is average absolute pressure of flow in the pipe, Pa is -hydraulic friction coefficient of gas-liquid mixed pipeline, dimensionless; is density of gas and liquid, kg/m³; is mass flow rate of the gas-liquid mixture, kg/s; is the flow velocity of gas-liquid mixture, m/s; is apparent velocity of gas, m/s; is inner diameter of pipes, m; and is dip angle, degree.

Among all those calculating methods of gas-liquid mixture transportation pipeline with topographic relief, BB pressure drop calculating method is the only one taking downhill energy recovery into consideration. If liquid holdup equals 1 or 0, the method turns into calculating single-phase liquid or gas pipeline.

B.2. Laws of Two-Phase Hydraulic Friction Coefficient

Assuming hydraulic friction coefficient of homogeneous flow is , the hydraulic friction coefficient ratio of two-phase flow to homogeneous flow is .

When .

For hydraulically smooth pipes, the hydraulic friction coefficient of homogeneous flow is , which can be looked up in Moody graph or calculated by the following equations:

Figure 16 is the program chart of BB method to get pressure drop.

Figure 16: The program chart of BB method.

Nomenclature

: | Route number in genetic algorithm
: | Pipe section number
: | Generation in genetic algorithm
: | Node number
: | The coordinates of node
: | The elevation of node
: | Nodes set of the route in generation
: | Length of route in generation
: | The pressure drop along the route in generation
: | The pressure drop along pipe section between nodes and .

Competing Interests

The authors declare that they have no competing interests.

Acknowledgments

The authors appreciate the financial support from the Young Scholars Development Fund of SWPU (201599010096).

References

U. Shamir, “Optimal route for pipelines in two-phase flow,” Society of Petroleum Engineers Journal, vol. 11, no. 03, pp. 215–222, 1971.

H. Meisingset, J. Hove, and G. Olsen, “Optimization of pipeline routes,” in Proceedings of the 14th International Offshore and Polar Engineering Conference, Toulon, France, May 2004.

E. C. Marcoulaki, I. A. Papazoglou, and N. Pixopoulou, “Integrated framework for the design of pipeline systems using stochastic optimisation and GIS tools,” Chemical Engineering Research and Design, vol. 90, no. 12, pp. 2209–2222, 2012.

J. J. Xiao, A. J. Al-Muraikhi, and A. M. Qahtani, “Automated route finding for production flowline to minimize liquid inventory and pressure loss,” in Proceedings of the SPE Annual Technical Conference and Exhibition (ATCE '06), Texas, USA, September 2006.

D. H. Beggs and J. P. Brill, “A experimental study of two-phase flow in inclined pipes,” Journal of Petroleum Technology, vol. 25, no. 5, pp. 607–617, 1973.

Z. Huang, S. Chen, L. Kang, and Y. Chen, “Solving the shortest path on curved surface based on simulated annealing algorithm,” Journal Wuhan University, vol. 46, no. 3, pp. 273–276, 2000.

D. D. Yang and R. Ran, “Genetic algorithm based shortest path planning on curved surface,” Computer Simulation, vol. 23, no. 8, pp. 168–169, 2006.

J. Y. Luo, “The study on PSO algorithm to seek shortest path on curved surface,” Journal of Min Jiang University, vol. 25, no. 5, pp. 14–17, 2007.

J. Zhou, X. Li, T. Deng, M. Cheng, and J. Gong, “Layout optimization of branch pipeline network on curved surface using genetic algorithm,” in Proceedings of the 10th International Pipeline Conference (IPC '14), Calgary, Canada, October 2014.