/smash/get/diva2:347760/FULLTEXT01.pdf

/smash/get/diva2:347760/FULLTEXT01.pdf
Optimizing separator pressure in a
multistage crude oil production plant
Øyvind Widerøe Kylling
Master of Science in Engineering Cybernetics
Submission date: June 2009
Supervisor:
Jan Tommy Gravdahl, ITK
Norwegian University of Science and Technology
Department of Engineering Cybernetics
Problem Description
This project is related to offshore oil and gas production. Oil and gas production is a complex
process where many components are closely coupled and dependent on each other. With a
traditional control structure the separator pressure is fixed and it is possible that an adaptive
separator pressure will increase profit. The main objective of this project is to derive a steady
state simulation model for a multistage crude oil production plant and optimize the separator
pressure. This will be achieved through the following subgoals:
1.
Explain the potential benefits of using adaptive separator pressure
2.
Literature study on separator modelling. Give a presentation of different methods found
in the literature and implement the method best suited for this problem.
3.
Optimize the separator pressure for a multistage crude oil production plant without
compressors.
4.
Literature study on compressor modelling. Give a presentation of different methods
found in the literature and implement the method best suited for this problem.
5.
Optimize the separator pressure for a multistage crude oil production plant with gas
compression.
Assignment given: 12. January 2009
Supervisor: Jan Tommy Gravdahl, ITK
Abstract
This thesis contains a steady state simulation model of a multistage crude oil production
plant. The unstable reservoir fluid is separated into crude oil and gas in a three stage gas oil
separation plant. Peng Robinson Equation of State and successive substitution is used to
model the separators. The liquid output for the third stage separators is stable crude oil and
the crude oil is sold on the international market.
The gas liberated in the separators is compressed by centrifugal compressors and injected
into the reservoir. Several methods for modelling centrifugal compressors are discussed. The
discussion concludes that Dimensionless Parameters is the best suited method for this case
and this method is therefore used.
The plant studied has three separation stages at decreasing pressure and the standard
control method is to use fixed separator pressure. This is not optimal and brute force
optimization is used to find the optimal pressure set-points. Adaptive pressure set-points will
improve product separation and therefore increase the profit. The profit is calculated as the
income from crude oil sale minus the energy cost.
Using this new method, the optimum separator pressures for Snorre A are determined. As a
result, the profit is increased with 0.17, 0.11 and 0.07 present for three different inlet
conditions. For one year this small increase in profit gives an extra two million dollars in
income. The adaptive pressure set-points give an extension of the plant’s maximum capacity
for a reservoir fluid with a high gas oil ratio.
I
II
Preface and acknowledgments
This thesis concludes my Master of Science degree at the Norwegian University of Science
and Technology. The scope of this work is one semester and the thesis is written in the
spring of 2009.
This project report has been written in collaboration with Siemens Oil & Gas Offshore AS.
I would like to thank Dr. Ing Fredrik Dessen and the rest of the department. They have
always answered my questions and have arranged access to the database system and a
work station at Siemens.
I would like to express my sincere gratitude to my supervisor Jan Tommy Gravdahl. Gravdahl
has helped me working on the right subjects and pointed out details that I have missed.
Øyvind Widerøe Kylling
June 2009, Trondheim Norway
III
IV
Contents
ABSTRACT ......................................................................................................................................................I
PREFACE AND ACKNOWLEDGMENTS ............................................................................................................ III
1
INTRODUCTION .................................................................................................................................... 1
1.1
1.2
2
PLACEMENT IN THE OVERALL CONTROL STRUCTURE ............................................................................................... 2
CONTRIBUTIONS OF THIS THESIS ........................................................................................................................ 2
GAS OIL SEPARATION PLANT................................................................................................................. 3
2.1 OPTIMUM PRESSURE FOR GAS-OIL SEPARATORS ................................................................................................... 5
2.1.1
Empirical method ............................................................................................................................ 6
3
CHEMICAL PROCESS SIMULATOR .......................................................................................................... 7
4
SEPARATOR MODELLING ...................................................................................................................... 9
4.1 OPTIMIZATION ALGORITHM ............................................................................................................................. 9
4.1.1
Indirect minimization ...................................................................................................................... 9
4.1.2
Local direct minimization .............................................................................................................. 10
4.1.3
Global direct minimization ............................................................................................................ 10
4.2 THERMODYNAMIC MODELS ............................................................................................................................ 11
4.3 ASSUMPTIONS AND CHOICE OF MODEL ............................................................................................................. 12
4.4 VAPOUR LIQUID EQUILIBRIUM CALCULATIONS .................................................................................................... 14
4.4.1
Initialization................................................................................................................................... 16
4.4.2
Calculation of β ............................................................................................................................. 16
4.4.3
Calculation of fugacity................................................................................................................... 19
4.4.4
The Peng-Robinson Equation of State ........................................................................................... 20
4.5 VERIFICATION OF THE ALGORITHM ................................................................................................................... 22
4.6 CRUDE OIL PRODUCT PRICING ......................................................................................................................... 25
5
OPTIMIZING SEPARATOR PRESSURES (WITHOUT COMPRESSORS) ....................................................... 27
6
FIELD PROCESSING OF NATURAL GAS.................................................................................................. 31
6.1
6.2
6.3
7
COMPRESSORS ............................................................................................................................................ 32
ISENTROPIC HEAD AND ISENTROPIC EFFICIENCY................................................................................................... 35
PRESSURE CONTROL IN SEPARATOR S1 AND S2 .................................................................................................. 37
COMPRESSOR MODELLING ................................................................................................................. 39
7.1 POLYNOMIAL APPROXIMATION ....................................................................................................................... 40
7.1.1
Polynomial + nonlinear term approximation of the pressure ratio ............................................... 41
7.1.2
Polynomial + nonlinear term approximation of the power consumption. .................................... 43
7.1.3
Conclusion ..................................................................................................................................... 44
7.2 PHYSICAL MODELLING ................................................................................................................................... 45
7.3 DIMENSIONLESS PARAMETERS ........................................................................................................................ 47
7.3.1
Algorithm for calculating the optimal exponents of S ................................................................... 49
7.3.2
Calculation of discharge pressure and power consumption .......................................................... 50
7.4 ANTI-SURGE CONTROL .................................................................................................................................. 52
7.5 COMPRESSOR C4 ......................................................................................................................................... 54
8
OPTIMIZING SEPARATOR PRESSURES (WITH COMPRESSORS) .............................................................. 57
9
CONCLUSIONS .................................................................................................................................... 63
V
10
APPENDIX........................................................................................................................................... 65
10.1
10.2
10.3
10.4
10.5
10.6
10.7
10.8
11
VI
LINEAR LEAST-SQUARES PROBLEM .............................................................................................................. 65
RESERVOIR FLUID COMPOSITION ................................................................................................................ 66
CHEMICAL PROPERTIES ............................................................................................................................. 68
INLET CONDITION FOR THE COMPRESSOR CHARACTERISTICS ............................................................................. 68
SIMPLE PI CONTROL WITH ANTI-WINDUP ..................................................................................................... 69
PSEUDOCODE FOR BRUTE FORCE OPTIMIZATION OF A GAS OIL SEPARATION PLANT ................................................ 70
ENCLOSED FILES ...................................................................................................................................... 71
ACRONYMS ............................................................................................................................................ 72
BIBLIOGRAPHY ................................................................................................................................... 73
1 Introduction
This Mcs thesis will investigate the potential benefits of using adapting pressure set-points
for the separators in a multistage crude oil production plant. One of the two multistage
crude oil production plants on Snorre A is used as a case study. The standard control method
for a multistage crude oil production plant is to use fixed pressure set-points for the
separators. Snorre A uses this method in its current control system.
The plant investigated in this thesis processes the reservoir fluid from the subsea production
system Vigdis. Vigdis is connected to eight wells and the production rates from these wells
are controlled independently. The production ratio between the wells varies and this
influences the inlet flow and composition to the multistage crude oil production plant
By changing the separator pressure the multistage crude oil production plants adapts to this
new inlet condition. A steady state model of the multistage crude oil production plant is
derived and this model is used to find the optimum separator pressures. The optimum
separator pressures are found by brute force optimization. MATLAB is used to implement
both the steady state simulation model and the brute force optimization.
Optimizing separator pressure will increase oil production since fewer hydrocarbons, more
than 2 carbon molecules, are lost to the gas phase. Snorre A produces more then 200 000
barrels per day and even a marginal percentage increase in the oil production will therefore
be profitable.
This thesis has two main parts. In the first part, chapter 2-5, a multistage crude oil
production plant without gas compression is studied. In this plant the reservoir fluid is
separated into gas and crude oil and the optimum separator pressure is found. The optimum
separator pressures are the pressures that maximise the income from the crude oil sale.
In the second part, chapter 0-0, a multistage crude oil production plant with gas
compression is studied. The gas from the separators must be compressed before it can be
sold or injected back to the reservoir. Compression consumes huge amount of energy and
the feasible region for the separator pressures is reduced. The energy cost of operating the
compression plant is added to the object function and the optimum separator pressures is
found.
1.1 Placement in the overall control structure
According to Hovd (2008), control systems in the process industries can be divided into four
main groups: regulatory control, supervisory control, real time optimization and production
planning/scheduling. Hovd describes the real time optimization group as:
• Real Time Optimization (RTO)
The RTO layer identifies the optimal conditions by solving an optimization problem
involving models of the production cost, value of product (possibly dependent on
quality), and the process itself. The process model is often non-linear and derived from
fundamental physical and chemical relationships, but they are usually static.
The control method implemented in this thesis uses an optimization problem to maximize
the profit for a multistage crude oil production plant. The model is derived from non-linear
fundamental physical and chemical relationships and the method is therefore clearly a part
of the real time optimization group.
A dynamic model would have complicated both the derivation of the model and the solution
method. This would have required non-linear model predictive control and according to
Hauger (2008) only eight companies in the world uses this technology. A dynamic model is
therefore too comprehensive for this thesis and a steady state model will be used.
1.2 Contributions of this thesis
The contributions of this thesis can be summarized as follows:
•
•
•
•
2
Separator modelling: The literature review on separator modelling and
implementation of the vapour liquid equilibrium routine in MATLAB. Compression
between the MATLAB implantation and UNISM design.
Optimizing separator pressures (without compressors): Implantation of the brute
force optimization. The idea of optimising the separator pressures for a multistage
crude oil production plant has been published before, see Bahadori, Vuthaluru &
Mokhatab (2008).
Field processing of natural gas: The adjustments of the compressor models so that
they fit the actual compressor characteristics from Snorre A. This includes the
polynomial plus nonlinear term approximation, algorithm for calculating the optimal
exponent of S, and the parameter estimation routine implemented in MATLAB. The
extension of the dimensionless parameters model to include surge control.
Optimizing separator pressures (with compressors): An extension of the multistage
crude oil production plant has been derived to take the gas compression into
account. The brute force optimization of the separator pressures for this plant.
2 Gas oil separation plant
At the high pressure existing at the bottom of the producing well, crude oil contains great
quantities of dissolved gases (Abdel-Aal et al, 2003). The weight of the reservoir fluid and
friction in the production string reduces the inlet pressure for the gas oil separation plant.
Some of the lighter hydrocarbons will change phase and bubbles will form in the fluid. The
fluid is now unstable and some means of separation must be provided.
The crude oil from the reservoir is processed into gas and oil in the three separators, see
Figure 1. This has to be done offshore because the crude oil from the well is unstable and
not suitable for transport. The first separator operates at a high pressure and the pressure is
reduced each time the oil enters a new separator. The pressure in the third separator must
be near atmospheric pressure so that the oil can be stored in barrels, tankers or atmospheric
reservoir.
The reservoir fluid on Snorre A contains water and separator S2 is replaced with a three
phase separator for the actual process. This thesis assumes that the fluid consists of
hydrocarbons and nitrogen and a two phase separator will therefore be used.
The production rate through the system is controlled by the choke valve placed before
separator S1. On Snorre A this choke valve is adjusted manually. A change in pressure for
separator S1 will therefore affect the production rate.
This is not desired and it is therefore assumed that this valve opening is controlled such that
the production rate is constant. This thesis assumes that the production rate is measured
and controlled by the flow controller: FC-S11. Unfortunately, the reservoir fluid is a multiphase flow and is therefore difficult to measure. For more information on multi-phase flow
measurements consult Ismail, Gamio, Bukharia, & Yang (2005). It is assumed that the
pressure at the wellhead is high and the pressure in separator S1 can be increased to 45 bars
without reducing the production rate.
Pressure in the three separators is controlled by a valve on the outlet gas flow. The valve
opening is controlled by a PI controller and the current control system uses a fixed set-point
of 36, 12 and 2 bar for the first, second and third stage separator, respectively. Liquid level
in the three separators is controlled by a valve on the outlet crude oil flow.
Gas to compression
PC
S12
PC
S22
PC
S32
FC
S11
S1
Oil/gas from
reservoir
S2
LC
S11
S3
LC
S21
LC
S31
Oil to export
Figure 1: PI&D for a gas oil separation plant.
3
The well stream contains essentially three main gropes of hydrocarbons and the three main
groups are:
1. Light group, which consists of methane (CH4) and ethane (C2H6)
2. Intermediate group, which consists of two subgroups: the propane/butane
(C3H8/C4H10) group and the pentane/hexane (C5H12/C6H14) group.
3. Heavy group, which is the bulk of crude oil and is identified as hydrocarbons with
seven or more carbons atoms per molecule.
In carrying out the gas-oil separation process, the main target is to try to achieve the
following objectives:
1. Separate the C1 and C2 light gasses from oil. Heavier hydrocarbons tend to condense,
forming two-phase flow and thus creating pipeline operating problems
2. Maximize the recovery of heavy components of the intermediate group in crude oil
3. Save the heavy group components in liquid product. (Abdel-Aal et al 2003: 60)
The preferred gas-oil separation method with respect to the objectives above is differential
or enhanced separation. In this method a sample of the reservoir fluid is placed in a cylinder
with a gas valve at the top. The liberated gas is slowly removed from the oil through the gas
valve. As pointed out by Clark (1960), when the gas is separated in this manner, the
maximum amount of heavy and intermediate components will remain in the liquid,
minimum shrinkage of the oil will occur, and, therefore, greater stock-tank oil recovery will
occur.
According to Ahmed (2006), this is due to the fact that the gas liberated earlier at higher
pressures is not present at lower pressures to attract the intermediate and heavy
components and pull them into the gas phase. Nevertheless, commercial separation based
on differential concept is very costly and is not a practical approach (Abdel-Aal et al 2003).
The gas-oil separation method used on Snorre A and in this thesis is flash or equilibrium
separation. This method reduces the pressure in steps, see Figure 1. When more stages are
added the oil recovery increases and the power needed to compress the gas for export or
injection is reduced, see Table 1. Adding an extra stage is a large investment since this
requires additional separator, compressor, piping and control systems. In most cases, the
optimum number of stages is very difficult to determine as it may be different from well to
well and it may change as the wells' flowing pressure declines with time, (Arnold & Stewart
1999).
Table 1: Effect of separation pressure for a rich condensate stream (from (Arnold & Stewart 1999))
Case
I
II
III
4
Separation stages
[bar]
84,4.4
84,36,4.4
84,36,14.4.4
Liquid Produced [bps]
8.400
8.496
8.530
Compressor
horsepower required
861
497
399
2.1 Optimum pressure for gas-oil separators
The pressure in the separators will influence the oil recovery and this is demonstrated with
an example. In this example the reservoir fluid is flashed in an initial separator and then the
liquid from this separator is flashed again at the stock tank. The pressure in the stock tank is
1 bar.
The oil recovery is calculated by using the method presented in Section 4.4. Figure 2
presents the effect of initial separator pressure on the oil recovery. Where, Fluid 1 has a high
gas oil ratio, Fluid 2 has an average gas oil ratio and Fluid 3 has a low gas oil ratio. The exact
composition of these fluids is presented in Section 10.2.
Figure 2 shows that the oil recovery is dependent on the initial separator pressure and the
reservoir fluid composition. An initial separator pressure of 17 [bar] gives the maximum oil
recovery for a reservoir fluid with high gas oil ratio. The initial separator pressure must be
reduced to obtain maximum oil recovery for a reservoir fluid with lower gas oil ratio.
1.124
Fluid 1
Fluid 2
Fluid 3
1.122
Oil recovery [bps]
1.12
1.118
1.116
1.114
1.112
1.11
1.108
0
5
10
15
20
25
30
Initial separator pressure [bar]
35
40
45
Figure 2: Effect of initial separator pressure on the oil recovery.
This thesis will use vapour liquid equilibrium calculation to determine the optimum pressure
for the gas-oil separators. In Section 2.1.1 an empirical method is used to determine the
optimal second-stage operation pressure is presented. The main drawback with this method
is that it assumes that the first-stage separator pressure is constant.
5
2.1.1 Empirical method
In a gas oil separation plant with three separators the optimum second stage pressure can
be calculated with a method proposed by Whinery, K. F. & Compbell, J. M. (1958). The
optimal second stage pressure is the pressure that maximizes the oil yield. In this method
the first stage pressure is assumed known and the third stage pressure is near atmospheric
pressure.
16.04 ⋅ AP10.686 + 29.58 ⋅104 ( A − 0.057)
P2,o = 
0.765
+ 57.43 ⋅104 ( A + 0.028)
 7.981 ⋅ AP1
MWws
M=
MWair
if M > 1

if M ≤ 1
(2.1)
(2.2)
Where P2,o is the optimum pressure [bar] in the second stage separator, P1 is the pressure
[bar] in the first stage separator, MWws is the molecular weight of the well stream and MWair
is the molecular weight of air. A is a dimensionless constant evaluated from Figure 3 using M
and the parameter Z. The parameter Z is the sum of mole fractions of the hydrocarbons
C1+C2+C3 found in the well stream. The black lines in Figure 3 are for different values of Z.
0.7
0.95 0.9 0.8 0.7 0.6
0.5
0.4
0.6
0.5
A
0.4
0.3
0.2
0.1
0
0
0.5
1
1.5
2
Relative molecular weight:M
2.5
Figure 3: Determination of the A factor.
6
3
3 Chemical process simulator
Chemical process simulators (CPS) are software programs designed to model process plants.
CPS is especially important in modelling systems that do not yet exist, or that would be too
expensive to ‘play’ with. Such systems have historically included large scale chemical process
and manufacturing industries, (Casavant & Côté, 2004) .
There are several CPS software packages available and some of them are listed her: Aspen
HYSYS by Aspentech, ASSETT and D-SPICE by Kongsberg Maritime, CADSIM Plus by Aurel
Systems, CHEMCAD by Chemstations and UNISIM Design by Honeywell. CPS is not used at
Siemens today, but students at NTNU have access to the CPS UNISIM Design for educational
use.
Figure 4 presents a natural gas processing facility implemented in UNISIM Design. This is the
first tutorial from Honeywell (2008) and the implementation time is only a few hours. Where
the blue lines are material streams, the red lines are energy streams and the green lines are
for control functions.
Both steady state and dynamic simulation is possible in UNISIM Design. In this example a
steady state controller is used to ensure that the sales gas gets the right dew-point
temperature. Dynamic controllers, from simple PID to advanced MPC controllers, can also be
used in UNISIM Design. UNISIM Design is therefore an excellent tool for experimenting with
new control structures and methods.
Figure 4: Natural gas processing facility implemented in UNISIM Design.
Using UNISIM Design has some benefits and disadvantages compared to MATLAB and they
will be discussed briefly: UNISIM Design has a graphical user interface and new process
equipment can be added with a few keystrokes. In Figure 5 the configuration window for a
two-phase separator in UNISIM Design is presented. A number of different thermodynamic
models can be selected and built-in optimization routines can be used to find the best
operation point. This gives a huge reduction in the implementation time. The program is well
tested and the results are reliable.
7
Figure 5: Configuration window for two-phase separator in UNISIM Design.
An implementation in UNISIM Design will have small second hand value for Siemens since
they have to buy a license for this software and purchase is very expensive. A MATLAB
implementation can be used by Siemens and can be compiled to C. This makes it easier to
implement the system in a future control system. UNISIM Design can also be linked to the
control system by using an OPC server. In this case a computer with UNISIM Design must be
connected to the control system.
In UNISIM Design the designer is bound to the methods that exist in the program. MATLAB
can implement any method and this gives greater flexibility. For example flash calculations
appearing in commercial process simulators are based on local minimization, (Saber & Shaw,
2007). If MATLAB is chosen a global minimization method can be implemented.
This project will be implemented in MATLAB since this gives a larger second hand value for
Siemens and offers more flexibility. UNISIM design will be used to verify the phase
equilibrium method implemented in MATLAB.
8
4 Separator modelling
The separator will be modelled by using phase equilibrium calculations. In phase equilibrium
calculation, a thermodynamic model and an optimization algorithm must be chosen. A
thermodynamic model gives the relation between pressure, molar volume and temperature
for pure components and mixtures. The thermodynamic model is usually nonlinear and
nonconvex and therefore an optimization method must be used to find phase equilibrium.
These two routines can in most cases be selected independently of each other.
From Carroll ( 2003) the criteria for phase equilibrium are defined as: (1) the temperature
and pressure of the phases are equal,(2) the chemical potentials of each of the components
in each of the phases are equal and (3) the global Gibbs free energy is a minimum. Phase
equilibrium was first established by Gibbs for more than 100 years ago.
Most phase equilibrium calculations switch from chemical potentials to fugacities, (Carroll,
2003). The fugacity is a property created by G.N Lewis to provide an alternative to the
chemical potential. Conceptually, fugacity offers no advantage over the chemical potential,
but it does offer computational advantages, particularly for mixtures, (O'Connell & Haile,
2005).
4.1 Optimization algorithm
Current frameworks to solve the phase equilibrium problem can be divided into two main
types: indirect and direct minimization, Vázquez-Román et al (2000). The indirect
minimization only uses criteria 1 and 2 for phase equilibrium and hopes this will also satisfy
criteria 3.
Direct minimization method finds the global or local minimum of the Gibbs free energy when
criteria 1 is satisfied. Because the Gibbs free energy of the system is a minimum at
equilibrium, several researchers have adopted optimization techniques to minimize this
property directly for a specified number of phases (Chaikunchuensakun, Stiel, & Baker,
2002). Direct minimization can further be divided into two groups: local and global. Global
direct minimization fulfils all three criteria for phase equilibrium. The local direct
minimization fulfils criteria one, two and a local minimum of the Gibbs free energy.
4.1.1 Indirect minimization
According to Vázquez-Román et al (2000) the successive substitution (SS) method is the
most popular method that has proved to converge to the optimal in most practical cases.
However, a good initial estimation is required to avoid undesired solutions and enhance
convergence. Since the SS method always converges to a local minimum of the Gibbs free
energy, all three criteria for phase equilibrium are satisfied (Michelsen, 1982).
9
One weakness with the SS method is that it has linear rate of convergence and that for nearcritical region, the rate of convergence becomes extremely slow (Firoozabadi, 1999). Many
methods have been proposed to accelerate the convergence rate of SS method. In
petroleum reservoir simulations, phase equilibrium calculation routine represents a key
sequence and a huge number of flash calculations are performed (Nichita, Gomez, & Luna,
2002).
In the works of Vázquez-Romanán et al (2000) and Mehra et al (1982) an accelerated
successive substitution method was used and the rate of convergence was improved
substantially. However, a common weakness of all acceleration methods is that Gibbs free
energy may increase during the iteration and eventually converge to a false or trivial
solution. When an increase in the Gibbs free energy is detected the algorithm switches to a
Newton method. The Newton method has quadratic convergence, but needs a better initial
estimate of the equilibrium values (Firoozabadi, 1999). To guarantee a descent direction the
hessian must be positive definite. In the algorithm proposed by Vázquez-Romanán et al
(2000) the hessian is maintained symmetric and positive definite by the LevenbergMarquardt method.
4.1.2 Local direct minimization
Chaikunchuensakun, Stiel, & Baker (2002) proposed a combined algorithm for stability and
phase equilibrium by Gibbs free energy minimization.
Nichita, Broseta, & Hemptinne (2006) proposed a method for multiphase equilibrium
calculations that uses reduced variables. This is possible since the number of independent
variables for phase equilibrium calculations does not depend on the number of components
in the mixture. For this method the computer time increases somewhat linearly with the
number of components, while for standard methods this dependence is at least quadratic.
4.1.3 Global direct minimization
Since the equation of states in general is a non-convex nonlinear function, many local
optimums can exist. The algorithms that fall into this category try to find the global
minimum of the Gibbs free energy. According to (Harding & Floudas, 1999) the difficulty of
locating the global minimum of the Gibbs free energy is due to two main points: 1) there is
no method to determine a priori the number and types of phases present in the equilibrium
state, and 2) for nonideal systems the Gibbs energy surface may contain multiple local
minima.
Rossi, Cardozo-Filho, & Guirardello (2009) proposed an approach for the minimization of the
Gibbs free energy using linear programming that guarantees finding the global optimum
within some level of precision, for any kind of thermodynamic model. For systems with more
than four components the calculation time and memory requirements becomes too
excessive and the completion of the calculations is not feasible.
10
In the work of Zhu, Wen, & Xu (2000) an enhanced simulated annealing algorithm is
presented to verify the phase stability analysis and obtain the true solution of the phase
equilibrium problem of multi-component systems at high pressures.
According to Nichita et al (2002) a global optimization method called Tunneling, able to
escape from local minima and saddle points, is used here, and has shown to be able to
efficiently find the global solution for all the hypothetical and real problems tested. The
Tunneling method has two steps. In step one, a local bounded optimization method is used
to minimize the objective function. In step two (tunnelization), either global optimality is
ascertained, or a feasible initial estimate for a new minimization is generated.
Harding & Floudas (1999) used the deterministic global optimization algorithm α-based
Branch and Bound to find chemical equilibrium. The key idea is the construction of a
converging sequence of upper and lower bound on the global minimum through the convex
relaxation of the original problem, Adjiman et al (1997). In this work a system of eight
hydrocarbons was studied and the algorithm used 7.5 minutes to converge to the global
minimum.
4.2 Thermodynamic models
There exist three main types of thermodynamic models: The virial equations, equations of
states and activity coefficient models. For more information on thermodynamic models,
consult (Assael, Trusler, & Tsolakis, 1996).
According to Honeywell (2008), equation of state models have proven to be very reliable in
predicting properties of most hydrocarbon-based fluids over a large range of operating
conditions, and their application has been limited to primarily non-polar or slightly polar
components. The equation of state models is also the only model that can be used to
estimate thermodynamic properties for both the liquid and vapour phases.
For mixtures containing polar components, for example water, the activity coefficient
method is more accurate (Assael, Trusler, & Tsolakis, 1996). According to Honeywell (2008),
activity models are much more empirical in nature when compared to the property
predictions in the hydrocarbon industry. For this reason, they cannot be used as reliably as
the equations of state for generalized application or extrapolated into untested operating
conditions. Their adjustable parameters should be fitted against a representative sample of
experimental data and their application should be limited to moderate pressures.
According to (Adewumi), the Peng Pobinson Equation of State (EOS) has become the most
popular EOS for natural gas systems in the petroleum industry. This EOS is also used by
Bahadori, Vuthaluru, & Mokhatab (2008) who proposed a method for optimizing separator
pressures in the multistage crude oil production unit.
11
4.3 Assumptions and choice of model
The first assumption is that the reservoir fluid contains no polar components. A typical
reservoir fluid contains the polar components: water, hydrogen sulfide and carbon dioxide.
Hydrogen sulfide and carbon dioxide can quite easily be included by using a grope
contribution method, see Privat, Jaubert, & Mutelet (2008). To be able to include water, a
method that handles vapour liquid liquid equilibrium must be used and the activity
coefficient model must be used for the liquid phases. It is therefore possible to use the Peng
Robinson EOS for both the vapour and liquid phases, and this is the approach tha will be
used in this project.
Figure 6 presents the phase envelope for the three separators at Snorre A. The phase
envelope is valid for the operation condition specified in Section 4.5 at page 22. According to
Adewumi the dew point, bubble point and critical point can be defined as: Dew point is the
pressure and temperature condition at which an infinitesimal quantity of liquid (a droplet)
exists in equilibrium with vapour. Bubble point is the pressure and temperature condition at
which the system is all liquid, and in equilibrium with an infinitesimal quantity (a bubble) of
gas. Critical point is the temperature and pressure for which liquid and vapour are
indistinguishable.
Operation condition is the pressure and temperature for separators S1, S2 and S3. L is the
liquid region. In the two-phase region (L+V) both a liquid and vapour phase exists and V is
the vapour region.
From the reservoir to the first separator and between the separators a considerable
pressure reduction occurs. It is therefore reasonable to assume that the fluid separates into
a liquid and vapour phase. This is also confirmed in Figure 6 where the operation condition
for separator S1, S2 and S3 is placed well inside the two phase region. This simplifies the
problem form phase equilibrium calculation to vapour liquid equilibrium calculation.
In this application the number of vapour liquid equilibrium calculation needed is quite small
and the sampling time is large, approximately one hour. Figure 6 shows that the operation
condition is far from the critical point and the SS method can therefore be used. Since speed
is not important, the successive substitution method is used. The SS method is the most
popular, best documented and easiest to implement. The third and final assumption is that
the local solution found by the SS method is the global solution.
12
Separator S1
Separator S2
60
Pressure [Bar]
Pressure [Bar]
300
200
100
0
-200
0
200
Temperature [C]
Separator S3
400
40
20
L
L+V
V
0
-200
0
200
400
Temperature [C]
600
Pressure [Bar]
30
Bubble point curve
Dew point curve
20
Critical point
Operation condition
10
0
-200
0
200
400
Temperature [C]
600
Figure 6: Phase envelope for separator S1, S2 and S3 (calculated in UNISIM Design).
13
4.4 Vapour liquid equilibrium calculations
A flash process is one in which a fluid stream of known compositions and flow rate passes
through a throttle and into a vessel where liquid and vapour phases are separated before
passing through the appropriate outlet (Assael, Trusler, & Tsolakis, 1996).
In this project an iterative algorithm is used to find the vapour liquid equilibrium. The
algorithm is mostly based on the course phase relations in reservoir engineering taught at
the Pennsylvania State University, see Adewumi. Some tips on how to implement the
algorithm in MATLAB are taken from Rosales-Quintero who has implemented an isothermal
flash calculation algorithm in MATLAB using Soave equation of state. The books Assael,
Trusler, & Tsolakis (1996) and Wauquier (2000) also recommends the method proposed by
Adewumi for solving isothermal flash calculations.
Y
FV
T P
Z
F
Q
X
FL
Figure 7: Isothermal flash unit.
In Figure 7 a typical overview of an isothermal flash unit is shown. Where Z is the molar
composition of the inlet flow, Y is the molar composition of the vapour outlet flow, X is the
molar composition of the liquid outlet flow, T is the temperature, P is the pressure, Q is the
heat flow, F is the inlet molar flow, Fv is the outlet vapour molar flow and FL is the outlet
liquid molar flow. The underlining under the letters Y, Z and X is used to specify that these
values are vectors with one number for each component of the inlet stream.
According to (Assael, Trusler, & Tsolakis, 1996), the operating pressure of the unit is
controlled in some way and heat is supplied or removed at rate Q through a heat exchanger
so as to maintain isothermal conditions at temperature T. The known parameters are T, P, Z
and F and the unknown parameters are Y, X, FV and FL. Since there is a relation between the
unknown parameters, the problem can be reduced to finding K and β. This gives a problem
with n+ 1 unknown variables, where n is the number of components in the inlet stream.
In Figure 8 a block diagram of the isothermal flash calculation algorithm is presented. The
algorithm consists of three main parts: initialization, calculation of β and calculation of
fugacity.
14
1. Start with fixed
P,T and Z
2. Estimate K with
Wilson's empirical
correlation
4b. Update b
3. Calculate betanew by
using Newton-Raphson
bold= bnew
4a. Check convergence No
abs(bnew-bold)<d1
Yes
5. Calculate and
normalize
X and Y
7b. Update Ki
Ki = Ki
fi L
f iV
6. Calculate vapor and
liquid fugacity
f i =....
f i =....
V
L
7a. Check convergence
2
 fi L

 g − 1 < δ 2

i =1  f i

n
No
Yes
End
Figure 8: Flow chart of isothermal flash calculation.
15
4.4.1 Initialization
An initial value for equilibrium ratios Ki is needed for the calculation of β. The Wilson’s
empirical correlation is a popular empirical correlation that is very often used in the
petroleum and natural gas industry. This correlation gives the value of Ki as a function of
reduced conditions and acentric factor, and is written as (Adewumi):
1
5.37(1 + ωi )(1 − )
1
Tri
Ki = e
Pri
(4.1)
In Equation (4.1) ω is the acentric factor. According to Arnold & Stewart (1999), the
substance reduced properties can be calculated from the critical properties, see Equation
(4.2) and (4.3). Where subscript, c is the critical value, r is reduced value and i is used to
select a specific component. The critical properties and acentric factor for a fluid is constant
and these values are presented in Section 10.3. Where i=1 equals nitrogen, i=2 equals
methane and so forth.
Pi
Pci
T
Tri = i
Tci
Pri =
(4.2)
(4.3)
4.4.2 Calculation of β
This part of the algorithm calculates the vapour and liquid molar flow and composition for a
constant value of the equilibrium ratios. The equilibrium ratios found by the Wilson’s
empirical correlation is most likely not the true equilibrium ratios and these values will be
updated by the last part of the algorithm.
Fv = β F
(4.4)
FL = (1 − β ) F
(4.5)
Equation (4.4) and (4.5) describes the vapor and liquid mole flows as a function of β and inlet
mole flow. Since only the overall composition of the mixture is known, a material balance for
each of the n components is required:
Fzi = FL xi + FV yi
y
Ki = i
xi
(4.6)
(4.7)
Ki, in Equation (4.7), is the equilibrium ratios. Equation (4.6) is solved with respect on xi and
the flow rates are eliminated in terms of the vapor fraction in Equation (4.4):
16
xi =
zi
1 + β ( K i − 1)
n
x
i
(4.8)
=1
(4.9)
i =1
The summation of all molar vapor fractions must be equal to one, see Equation (4.9). In
Equation (4.10) and (4.11) two possible object functions for finding β are presented. These
two functions are non-linear and can be solved with a Newton-Raphson method. One
problem with this approach is that the object functions are not monotonic and therefore the
Newton-Raphson method might end up with the wrong solution.
n


zi
f x (β ) =  
 −1 = 0
i =1  1 + β ( K i − 1) 
(4.10)


zi K i
f y (β ) =  
 −1 = 0
i =1  1 + β ( K i − 1) 
(4.11)
n
Rachford & Rice (1952) solved this problem by combining the two object functions. Equation
(4.13) presents the Richford Rice objective function and Equation (4.14) presents the
derivative of this function. They used a binary search algorithm to find f(β)=0.
f (β ) = f y (β ) − f x (β )
(4.12)
zi ( Ki − 1)
=0
i =1 1 + β ( K i − 1)
n
f (β ) = 
n
f ( β ) = −
i =1
zi ( K i − 1) 2
(1 + β ( Ki − 1) )
2
=0
(4.13)
(4.14)
Since the composition zi and something square is always positive the derivate of Rachford
Rice objective function is always negative. It is therefore proven that the Richford Rice object
function is a monotonically decreasing function. A remaining weakness of the Rachford-Rice
objective function is that, although monotonic, it is not continuous at all points of the
domain Adewumi. By inspection of the Rachford Rice objective function n singularities exists
and they accrue if β=βsing.
βsing =
1
1 − Ki
(4.15)
Equation (4.7) shows that the only physical meaningful values for ki are values larger than
zero. This is because ki smaller than zero gives a negative mole fraction of substance i in
either the vapour or liquid phase. By inspecting Equation (4.4) and (4.5) the physical
meaningful values for β are between zero and one. Equation (4.16) proves that all the
singularities are placed outside the physical meaningful region.
17
if ( 0 <Ki ≤ 1)
Bsin g > 1
(4.16)
f (1 <K i < ∞ )
Bsin g ≤ 0
In the physical meaningful region the Rachford Rice objective function is continuous and
monotonically decreasing and therefore only one or zero roots to Equation (4.13) exists. In
this project the Newton Raphson procedure is used to find the root of Equation (4.13). The
Newton Raphson procedure is presented in Equation (4.17) from Croft, Davison, &
Hargreaves (2001). Equation (4.19) ensures that βnew is in the physical meaningful region.
f (x )
xi +1 = xi −  i
f ( β xi )
zi ( K i − 1)
old ( K i − 1)
zi ( Ki − 1) 2
n
β NR = β old +
 1+ β
i =1
n
 (1 + β
i =1
β new
(4.17)
old
( K i − 1) )
(4.18)
2
 β NR if (0.001 < β NR < 0.999) 


= 0.999
if ( β NR ≥ 0.999)

 0.001

if ( β NR ≤ 0.001)


(4.19)
Convergence is achieved when Equation (4.20) is satisfied. δ1 is a small number and in this
project δ1 is equal to 10-14.
β new − β old < δ1
(4.20)
If convergence is not achieved, βold=βnew and the calculations of Equations (4.18) and (4.19)
are repeated. When convergence is achieved, βnew is used to calculate the vapour and liquid
composition, see Equation (4.21) and (4.22).
xi =
zi
1 + β new ( K i − 1)
(4.21)
yi =
zi K i
1 + β new ( K i − 1)
(4.22)
The liquid and vapour compositions are normalised so that Equation (4.23) is true.
n
n
i =1
i =1
 xi =  yi = 1
18
(4.23)
4.4.3 Calculation of fugacity
In this project the successive substitution method is used. According to Vázquez-Román et al
(2000) successive substitution is the most popular method that has proved to converge to
the optimal in most practical cases. However, a good initial estimation is required to avoid
undesired solutions and enhance convergence.
The Peng Robinson EOS is used to calculate the partial fugacity coefficient for the vapour and
liquid phase, see Section 4.4.4. In Equation (4.24) and (4.25) the fugacity of the vapour and
liquid phase is calculated. For the system to be at equilibrium fugacity of component i must
be equal in the vapour and liquid phase for all n components.
fiV = ϕiV yi P
(4.24)
fi L = ϕiL xi P
(4.25)
Convergence is achieved when Equation (4.26) is satisfied. δ2 is a small number and in this
project δ2 is equal to 10-14. If convergence is achieved the system is at equilibrium and the
isothermal flash algorithm is finished.
2
 fi L 
 g − 1 < δ 2

i =1  f i

n
(4.26)
In the opposite case the K values must be updated and this is done by a successive
substitution method. According to Jaluria (2008) a particularly simple method for root
solving is the successive substitution method, in which the given equation f (x) = 0 is
rewritten as x = g(x). At the root, α=g(α), where α is the root of the original equation and
thus f (α) = 0. This yields an iterative scheme given by the equation:
x k +1 = g ( x k )
(4.27)
At equilibrium the fugacity of the vapour and liquid phase is equal for all n components
( f i L = fiV ) and therefore:
Ki =
ϕiL
ϕiV
(4.28)
By using the successive substitution method on Equation (4.28) an iterating scheme for
updating Ki can be found.
f ( Ki ) =
ϕiL
− Ki = 0
ϕiV
(4.29)
This gives:
Ki = g ( Ki ) =
ϕiL
ϕiV
(4.30)
19
By inserting Equation (4.30) into Equation (4.27) and substituting x with K and iterative
scheme for updating Ki is found:
fi L
ϕL x P f L y
fL
K ik +1 = iV = i V = iV i = K ik iV
fi
ϕi
fi xi
fi
yi P
(4.31)
The old Ki values are not needed and the updating rule can therefore be simplified to
Equation (4.32). If convergence is not achieved the Ki values are updated as seen in Equation
(4.32) and the algorithm returns to step 3 in Figure 8.
Ki = Ki
fi L
f iV
(4.32)
4.4.4 The Peng-Robinson Equation of State
The Peng & Robinson (1976) Equation of State with one modification is used to calculate the
fugacity coefficient. The PR is a modification of the Redlich Kwong (RK) Equation of State
which corresponds to a lower critical compressibility of about 0.307 thus representing the
VLE of natural gas systems accurately, (Honeywell 2008).
In Equation (4.33) to (4.44) the Peng Robinson equation of state is presented. Where, P is
the pressure, φi is the fugacity coefficient, R is the universal gas constant, T is the
temperature, Vm is the molar volume, mi is the molar fraction of component i in either the
vapor or liquid phase, kij is the binary interaction parameter and Z is the compression factor.
P=
RT
aα
−
Vm − b Vm (Vm + b) + b(Vm − b)
Z 3 − (1 − B) Z 2 + ( A − 3B 2 − 2 B) Z − ( AB − B 2 − B3 ) = 0
n
(4.33)
(4.34)
n
A =  mi m j (1 − kij ) Ai Aj
(4.35)
i =1 j =1
n
B =  mi Bi
(4.36)
aα =  mi m j (1 − kij ) aiα i a jα j
(4.37)
i =1
n
n
i =1 j =1
20
n
b =  mi bi
(4.38)
i =1
Ai = 0.45724α i
ai = 0.45724
Pr ,i
Bi = 0.07780
2
r ,i
T
( RTi c ) 2
Pi c
(
bi = 0.07780
)
α i = 1 + ni 1 − Tr ,i 

Pr ,i
Tr ,i
RTi c
Pi c
(4.39)
(4.40)
2
(4.41)
In the original PR EOS Equation (4.42) was used for all ωi. According to Danesh (1998) this
correlation was later modified to improve predictions for heavier components, see Equation
(4.42) and (4.43).
if (ωi ≤ 0.491) ni = 0.37464 + 1.54226ωi − 0.26992ωi2
(4.42)
if (ωi > 0.491) ni = 0.379642 + 1.48503ωi − 0.164423ωi2 + 0.016666ωi3
(4.43)
Bi
( Z − 1) − ln( Z − B)
B
  Z + 2.414 B 
2 n
A  Bi
+
−
m j (1 − kij ) aiα i a jα j  ln 



2.828 B  B aα j =1
  Z − 0.414 B 
(4.44)
ln ϕi =
When the fugacity coefficient of the liquid phase is calculated the smallest real root of
Equation (4.34) is used and mi=xi. For the fugacity coefficient of vapor phase the largest real
root of Equation (4.34) is used and mi=yi.
Equation (4.37) and (4.38) is the classical mixing rule derived from the van der Vaals theory,
Wauquier (2000). Several different mixing rules exist and in the review article by Ghosh
(1999) seventeen different mixing rules were discussed.
The binary interaction parameter kij is symmetric (kij= kji) for the classical mixing rule, but for
some mixing rules they are taken to be asymmetric (Ghosh 1999). In this thesis it is assumed
that the binary interaction parameters are zero.
The binary interaction parameter can be estimated with a group contribution method
proposed by Privat, Jaubert, & Mutelet (2008). This method makes it possible to estimate kij
for any mixture containing saturated hydrocarbons (n-alkanes and branched alkanes),
aromatic hydrocarbons, cyclic hydrocarbons (naphthenes), carbon dioxide, nitrogen, and
hydrogen sulfide whatever the temperature.
21
4.5 Verification of the algorithm
A process with three separators in series, see Figure 9, is used to verify the vapour liquid
equilibrium algorithm implemented in MATLAB. Figure 9 presents the implementation of
this process in UNISIM Design. Fluid 2, see Table 12, is used as the reservoir fluid and the
flow rate is 2791 [kmol/h]. Operation conditions for the three separators are presented in
Table 2.
Figure 9: Separator train process.
Table 2: Operation conditions.
Separator
S1
S2
S3
Pressure [Bar]
36
12
2
Temperature [C]
70
68.71
66.11
In UNISIM Design a number of different thermodynamic models can be selected. According
to (Honeywell, 2008) the PR equation of state is the ideal for VLE calculations as well as
calculating liquid densities for hydrocarbon systems. UNISIM Design has an improved PR
equation of state that extends its range of applicability and to improve its predictions for
some non-ideal systems.
Table 3 presents the result from vapour liquid equilibrium calculations in MATLAB and
UNISIM Design. Where:
•
•
•
•
22
PRM1: Vapour liquid equilibrium algorithm implemented in MATLAB with critical
properties and accentric factor from Yaws (1999) and all binary interaction
parameters set to zero.
PRM2: Vapour liquid equilibrium algorithm implemented in MATLAB with critical
properties and accentric factor from UNISIM Design and all binary interaction
parameters set to zero.
PRU: Simulation in UNISM Design with PR equation of state with all binary
interaction parameters set to zero
IPRU: Simulation in UNISIM Design with improved PR equation of state with
binary interaction parameters estimated by UNISIM Design
Table 3 shows that the three methods PRM1, PRM2 and PRU generate comparable results.
Equation (4.45) presents the method for calculating the average relative error between
method m and n.
The average relative error between the PRM1 and PRU method is 0.59%. When the results
from PRM2 and PRU method is compared the average relative error is 0.13%. This error is
most likely caused by differences in implementation. The implementation in UNISIM design
is secret and further investigation of this error is not possible.
This project will continue to use the critical properties and accentric factor presented by
Yaws (1999). This is because UNISIM Design values may be copyright and this project could
not find the source for these values.
The average relative error between the PRM1 and IPRU method is 14.8%. This shows that
the binary interaction parameters are important and that these values should not be set
equal to zero. How to estimate the binary interaction parameters is outside the scope of this
project.
ΔK i =
K i ,m − K i ,n
100
( Ki,m + Ki,n )
2
FL ,m − FL ,n
100
( FL , m + FL , n )
2
1  N

E=
ΔK i + ΔFL 


N + 1  i =1

ΔFL =
(4.45)
23
Table 3: Comparison of VLE calculation in MATLAB and UNISIM Design.
Separator Method K1
S1
S2
S3
K2
K3
K4
K5
K6
K7
K8
K9
K10
FL
PRM1
13.31
6.29
1.89
0.7774 0.4118 0.3221 0.1675 0.1395 0.0608 3.12E-05 1.23E+03
PRM2
13.43
6.368
1.893
0.7778 0.4098 0.3212 0.167
PRU
13.42
6.333
1.893
0.7778 0.4095 0.321
IPRU
15.66
7.419
2.282
0.9287 0.4724 0.3752 0.1903 0.1576 0.0675 2.75E-05 1.17E+03
PRM1
39.38
17.63
4.763
1.799
0.8897 0.6841 0.3318 0.2719 0.1087 2.32E-05 1.05E+03
PRM2
39.73
17.85
4.779
1.802
0.886
PRU
39.69
17.74
4.778
1.802
0.8851 0.6822 0.3309 0.2699 0.1093 2.28E-05 1.05E+03
IPRU
46.61
20.95
5.845
2.194
1.045
0.8176 0.3878 0.317
0.1255 2.32E-05 1.02E+03
PRM1
235.9
102.1
25.86
9.27
4.398
3.344
1.555
1.262
0.4782 6.02E-05 925.7
PRM2
238
103.4
25.95
9.288
4.38
3.339
1.548
1.252
0.482
PRU
237.8
102.8
25.94
9.284
4.374
3.335
1.55
1.252
0.4814 5.91E-05 925.8
IPRU
281.3
122.6
32.26
11.54
5.283
4.093
1.866
1.512
0.5703 6.48E-05 914.1
0.683
0.1382 0.061
3.03E-05 1.23E+03
0.1672 0.1384 0.061
3.04E-05 1.23E+03
0.3305 0.2698 0.1094 2.28E-05 1.05E+03
5.91E-05 925.8
The calculation time for this example is 30 millisecond on a HP Pavilion DV6185 computer
with a 1.83 GHz processor. Table 4 presents the number of iterations need for the PRM1
method to converge. The relative high numbers of iterations in the inner loop implies that
the method can be improved to reduce computation time. This is not necessary since the
method is fast enough for this project.
Table 4: Iteration numbers for VLE algorithm implemented in MATLAB.
Separator:
S1
S2
S3
24
Iterations of outer loop
7
6
4
Average iterations of inner loop
15
17
17
4.6 Crude oil product pricing
Crude oil produced in the gas oil separation plant is sold on the international marked. The
price of this product is influenced by many independent factors, where the most important
factor is the relation between supply and demand. Crude oils differ in quality and this
influences the price. Crude oil is categorized primarily according to their API gravity and then
the sulphur content. The amount of entrained water is an additional factor for discounting
the price. (Mian 2002)
API gravity measures the relative density of the petroleum fluid and can be determined by
using a hydrometer (Rand 2003). According to Adewumi, the API gravity can be calculated
from the density of the petroleum fluid and this method is presented in Equation (4.46) to
(4.49). The API gravity are usually defined at standard conditions ( Pstc=14.7 psia and Tstc=
60oF).
The Peng Robinson EOS is used to calculate the liquid density, see Equation (4.46) and (4.47).
Where, Zoil is calculated with the procedure describe in Section 4.4.4 and MWi is the
molecular weight of component i in the petroleum fluid. The molecular weight for the fluids
used in this project is presented in Section 0. The Peng-Robinson EOS provides fair estimates
for vapour and liquid densities as long as we are dealing with natural gas and condensate
systems (Adewumi).
N
MWoil =  xi MWi
(4.46)
i =1
ρoil =
Pstc  MWoil 


RTstc  Z oil 
(4.47)
ρoil
ρ water
(4.48)
SG =
o
API =
141.5
− 131.5
SG
(4.49)
According to Mian (2002), the API gravity of crude oils varies from 5o to 55o. Average crude
oils have a 25o to 35o range. Light oils are 35o to 45o and heavy oils are below 25o. The lighter
crudes (higher API gravity) receive a higher price as compared to the heavier crude. This is
because the lighter crudes tend to have more gasoline by volume than the heavier crudes
that have proportionately more gas-oil (diesel) and residue cracking stock.
25
According to E24 AS the North Sea oil price was approximately 50 dollars per barrel for the
first quarter of 2009. The oAPI adjustment collected from Mian (2002) is added to this price
and Table 5 presents the crude oil prices as a function of API gravity
Table 5: Crude oil price as a function of API gravity.
o
API
50
45
40
30
Price in dollars per barrel
49.625
50
50
48.5
Equation (4.50) presents a method for calculating the income from the crude oil sale. Where,
I is the income [$/s], FL,3 is the liquid outlet flow from the third separator [kg mol/s] and
cmb=6.29 is a conversion factor from barrel to m3. The MATLAB function interp1 is used to
implement the function Price( 0 API ) .
I=
26
FL ,3 MWoil cmb
ρoil
⋅ Price( 0 API )
(4.50)
5 Optimizing separator pressures (without compressors)
The income from the crude oil sale is maximised for a process with three separators in
series. The process is the same as in Section 4.5 and the pressure in the first and second
stage separator is used as control variables.
max( I )
ps 1 , ps 2
subject to
25 ≤ ps1 ≤ 45
(5.1)
4 ≤ ps 2 ≤ 18
The optimization problem, see Equation (5.1), is solved by brute force optimization. Where,
ps1 is the pressure [bar] in the first stage separator, ps2 is the pressure [bar] in the second
stage separator and I is the income from crude oil sale. In brute force optimizing all possible
solutions is tested and the method is therefore very slow. Brute force optimization is easy to
implement and the optimum of the points tested will be found.
The inequality constraints have both physical and implementation reasons. Breaking the
maximum pressure will lead to an explosion in the separator and the compressor system
cannot handle pressure lower than the minimum. The vapour liquid equilibrium calculation
fails if the process operates in a single phase region. This happens if the pressure reduction
between the first and second stage separator is small. The inequality constraints limit the
number of possible solutions and therefore make brute force optimization possible.
Figure 10 presents the pseudocode for brute force optimization. The resolution for the
pressure is set to 0.1 bars and this gives 201 and 141 possible operation points for the first
and second stage separator. The objective function must therefore be calculated 28341
times.
ps1 = [ 25 25.1  45]
ps 2 = [ 4 4.1  18]
I opt = 0
for j = 1: size( ps1 )
for k = 1: size( ps 2 )
calculate I = f ( Ps1 ( j ) , Ps 2 (k ))
if I > I opt
jopt = j , kopt = k , I opt = I
end
end
end
Figure 10: Pseudocode for brute force optimization.
27
The brute force optimization method is used to calculate the optimum for three different
reservoir fluids. The composition of the reservoir fluids is presented in Section 10.2 and for
all three fluids a flow rate of 2791 [kmol/h] is used.
In Figure 11 to Figure 13 the result of this optimization is presented. The black circle is the
operation point for the current control system. The white circle is the optimum operation
point found by the brute force optimization. In these figures dark red represents the highest
income and the numbers beside the colourbar show the income in dollars per second.
The optimization problem appears to be convex and the nonlinear optimization methods in
MATLAB will therefore find the global optimum. This will give a huge time reduction
compared to using brute force optimization. However, the brute force optimization method
is fast enough for testing. The brute force optimization method uses 7 minutes to solve the
problem.
13.26
13.25
Pressure separator S1 [bar]
40
13.24
13.23
13.22
35
13.21
13.2
30
13.19
13.18
13.17
25
4
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 11: Graphical representation of income as a function of the pressure in separator S1 and S2 for fluid 1.
26.16
Pressure separator S1 [bar]
40
26.14
26.12
35
26.1
30
26.08
25
26.06
4
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 12: Graphical representation of income as a function of the pressure in separator S1 and S2 for fluid 2.
28
38.94
38.92
Pressure separator S1 [bar]
40
38.9
35
38.88
38.86
30
38.84
25
4
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 13: Graphical representation of income as a function of the pressure in separator S1 and S2 for fluid 3.
The optimum operation point changes when the composition of the reservoir fluid is
changed and the current operation point is far from the optimum for the three fluids tested.
It is possible that the new set-points are infeasible. This is because the compressor model is
not incorporated into this model.
Table 6 compares the income from the crude oil sale when the old and new control structure
is used. The new control structure gave an average increase in income of 0.14 %. This
number is quite small but the average increase in income for a year is one million dollar. It is
reasonable to assume that the increase in income will be lower when the compressor model
is incorporated.
Bahadori, Vuthaluru, & Mokhatab (2008) performed similar optimization for a gas oil
separation process with four separators and the same flow rate. They found the increase in
income to be 3600 [$/day] and 3000 [$/day] for the summer and winter seasons
respectively.
Table 6: Comparison between old and new control method.
Income old set-point [$/s]
Fluid 1 13.24
Fluid 2 26.15
Fluid 3 38.91
Income new set-point [$/s]
13.27
26.18
38.95
Increase [%]
0.23
0.12
0.09
Increase [$/day]
2627
2712
3058
29
30
6 Field processing of natural gas
The gas from the three separators needs to be compressed before it can be piped to the
injection system. Figure 14 presents the PI&D for the gas compression and gas oil separation
plant. The injection system is omitted from this thesis and it is assumed that the discharge
pressure for compressor C2 must be larger than 148 [bar]. Pressure below this value will give
an infeasible operation condition for the injection system. The purpose of injection is to
maintain overall and hydrostatic reservoir pressure and force the oil toward the production
wells, (Devold, 2006).
C2
Gas to injection
or export
C3
M1
SC
001
Scrubber
and
gas cooler
Scrubber
and
gas cooler
PC
S12
C4
M2
Scrubber
and
gas cooler
PC
S22
PC
S32
FC
S11
S1
Oil/gas from
reservoir
S2
LC
S11
S3
LC
S21
LC
S31
Oil to export
Figure 14: PI&D for the gas compression and gas oil separation plant.
The gas from the separator and the earlier compressor is quite hot and needs to be cooled
down before it can be compressed. The cooling increases the gas density and the
compressor can therefore have less physical size. On Snorre A the gas temperature from the
separator is approximately 70 oC and the gas from the earlier compressor is even hotter,
approximately 123 oC. The gas has to be cooled down to approximately 30 oC before it
reaches the next compressor. When the gas is cooled down, some of the heavy
hydrocarbons will begin to condense. Therefore a scrubber must be placed after the heat
exchanger to remove the liquid.
Liquids and solids will reduce the compressors expected lifetime and in more extreme chases
instantly destroy the compressor. The scrubber is a large vertical cylinder where the gas
enters near the bottom and is discharged at the top of the cylinder. The reduced gas speed
and a vane pack in the cylinder lets the oil droplets fall to the bottom. This condensate, the
oil droplets, is then pumped back to the inlet of the separator. This thesis, however, assumes
that no liquid is pumped back to the separator.
Compressor C4 is driven by a fixed speed electric motor and is fitted with inlet guide vanes.
Pressure in separator S3 is controlled by manipulating the inlet guide vane angel for
compressor C4. The pressure in separator S1 and S2 is controlled by manipulating the gas
valve opening.
31
Compressor C2 and C3 are multistage variable speed centrifugal compressors and they are
connected to the same shaft. The shaft is connected to a variable speed gas turbine and the
two compressors will therefore have the same speed.
The gas turbine is designed to operate at speed around 3428 rpm and is connected to a gear
box with a ratio of 3.9189. The nominal shaft speed is No=13434 rpm. The numbers seen in
Figure 17 and Figure 18 is the relative compressor speed Nc. Where Nc =N/No and N is the
shaft speed. The relative compressor speed can be adjusted from 0.9 to 1.05.The gas turbine
speed is controlled such that the gas valve opening for separator S2 is 95% open.
A secondary pressure control system is also fitted to the three separators. The set-points for
this system is 0.5 [bar] higher than then set-points for the primary pressure control system.
The gas from this system will be burned at the torch and the use of this system should
therefore be minimized. The secondary pressure control system is not implemented in this
thesis.
6.1 Compressors
The purpose of the compressor is to increase the pressure of gas from one level to another.
Depending on the volume flow and pressure ratio different compressor types are used.
According to Forsthoffer (2005), some different compressor types are: rotary lobe, rotary
screw, centrifugal single stage, centrifugal multi-stage and axial compressor.
In offshore oil and gas production the centrifugal multi-stage compressor is the most
common, and this compressor is used in this project. In Figure 15 a principle drawing of a
centrifugal multi-stage compressor is shown. The compressor consists of mainly three parts:
impeller, diffuser and volute/collector.
In a centrifugal compressor the energy of the gas is increased in the impeller. Here
mechanical energy from the shaft is used to increase the tangential velocity in the gas. The
increase in the tangential velocity will give an increase in pressure. In the diffuser and the
volute the tangential velocity will decrease and this gives additional pressure rise. According
to (Cohen, Saravanamuttoo, & Rogers, 1996), it is common to design compressors so that
about half the pressure rise occurs in the impeller and the other half in the diffuser.
32
Figure 15: principle drawing of a centrifugal multi-stage compressor (Picture from Siemens).
According to Gravdahl & Egeland (1999), the useful range of operation of turbocompressors, both axial and centrifugal, is limited, by choking at high mass flows when sonic
velocity is reached in some component, and at low mass flows by the onset of two
instabilities known as surge and rotating stall. According to Helvoirt (2007), surge not only
limits compressor performance and efficiency but can also damage the compressor and
auxiliaries due to the large thermal and mechanical loads involved.
Operation in the unstable regime is possible if some advanced control strategy, such as
closed coupled valve or drive torque actuation, is used. For more information on these
control methods, consult (Bøhagen, 2007) for drive torque and (Gravdahl & Egeland, 1999)
for closed coupled valve. These two methods need more research before they can be widely
implemented in the industry. Therefore this project will use the traditionally method to
prevent surge and rotating stall. This is done with a recycle valve that limits the compressor
to operate in the stable regime.
In Figure 16 the compressor characteristics for compressor C2 is given. The four blue lines
represent different impeller speeds, where the lines numbered 1, 2, 3 and 4 have the
impeller speed 12090, 12762, 13434 and 14105 [rpm] respectively. From the figure we can
see that an increase in impeller speed gives an increase in the pressure ratio for the same
mass flow. Pressure ratio is defined as the discharge pressure divided on the inlet pressure.
The red dashed line is the surge line and the compressor must operate to the right of this
line to be in the stable regime. When the compressor operates in this regime, a reduction in
the outlet mass flow will lead to an increase in the pressure ratio and therefore also an
increase in the discharge pressure. The increase in discharge pressure will increase the mass
flow and the compressor system will converge to a new equilibrium closer to the surge line.
If the reduction in mass flow is large and the surge line is crossed, the change in pressure
ratio will be proportional with the change in mass flow. The compressor system will then
33
become unstable, because a reduction in mass flow leads to a reduction in pressure ratio,
which in turn gives a reduction in mass flow.
In this project surge and rotating stall is avoided by using a recycle valve, see Figure 25 on
page 52 for block diagram. The compressor is fitted with an anti surge controller that opens
the recycle valve when the process crosses the surge control line. When the recycle valve is
open the fluid is fed back to the compressor intake and the mass flow is therefore increased.
6
Surge line
Surge control line
Choking
5.5
Pressure ratio
5
4
4.5
4
3
2
3.5
1
3
2.5
2
30
40
50
60
Mass flow [Kg/s]
70
80
Figure 16: Compressor characteristics with limitation.
The disadvantage with using this anti surge method is that the fluid that passes through the
recycle valve must be compressed in the compressor a second time and therefore the
overall efficiency of the compressor is reduced.
To the right of the black dotted line in Figure 16 the effect of choking, also known as
stonewall, is dominant. Choking occurs when sonic velocity is reached in some component.
This phenomenon only limits the range of operations and does not give an unstable regime
such as surge and rotating stall.
34
6.2 Isentropic head and isentropic efficiency
The preferred gas compression method with regard to energy consumption is isothermal
compression. In isothermal compression the temperature of the gas stays constant. When
gas is compressed the temperature increases and the gas must therefore be cooled while it
is compressed. According to the Purdue Research Foundation (2006), this is extremely
difficult to achieve because, for practical compression machines, the area available for heat
transfer is very small and the compression process occurs very quickly.
Since isothermal compression is almost impossible to implement, the compression process is
compared against an isentropic compression process. In an isentropic process the entropy is
constant. By assuming constant entropy it is possible to establish a relation between
temperature and pressure for an ideal gas with constant specific heats, see Equation (6.1).
Equation (6.1) was derived in the book White (2008) chapter nine.
k
p2  T2  k −1
= 
p1  T1 
(6.1)
According to Hanlon (2001), isentropic head is defined as the energy per mass unit
accumulated by the fluid subsequent to a reversible (and thus isentropic) adiabatic
transformation between states 1 and 2. An adiabatic process is a process where no heat is
transferred to or from the working fluid. According to Philip (1999), the isentropic head Hi
associated with compressing the gas from the inlet pressure p1 to the discharge pressure p2,
takes the form:
k −1


k


k
p

2
Hi =
ZRwT1   − 1
  p1 

k −1




(6.2)
The mean of the specific heats and the compressibility factor is used since these values
change slightly from the inlet to the discharge. Philip (1999) defined the isentropic efficiency
η1 as:
ηi =
mc H i
P
(6.3)
Where T is the temperature [K], p is the pressure [Pa], Rw is the characteristic gas constant
[J/kgK], k is the specific heats, Z is the compressibility factor, P is the power [W] used by the
compressor, mc is the mass flow [kg/s] through the compressor and the subscript 1 is taken
to refer to the inlet, while 2 refers to the discharge.
In Figure 17 the pressure ratio and isentropic efficiency for compressor C2 is presented. The
isentropic efficiency is calculated by using Equation (6.2) and (6.3). The isentropic efficiency
presents some interesting properties for compressor C2.
35
At the surge line the isentropic efficiency is quite low and proportional with the mass flow.
Therefore the benefits of implementing an active surge controller will be small. The peak
isentropic efficiency of 74% is less than what is typical for centrifugal compressors. According
to Philip (1999) the typical design point isentropic efficiency for a centrifugal compressor is
in the high 70s %. The most of the compressor characteristic has the isentropic efficiency
between 70 to 74% and there is therefore little to gain by changing the operation point.
6
Pressure ratio
5
4
3
2
0.9
1
30
35
40
45
50
55
Mass flow [Kg/s]
1
0.95
60
65
1.05
70
75
Isentropic efficiency [%]
0.8
0.7
0.6
1
0.5
0.4
30
0.95
0.9
35
40
45
50
55
Mass flow [Kg/s]
60
65
1.05
70
75
Figure 17: Pressure ratio and isentropic efficiency for compressor C2.
One weakness with using isentropic efficiency is that compressors with different pressure
ratios cannot be compared to each other. Therefore it is quite common to use polytropic
efficiency in the compressor literature. According to Philip (1999) the isentropic efficiency is
between about 2% and 7% less than the polytropic efficiency. In this project there is no need
to compare compressors with different pressure ratio and therefore isentropic efficiency is
used. More information on polytropic efficiency can be found in Dixon & Eng (1998), Hanlon
(2001) or Philip (1999).
36
6.3 Pressure control in separator S1 and S2
The pressure in separator S1 and S2 is controlled by a pressure controller. The controllers
are: PC-S12 for the first stage separator (S1) and PC-S22 for the second stage separator (S2).
The controller measures the gas pressure and regulates the amount of gas leaving the
separator through a choke valve, see Figure 14.
The valve is modelled as in the book Egeland & Gravdahl (2002) chapter 13, see Equation
(6.4). Where pi is the pressure [Pa] in the separator, Pd is the pressure [Pa] after the choke
valve, V is the valve constant, m is the outlet gas mass flow [kg/s] from the separator and u is
the valve opening. The valve cannot be more then fully open or less than completely closed
and the valve opening must therefore be between zero and one.
 uV pi − pd
m=
−uV pd − pi
if pi ≥ pd 

if pi < pd 
(6.4)
The valve constant is found by solving Equation (6.4) with respect on V when the conditions
presented in Table 7 are used. This gives a valve constant of 0.33 for the valve connected to
separator S1 and 0.025 for the second valve. The valve opening is found be rearranging
Equation (6.4) to Equation (6.5)
m

V p −p
i
d

u=
m
−
 V pd − pi


if pi ≥ pd 


if pi < pd 


(6.5)
Table 7: Values used for calculating the valve constant.
pi
pd
m
u
Separator S1
36*105 [Pa]
35.7*105 [Pa]
55 [Kg/s]
0.95
Separator S2
12*105 [Pa]
11.7*105 [Pa]
4 [Kg/s]
0.95
Description
Pressure in separator
Pressure after the gas valve
Outlet gas mass flow from the separator
Valve opening
37
38
7 Compressor modelling
Compressor characteristics are a common way to represent compressor performance. Figure
18 presents the design pressure ratio and power consumption for compressor C2 and
compressor C3. These four graphs must be implemented in the compressor simulation
model and this can be done in many different ways. Some of the different methods used for
implementation are polynomial approximation, physical modelling and dimensionless
parameters. All the methods have different advantages and disadvantages and a short
description of the methods will be given in the following subsections.
The compression plant has two multistage variable speed centrifugal compressors and the
compressor characteristics for these two compressors are presented in Figure 18. Where the
black x-marks are points obtained from Aker Engineering a.s (1996a), the red line is the
surge line, the blue x-marks are an expansion of the compressor characteristics, the dotted
line is a linear interpolation between the x-marks and the numbers beside the lines show the
relative compressor speed. The inlet conditions for the compressor characteristics are
presented in Table 14.
Compressor C2
Compressor C3
5
5
4
3
2
0.9
1
30
40
0.95
50
60
Mass flow [Kg/s]
1 1.05
4
2.5
1.5
70
1
1.2
0.95
0.9
40
50
60
Mass flow [Kg/s]
70
Power at compressor coupling [W]
Power at compressor coupling [W]
1.05
1.4
30
0.9
5
6
7
8
9
10
Mass flow [Kg/s]
11
12
11
12
6
1.6
0.8
0.95
3
2
x 10
1
1
3.5
7
1.8
1.05
4.5
Pressure ratio
Pressure ratio
6
2.2
x 10
1.05
2
1.8
1
1.6
1.4
0.95
1.2
0.9
1
5
6
7
8
9
10
Mass flow [Kg/s]
Figure 18: Compressor characteristic for compressor C2 and compressor C3.
39
7.1 Polynomial approximation
The pressure ratio can be estimated with a polynomial and this approach is used by Bøhagen
(2007), Egeland & Gravdahl (2002), Willems (2000) and Helvoirt ( 2007). Equation (7.1)
shows the polynomial approximation proposed by Willems (2000) also used by Bøhagen
(2007). The unknown coefficients ci,j can be found with linear least-squares and this is
described in Section 10.1.
pr (m, S ) = c3 ( S )m3 + c2 ( S )m 2 + c0 ( S )
(7.1)
ci ( S ) = ci ,2 m2 + ci ,1m + ci ,0
Figure 19 presents the polynomial approximation of the pressure ratio for compressor C2.
The x-marks are the points collected from the datasheet supplied by the manufacturer. The
dashed lines is a shape-preserving piecewise cubic interpolation of the x-marked points. This
line is calculated with a fixed step size of 0.1 kg/s in the x-axis. The solid line is the
polynomial approximation where all the points from the dashed lines are used.
This figure illustrates that the polynomial approximation proposed by Bøhagen (2007) is
inaccurate when the whole pressure ratio curve is approximated. Bøhagen used a single
stage centrifugal compressor. This compressor has a smoother curve and the derivative is
smaller at high mass flow. Figure 19 shows that the polynomial approximation fails to
estimate the points near the stonewall.
6
5.5
5
Pressure ratio
4.5
4
3.5
3
2.5
2
1.5
30
35
40
45
50
55
Mass flow [Kg/s]
60
65
70
Figure 19: Polynomial approximation of the pressure ratio 1.
40
75
The solid line in Figure 20 is a polynomial approximation of the pressure ratio for compressor
C2. In Figure 20 the dashed line to the left of the circle is used in the polynomial
approximation.
This approach gives a tight fit between the solid and dashed line for points placed left to the
circle. Bøhagen used this polynomial approximation in the thesis “Active surge control of
centrifugal compressor system”. The part of the dashed line that is omitted is insignificant
for active surge control system. This is because the compressor system is stable and this
region is far from the surge line. Figure 17 shows that the isentropic efficiency is quite high
for this region and it is therefore likely that the compressor system will operate in this
region.
6
5.5
5
Pressure ratio
4.5
4
3.5
3
2.5
2
1.5
30
35
40
45
50
55
Mass flow [Kg/s]
60
65
70
75
Figure 20: Polynomial approximation of the pressure ratio 2.
7.1.1 Polynomial + nonlinear term approximation of the pressure ratio
An alternative approach is to approximate the pressure ratio for the four speed lines and
then use linear interpolation to estimate the pressure ratio for the other speed.
High order polynomials can be highly oscillatory and the polynomial order should therefore
be held as low as possible. Equation (7.2) presents a method for estimating the pressure
ratio, where c1,I to c7,I are the unknown parameters and the subscript i is used to separate
the four different speed lines from the manufacture. This method consists of a cubic
polynomial approximation and a nonlinear term. The unknown coefficients cannot be
calculated with linear least-squares since the method contains a nonlinear term.
A cubic polynomial approximation gives a tight fit between the model and the
measurements, when the points near the stonewall area of the measured characteristics
41
were not used. This method will therefore use a cubic polynomial approximation for this
part. For the points near the stonewall area a nonlinear term will be added to improve
accuracy.
if c5,i > m

pr ,i = c1,i m3 + c2,i m 2 + c3,i m + c4,i
else
(7.2)
c

pr ,i = c1,i m3 + c2,i m 2 + c3,i m + c4,i + c6,i (m − c5,i ) 7,i
end
This curve fitting procedure consists of two steps:
1. The unknown parameters c5,i to c7,I are set to zero and the remaining term is then a
cubic polynomial. The coefficients of this polynomial are found with the MATLAB
command polyfit.
2. The remaining unknown parameters c5,i to c7,i are calculated with the MATLAB
command fminsearch. Fminsearch searches for the minimum of Equation (7.3),
where pr,i is the shape-preserving piecewise cubic interpolation of a constant speed
line from the manufacture.

min pr ,i − pr ,i
c
2
(7.3)
Figure 21 presents a comparison between the shape-preserving piecewise cubic
interpolation (dashed black line) and the polynomial + nonlinear term approximation (blue
line). The blue line nearest the lower left corner has a relative compressor speed of 0.85 and
the speed is increased with 0.01 for each new blue line. The preserving piecewise cubic
interpolation line and the blue line for the same speed fits almost perfectly and this method
seems to give good results between the speed lines too.
42
6
5.5
5
Pressure ratio
4.5
4
3.5
3
2.5
2
1.5
30
35
40
45
50
55
Mass flow [Kg/s]
60
65
70
75
Figure 21: Polynomial + nonlinear term approximation of the pressure ratio.
7.1.2 Polynomial + nonlinear term approximation of the power
consumption.
The approach used above is used to approximate the power consumption. Equation (7.4)
presents the approximation of the power consumption for a constant speed. Figure 22
shows the compression between the measured power consumption (dashed black line) and
the polynomial + nonlinear term approximation (blue line).
f c3,i > m

Pi = c1,i m + c2,i
else

c
Pi = c1,i m + c2,i + c4,i (m − c3,i ) 5,i
(7.4)
43
7
1.8
x 10
Power at compressor coupling [W]
1.6
1.4
1.2
1
0.8
0.6
30
35
40
45
50
55
Mass flow [Kg/s]
60
65
70
75
Figure 22: Polynomial + nonlinear term approximation of the power consumption.
7.1.3 Conclusion
Polynomial plus nonlinear term approximation gives a good approximation of the
compressor characteristics for the design inlet conditions. A change in the separator
pressure will influence the inlet pressure to the compressor. Small changes in the molecular
weight will also accrue when the reservoir fluid composition changes. The compression
system will therefore operate in off-design operation points. According to Hanlon (2001),
off-design operation of a compressor can dramatically affect the pressure ratio and power
consumption.
Polynomial plus nonlinear term approximation can therefore not be used since this method
gives the same compressor characteristics for all inlet conditions.
44
7.2 Physical modelling
In physical modelling first principal of physics are used to derive a model for the compressor
system. This approach was used by Gravdahl & Egeland (1999) and parts of this model will
be used here. This model is a dynamic model for a variable speed centrifugal compressor
and is based on compressor geometry and energy considerations.
When the model was derived, it was assumed that compression process is isentropic and
that the gas has constant specific heat. With these two assumptions the discharge pressure
can be calculated as seen in Equation (7.5).
pd ,c
 η (m,U1 )Δh0 c ,ideal
= 1 + i

Ti ,c c p

k
 k −1
 pi ,c

(7.5)
Where ηi (m,U1 ) is the isentropic efficiency, Δh0 c ,ideal is the ideal specific enthalpy delivered
to the fluid, k is the ratio of specific heats and cp is the specific heat capacity at constant
pressure.
The slip factor σ depends largely on the number of impeller blades, but also on the passage
geometry, the impeller eye tip exit diameter ratio and mass flow rate, (Gravdahl & Egeland,
1999). With a constant slip factor and a radially vaned impeller the ideal specific enthalpy
delivered to the fluid can be expressed as:
Δh0 c ,ideal = σ U 22
(7.6)
The maximum pressure ratio, for a constant speed, in Equation (7.5) occurs when the
isentropic efficiency is at the maximum. This is not the case for compressor C2, see Figure
17, and this indicates that the slip factor is not constant.
ηi (m,U1 ) =
Δh0 c ,ideal
Δh0 c ,ideal + Δhloss1
− Δhloss 2
(7.7)
In Equation (7.7) the isentropic efficiency of the compressor is presented, where Δhloss1 is the
sum of incidence and frictional losses in the impeller and diffuser. Δhloss 2 represents other
losses. In the work of (Gravdahl & Egeland, 1999) model for the Δhloss1 is presented and
Δhloss 2 is assumed constant.
45
The compressors power consumption is:
Pc = σ ( D2 N )2 mc
(7.8)
Where D2 is the diameter at the impeller tip and N is the number of revolutions per second.
The power consumption for a constant speed as a function of mass flow is a straight line.
Figure 18 shows that the physical model proposed by Gravdahl & Egeland (1999) cannot be
used to accurately model the power consumption for compressor C2 and C3. This is because
the power consumption for a constant speed as a function of mass flow is not a straight line.
Common practice in the literature was and still is to use an approximation of the pressure
rise characteristic (Helvoirt 2007). This is because physical modelling gives many unknown
parameters that must be estimated. The model is nonlinear and this estimation is therefore
difficult. Physical modelling will not be used in this thesis.
46
7.3 Dimensionless parameters
According to Nørstebø (2008) the compressor characteristics may be specified by equations
of different dimensionless parameters. These equations will not be dependent on inlet
pressure, temperature, molecular weight or compressor speed. Nørstebø proposed the
dimensionless factors presented in Equation (7.9) to (7.11). The exponents of Ti, MWc and S
can be modified in order to fit better with the actual compressor system.
Flow coefficient:
ϕc = ϒ
m Ti
pi MW S 1
(7.9)
Pressure coefficient:
pd
pi S 2
(7.10)
P MW
pi Ti S 3
(7.11)
ωc =
Power coefficient:
ψc =
Where m is the mass flow, Ti is the inlet temperature, MW is the molecule weight, pd is the
discharge pressure, pi is the inlet pressure, S is the relative compressor speed, P is the power
consumption and ϒ is used to scale the value properly. The scaling improves the numerical
properties for the pressure and power coefficient approximation.
The compressor characteristic from the manufacture is a function of mass flow and relative
compressor speed. Since the compressor characteristic from the manufacture is not a
function of temperature and molecular weight, the exponents for these to values cannot be
tuned.
Figure 23 shows the relationship between flow and pressure coefficients, and between flow
and power coefficients. The fist column is for compressor C2 and the second column is for
compressor C3. In Figure 23 the light grey, grey, dark gray and black lines are the speed lines
for the manufacture. The relative compressor speeds are 0.9, 0.95, 1 and 1.05 for these
lines.
The exponents of S are tuned such that the area between these lines are minimised. This
minimisation can be done by trial and error or by an optimization algorithm which is
presented in Section 7.3.1. This project uses the optimization algorithm presented in Section
7.3.1 and Figure 23 shows the result of this optimization.
The green line in Figure 23 is a third order polynomial approximation of the pressure
coefficient. For compressor C2 the flow coefficient data between 1.25 and 2 are used.
Compressor C3 has a larger deviation between the four speed lines. The light grey line has a
large deviation from the three other lines for flow coefficient data less than 0.63 and these
47
data are therefore removed. After these data are removed, the flow coefficient data
between 0.6 and 0.87 are used for the third order polynomial approximation.
Equation (7.12) presents this method and the unknown coefficients, ca1 to ca4, are found
with the MATLAB command polyfit. If the entire flow coefficient data is used the polynomial
order must be increased to seven to give a good approximation. High order polynomials can
be highly oscillatory and the polynomial order should therefore be as low as possible
ωˆ c = ca1ϕc3 + ca 2ϕc2 + ca 3ϕc + ca 4
(7.12)
The third order polynomial approximation gives a precise estimation of the four speed lines
from the manufacture for the flow coefficient data used in the estimation. In Equation (7.13)
an alternative method is shown. This method uses the third order polynomial approximation
presented above and a nonlinear term. The three unknown coefficients, ca5 to ca7, can easily
be found by trial and error.
Selecting ca5 positive and ca7 greater than three guarantees that the nonlinear term
becomes the dominant factor for large mass flow. This ensures that the pressure coefficient
continues to decline for flow coefficients data larger than the data used in this
approximation. If a high order polynomial is used the opposite can occur and this is clearly
unphysical.
The blue line in Figure 23 shows the result of this curve fitting method. The deviation
between the blue line and the speed lines from the manufacture is small.
if (ϕc < ca 6 )
ωˆ c = ca1ϕc3 + ca 2ϕc2 + ca 3ϕc + ca 4
(7.13)
else
ωˆ c = ca1ϕc3 + ca 2ϕc2 + ca 3ϕc + ca 4 − (ca 5 (ϕc − ca 6 ))
ca 7
The red line in Figure 23 is the fifth order polynomial approximation of the power
coefficient, see Equation (7.14). The pressure and power coefficients approximation will be
used to calculated the discharge pressure and power consumption for compressor C2 and
C3.
ψˆ c = cb1ϕc5 + cb 2ϕc4 + cb3ϕc3 + cb 4ϕc2 + cb5ϕc + cb 6
48
(7.14)
Compressor C3
4.5
4.5
4
Pressure coeffcient
Pressure coeffcient
Compressor C2
5
4
3.5
3
2.5
2
1.2
1.4
1.6
1.8
Flow coefficient
2
3
2.5
2
1.5
2.2
0.6
0.7
0.8
Flow coefficient
0.9
0.6
0.7
0.8
Flow coefficient
0.9
0.5
Power coeffcient
1.1
Power coeffcient
3.5
1.05
1
0.95
0.48
0.46
0.44
0.9
1.2
1.4
1.6
1.8
Flow coefficient
2
0.42
2.2
Figure 23: Relationship between flow and pressure coefficient, and between flow and power coefficients.
7.3.1 Algorithm for calculating the optimal exponents of S
The calculation of the optimal exponents of S is an unconstrained nonlinear minimization
problem and the MATLAB function fminsearch is used to find the optimum. Fminsearch uses
the Nelder-Mead simplex direct search algorithm to find the minimum. This function
minimizes the object function with respect on the optimization variables exs1 to exs3
Object function:
1. Calculate Equation (7.15) to (7.17) for j=[1,2,3,4], where j is the speed lines from the
manufacture and ϒ is used to scale the value properly. The scaling transformation
improves the numerical properties of this algorithm.
ϕc , j = ϒ1
mc , j Ti ,c
pi ,c MWc S exs1
ωc, j =
ψ c, j = ϒ2
pr ,c , j
S exs 2
Pc , j MWc
pi ,c Ti ,c S exs 3
(7.15)
(7.16)
(7.17)
49
2. Calculate the polynomial in Equation (7.18) which gives the smallest square error
compared to Equation (7.15) and (7.16).
ω = P1ϕ 9 + P2ϕ 8 ...... + P9ϕ + P10
(7.18)
3. Calculate the polynomial in Equation (7.19) which gives the smallest square error
compared to Equation (7.15) and (7.17).
ψ = P1ϕ 9 + P2ϕ 8 ...... + P9ϕ + P10
(7.19)
4. Return the sum of the squared errors.
7.3.2 Calculation of discharge pressure and power consumption
In the simulation model the inlet conditions, temperature, pressure, molecule weight,
relative compressor speed and mass flow are known. The power consumption and discharge
pressure can be calculated from these values and this calculation is presented in Equation
(7.20)
ϕ=ϒ
m Ti
pi MW S exs1
if (ϕ < ca 6 )
ωˆ = ca1ϕ 3 + ca 2ϕ 2 + ca 3ϕ + ca 4
else
ωˆ = ca1ϕ 3 + ca 2ϕ 2 + ca 3ϕ + ca 4 − (ca 5 (ϕ − ca 6 ))
ca 7
(7.20)
end
pd = piωˆ S exs 2
ψˆ c = cb1ϕ 5 + cb 2ϕ 4 + cb 3ϕ 3 + cb 4ϕ 2 + cb 5ϕ + cb 6
P=
pi Ti S exs 3
MW
ψˆ
Figure 24 presents a comparison between actual compressor characteristics and the
dimensionless parameters model, where x-marks are the actual compressor characteristics
and the blue line are the dimensionless parameters model. For this operation point the
deviation between the model and the actual compressor characteristics is small.
50
It is assumed that the gas cooler is ideal and the compressor inlet temperature is therefore
constant. The compressors inlet pressure and molecular weight is not constant and the
dimensionless parameters model should therefore be tested against other operation
conditions. Data for other operation conditions were impossible to obtain and it is therefore
assumed that the Dimensionless Parameters model gives reasonable result for these
operation conditions.
Compressor C2
Compressor C3
6
5
4.5
Pressure ratio
Pressure ratio
5
4
3
4
3.5
3
2.5
2
2
30
40
50
60
Mass flow [Kg/s]
1.5
70
7
2.2
1.6
Power consumption [W]
Power consumption [W]
8
10
Mass flow [Kg/s]
12
8
10
Mass flow [Kg/s]
12
6
x 10
1.4
1.2
1
0.8
30
6
40
50
60
Mass flow [Kg/s]
70
x 10
2
1.8
1.6
1.4
1.2
1
0.8
6
Figure 24: comparison between actual compressor characteristics and dimensionless parameters model.
This thesis will use the Dimensionless Parameters method to model the compressor
characteristics. Both physical modelling and Dimensionless Parameters can be used for offdesign operation points, but physical modelling is easier to implement and is therefore
preferred. Polynomial approximation cannot be used for off-design operation points and is
therefore unsuitable for the model derived in this thesis.
51
7.4 Anti-surge control
Surge is avoided in the three compressors by using a recycle valve. The existing control
system uses the pressure ratio versus actual volumetric flow scheme to avoid surge. Figure
25 presents the piping and instrument diagram for this control scheme. The anti surge
controller used on these three compressors is developed by Siemens and the algorithm for
this controller is presented in Siemens (1996). The existing control system is quite complex
and another controller will be used to simplify the analysis. The controller used in this
project is a PI controller with anti-windup, see Section 10.5 for details.
FIC
Recycle valve
mrv
PT
mi
Scrubber
and
gas cooler
FT
PT
pi
pd
mc
Compressor
Figure 25: P&ID for compressor C2 and C3.
The input to the PI controller with anti-windup is calculated as seen in Equation (7.21). A
positive value of E will lead to an opening of the recycle valve. The surge avoidance line is
found by setting E to zero.
E = cas1 + cas 2
pd
− ρ mc
pi
(7.21)
The minimum possible mass flow through the compressor is calculated by setting E equal to
zero, see Equation (7.22). For compressor C4 ρ is constant and Equation (7.22) can be
rearranged to Equation (7.23). The red line in Figure 27 is the surge avoidance line for
compressor C4.
msurge =
cas1
+
cas 2
pr
(7.22)
msurge = csa 3 + cas 4 pr
(7.23)
ρ
ρ
The steady state surge controller for compressor C4 is presented in Equation (7.24).
if (mi < msurge )
mc = msurge
else
mc = mi
end
52
(7.24)
The surge control system is designed to operate with small changes in the inlet pressure. The
inlet pressure for compressor C2 and C3 is not constant and another surge control method is
needed. Dimensionless Parameters are used to model these compressors and an anti-surge
controller is incorporated into this model. Equation (7.25) presents the new anti-surge
controller, where φmax is a constant and φc is the flow coefficient calculated in Equation (7.9)
. The new surge control method is more accurate when the inlet conditions changes and it is
easier to implement.
E = ϕmax − ϕc
(7.25)
Figure 26 presents the anti-surge controller on compressor C2 and C3. The green and black
line is the surge avoidance line. The green line shows the existing control system and the
black line shows the new control system. φmax is selected such that the deviation between
the black and green line is minimized. The steady state surge controller for compressor C2
and C3 is presented in Equation (7.24) when msurge is replaced with φmax, mi and mc is
replaced with φc.
The two surge avoidance lines are almost identical for compressor C2 and the replacement
of surge controller should therefore have insignificant effects on the simulations.
The compressor characteristics for compressor C3 deviates from other compressor
characteristics for a centrifugal compressor. Examples of other compressor characteristics
are presented in Figure 1.17 (Gravdahl & Egeland 1999), FIG 8.9aa (Lipták 1995) and Fig C.3
(Helvoirt 2007). All these figures have surge lines with the same shape as the green line in
Figure 17(2). Why the surge line for compressor C3 deviates from other surge lines is out of
scope for this project. The new surge controller will be used for both compressors.
Compressor C2
Compressor C3
5
6
4.5
4
Pressure ratio
Pressure ratio
5
4
3
2
1
30
3.5
3
2.5
2
40
50
60
Mass flow [Kg/s]
70
1.5
6
8
10
Mass flow [Kg/s]
12
Figure 26: Anti-surge controller on compressor C2 and C3.
53
7.5 Compressor C4
Compressor C4 is a centrifugal compressor with six stages and is driven by a fixed speed
electric engine. The compressor is fitted with inlet guide vanes and they are used to control
the pressure in separator S3. The inlet pressure and temperature for this compressor is
constant. This is because the pressure in separator S3 is constant and it is assumed that the
scrubber and gas cooler are ideal components. It is also assumed that the inlet density is
constant.
The compressor characteristic seen in Figure 27 is collected from Aker Engineering a.s
(1995b) where the black curves represent different angles of the inlet guide vanes. The inlet
conditions for this experiment are presented in Table 14.
A straightforward approach is to use the inlet guide vane angel and the mass flow as the
input and then use a polynomial approximation to calculate the pressure ratio and power
consumption. With this approach a high order polynomial approximation is needed to
accurately estimate the pressure ratio and power consumption.
The pressure ratio can be used as the input instead of the inlet guide vane angles. This
reduces the order for the polynomial approximation and the power consumption is
approximated by Equation (7.26). This makes is possible to select inputs that are infeasible
and constraints must therefore be added to the model. Equation (7.28) presents the
constraints. Where, prmax is the maximum possible pressure ratio for a given mass flow. The
blue line in Figure 27 shows the maximum pressure ratio. Linear interpolation is used for the
implementation of the function prmax.
P = c p1mc + c p 2 pr + c p 3
(7.26)
It is assumed that the discharge pressure from compressor C1 must be at least 148 bar. The
operation condition that gives the smallest possible pressure ratio for compressor C3 is
when compressor C2 and C1 operates at maximum pressure ratio. Equation (7.27) presents
the minimum pressure ratio possible for compressor C3.
pr min =
pd c1
pr c 2 pr c1 psep 3
=
148
= 2.8
5.6 ⋅ 4.8 ⋅ 2
pr min < pr < pr max (mc )
(7.27)
(7.28)
The unknown coefficients in Equation (7.26) , cp1 to cp3, is found with linear least squares, see
Section 10.1. The endpoints of the five curves were used in this approximation. The error
between the actual power consumption, black x-mark, and the estimated power
consumption, blue x-mark, is small.
54
Power at compressor coupling [W]
Pressure ratio
15
105°
10
5
25°
2.5
3
35°
3.5
4
65°
43°
4.5
5
Mass flow [Kg/s]
5.5
6
6.5
7
6
x 10
1.5
65°
1
105°
43°
35°
25°
0.5
2.5
3
3.5
4
4.5
5
Mass flow [Kg/s]
5.5
6
6.5
7
Figure 27: Compressor characteristics for compressor C4.
55
56
8 Optimizing separator pressures (with compressors)
The gas from the separators must be compressed before it can be sold or injected back to
the reservoir. In this thesis it is assumed that the gas is injected back to the reservoir. The
model is therefore extended to include the compressors and the process is presented in
Figure 14. The optimum operation points found in Section 5 may be infeasible or not optimal
when the compression plant is included.
max( I − E )
ps 1 , ps 2 , S , pr ,c 4
subject to
(8.1)
pd ,C 2 > 148
0.9 < S < 1.05
0 < uS1 < 1
0 < uS 2 < 1
25 ≤ ps1 ≤ 45
4 ≤ ps 2 ≤ 18
1 < pr , C 2
1 < pr ,C 3
2.8 < pr ,C 4 > 14.3
E = ( Pc 2 + Pc 3 + Pc 4 ) priceel
(8.2)
The optimization problem is presented in Equation (8.1). The profit is maximized in the
objective function where I is the income from the crude oil sale and E is the energy cost for
operating the gas turbine and electric engine. It is assumed that the efficiency of the two
engines is 100% and that the energy price is 2.13e-8 [$/Ws]. This corresponds to an energy
price of 0.5 [NOK/KWh]. The energy cost is calculated as seen in Equation (8.2) where priceel
is the energy price [$/Ws].
The profit is calculated as the income from crude oil sale minus the energy cost for operating
the gas turbine and electric engine. Additional factors as: implementation cost, taxes and
other operation costs will also affect the profit, but these factors are not included in this
thesis.
The discharge pressure from compressor C2 must be larger than 148 bar. Lower pressure will
give an infeasible operation condition for the injection compressor. The constraint on
relative compressor speed is due to limitations in the gas turbine. A negative pressure ratio
in compressor C2 or C3 will give a negative pressure for the discharge pressure and this is
clearly unphysical. The pressure is reduced before each separator and the pressure ratio in
compressor C2 and C3 must therefore be larger than one.
Brute force optimization is used to solve this optimization problem and a pseudocode for
this is presented in Section 10.6. The compressor model is dependent of all the four control
variables and must therefore be calculated N1* N2* N3*N4=100 million times where N1, N2,
N3 and N4 is the number of points in the vector ps1, ps2, S and pr,c4, respectively.
57
The separator model is independent of the relative compressor speed and pressure ratio for
compressor C4. It is therefore enough to calculate this model N1*N2=3351 times. This gives
a significant reduction to the computation time.
The compressor model has a very small feasible region for some of the first and second stage
separator pressure combinations. As a result of this a very small step size for the
optimization variables S and Pr,C4 must be used. This increases the number of calculations
needed and the brute force optimization method is therefore extremely slow. The
competition time for the brute force optimization method presented in Section 10.6 is
around 18 hours.
The composition of the reservoir fluids is presented in Section 10.2. The maximum crude oil
capacity is limited by the separators and the oil pump. According to Norsk Hydro (2001) the
maximum crude oil capacity for Snorre A is 1.31 barrels per second. Table 8 presents the gas
and crude oil production for the current control systems. The inlet flow was selected such
that the crude oil production is approximately 85% of the maximum.
Table 8: Gas and crude oil production for four different inlet conditions.
Experiment Inlet
composition
1
Fluid 1
2
Fluid 2
3
Fluid 3
4
Fluid 4
Inlet flow
[kmol/s]
12000
6000
4000
14000
Gas produced
[kg/s]
61.2
24.1
12.1
Infeasible
Crude oil produced
[b/s]
1.15
1.13
1.12
1.15
The brute force optimization method is used to calculate the optimum for four different
experiments, see Table 8. Figure 28 to Figure 31 presents the result of this optimization.
Here the black circle is the operation point for the current control system and the white
circle is for the new control system. Dark red represents the highest income and the
numbers beside the colourbar shows the income in dollars per second. In the dark blue area
one of the constraints is violated and operation with this setpoint is therefore impossible.
58
44
56.5879
Pressure separator S1 [bar]
42
56.5054
40
38
56.423
36
56.3406
34
56.2581
32
56.1757
30
Infeasible
28
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 28: Profit as a function of the pressure in separator S1 and S2 for fluid 1.
44
55.9389
Pressure separator S1 [bar]
42
55.8682
40
38
55.7976
36
55.727
34
55.6563
32
55.5857
30
Infeasible
28
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 29: Profit as a function of the pressure in separator S1 and S2 for fluid 2.
44
55.4851
Pressure separator S1 [bar]
42
55.4245
40
38
55.3639
36
55.3034
34
55.2428
32
55.1822
30
Infeasible
28
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 30: Profit as a function of the pressure in separator S1 and S2 for fluid 3.
59
The new control method increased the energy cost with 2.8 and 3.8 [%] for fluid 2 and 3,
respectively. This is due to an increase in the gas turbine speed, see Table 10. For fluid 1 the
energy cost was reduced with 0.5% for the new control method. This was expected since the
pressure in separator S1 was increased and less compression was needed for the gas
separated in this separator.
Table 10 shows that the gas valve opening for separator S1 and S2 are partially closed. This
gives a large pressure drop over the valve. One example of this is the 2.5 bar pressure drop
that occurs for experiment 1 with the new control method. Compressor C2 must therefore
compress this gas 2.2 bar more then what is necessary if the valve was fully open. The two
gas valve is not needed if the speed of two compressors can be selected independently. This
will reduce the energy cost since this method does not require a pressure drop over the gas
valves to control the pressure in the separators.
The new control method increased the profit with 0.17, 0.11 and 0.07[%] for experiment 1, 2
and 3, respectively. By assuming that the plant is operated in experiment 1, 2 and 3 for equal
time shares a rough estimation of the increase in profit can be calculated. This rough
estimation gives an increase in profit of two million dollars per year.
The profit is equal to the income for the optimization of separator pressure without
compressor, see Section 5. As expected the percentage increase in profit is lower when the
compressors are included into the model. This is because the compressors reduce the
feasible region and that the new set-points give an increase in the energy cost.
Table 9: Comparison of profit between old and new control method.
Income
-Expense
=Profit
Fluid 1
Old [$/s]
New [$/s]
56.92
57.02
0.3503
0.3483
56.57
56.67
Fluid 2
Old [$/s]
New [$/s]
56.28
56.21
0.2591
0.2664
56.01
55.95
Fluid 3
Old [$/s]
New [$/s]
55.77
55.82
0.2603
0.2703
55.51
55.55
Table 10: Output data and setpoints for the old and new control method.
U1
U2
Pd,C2 [bar]
P1 [bar]
P2 [bar]
S
Pr,C4 [bar]
60
Old
0,9043
0,1907
148,6
36
12
1.0005
4.4
Fluid 1
New
0,2653
0,9229
148,0
42
9.84
0.996
4.76
Fluid 2
Old
New
0,3999
0,09872
0,1892
0,9448
148,0
148,2
36
36.9
12
7.68
0.94575
0.9983
5
3.76
Fluid 3
Old
New
0,1723
0,2632
0,1548
0,8485
148,0
148,063
36
30.9
12
7.44
0.94575
1.002
5
3.68
The current control system gives an infeasible operation point for fluid 4, see Figure 31. This
will activate the secondary pressure control system and some of the gas will be burned at
the torch.
With the current control system the operator has two options:
1) Reduce the opening of the valve placed between the reservoir and the first stage
separator. This will reduce the production rate and the operation point will again be feasible.
The drawback with this method is that less crude oil is produced and this leads to a
reduction in income. The maximum inlet flow for fluid 4 with the current control system is
12750 [kmol/h] and this gives a profit of 51.92 dollar per second.
2) Let some of the gas be burned at the torch. This gives atmospheric emission and taxes
must be paid for this. Future income is also reduced since less gas is injected back to the
reservoir. The simulation model must be extended to also include the safety pressure
system, gas price and taxes on emissions for a compression between method two and the
new control system can be done. This is out of scope for this thesis.
With the new control system, operation under this condition is feasible and the maximum
capacity for the gas oil separation plant is therefore extended. The new control system
increased the profit with 11% for this operation point.
44
58.2531
43
Pressure separator S1 [bar]
58.1771
42
41
58.101
40
58.025
39
57.949
38
57.873
37
Infeasible
36
35
6
8
10
12
14
Pressure separator S2 [bar]
16
18
Figure 31: Profit as a function of the pressure in separator S1 and S2 for fluid 4.
61
62
9 Conclusions
In this thesis a steady state model of a multistage crude oil production plant with
compressors has been implemented in MATLAB. This model has been used to investigate the
potential benefits of using adaptive separator pressure.
First, a gas oil separation plant with two stages was used to show that the oil recovery was
dependent on the separator pressure and the reservoir fluid composition. This example
demonstrated that adaptive separator pressure could increase oil recovery and income from
crude oil sale.
Then, a literature study on separator modelling was performed and a vapour liquid
equilibrium calculation was chosen to model the separators. This model used the Peng
Robinson equation of state and successive substitution. The vapour liquid equilibrium
calculation was implemented in MATLAB and tested against a commercial process simulator.
Both simulators gave almost identical result for a test case, which consists of a three stage
gas oil separation plant. The average relative error in the mass flows and equilibrium values
was 0.13%.
Dimensionless parameters method was used to model the centrifugal compressors since it
was easy to implement and accurate for off-design operation. Polynomial approximation and
physical modelling were also investigated, but these two methods were found to be
unsuitable for this type of modelling.
A steady state simulation model of a multistage crude oil production plant with gas
compression was implemented in MATLAB. Brute force optimization was used to maximize
the profit by changing the separator pressure. Three different inlet conditions were tested
and the profit was increased with 0.17, 0.11 and 0.07 percent compared to the old control
method. A rough estimation shows that the new control method can increase the profit with
two million dollars per year for Snorre A.
The new control method has a large maximum capacity for inlet flow with high gas oil ratio.
A simulation showed that the new control method could increase profit with 11 present for
this inlet condition.
63
64
10 Appendix
10.1 Linear least-squares problem
The coefficients for a polynomial with one independent variable can easily be found by using
the MATLAB command polyfit. This function cannot be used for polynomials with more than
one independent variable. In Equation (10.2) a polynomial with two independent variables is
presented. This section will present a method that calculates the coefficients for this
polynomial.
For a system with l data points, see Equation(10.1), a function f(x,y) can be determined such
that f(xi,yj)≈zj, j=1,∙∙∙,l. The function f(x,y) is a polynomial and this polynomial is presented in
Equation (10.2). Here, c1,1 to cn+1,m+1 are the unknown coefficients.
( z1 , x1 , y1 ),, ( zl , xl , yl )
(10.1)
f ( x j , y j ) = c1 x j n + c2 x j n −1 +  + cn x j + cn +1
c1 = c1,1 y j m + c1,2 y j m −1 +  + c1,m y j + c1, m +1

(10.2)
cn +1 = cn +1,1 y j m + cn +1,2 y j m −1 +  + cn +1, m y j + cn +1,m +1
Equation (10.2) can be rearranged to Equation(10.3). To simplify the notation subscript j is
omitted in Equation(10.3).
f ( x, y ) = Aθ T
A =  y m x n
y m −1 x n  1x n
y m −1 x n −1  1x n −1  y m1 y m −11  1 (10.3)
 c2,m +1  cn +1,1 cn +1,2  cn +1,m +1 
y m x n −1
θ = c1,1 c1,2  c1,m+1 c2,1 c2,2
z j = Ajθ T
for ( j = 1, 2l )
 A1 
A 
 2

 
 Al 
(10.4)
(10.5)
The system in Equation (10.4) consists of l linear equations in (n+1)(m+1) unknown
coefficients. To get a unique solution two conditions must be satisfied. The number of linear
equations must be larger than the number of unknown coefficients and matrix (10.5) must
have full column rank.
65
Usually it is impossible to find a θ that satisfied Equation (10.4) for all linear equations. A
linear least-squares problem can be formulated to minimize the error, see Equation(10.6).
The problem is convex and this ensures that the solution found is the global minimum. For
theory and solution methods for linear least-squares problem consult (Nocedal & Wright,
2006).
n
min  ( z j − Ajθ T )2
c
(10.6)
j =1
In MATLAB the least-squares solution is obtained by using the ‘backlash’ operator as seen in
Equation (10.7).
 A1   z1 
 A  z 
θ =  2 \  2
  
   
 Al   zl 
(10.7)
10.2 Reservoir fluid composition
The exact reservoir fluid composition was not possible to obtain and is therefore estimated.
In this estimation the design gas composition for compressor C1 and a C7+ fraction is used.
All hydrocarbons with more than seven carbon molecules are placed in the C7+ fraction. The
most important factor in the reservoir fluid is the gas oil ratio. Three different reservoir
fluids, fluid 1 to 3, are made. The C7+ fraction (oil) for these fluids are 15, 30 and 45 mole
present, respectively.
Table 13 presents the gas analysis for compressor C1 and is collected from Aker Engineering
a.s, (1996a). In this analysis, small traces of the polar components: Water vapour, Carbon
Dioxide and Hydrogen Sulphide are present. The vapour liquid algorithm implemented in
MATLAB does not support polar components and these components must therefore be set
to zero. These three components account for approximately 0.5 mol % of the total gas
composition and should therefore be safe to remove.
66
Table 11: Gas analysis for compressor C1.
Component
Nitrogen
Water Vapour
Carbon Dioxide
Hydrogen Sulphide
Methane
Ethane
Propane
i-Butane
n-Butane
i-Pentane
n-Pentane
Hexane Plus
Composition [Mol %]
2.425
0.021
0.472
0.007
69.740
13.345
9.347
0.918
2.567
0.420
0.483
0.256
Table 14 shows the reservoir fluid composition. The composition is normalized such that the
C7+ fraction and the components from Table 11 together give a composition of 100 mol
percent.
Table 12: Reservoir fluid composition.
Component
Nitrogen
Methane
Ethane
Propane
i-Butane
n-Butane
i-Pentane
n-Pentane
n-Hexane
C7+
Composition [Mol %]
Fluid 1
Fluid 2
2.071
1.706
59.58
49.06
11.40
9.390
7.984
6.577
0.784
0.646
2.193
1.806
0.358
0.295
0.412
0.340
0.218
0.180
15.00
30.00
Fluid 3
1.341
38.55
7.377
5.167
0.507
1.419
0.232
0.266
0.141
45.00
Fluid 4
1.832
61.87
12.74
7.053
0.693
1.940
0.316
0.364
0.192
13.00
67
10.3 Chemical properties
The chemical properties needed in this project are: the critical temperature, the critical
pressure, the acentric factor and molecular weight. The chemical properties used in this
project are collected from Yaws (1999) and is presented in Table 13.
The C7+ fraction uses the critical temperature, critical pressure and acentric factor from nhexadecane. The molecule weight for the C7+ fraction is set to 295 [g/mol]. The molecule
weight from n-hexadecane gave a too high API number and is therefore not used. A more
accurate method to determine the chemical properties for the C7+ fraction is to use
experimental data. Twu (1984) proposed a method for estimating the critical properties and
molecular weight of the C7+ fraction.
Table 13: Chemical properties.
Component critical temperature
[K]
Nitrogen
126.10
Methane
190.58
Ethane
305.42
Propane
369.82
i-Butane
408.14
n-Butane
425.18
i-Pentane
460.43
n-Pentane
469.65
n-Hexane
507.43
C7+
702.60
critical pressure
[Pa]
33.94e5
46.04e5
48.8 e5
42.49 e5
36.48 e5
37.39 e5
33.81 e5
33.69 e5
30.12 e5
14.19 e5
acentric
factor
0.040
0.011
0.099
0.152
0.177
0.199
0.228
0.249
0.305
0.747
molecular weight
[g/mol]
28.013
16.043
30.070
44.096
58.123
58.123
72.150
72.150
86.177
295.00
10.4 Inlet condition for the compressor characteristics
This thesis uses a surge avoidance controller and the compressor system will therefore
always operate in the stable part. This part of the compressor characteristics is obtained by
direct measurements since it is experimentally observable (Wang & Murray, 1998). In Table
14 the inlet conditions for this experiment are presented.
Table 14: Inlet conditions for the compressor characteristics.
Temperature [oC]
Compressor C2 29.8
Compressor C3 29.7
Compressor C4 28.6
68
Molecular weight [gram/mol]
22.831
29.316
42.756
Pressure [Bar]
34.25
10.8
1.3
10.5 Simple PI control with anti-windup
The PI controller used in this project is the PI controller from Hovd (2008). The anti windup
limits the controller output and the controller is implemented as illustrated in Figure 32.
Here E is the error, Kp is the proportional gain, Ti is the integral gain, s is the Laplace
operator, u is the valve opening, umax is the maximum valve opening and umin is the minimum
valve opening.
According to Hovd (2008), The actual input implemented on the plant is feedback to the
controller through the low pass filter 1/(Tis+1). If the actual plant input is not measured, it
suffices to know the range of actuation for the input. The actual input can then easily be
calculated.
Saturation
E
umax
u
Kp
u
umin
1
Tis+1
Figure 32: PI controller with anti-windup.
The normal behaviour of a PI controller is achieved when the valve opening is not saturated
( u = u ), see Equation (10.8).
u = Kp
Ti s + 1
E
Ti s
(10.8)
It is assumed that the capacity of the recycle valve is large and that u is smaller than umax for
all steady state operation points. Equation (10.9) presents the controller behaviour when it
is saturated at the lower limit. The internal feedback path in the controller is now broken
and integrating state does not wind up.
u = K p E +
1
umin
Ti s + 1
(10.9)
A positive error will led to an increase in the valve opening. This will reduce system friction
and the mass flow through the compressor will therefore increase. An increase in mass flow
will decrease the positive error, see Equation (7.21). The steady state error must therefore
be equal or less than zero.
69
10.6 Pseudocode for brute force optimization of a gas oil separation
plant
ps1 = [27 27.3  45]
ps 2 = [6 6.24  19]
S = [0.9 0.90075  1.05]
pr ,C 4 = [3 3.04  9]
Popt = 0
for j = 1: size( ps1 )
for k = 1: size( ps 2 )
compute separator model and I = f ( ps1 ( j ), ps 2 (k ))
for l = 1: size( S )
for m = 1: size( pr ,C 4 )
compute compressor model and E = f ( ps1 ( j ), ps 2 (k ), S (l ), pr ,C 4 (m))
P=I −E
if (feasible region and P > Popt )
Popt = P
end
end
end
end
end
70
jopt = j kopt = k lopt = l
mopt = m
10.7 Enclosed files
The simulation models and the MATLAB code are easier to study in MATAB than as an
attachment in this report. Table 15 shows a listing of the contents on the enclosed files.
Table 15: Contents on the enclosed files.
Folder
Antisurgecontroller
Bobbeldew
Comchar
Commod
Commod\dim
File
CompressorC23.m
BubbeldewCri.m
BubbleDew
comcharC2.m
comcharC3.m
comcharC4.m
CompressorC4.m
Dimpar.m
objcch2.m
comcharC32.m
PrecC2.fig PrecC3.fig
PowC2.fig PowC3.fig
Plotdimpar.m
Testsscompresor.m
sscomdim1.m
Sscomdim2.m
Commod\poly\C2
PRpoly1.m
PRpoly2.m
PRpolynon.m
objf9.m
Popolynon.m
Obj13.m
Commod\poly\C3
Empirical method
Isentropic efficiency
plotrap.m
iseC2.m
Description
Generates the plot presented in Figure 26.
Generates the plot presented in Figure 6.
Contains the data from UNISIM.
Generates the compressors characteristics from
the manufacture for compressor C2, C3 and C4
Generates the plot presented in Figure 27.
Calculates the unknown coefficients for the
dimensionless parameters model.
Implementation of the algorithm presented in
Section 7.3.1.
Extended version of the compressor
characteristics for compressor C3
Figures generated by Dimpar.m.
Generates the plot presented in Figure 23.
Generates the plot presented in Figure 24
Steady state compressor model for compressor
C2 and C3. This model uses dimensionless
parameters and anti surge control is not included
in this model.
Same as sscomdim1.m, but with anti surge
control
Generates the plot presented in Figure 19.
Generates the plot presented in Figure 20.
Generates the plot presented in Figure 21.
Subroutine called by PRpolynon.m.
Generates the plot presented in Figure 22.
Subroutine called by Popolynon.m.
Generates the plot presented in Figure 19 to
Figure 22 for compressor C3. Not included in the
report.
Generates the plot presented in Figure 3.
Generates the plot presented in Figure 17.
71
VLE
API.m
flashcalc.m
oilrecovery.m
Opit1.m
Phi.m
Verify.m
VLEandComp
bruteopti.m
compressors.m
Separators.m
maxflow.m
sscompressorC4.m
Calculates the API gravity of crude oil, se Section
4.6.
Isothermal flash calculation using Peng Robinson
equation of state, se Section 4.4.
Generates the plot presented in Figure 2.
Optimizes the separator pressure for a process
without compressors, see Section 5
Fugacity coefficient calculation using Peng
Robinson equation of state
Compares the MATLAB implementation of the
vapour liquid equilibrium calculation against a
commercial simulator, see Section 4.5.
Optimizes the separator pressure for a process
with compressors, see Section 0
Contains the compression model.
Contanis the separator model.
Calculates the maximum possible flow for fluid 4
and oil and gas production
Steady state compressor model for compressor
C4, see Section 7.5
10.8 Acronyms
Table 16: Acronyms.
CPS
EOS
MPC
MSc
NOK
OPC
PR
RK
RTO
SS
VLE
72
Chemical process simulators
Equation of state
Model Predictive Control
Master of Science
Norwegian krone
Object Linking and Embedding for Process Control
Peng Robinson
Redlich Kwong
Real Time Optimization
Successive substitution
Vapour liquid equilibrium
11 Bibliography
Abdel-Aal, H., M Aggour & M.A. Fahim (2003). Petroleum and gas field processing. Marcel
dekker, inc.
Adewumi, M. (n.d.). Phase Relations in Reservoir engineering. Retrieved from The
Pennsylvania State University: https://www.e-education.psu.edu/png520/
Adjiman, C., Dallwig, S., Floudas, C., & Neumaier, A. (1997). A global optimization method,
alfaBB, for general twice-differentiable constrained NLPs -- I. Theoretical advances.
Computers & Chemical Engineering.
Ahmed, T. H. (2006). Reservoir engineering handbook. Elsevier Inc.
Aker Engineering a.s. (1995b). 2nd Stage Separator Data Sheet Process and Mechanical.
Aker Engineering a.s. (1996a). Mechanical data sheet for gas compression train. Vigdis field
development project.
Arnold, K., & Stewart, M. (1999). Surface Production Operations (2nd Edition) Volume 1 Design of Oil-Handling Systems and Facilities. Elsevier.
Assael, M. J., Trusler, M. J., & Tsolakis, T. F. (1996). Thermophysical properties of fluids : an
introduction to their prediction. London: Imperial College Press.
Bahadori, A., Vuthaluru, H. B., & Mokhatab, S. (2008). Optimizing separator pressures in the
multistage crude oil production unit. Asia-pacific journal of chemical engineering.
Bøhagen, B. (2007). Active surge control of centrifugal compression systems.
Carroll, J. (2003). Natural Gas Hydrates - A Guide for Engineers. Elsevier.
Casavant, T. E., & Côté, R. P. (2004). Using chemical process simulation to design industrial
ecosystems. Journal of Cleaner Production.
Chaikunchuensakun, S., Stiel, L. I., & Baker, E. L. (2002). A Combined Algorithm for Stability
and Phase Equilibrium. Industrial & Engineering Chemistry Research.
Clark, N. (1960). Elements of Petroleum Reservoirs. Dallas: Society of Petroleum Engineers.
Cohen, H. C., Saravanamuttoo, H., & Rogers, G. (1996). Gas Turbine Theory. Longman. Essex.
Croft, A., Davison, R., & Hargreaves, M. (2001). Engineering Mathematics: A Foundation for
Electronic, Electrical, Communications and Systems Engineers. Pearson Education Limited.
Danesh, A. (1998). PVT and Phase Behaviour of Petroleum Reservoir Fluids. Elsevier.
73
Devold, H. (2006). Oil and gas production handbook: An introduction to oil and gas
production. ABB.
Dixon, S., & Eng, B. (1998). Fluid Mechanics, Thermodynamics of Turbomachinery. Elsevier.
E24 AS. (n.d.). E24. Retrieved from http://e24.no
Egeland, O., & Gravdahl, J. (2002). Modeling and simulation for control. Trondheim: Marine
Cybernetics.
Firoozabadi, A. (1999). Thermodynamics of hydrocarbon reservoirs. McGraw-Hill.
Forsthoffer, W.E. (2005) Forsthoffer's Rotating Equipment Handbooks. Elsevier.
Ghosh, P. (1999). Prediction of Vapor-Liquid Equilibria Using Peng-Robinsonand SoaveRedlich-Kwong Equations of State. Chemical Engineering & Technology.
Gravdahl, J. T., & Egeland, O. (1999). Compressor Surge and Rotating Stall:. London: Springer
Verlag.
Hanlon, P. (2001). Compressor Handbook. McGraw-Hill.
Harding, S., & Floudas, C. (1999). Phase Stability with Cubic Equations of State: A Global
Optimization Approach.
Hauger, S. O. (2008). MPC Model Predictive Control.
Helvoirt, J. v. (2007). Centrifugal Compressor Surge Modeling and Identification for Control.
Honeywell. (2008). UniSim Design User Guides, References and Tutorials.
Hovd, M. (2008). Lecture notes for the course Advance Control of Industrial Processes.
Norwegian university of science an tecnology.
Ismail, I., Gamio, J., Bukharia, S., & Yang, W. (2005). Tomography for multi-phase flow
measurement in the oil industry. Flow measurement and instrumentation.
Jaluria, Y. (2008). Design and optimization of thermal systems. CRC Press.
Lipták, B. G. (1995). Insttruments engineers's handbook: Process control.
Mehra, R. K., Heidemann, R. A., & Aziz, K. (1982). Computation of multiphase equilibrium for
compositional simulation. Society of Petroleum Engineers journal.
Mian, M.A. (2002). Project Economics and Decision Analysis Volume I: Deterministic Models.
PennWell.
74
Michelsen, M. L. (1982). The isothermal flash problem. Part II. Phase-split calculation. Fluid
Phase Equilibria.
Nichita, D. V., Broseta, D., & Hemptinne, J.-C. d. (2006). Multiphase equilibrium calculation
using reduced variablesstar, open. Fluid Phase Equilibria.
Nichita, D. V., Gomez, S., & Luna, E. (2002). Multiphase equilibria calculation by direct
minimization of Gibbs free. Computers and Chemical Engineering.
Nocedal, J., & Wright, S. J. (2006). Numerical Optimization. Springer.
Norsk Hydro. (2001). Systemkurs Snorre og Vigdis.
Nørstebø, V. S. (2008). Optimum operation of gas export systems. Trondheim.
O'Connell, J., & Haile, J. (2005). Thermodynamics : fundamentals for applications. Cambridge
University Press.
Peng, D.-Y., & Robinson, D. B. (1976). A New Two-Constant Equation of State. Industrial &
Engineering Chemistry Fundamentals.
Philip, T. J. (1999). Simulation of Industrial Processes for Control Engineers. Elsevier.
Privat, R., Jaubert, J.-N., & Mutelet, F. (2008). Addition of the sulfhydryl group (–SH) to the
PPR78 model (predictive 1978,. The Journal of Chemical Thermodynamics.
Purdue research foundation. (2006). Thermodynamic systems operating with nearisothermal compression and expansion cycles.
Rachford, H., & Rice, J. (1952). Procedure for Use of Electronic Digital Computers in
Calculating Flash Vaporization Hydrocarbon.
Rand, S. (2003). Significance of Tests for Petroleum Products. ASTM International.
Rosales-Quintero, A. (n.d.). Isothermal flash calculation using Soave equation of state.
Retrieved from MATLAB Central:
http://www.mathworks.com/matlabcentral/fileexchange/22364
Rossi, C., Cardozo-Filho, L., & Guirardello, R. (2009). Gibbs free energynext term minimization
for the calculation of chemical and phase equilibrium using linear programming. Fluid Phase
Equilibria.
Saber, N., & Shaw, M. (2007). Rapid and robust phase behaviour stability analysis using
global optimization. Fluid Phase Equilibria.
Siemens. (1996). Snorre/Vigdis Gas Antisurge Controller. Vigdis field development project.
75
Twu, C. H. (1984). An internally consistent correlation for predicting the critical properties
and molecular weights of petroleum and coal-tar liquids. Fluid Phase Equilibria.
Vázquez-Román, R., García-Sánchez, F., Salas-Padrón, A., Hernández-Garduza, O., & EliosaJiménez, G. (2000). An efficient flash procedure using cubic equations of state. Chemical
Engineering Journal.
Wang, Y., & Murray, R. M. (1998). Effects of the Shape of Compressor Characteristics on
Actuator.
Wauquier, J.-P. (2000). Petroleum refining Volume two.
Whinery, K. F. Compbell, J. M. (1958). Method for determining optimum second stage
pressure in 3-stage separation. J. of Petrol. Technol. 4.
White, F. M. (2008). Fluid Mechanics. McGraw-Hill.
Willems, F. (2000). Modeling and Bounded Feedback Stabilization of Centrifugal Compressor
Surge.
Yaws, C.L. (1999). Chemical Properties Handbook. McGraw-Hill.
Zhu, Y., Wen, H., & Xu, Z. (2000). Global stability analysis and phase equilibrium calculations
at high pressures using the enhanced simulated annealing algorithm. Chemical Engineering
Science.
76
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement