You are on page 1of 14

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/263610207

APPLICATION OF GENETIC ALGORITHM FOR OPTIMIZATION OF


SEPARATOR PRESSURES IN MULTISTAGE PRODUCTION UNITS

Article  in  Chemical Engineering Communications · March 2014


DOI: 10.1080/00986445.2013.793676

CITATIONS READS

3 109

3 authors:

Mojtaba Ghaedi Ali Ebrahimi


Shiraz University Massachusetts Institute of Technology
19 PUBLICATIONS   48 CITATIONS    26 PUBLICATIONS   145 CITATIONS   

SEE PROFILE SEE PROFILE

Mahmoud Reza Pishvaie


Sharif University of Technology
77 PUBLICATIONS   524 CITATIONS   

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

My PhD thesis View project

All content following this page was uploaded by Ali Ebrahimi on 13 May 2018.

The user has requested enhancement of the downloaded file.


Chem. Eng. Comm., 201:926–938, 2014
Copyright # Taylor & Francis Group, LLC
ISSN: 0098-6445 print=1563-5201 online
DOI: 10.1080/00986445.2013.793676

Application of Genetic Algorithm for


Optimization of Separator Pressures in
Multistage Production Units

MOJTABA GHAEDI,1 ALI NEJAD EBRAHIMI,2 AND


MAHMOUD REZA PISHVAIE1
1
Chemical and Petroleum Engineering Department, Sharif University of
Technology, Tehran, Iran
2
Computational Physics for Engineering Materials, IfB, ETH Zurich,
Zurich, Switzerland

In this article, a genetic algorithm is used to optimize the separator pressures in a


multistage crude oil and multistage gas condensate production unit with four and
three separators respectively. This leads to the generation of more accurate results
for the quality and quantity of oil remaining in the stock tank for both crude oil and
gas condensate production units. Genetic-based optimized pressures for crude oil
separators resulted in 1.8% and 2% enhancement in oil remaining in the stock tank
for summer and winter respectively. API gravity of the stock tank oil was improved
2.4% in summer and 2.2% in winter. For the gas condensate production unit, opti-
mized pressures can enhance by 8.6% and 8.1% the oil remaining in the stock tank
for summer and winter respectively. The API gravity of stock tank liquid also
increased by 2.6% for both summer and winter.

Keywords Crude oil; Gas condensate; Genetic algorithm; Multistage separation;


Optimization

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).

Address correspondence to Mahmoud Reza Pishvaie, Chemical and Petroleum Engineer-


ing Department, Sharif University of Technology, Azadi Avenue, Tehran, Iran. E-mail:
pishvaie@sharif.edu
Color versions of one or more of the figures in the article can be found online at
www.tandfonline.com/gcec.

926
GA for Optimization of Separator Pressures 927

The temperature and pressure of separators play a major role in determining


the amount of liquid recovery from the stock tank. Due to the constant separator
temperature, pressure is typically the key parameter in optimization studies. Well
stream pressures must be reduced to atmospheric at stock tank conditions (Al-
Farhan and Ayala, 2006). The manipulation of separator pressures can have
a remarkable impact on the quantity and quality of the produced oil in the sock
tank. If the separator pressure is high, large amounts of light components will remain
in the liquid phase at the separator and will be lost, along with other valuable
components, to the gas phase at the stock tank. On the other hand, if the pressure
is too low, large amounts of light components will be separated from the liquid
and they will attract substantial quantities of intermediates and heavier components,
so it is necessary to optimize separator pressures (Bahadori et al., 2008).
Both an empirical approach and flash calculation can be used to determine the
optimum separator pressure that maximizes the oil accumulation in the stock tank,
i.e., minimizes the gas-oil ratio (GOR) while enhancing its API gravity. Although the
empirical and quasi-empirical approaches are more popular, the most accurate
method for the optimization of separator pressure is vapor=liquid equilibrium
thermodynamics (Whitson, 1983).
Whinery and Campbell (1958) were pioneers who proposed a method to find the
optimum second-stage pressure in a three-stage separation system. They used a very
simple method without applying any flash calculations. Chilingar and Beeson (1969)
proposed a method for two-stage separation to calculate the optimum pressure for
the first stage. In their method the gallons of liquid lost per barrel of crude oil were
plotted versus the pressure of the high-pressure stage separator; the optimum
pressure for the first stage can be calculated from the minimum of the plot curve.
A rapid but inaccurate method was suggested later by Natco Company (1972),
which assumes that the ratio between two following pressures is constant and this
approximation was used to determine the optimum pressure for separators in the first
and last stages. Fujii and Horne (1995) described the problem of networked system
optimization. They optimized tubing sizes of two networked systems by using three
techniques: Newton-type method, the polytope method, and the genetic algorithm
(GA) technique. They mentioned GA as the most successful technique in their work.
Artificial intelligence was another method used by Al-Farhan and Ayala (2006) to
determine the optimum separator pressure. In their proposed method, the optimum
pressure of the second separator was determined by artificial intelligence in a three-stage
separation when the pressures of the first and second separators were known.
An accurate methodology for the optimization of the separator pressure in
a crude oil production unit was suggested by Bahadori et al. (2008). They used flash
calculations to determine optimum pressures of separators in different stages of
separation and consequently to optimize the operation conditions. They didn’t
explain clearly the procedure of finding the optimum pressures.
In recent years, correlations to estimate optimum separator pressure for the sep-
aration stations to treat volatile oils were formulated by Al-Jawad and Hassan
(2010). These empirical equations were divided according to the number of stages
in each separation station, including two, three, four, and five stages.
Despite the popularity of previous empirical and quasi-empirical approaches
to determine the optimum separator pressure, these methods are not exact enough
and they usually give appropriate answers only at the specific predefined condi-
tions. On the other hand, the previous methods based on vapor=liquid equilibrium
928 M. Ghaedi et al.

thermodynamics (such as Bahadori et al., 2008) find separator pressure by exhaus-


tive search and may or may not find the global optimum for the separator pressure;
these calculations also require a large amount of computational time. Thus, there is
a demand for a more robust procedure. In this work, we use HYSYS software
(Revision (3.1) 2002, Hyprotech, Ltd., Calgary, Canada) to perform vapor=liquid
flash calculations for multistage production units and also to avoid exhaustive
search, and to ensure finding the global optimum of separator pressure, we utilize
a genetic algorithm as an optimization tool. The applied procedure is more accurate
due to the consideration of flash calculations, and it is fast since instead of
exhaustive search, an optimization tool is applied.

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

Figure 1. Flowchart of a genetic algorithm.

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 subscripts i, 1, 2, 3, . . . , N represent stage numbers. The pressure of a separator


prior to the stock tank must not be below the stock tank pressure, which equals
atmospheric pressure approximately:
Piþ1 > Pi ð4Þ

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

Figure 2. Flowchart to calculate the objective function of each individual of a population.


GA for Optimization of Separator Pressures 931

Figure 3. Schematic of a four-stage separation obtained for summer condition.

to get the compositions and quantities of gas and liquid phases leaving the first
separator:

Nl1 ¼ F nl1 ð5Þ


Nv1 ¼ F nv1 ð6Þ

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:

Nl2 ¼ Nl1 nl2 ¼ F nl1 nl2 ð7Þ

Nv2 ¼ Nl1 nv2 ¼ F nl1 nv2 ð8Þ

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Þ

Equation (5) can be written in the following general form:


" #
XN Y
i1
NVT ¼ F nV 1 þ nVi nLj ð10Þ
i¼2 j¼1
932 M. Ghaedi et al.

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

Step 8: Calculate the total GOR:

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.

Results and Discussion


In this work, two different cases were considered to verify the ability of GA in the
determination of optimum separator pressures. The first case is a crude oil multi-
stage separation unit consisting of four separators, and the second case is a gas
condensate production unit containing three separators.

Optimizing Separator Pressure of Crude Oil Production Unit


The reservoir fluid composition of crude oil (Zi) is shown in Table I. The tempera-
tures of separators are different during summer and winter, so GA optimization was
utilized for both summer and winter to determine optimum separator pressure. Since
the pressure of the fourth-stage separator (stock tank) is known (atmospheric con-
dition), the pressures of only the first, second, and third separators were optimized.
Table II gives the GA parameters used to optimize the separator pressures. Figure 4
depicts the best and mean of each generation during the summer for a crude oil
multistage separation unit. Note that the objective function is defined as 1=API.
GA for Optimization of Separator Pressures 933

Table I. Reservoir fluid composition of crude oil

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

Max. no. of Crossover Crossover Mutation Hybrid


Population generations type rate rate method
50 100 Scattered 0.70 0.06 Pattern search

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.

Optimizing Separator Pressure of Gas Condensate Production Unit


In Table V, the reservoir fluid composition of gas condensate (Zi) is shown. The
same as for the crude oil production unit, for both summer and winter GA was used

Table V. Reservoir fluid composition of gas condensate

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.

Table VI. GA parameters used to optimize separator pressure of gas condensate


production unit

Max. no. of Crossover Crossover Mutation Hybrid


Population generations type rate rate method
50 100 Scattered 0.73 0.07 Pattern search

to determine optimum separator pressures. The pressure of the third-stage separator


(stock tank) is known (atmospheric condition), so the pressures of only the first and
second separators were determined. Table VI presents the GA parameters used to
optimize the separator pressures. Figure 5 illustrates the best and mean of each gen-
eration during the summer. Here again the objective function is defined as 1=API.

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.

EOS equation of state


GA genetic algorithm
GOR gas-oil ratio, scf=stb
Subscripts
i, 1, 2, 3, . . . , N stage number
G gas
L liquid
O oil
V vapor
ST stock tank
T total

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.

View publication stats

You might also like