Application of Genetic Algorithm For Optimization of Separator Pressures in Multistage Production Units
Application of Genetic Algorithm For Optimization of Separator Pressures in Multistage Production Units
Application of Genetic Algorithm For Optimization of Separator Pressures in Multistage Production Units
net/publication/263610207
CITATIONS READS
3 109
3 authors:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Linking hydration status, carbon source and aggregate size distribution on soil GHG emissions: Laboratory column
experiments using artificial soil aggregates View project
All content following this page was uploaded by Ali Ebrahimi on 13 May 2018.
Introduction
Crude oil contains great quantities of dissolved gases in the bottom of the
production well due to the existence of high pressure. Furthermore, the gases
dissolved at high pressure tend to come out from liquid phase at the low pressures,
so it is necessary to optimize separator pressure in the winter and summer seasons
(Abdel-Aal et al., 2003; Bahadori et al., 2008). Reservoir fluid processing is done
by two or more separators consecutively at lower pressures. The main purpose of
using multistage production units is to provide maximum stabilization for the result-
ant phases (gas and liquid) leaving the final separator, which means that consider-
able amounts of gas or liquid will not evolve from the final liquid and gas phases,
respectively (Mokhatab et al., 2006).
926
GA for Optimization of Separator Pressures 927
Genetic Algorithm
Genetic algorithms (GAs) were developed by Prof. John Holland and his students
during the 1960s and 1970s. GAs belong to the larger class of evolutionary algo-
rithms (EA), which generate solutions to optimization problems using techniques
inspired by natural evolution, such as mutation, selection, and crossover (Haupt
and Haupt, 2004).
A GA starts with a set of the randomly generated possible solutions, called a
population. Each individual solution in the population is known as a chromosome
or an individual. Each chromosome may be represented as a simple string or an
array of genes, which contain a part of the solution. The values of genes are called
alleles. A fitness function is provided to assign the fitness value for each individual.
This function is based on how close an individual is to the optimal solution. Two
randomly selected chromosomes, known as parents, can exchange genetic infor-
mation in a process called recombination or crossover to produce two new chromo-
somes known as children or offspring. If both parents share a particular pattern in
their chromosomes, then the same pattern will be carried over to the offspring.
The performance of genetic algorithms heavily depends on the performance of
the crossover operator used in the GA. The crossover rate is defined as the ratio
of the number of offspring produced in each generation to the population size. This
ratio controls the expected number of chromosomes undergoing the crossover
operation. A higher crossover rate increases the exploitation of solution space. Some
crossover types are: single point, double point, multipoint, and scattered.
To obtain a good solution, mutation is often applied to randomly chosen
chromosomes after the process of crossover. Mutation helps to restore any lost genetic
values when the population converges too fast. A simple way to achieve mutation
would be to alter the value of one or more genes. Mutation serves the crucial role
of exploration of search space and generation of sufficient variety in the chromosomes
being used in the GA. The mutation rate is defined as the percentage of the total
number of genes at each generation whose values are flipped. The smaller the muta-
tion rate, the less variety in the candidate solution and the less exploration will occur.
Once the processes of crossover and mutation have occurred in a population, the
chromosomes for the next generation are selected. To ensure that the new generation
is at least as fit as the previous generation, some of the poorest performing indivi-
duals of the current generation can be replaced by the same number of the best
performing individuals from the previous generation. This process is called elitism.
This entire cycle is repeated until the stopping criterion of the algorithm is met
(e.g., maximum number of generations) (Haupt and Haupt, 2004; Langdon and Poli,
GA for Optimization of Separator Pressures 929
2001). Figure 1 is the flowchart of a typical genetic algorithm (Haupt and Haupt,
2004).
A hybrid GA combines the power of the GA with the speed of a local optimizer.
The GA excels at gravitating toward the global minimum, but it is not especially fast
at finding the minimum when in a locally quadratic region. Thus the GA finds the
region of the optimum, and then the local optimizer (such as pattern search) takes
over to find the minimum (Haupt and Haupt, 2004).
Optimization Method
The objective function for separator pressure optimization can be formulated as
follows:
8
>
> Stock tank oil gravity ðAPIÞ
< Maximize
Objective Function ¼ f ðxÞ ¼ Liquid volume in the stock tank ðVOST Þ
>
> Total gas oil ratio ðGORÞ
: Minimize
Oil formation volume factor ðBo Þ
ð1Þ
The terms of the stated objective function are equivalent, e.g., if stock tank oil API
gravity is maximized, then the oil formation volume factor and gas oil ratio are mini-
mized. The constraints of the optimization problem can be expressed as:
P1 < Pallowable ð2Þ
The first-stage pressure must not exceed the maximum allowable designed pressure:
P1 ; P2 ; :::PN1 < PN ð3Þ
The pressure of a separator cannot exceed the pressure of the previous separator.
One step in the flowchart of the GA is evaluation of each chromosome
(Figure 1). During these steps, the objective function of each individual chromosome
930 M. Ghaedi et al.
is determined. In other words, the value of the objective function (API, GOR, Bo,
and VOST) with assigned feasible pressure to each separator is obtained. To calculate
the objective function of each individual solution in the population, HYSYS
software was used to perform flash calculations for each separator. After that, the
outputs of HYSYS software were analyzed to calculate the objective function
(Figure 2). The computational procedure to calculate the objective function was
described previously by Bahadori et al. (2008). Considering the schematic of a
four-stage separation shown in Figure 3, the following steps can be considered:
Step 1: Based on the first separator conditions (i.e., separator pressure and
temperature), calculate the equilibrium ratios of the feed stream (Zi) with given com-
position and desired equation of state (EOS). To perform the calculations of vapor
liquid equilibrium, different EOSs can be applied. In this work we used the Peng and
Robinson EOS (1976) of the HYSYS software, a popular and accurate EOS for this
kind of system.
Step 2: Using the calculated equilibrium ratios in step 1 and assuming a
total F moles of the feed entering the first separator, perform flash calculations
to get the compositions and quantities of gas and liquid phases leaving the first
separator:
where Nl1 and Nv1 are number of moles of liquid and gas phase leaving the first sep-
arator respectively, and nl1 and nv1 represent liquid and vapor fraction of the feed.
Step 3: Using the composition of the liquid leaving the first separator and at the
pressure and temperature of the second separator, determine the equilibrium ratios
of the hydrocarbon mixture.
Step 4: Based on 1 mole of the feed, perform flash calculation to determine the
compositions and quantities of the gas and liquid phases leaving the second separ-
ator. The actual number of moles of the two phases can be calculated as:
Step 5: Repeat the illustrated previous procedure for each separation stage
including the stock tank stage. The total number of moles of the gas given off in
all stages is calculated as:
X
NVT ¼ NVi ¼ NV 1 þ NV 2 þ NV 3 þ NV 4 ¼ FnV 1 þ FnL1 nV 2
þ FnL1 nL2 nV 3 þ FnL1 nL2 nL3 nV 4 ð9Þ
Total moles of liquid remaining in the stock tank can also be calculated as:
Y
N
NLT ¼ F nLi ð11Þ
i¼1
Step 6: Determine the volume of stock tank oil occupied with liquid:
ðNLT ÞðMWOST Þ
VOST ¼ ð12Þ
qOST
Step 7: Calculate the specific gravity and the API gravity of the stock tank oil by
applying:
qOST
co ¼ ð13Þ
1000
141:5
API ¼ 131:5 ð14Þ
co
VG qOST NVT
GOR ¼ ¼ ð15Þ
VOST NLT MWOST
VG and VOST are the volume of gas (scf=mole) and the volume of stock tank oil,
respectively, and MWOST is the apparent molecular weight of stock tank oil. As
mentioned before, at the optimum separator pressure, API gravity should be
maximum and consequently GOR should be minimum.
The presented procedure is repeated for all of the individuals of the population
during each generation. Then the crossover and mutation operators take place. For
another generation this entire procedure is repeated until one or more stopping
criteria of the algorithm is reached.
Component mol%
C1 36.29
C2 6.523
C3 5.255
IC4 1.07
NC4 3.12
IC5 1.401
NC5 1.805
NC6 2.896
H2S 0.406
CO2 1.005
C7þ (MW ¼ 254, spec. gr. ¼ 0.892) 40.23
Table II. GA parameters used to optimize separator pressure of crude oil production
unit
Figure 4. Best and mean of each generation for crude oil multistage production unit obtained
for summer condition.
Table III. Determined optimum separator pressures for summer and winter for crude oil production unit
Summer Winter
Optimum pressure (psig) Optimum pressure (psig)
Separation Operation pressure
stage (psig) Temperature (F) Correlations GA Temperature (F) Correlations GA
934
First 138 120 692.26 172.21 85 666.88 551.11
Second 17 110 113.08 48.11 80 104.53 104.31
Third 6.5 105 47.64 9.5 75 39.20 22.16
Fourth 3.5 100 3.51 3.51 70 3.51 3.51
GA for Optimization of Separator Pressures 935
Table IV. Comparison of resulted API gravity of stock tank liquid and liquid mole
flow rate with operating conditions for crude oil production unit
Summer Winter
Liquid mole flow Liquid mole flow
rate (basis 1 mole) API rate (basis 1 mole) API
Operating conditions 0.4847 33.16 0.5059 31.56
Optimized Correlations 0.4905 33.74 0.5142 31.97
conditions GA 0.4935 33.97 0.5161 32.25
In fact, defining the objective function in this form makes the problem a minimiza-
tion problem.
Among the previous works, correlations introduced by Al-Jawad and Hassan
(2010) seem to be more accurate than other methods. Similar to the GA optimization
method, correlations applied for four-stage separation by Al-Jawad and Hassan
(2010) were used to obtain separator pressures. Thus, assessment of GA performance
by comparison with another method is possible. Optimum separator pressures calcu-
lated for summer and winter by GA and correlations and operating conditions are
shown in Table III. A comparison of obtained API gravity of stock tank liquid
and liquid mole flow rate (basis 1 mole) by GA with those of operating conditions
is displayed in Table IV. The superiority of genetic-based optimized pressures over
correlations is clear by comparing the results of this table; the liquid mole flow rate
increased by 0.0088 (basis 1 mole) for summer and 0.0102 for winter, which means
1.8% and 2% enhancement in liquid flow rate for summer and winter, respectively.
API gravity of stock tank liquid is also improved by 2.4% and 2.2% for summer
and winter, respectively.
Component mol%
N2 0.8
CO2 0.61
H 2S 0
C1 68.64
C2 13.9
C3 6.89
IC4 0.66
NC4 2.66
IC5 0.62
NC5 0.94
NC6 1.14
C7þ (MW ¼ 152.3, spec. gr. ¼ 0.7763) 3.48
936 M. Ghaedi et al.
Figure 5. Best and mean of each generation for gas condensate multistage production unit
obtained for summer condition.
Table VII. Obtained optimum separator pressures for summer and winter for gas
condensate production unit
Summer Winter
Operation Optimum Optimum
Separation pressure Temperature pressure Temperature pressure
stage (psig) (F) (psig) (F) (psig)
First 231.2 110 596.71 80 466.21
Second 102.4 105 48.57 75 41.97
Third 2 100 2 70 2
GA for Optimization of Separator Pressures 937
Table VIII. Comparison of resulted API gravity of stock tank liquid and liquid mole
flow rate with operating conditions for gas condensate production unit
Summer Winter
Liquid mole flow rate Liquid mole flow rate
(basis 1 mole) API (basis 1 mole) API
Operating conditions 0.0479 62.42 0.05582 61.65
Optimized conditions 0.0520 64.06 0.06033 63.23
Optimum separator pressures determined for summer and winter and also oper-
ating pressures are shown in Table VII. Table VIII compares obtained API gravity
of stock tank liquid and liquid mole flow rate (basis 1 mole) by GA with those of
operating conditions. As the results of Table VIII show, the liquid mole flow rate
increased by 0.0041 (basis 1 mole) for summer and 0.0045 for winter, which means
8.6% and 8.1% enhancement in liquid flow rate for summer and winter respectively.
API gravity of stock tank liquid is also improved by 2.6% for both summer and
winter.
Conclusion
In this work, GA was used to optimize the separator pressure. Two different cases
were selected, a crude oil production unit with four separation stages and a gas con-
densate production unit with three separation stages. For the crude oil production
unit the liquid mole flow rate improved by 0.0088 (basis 1 mole) for summer and
0.0102 for winter; this means 1.8% and 2% enhancement in liquid flow rate for sum-
mer and winter respectively. Using GA-based optimum separator pressure, the API
gravity of stock tank liquid is also improved, by 2.4% and 2.2% for summer and win-
ter respectively. In the gas condensate production unit, the liquid mole flow rate was
enhanced by 0.0041 (basis 1 mole) for summer and 0.0045 for winter, which means
8.6% and 8.1% enhancement in liquid flow rate for summer and winter respectively.
For this case, API gravity of stock tank liquid is also improved by 2.6% for both
summer and winter. The obtained results for both cases show that GA is a powerful
tool in determining the optimum separator pressures in production units.
Nomenclature
MWOST apparent molecular weight, lb=mol
NL number of liquid moles, mole
NV number of vapor moles, mole
VG volume of gas, scf=mol
VOST volume of stock tank oil, bbl
co oil specific gravity
qo stock tank oil density, lb=ft3
Abbreviations
API gravity American Petroleum Institute gravity
Bo oil formation volume factor, bbl=stb
EA evolutionary algorithms
938 M. Ghaedi et al.
References
Abdel-Aal, H. K., Aggour, M., and Fahim, M. A. (2003). Petroleum and Gas Field Processing,
Marcel Dekker, New York.
Al-Farhan, F., and Ayala, L. F. H. (2006). Optimization of surface condensate production
from natural gases using artificial intelligence, J. Pet. Sci. Eng., 53, 135–147.
Al-Jawad, M. S., and Hassan, O. F. (2010). Correlating optimum stage pressure for sequential
separator systems, SPE Projects Facil. Construct., 5, 13–16.
Bahadori, A., Vuthaluru, H. B., and Mokhatab, S. (2008). Optimizing separator pressures in
the multistage crude oil production unit, Asia-Pac. J. Chem. Eng., 3, 380–386.
Chilingar, G. V., and Beeson, C. M. (1969). Surface Operations in Petroleum Production,
American Elsevier, New York.
Fujii, H., and Horne, R. (1995). Multivariate optimization of networked production systems,
SPE Prod. Facil., 10, 165–171.
Haupt, R. L., and Haupt, S. E. (2004). Practical Genetic Algorithms, 2nd ed., John Wiley,
Hoboken, N.J.
Langdon, W. B., and Poli, R. (2001). Foundations of Genetic Programming, Springer, Berlin.
Mokhatab, S., Poe, W. A., and Speight, J. G. (2006). Handbook of Natural Gas Transmission
and Processing, Gulf Professional Publishing, Burlington, Mass.
Natco Company. (1972). Technical Development Program.
Peng, D. Y., and Robinson, D. B. (1976). A new two-constant equation of state, Ind. Eng.
Chem., 15, 59–64.
Whinery, K. F., and Campbell, J. M. (1958). A method for determining optimum second stage
pressure in 3-stage separation, J. Pet. Technol., 4, 53–54.
Whitson, C. H. (1983). Characterizing hydrocarbon plus fractions, SPE J., 23, 683–694.