applied process simulation-driven oil and gas separation

36
doi.org/10.26434/chemrxiv.8025221.v1 Applied Process Simulation-Driven Oil and Gas Separation Plant Optimization using Surrogate Modeling and Evolutionary Algorithms Anders Andreasen Submitted date: 23/04/2019 Posted date: 23/04/2019 Licence: CC BY-NC-ND 4.0 Citation information: Andreasen, Anders (2019): Applied Process Simulation-Driven Oil and Gas Separation Plant Optimization using Surrogate Modeling and Evolutionary Algorithms. ChemRxiv. Preprint. In this article the optimization of a realistic oil and gas separation plant has been studied. Two different fluids are investigated and compared in terms of the optimization potential. Using Design of Computer Experiment (DACE) via Latin Hypercube Sampling (LHS) and rigorous process simulations, surrogate models using Kriging have been established for selected model responses. The surrogate models are used in combination with a variety of different evolutionary algorithms for optimizing the operating profit, mainly by maximizing the recoverable oil production. A total of 10 variables representing pressure and temperature various key places in the separation plant are optimized to maximize the operational profit. The optimization is bounded in the variables and a constraint function is included to ensure that the optimal solution allows export of oil with an RVP < 12 psia. The main finding is that, while a high pressure is preferred in the first separation stage, apparently a single optimal setting for the pressure in downstream separators does not appear to exist. In the second stage separator apparently two different, yet equally optimal, settings are revealed. In the third and final separation stage a correlation between the separator pressure and the applied inlet temperature exists, where different combinations of pressure and temperature yields equally optimal results. File list (1) download file view on ChemRxiv Andreasen 2019.pdf (1.96 MiB)

Upload: others

Post on 20-Mar-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Applied Process Simulation-Driven Oil and Gas Separation

doi.org/10.26434/chemrxiv.8025221.v1

Applied Process Simulation-Driven Oil and Gas Separation PlantOptimization using Surrogate Modeling and Evolutionary AlgorithmsAnders Andreasen

Submitted date: 23/04/2019 • Posted date: 23/04/2019Licence: CC BY-NC-ND 4.0Citation information: Andreasen, Anders (2019): Applied Process Simulation-Driven Oil and Gas SeparationPlant Optimization using Surrogate Modeling and Evolutionary Algorithms. ChemRxiv. Preprint.

In this article the optimization of a realistic oil and gas separation plant has been studied. Two different fluidsare investigated and compared in terms of the optimization potential. Using Design of Computer Experiment(DACE) via Latin Hypercube Sampling (LHS) and rigorous process simulations, surrogate models usingKriging have been established for selected model responses. The surrogate models are used in combinationwith a variety of different evolutionary algorithms for optimizing the operating profit, mainly by maximizing therecoverable oil production. A total of 10 variables representing pressure and temperature various key placesin the separation plant are optimized to maximize the operational profit. The optimization is bounded in thevariables and a constraint function is included to ensure that the optimal solution allows export of oil with anRVP < 12 psia. The main finding is that, while a high pressure is preferred in the first separation stage,apparently a single optimal setting for the pressure in downstream separators does not appear to exist. In thesecond stage separator apparently two different, yet equally optimal, settings are revealed. In the third andfinal separation stage a correlation between the separator pressure and the applied inlet temperature exists,where different combinations of pressure and temperature yields equally optimal results.

File list (1)

download fileview on ChemRxivAndreasen 2019.pdf (1.96 MiB)

Page 2: Applied Process Simulation-Driven Oil and Gas Separation

Applied Process Simulation-Driven Oil and GasSeparation Plant Optimization using Surrogate

Modeling and Evolutionary Algorithms

Anders Andreasen∗

Ramboll Energy, Studies & FEED, Field Development, Bavnehøjvej 5, DK-6700 Esbjerg,Denmark

Abstract

In this article the optimization of a realistic oil and gas separation plant hasbeen studied. Two different fluids are investigated and compared in terms ofthe optimization potential. Using Design of Computer Experiment (DACE) viaLatin Hypercube Sampling (LHS) and rigorous process simulations, surrogatemodels using Kriging have been established for selected model responses. Thesurrogate models are used in combination with a variety of different evolution-ary algorithms for optimizing the operating profit, mainly by maximizing therecoverable oil production. A total of 10 variables representing pressure andtemperature various key places in the separation plant are optimized to maxi-mize the operational profit. The optimization is bounded in the variables and aconstraint function is included to ensure that the optimal solution allows exportof oil with an RVP < 12 psia. The main finding is that, while a high pressure ispreferred in the first separation stage, apparently a single optimal setting for thepressure in downstream separators does not appear to exist. In the second stageseparator apparently two different, yet equally optimal, settings are revealed.In the third and final separation stage a correlation between the separator pres-sure and the applied inlet temperature exists, where different combinations ofpressure and temperature yields equally optimal results.

Keywords: Surface facility, Process simulation, Production Optimization,Evolutionary Algorithms, Surrogate modeling, Pareto optimal

1. Introduction

Separation of hydrocarbon reservoir fluids into oil, gas, and water prior tofurther transport and downstream processing and refining is performed in sur-face facilities where the multiphase fluids is passed through a number of sepa-rators, in which the pressure is gradually decreased to a level where the final

[email protected]

Preprint submitted to Journal of Petroleum Science and Engineering April 23, 2019

Page 3: Applied Process Simulation-Driven Oil and Gas Separation

oil product is stabilized to a certain degree. This is normally specified as amaximum allowed TVP (True Vapor Pressure) or RVP (Reid Vapor Pressure)value. The surface separation ensures that transportation in pipeline can com-mence with the crude in the liquid single phase state, without flashing. Further,when reaching the downstream refining facilities the vapor losses are minimized.Some flashing will occur, and this may provide fuel gas for the refining facilities.However, excessive flashing will occur if the crude has not been proper stabilizedupstream and eventually this may lead to increased flaring, to the harm of theenvironment.

Depending on a number of parameters such as reservoir fluid inlet pressure,ease of separation due to fluid properties such as density, viscosity etc. andsurface facilities space constraints - often experienced on off-shore facilities -the number of separation stages is normally set between 2 to 4 [1]. The firststage pressure is normally set as high as possible without limiting the flow fromthe reservoir due to back pressure. This minimizes the power requirementsfor compressing the flash gas for export. The final separation stage pressureis normally set low enough to meet TVP/RVP specifications, or set at stockconditions. The intermediate stage pressure(s) are then set in-between, oftenwith consideration to the gas compression system specification and performance.

The challenge is to specify the operating conditions for the separation trainwhich maximizes the profit, which is normally dominated by the export quantityof crude oil [1]. Having a relatively high pressure up to the final separation stagewill result in a high quantity of C1/C2 being dissolved. These light componentsflash off in the final separation stage, also attracting some of the valuable middleC3-C5 components. On the other hand if pressure is too low, the C1-C2 isalready flashed off before the final separation stage, but when doing so, some ofthe C3-C5 may have been lost as well [2]. From this notion it seems as thoughsetting the pressure just right, will preserve as much of the middle componentsin the crude, while the content of C1 and C2 is low enough, when the crudeleaves the final separation stage, to meet the crude export specifications in termsof RVP/TVP. Besides maximizing the crude production, operating conditionsmay be optimized in order to reduce the CAPEX, in case of a new design, or tostay within design capacity of existing equipment, in case of a plant already inoperation.

The complexity in terms of process plant configuration and number of con-trollable variables is increased with a compression system on top of the separa-tion train. The compression system is responsible for collecting and pressurizingthe gas liberated in each of the separation stages, usually a compressor for eachstage. The gas pressure is increased enough to allow commingling with the gasliberated in the previous/upstream separation stage. The gas from the firstseparation stage commingled with gas from all the downstream stages, may ormay not need further compression. This depends on the operating pressure ofthe first stage separator, the requirements for gas export pressure etc. For eachcompressor the gas is often cooled and any liquid condensed is collected. Thesecondensate streams from compressor suction scrubbers are normally routed backinto the separation train.

2

Page 4: Applied Process Simulation-Driven Oil and Gas Separation

The selection of separator pressure for optimum stabilized crude productionhas been the subject of numerous studies. Campbell and Whinery [3] developeda correlation for the optimal second stage pressure in a three stage separationtrain with the relative molecular weight of the hydrocarbon mixture and a cor-relating parameter given as a function of C1-C3 content and molecular weight.In a more recent study by Al-Jawad and Hassan [4, 5] developed correlationsfor separation trains with 2-5 stages, and the correlations provide optimal sep-arator pressure for all separators, except the final stage. The required inputare separator temperatures, methane and impurity content, and upstream sep-arator pressures. Ling et al. [6] investigated the optimum separator pressuresassuming constant temperature and well fluid composition for two, three, andfour stage separation by successive optimization from first to last separationstage. Bahadori et al. [7] also made an optimization of separator pressure fora four stage separation train using a commercial process simulator for the flashcalculations. Unfortunately, details on the optimization procedure was not pro-vided. Al-Farhan and Ayala [8] trained an artificial neural network (ANN) fora 3 stage separation train in order to predict optimal second stage separatorpressure. First stage pressure as well as fluid composition was varied, providinga exhaustive number of data sets.

Some recent studies employ optimization methods by coupling a commer-cial process simulator to an optimization routine. Ghaedi et al. [2] coupled agenetic algorithm with a commercial process simulator in order to optimize thecrude oil production in a four stage separation train for both a crude oil anda gas condensate well stream, respectively. By optimizing the pressure in thefirst three separators it was found that the oil production could be increasedapprox. 2% and 8%, for crude and gas condensate, respectively. Motie et al.[9] made a comprehensive study investigating the optimum separator pressurein a multistage separation train, studying the effect of the number of stages,both in terms of operating conditions, but also in terms of an NPV analysisin order to investigate to which extent the added cost of additional equipmentfor additional separation stages can be justified. The optimization of separatorpressures was carried out by means of a genetic algorithm.

Common for refs. [2, 3, 4, 5, 6, 7, 8, 9] is the lack of a compression sys-tem providing condensate recycle streams i.e. these studies assume a simplestraight through process with the number of controllable variables normally notexceeding 2 to 5.

Kim et al. [1] used a commercial process simulator coupled to an evolution-ary algorithm (CMA-ES) in order to optimize separator pressure in both threeand four stage separation both with and without condensate recycle streamsfrom the compression system included. When the condensate recycles from thecompression system are included, a total of 10 variables are adjusted. The opti-mization is constrained by a maximum allowed RVP and the objective functionis a profit function being maximized.

Andreasen et al. [10] studied a complete oil and gas separation plant withthree separation stages, compression system as well as hydrocarbon dew pointcontrol (cold process) including condensate recycles. Process optimization in

3

Page 5: Applied Process Simulation-Driven Oil and Gas Separation

terms of minimizing gas compression system power consumption (indirectlyminimizing CAPEX) was conducted using constrained optimization using theSLSQP algorithm. Optimization was done on a surrogate model derived by mul-tiple linear regression developed using a commercial process simulator, designof computer experiments (DACE) and response surface methodology.

In this paper optimal operating conditions are investigated for a realisticcomplex oil and gas separation plant with: multiple separation stages, a com-pression system for compressing the flash gas from all separators including con-densate recycles, and a cold process for export gas hydrocarbon dew point con-trol. By representing the separation plant with a process simulation model,means to achieve optimal operating conditions i.e. maximizing the profit is in-vestigated. A comparison is also made between different reservoir fluids. Anelaborate study taking the full plant complexity into account when studying notjust optimal separation stage pressures, but plant-wide operating conditions ingeneral, will contribute to the state-of-art.

2. Methodology

2.1. System description

The process flowsheet forming the basis for the studies presented in thepresent paper is depicted in Figure 1. In the following the process configurationis elaborated.

The well fluid is routed via an inlet heat exchanger, 20-HA-01, to the firststage separator, 20-VA-01, in which oil and gas is separated. The oil is routedvia level control valve and inter-stage heater, 20-HA-02, to the second stageseparator, 20-VA-02, operated at a lower pressure. In the separator oil and gasis separated. The oil is routed via level control valve and the second inter-stageheater, 20-HA-03, to the third (final) separation stage. The separated oil isrouted via crude cooler, 21-HA-01, to the oil export pump, 21-PA-01.

The flash gas from the third stage separator is routed via the LP compressorsuction cooler, 23-HA-03, to the LP compressor suction scrubber, 23-VG-03.Condensed liquid is pumped by the condensate recycle pump, 23-PA-01, anddischarged upstream the third stage separator and second inter-stage heater.The gas from the scrubber is compressed in the LP compressor, 23-KA-01, andthe compressed gas is commingled with the flash gas from the second stageseparator, 20-VA-02. The commingled gas is cooled in the MP compressorsuction cooler, 23-HA-02, and routed to the MP compressor suction scrubber,23-VG-02, where condensed liquid is knocked out and commingled with theliquid from the second stage separator as well as condensate from the condensaterecycle pump, 23-PA-01. The gas from the MP compressor suction scrubber iscompressed in the MP compressor, 23-KA-02, and commingled with the gas fromthe first stage separator, 20-VA-01. The commingled gas is further commingledwith condensate from the LT knock-out drum, 25-VG-01, in the dew pointcontrol unit, before being cooled in the HP compressor suction cooler, 23-HA-01, and with subsequent condensate knock-out in the HP compressor suctionscrubber, 23-VG-01.

4

Page 6: Applied Process Simulation-Driven Oil and Gas Separation

Figure 1: Process flow diagram implemented in the process simulator flow sheet.

5

Page 7: Applied Process Simulation-Driven Oil and Gas Separation

The compressed gas is cooled in the dehydration inlet cooler, 24-HA-01, andcondensed liquid is collected in the dehydration inlet scrubber, 24-VG-01. Thegas is dehydrated in the glycol contactor, 24-VB-01. Dry gas is used as fuelgas. The dehydrated gas is further processed in the dew point control unit,consisting of heat exchangers 25-HA-01 and 25-HA-02. The former is used forheat recovery with cross exchange with the dew point controlled dry gas, and25-HA-02 is for simplicity assumed to be cooled by mechanical refrigeration.Typical alternatives employed especially in off-shore oil and gas facilities in-cludes both Joule-Thomson (J-T) cooling using a simple valve, and sometimesa turbo-expander/re-compressor on a common shaft for deeper NGL (NaturalGas Liquid) recovery, and severe hydrocarbon dew point suppression. In thepresent study a refrigeration process is assumed. The cooled gas is routed to theLT knock-out drum, 25-VG-01, where condensed liquid is collected and routedto the HP compressor suction cooler. The cold dew point controlled gas isused for cooling of the water dry gas in the heat exchanger 25-HA-01 beforebeing further pressurized in the export compressor 27-KA-01. Before leavingthe facilities the gas is cooled in the export gas cooler, 27-HA-01.

2.2. Fluid description

Two different reservoir fluids are investigated in the present study. Thecomposition of the two fluids are based on the fluids from refs.[1] and [7] andthe composition and fluid characterization in terms of hypotheticals/pseudo-components are shown in Table 1 and Table 2, respectively.

Pseudo-componentComponent Mole fraction (%) Molecular weight (kg/kmole) Specific gravity (–)

H2O 0.2N2 0.44

CO2 3.25CH4 47.14C2H6 6.48C3H8 5.75

i-C4H10 1.10n-C4H10 3.22i-C5H12 1.43n-C5H12 1.57

C6∗ 2.31 86 0.6647C7∗ 3.18 96 0.7432C8∗ 3.51 107 0.7562C9∗ 2.74 121 0.7676

C10−14∗ 7.74 158 0.8067C15−20∗ 4.77 238 0.8496C21−29∗ 3.37 336 0.8903C30+∗ 1.79 535 0.9461

Table 1: Well fluid composition and characterization for fluid no. 1 [7].

The phase envelopes of the two fluids are depicted in Figure 2. As seen fromthe figure the fluids appear rather similar as judging from their phase envelopes.

6

Page 8: Applied Process Simulation-Driven Oil and Gas Separation

Pseudo-componentComponent Mole fraction (%) Molecular weight (kg/kmole) Specific gravity (–)

H2O 0.0N2 0.0

CO2 1.5870CH4 52.51C2H6 6.24C3H8 4.23

i-C4H10 0.855n-C4H10 2.213i-C5H12 1.1240n-C5H12 1.271n-C5H12 2.2890

C7+∗-CUT1 0.8501 108.47 0.7411C7+∗-CUT2 1.2802 120.4 0.755C7+∗-CUT3 1.6603 133.63 0.7695C7+∗-CUT4 6.5311 164.79 0.799C7+∗-CUT5 6.3311 215.94 0.8387C7+∗-CUT6 4.9618 274.34 0.8754C7+∗-CUT7 2.9105 334.92 0.90731C7+∗-CUT8 3.0505 412.79 0.9575

Table 2: Well fluid composition and characterization for fluid no. 2 [1]

The cricondentherm is 469 ◦C and 493 ◦C, and the cricondenbar is 289.6 bargand 285.1 barg, for fluid 1 and 2, respectively. The GOR is 200 Sm3/Sm3 forfluid 1 and 240 Sm3/Sm3 for fluid 2.

2.3. Simulation setup

All process simulations are carried out using the Aspen HYSYS ver. 10(AspenTech, Bedford, Massachusetts, United States) process simulator. Theprocess flow diagram shown in Figure 1 is modelled in the process simulationflowsheet. The fluid is described using the Peng-Robinson equation of state [11],and liquid density is estimated using the COSTALD method [12].

A common simulation case is setup with a standard setting of parametersas displayed in Table 3. Further, assumed bounds for the variables are alsoincluded and shown in the table.

Along with parameter settings, key process simulation output is also includedi.e. calculated operating profit, oil export rate, power, and oil export RVP.In the following when referring RVP, it is implicitly assumed that it is at atemperature of 37.8◦C. The parameter settings have been set with the followingconsiderations in mind: The 1st stage separator pressure is set as high as possiblein order to reduce compression cost (assuming that the flowing wellhead pressureis higher), the 3rd stage separator pressure is set to 1.5 barg (arbitrary), the 2st

stage separator is set in order to have equal pressure ratio between 1st to 2nd

stage and 2nd to 3rd. The pressure after the HP compressor is set to 90 barg,in order to provide a reasonable high pressure ratio. The remaining parametersare arbitrarily set.

7

Page 9: Applied Process Simulation-Driven Oil and Gas Separation

0

50

100

150

200

250

300

350

-200 -100 0 100 200 300 400 500 600

Pre

ssure

(barg

)

Temperature (˚C)

Fluid 1

Fluid 2

Critical point - Fluid 1

Critical point - Fluid 2

Figure 2: Phase envelopes for fluid 1 and 2, respectively.

Base case Bounds

Parameters Unit Fluid 1 Fluid 2 Low High

Profit ($/day) 6,307,920 6,490,337 – –Oil (m3/d) 15,905 16,279 – –Power (kW) 12,019 15,116 – –RVP (psia) 10.08 11.82 – –TSep1 (◦C) 70 70 50 70PSep1 (barg) 32 32 11 32PSep2 (barg) 8 8 2.5 10TSep3 (◦C) 65 65 40 75PSep3 (barg) 1.5 1.5 0.5 2TScrub1 (◦C) 32 32 25 40TScrub2 (◦C) 32 32 25 40TScrub3 (◦C) 32 32 25 40PComp1 (barg) 90 90 60 90TRefrig (◦C) 10 10 -5 28

Table 3: Process simulation parameter settings for base case simulations. The gas exportpressure is set to 188 barg for all simulations.

8

Page 10: Applied Process Simulation-Driven Oil and Gas Separation

The bounds applied to the variables in the present study are based on off-shore facilities and practical considerations for e.g. cooling medium system(assuming North Sea conditions). For such facilities the lower cooling mediumtemperature is limited by the ambient seawater temperature.

An internal calculation is setup in the process simulation whereby the totalpower is summarized taking both direct process consumers into account as wellas indirect consumers (not modeled in the flow sheet) such as cooling mediumpumps, sea water lift pumps for cooling medium cooling and heating mediumpumps (if required). In order to calculate the required cooling medium flowand related pumping power, a CM duty balance is made by summing up all theindividual cooling duties. Further, a CM density of 1,000 kg/m3, a temperaturerise ∆T = 20◦C, and a specific heat capacity of 3.8 kJ/kg is assumed. A similarapproach is made for the HM balance, but with a slightly higher heat capacityof 3.9 kJ/kg. The exchangers 20-HA-01 and 20-HA-03 can function as eithercoolers or heaters, depending on the specified variables.

For seawater the assumed heat capacity is 4.0 kJ/kg and ∆T = 10◦C is as-sumed and the duty is equated to the CM duty. Utility pumping power is basedon a pump efficiency of 75% and a pump head of 550 m for CM and HM pumpsand 1,000 m for SW lift pumps. The power required for refrigerant compres-sion is assumed to be 25% of the refrigeration cooling duty. This correspondsroughly to an evaporator temperature of -5◦C and a condenser temperature of30-35◦C with propane in a single stage refrigeration process [13].

Based on the calculated total power consumption of main process and utilityconsumers, the corresponding amount of fuel gas needed for fueling a gas turbinepower generator is calculated based on the fuel gas (downstream glycol contactor24-VB-01) LHV and an assumed total electrical efficiency of ε = 32%. The fuelgas flow of the corresponding stream is automatically adjusted in order to reflectloss of revenue due to reduced gas export flow.

For the main unit operations relevant modeling details are summarized inTable 4.

2.4. Design of Computer Experiment and Surrogate modeling

A surrogate model of the complex process simulation model is constructedby making a sampling plan, where the process simulation input parameters arevaried, running the process simulation model for each combination of variablesand recording the output. Using the sampling with the recorded output asurrogate model is constructed.

A Latin-Hypercube sampling plan [14] is generated by the pyKriging package[15] for Python. It is suggested that for up to 10 variables an initial sample sizeof 15 should suffice [16]. In the present study a sample size of 20 is applied i.e.the 10 variables are subdivided in 20 intervals i.e. a sampling of 200 uniquecombinations of variables is created.

An automated process of running all the computer experiments defined bythe sampling plan is made combining the process simulator with Python (pro-gramming language) via COM (Microsoft Component Object Model) [17]. A

9

Page 11: Applied Process Simulation-Driven Oil and Gas Separation

∆P (bar) ε (%)Heat exchangers

20-HA-01 0.5 –20-HA-03 0.5 –21-HA-01 0.5 –23-HA-01 0.3 –23-HA-02 1.0 –23-HA-03 1.0 –24-HA-01 1.0 –25-HA-01 0.5 –25-HA-02 0.5 –27-HA-01 0.0 –

Pumps

21-PA-01 – 7523-PA-01 – 75

Compressors

23-KA-01 – 7523-KA-02 – 7523-KA-03 – 7527-KA-01 – 75

Table 4: Applied modeling details for unit operations. For 20-HA-02 the duty is assumed tobe zero i.e. no inter-stage heating applied between first and second separation stage. A fixedtemperature is applied for the discharge of the dehydration inlet cooler, 24-HA-01, of 30◦C.

black-box wrapper is made in Python exposing the process simulation as a sim-ple callable object/function, taking the 10 variables as input, and providingthe desired output when the simulation has converged. See implementationschematic in Figure 3. A similar black-box approach has been used by others[1, 18, 19] using either VBA or Matlab. For each sample in the sampling plana corresponding simulation is made and the results recorded. Convergence ischecked both for the tear streams (recycle operations), the adjuster operation(adjusting fuels gas extracted, based on power consumption), and by an overallmass balance check. In case convergence is not obtained, or if the simulationfails in other ways, the tear streams are reset (mass flow set to a predefinedlow value) in an attempt to obtain a converged simulation. If this also fails thecurrent simulation case is closed, and a fresh start is made from the base casesimulation. If convergence is still not obtained the sample is skipped.

The sampling plan and associated output generated by the process simula-tion (200 samples for each fluid) is used to train a Kriging model [20, 21] foreach fluid applied in the simulation using the pyKriging package [15]. See also[19, 22, 23] for more information about Kriging in chemical engineering applica-tions. A Kriging model is trained for the responses of interest i.e. the objectivefunction (profit) and the constraint function (RVP), but also for total power andcrude oil recoverable/export flow. The Kriging models for the objective func-tion and the constraint function is then used with the optimization algorithmsin order to obtain optimal operating conditions.

10

Page 12: Applied Process Simulation-Driven Oil and Gas Separation

Converged?

LHS

Simulation input, X

Process simulation Reset/Restart

Simulation output, Y

COM

HYSYS

Yes

No

Figure 3: Calculation flow for Latin-Hypercube sampling using process simulation.

11

Page 13: Applied Process Simulation-Driven Oil and Gas Separation

All implementations, calculations, optimization, data handling/analysis andrepresentation is performed in Python 2.7 with the software stack of NumPy[24, 25], SciPy [26], and Matplotlib [27].

2.5. Optimization methods

The optimization objective can be formulated in many different ways. Thetarget can be to maximize oil/condensate production [2, 6, 7, 8], minimize powerconsumption [10], maximize profit (sales subtracted OPEX) [1, 28] etc. Fur-ther, the variables are subject to bounds either external such as minimum flow-ing wellhead pressure (FWHP), flowing wellhead temperature (FWHT), practi-cal/design limits on equipment such as cooling/heating medium design. Finally,the process may be subject to a manifold of constraints [10, 29] such as exportspecifications for crude oil, usually RVP/TVP [1, 10], but also BS&W, salt con-tent etc., gas export requirements such as max. dew point, combustion quality(HHV, Wobbe Index, Specific gravity) [10], minimum requirements to exportpressure(s), restrictions on compressor performance (max, head, discharge tem-perature etc.). Taking all this into account, realistic scenarios must be treatedas a general bounded, constrained optimization problem. Thus, we shall treata general optimization problem:

min(f(x)) (1)

Subject to the constraints

gi(x) = 0 for i = 1, . . . , p (2)

hi(x) ≥ 0 for = 1, . . . , q (3)

Lr < xr < Ur for r = 1, . . . , n (4)

The objective function f(x) is minimized, subject to p equality constraintsg(x), q inequality constraints h(x), and n bounds (upper and lower) on thevariables. Further, the objective function may not even be a single objectivebut a multi-objective.

Further, the optimization of a complex process simulation model is often non-linear, and either derivative free methods are required for black-box optimisationor alternatively numerical derivatives can be estimated. However, depending onthe complexity of the model and the number of variables, this may lead toexcessive time consuming evaluations of the objective function.

In the present study we define our main objective function as the dailyoperational profit based on sales of stabilized oil and gas export.

fprofit(x) = πoil(x) + πgas(x)− ψenvironment(x) (5)

In the above equation the profit from oil sales, πoil(x), is based on the cal-culated oil recoverable/flow for the parameter settings, x, using an oil price of60 $/barrel. The profit from gas sales πgas(x), is calculated using a value of2.8 $/MMBtu. The revenue loss associated with utilities i.e. electricity, cooling

12

Page 14: Applied Process Simulation-Driven Oil and Gas Separation

system etc. is indirectly accounted for by subtracting the required fuel gas con-sumption for power generation from the total produced gas, before calculatingπgas(x). It is thus assumed that OPEX is simply a matter of consumables forpower generation. This is a reasonable assumption for off-shore facilities whichseldomly purchase external utilities. In the present study labor, maintenance,indirect expenses etc. are not accounted for, as these will be less sensitiveto changes in variables, than the direct costs power generation. A penalty isincluded above, in order to reflect environmental taxation. In the current sim-ulations a penalty of 0.13 $/Sm3 of fuel gas is applied [30]. This corresponds tothe CO2 taxation applicable for offshore facilities on the Norwegian continentalshelf and roughly corresponds to 55 $/tCO2 emitted. The price of oil and gasis volatile, and in the short term they may display opposite trends in price de-velopment, though on a longer time scale they seem to correlate. Further, theprofit for the chosen fluids are highly dominated by the oil sales price, henceit is considered that the conclusions obtained using the above objective func-tion will be generally applicable and relatively insensitive to oil and gas pricefluctuations.

Further, the main constraint for the crude oil quality can be written as

gRV P (x) ≥ 0 (6)

with

gRV P (x) = 12−RV P (x) (7)

where RV P (x) is the simulated crude oil RVP value at the variable settingsx. An upper acceptable limit of 12 psia (37.8◦C) is chosen, which is a represen-tative crude oil quality specification. No constraint function is applied for thegas export hydrocarbon dew point in the present study.

A number of evolutionary algorithms are applied: NSGA-II (Non-dominatedSorting Genetic Algorithm) [31], GDE3 (The third evolution step of differ-ential evolution )[32], SPEA2 (improved Strength Pareto Evolutionary Algo-rithm) [33], ε-MOEA (epsilon-domination based multi-objective evolutionaryalgorithm) [34], CMA-ES (Covariance Matrix Adaptation Evolution Strategy)[35], and NSGA-III [36]. These methods are derivative-free, and as implementedin the platypus package [37], bounds and constraints are handled seamlessly.Further, multi-objective optimization is also provided. The reason for includingmore evolutionary algorithms is not to conduct a thorough comparative studyof the different methods as such, but a more high-level evaluation of which algo-rithms perform better than others for the selected optimization problem. In ad-dition to these evolutionary algorithms, the SLSQP (Sequential Least SQuaresProgramming) algorithm [38] implemented in scipy [26] is also included for com-parison.

13

Page 15: Applied Process Simulation-Driven Oil and Gas Separation

3. Results and Discussion

To begin with the developed surrogate models are used in a bi-objective op-timization in order to calculate the Pareto frontiers for the two fluid simulationswith crude oil flow and total electrical power requirement as objectives. Theresults are summarized in Figure 4. Pareto frontiers are calculated both for anunconstrained bi-objective optimization, as well as for the constrained problemapplying the RVP ≤ 12 psia specification. Calculations are performed with theNSGA-II algorithm.

As seen from Figure 4 a number of immediate observations are worth noting.First of all, it is generally observed that the power requirements increase with in-creased oil recoverable. Hence, it costs power to force more of the light ends intothe oil export due to both increased cooling in order to increase condensationand due to increased recycle of condensate in the compression system requiringmore compression power [10, 39]. Secondly, it is observed that without the RVPconstraint a higher oil recoverable is achievable for the same power cost. Thiscan be realized by e.g. higher separator pressure in the final separation stage,colder crude in the final separator, both changes which increase the oil RVPand thereby also the light end content. The third observation is the fact thatfluid no. 1 has a much higher span in terms of oil rate and power comparedto fluid no. 2. For fluid no. 1, the span in oil flow is 286 m3/d and the spanin power is 12,950 kW. For fluid no. 2 the span is 164 m3/d and 2,153 kW,for oil and power respectively. The larger span for fluid no. 1 is considered tooriginate from a slightly higher fraction of NGLs (C2-C5) cf. Table 1 and Table2. Condensation occurs in compressor coolers or eventually in the hydrocarbondew point control unit, and these fractions build up in the compression system.This can lead to a drastic increase in required compression power [10, 39]. Thus,although apparently quite similar fluids cf. Figure 2 their Pareto frontiers havesignificantly different span.

The investigated objectives in the Pareto analysis correlate with sales profit(oil production) and operating expenses (power consumption). However, the to-tal plant power can also be considered as a surrogate for the total plant CAPEX.Generally a higher power results in larger (and more costly) compressors dueto e.g. increased head and/or flow. Higher flow results in larger suction scrub-bers, larger coolers due to a higher duty demand etc. Eventually, the increasein CAPEX as a function of increased oil recoverable makes the project unprof-itable over the entire lifetime. When comparing the results for fluid no. 1 and2, it is obvious that the maximum oil production found for fluid no. 1 musthave a significantly higher CAPEX than for fluid no. 2, solely considering thepower requirements. For optimal conditions fluid no. 1 requires 22,500 kW ofpower for compression and utilities, compared to approx. 13,700 kW for fluidno. 1, while only providing only marginally higher oil production. The muchhigher power requirements translates to larger and heavier equipment and thusalso CAPEX. Hence, the optimal settings for fluid no. 1 may not be realizableas determined by e.g. an NPV analysis of the investment. In order to makefluid no. 1 an attractive investment option the CAPEX may need substantial

14

Page 16: Applied Process Simulation-Driven Oil and Gas Separation

16300 16400 16500 16600 16700 16800Oil production (m3/d)

12000

14000

16000

18000

20000

22000

24000

Powe

r (kW

)

Un-constrainedConstrained

(A)

16000 16050 16100 16150 16200Oil production (m3/d)

11500

12000

12500

13000

13500

Powe

r (kW

)

Un-constrainedConstrained

(B)

Figure 4: Pareto frontiers for fluid 1 (A) and fluid (B). Pareto frontiers calculated using theNSGA-II algorithm with a population=100 and 10,000 function evaluations. Pareto frontierscalculated with and without the crude oil RVP constraint.

15

Page 17: Applied Process Simulation-Driven Oil and Gas Separation

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.36e+06

-6.34e+06

-6.32e+06

-6.30e+06

-6.28e+06

-6.26e+06

-Pro

fit (D

olla

rs)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.36e+06

-6.34e+06

-6.32e+06

-6.30e+06

-6.28e+06

-6.26e+06

-6.24e+06

-Pro

fit (D

olla

rs)

NSGA-II GDE3

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.36e+06

-6.34e+06

-6.32e+06

-6.30e+06

-6.28e+06

-6.26e+06

-Pro

fit (D

olla

rs)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.36e+06

-6.34e+06

-6.32e+06

-6.30e+06

-6.28e+06

-6.26e+06

-Pro

fit (D

olla

rs)

SPEA2 ε-MOEA

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.36e+06

-6.34e+06

-6.32e+06

-6.30e+06

-6.28e+06

-Pro

fit (D

olla

rs)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

-6.38e+06

-6.37e+06

-6.36e+06

-6.35e+06

-6.34e+06

-6.33e+06

-6.32e+06

-6.31e+06

-Pro

fit (D

olla

rs)

CMA-ES NSGA-III

Figure 5: Objective function value for fluid no. 2 as a function of evaluation number for theprobed evolutionary algorithms.

reduction. While indeed interesting this aspect is not investigated further in thepresent study.

In the following, the aggregate single objective profit function Eq. 5 is opti-mized using the six different evolutionary algorithms. Optimization is performedbased on the surrogate models for both fluid no. 1 and 2. All algorithms areterminated after 10,000 objective function evaluations, and a population size of100 is applied.

A high-level evaluation of the performance of the different optimization al-gorithms is provided by depicting the development in objective function value

16

Page 18: Applied Process Simulation-Driven Oil and Gas Separation

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

3

4

5

6

7

8

9

10

Pres

. 2nd

Stg

. Sep

arat

or (b

arg)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

3

4

5

6

7

8

9

10

Pres

. 2nd

Stg

. Sep

arat

or (b

arg)

NSGA-II GDE3

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

3

4

5

6

7

8

9

10

Pres

. 2nd

Stg

. Sep

arat

or (b

arg)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

3

4

5

6

7

8

9

10Pr

es. 2

nd S

tg. S

epar

ator

(bar

g)

SPEA2 ε-MOEA

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

3

4

5

6

7

8

9

10

Pres

. 2nd

Stg

. Sep

arat

or (b

arg)

0 2000 4000 6000 8000 10000Objective function evaluation no. (--)

4

5

6

7

8

9

Pres

. 2nd

Stg

. Sep

arat

or (b

arg)

CMA-ES NSGA-III

Figure 6: Convergence of variable 3rd stage separator pressure for fluid no. 2 as a function ofevaluation number for the probed evolutionary algorithms.

17

Page 19: Applied Process Simulation-Driven Oil and Gas Separation

as a function of the number of function evaluations cf. Figure 5. Further, thedevelopment of the pressure in the 3rd stage separator is tracked as a function ofobjective function evaluation number cf. Figure 6. Results are shown for fluidno. 2 only.

It is observed that GDE3 and SPEA2 converges to a fairly stable objectivefunction value in 6000 function evaluations for GDE3 and between 4000-6000function evaluations for SPEA2. NSGA-II, ε-MOEA, and CMA-ES convergesin less than 2000 function evaluations, and apparently NSGA-III converges inless than 1000 function evaluations. For the separator pressure a similar trendis observed. The GDE3 and SPEA2 algorithms apparently coverage to an opti-mal separator pressure slower (6000-8000 function evaluations) than the otheralgorithms. Both the ε-MOEA, NSGA-III and CMA-ES algorithms seem toconverge between 2000-4000 function evaluations, with CMA-ES being fastestand NSGA-II the slowest of the three. Apparently, NSGA-III converges fasterthan all the others as also seen for the objective function evaluations.

For each optimization algorithm the variables at the maximum profit/optimumin objective function, is used as input in the full process simulation model as apseudo check of the performance of the surrogate models. The results are sum-marized in Table 5 and Table 6 for the profit objective function, RVP constraint,oil production and power requirements.

Profit Oil Power RVPAlgorithm Model ($/day) (m3/d) (kW) (psia)

NSGA-II Surrogate 6,573,806 16,584 22,661 12.00Simulation 6,574,347 16,585 20,991 11.90Dev. (%) -0.008 -0.005 7.955 0.857

GDE3 Surrogate 6,573,960 16,592 23,011 12.00Simulation 6,568,793 16,582 24,349 11.78Dev. (%) 0.079 0.062 -5.495 1.888

SPEA2 Surrogate 6,573,520 16,591 23,151 11.99Simulation 6,566,494 16,581 25,699 11.79Dev. (%) 0.107 0.059 -9.917 1.684

ε-MOEA Surrogate 6,573,693 16,591 22,430 12.00Simulation 6,567,507 16,584 25,419 11.94Dev. (%) 0.094 0.043 -11.759 0.493

CMA-ES Surrogate 6,574,027 16,589 22,750 12.00Simulation 6,570,847 16,588 23,983 11.96Dev. (%) 0.048 0.005 -5.143 0.290

NSGA-III Surrogate 6,573,540 16,584 22,306 12.00Simulation 6,574,087 16,586 21,308 11.89Dev. (%) -0.008 -0.012 4.683 0.886

SLSQP Surrogate 6,574,027 16,590 22,555 12.00Simulation 6,569,498 16,586 24,688 11.96Dev. (%) 0.069 0.024 -8.639 0.370

Table 5: Profit maximum for fluid no. 1. Comparison between the prediction of the surrogatemodels and the original process simulation model for the variable settings at the optimum.

As seen from Table 5 and Table 6 generally all algorithms obtain a similarmaximum profit, at least identical to the fourth significant digit. This applies

18

Page 20: Applied Process Simulation-Driven Oil and Gas Separation

Profit Oil Power RVPAlgorithm Model ($/day) (m3/d) (kW) (psia)

NSGA-II Surrogate 6,375,112 16,137 13,843 12.00Simulation 6,375,369 16,137 13,569 12.00Dev. (%) -0.004 0.003 2.025 0.031

GDE3 Surrogate 6,375,041 16,137 13,914 12.00Simulation 6,374,968 16,136 13,597 11.97Dev. (%) 0.001 0.011 2.329 0.208

SPEA2 Surrogate 6,374,871 16,136 13,871 11.99Simulation 6,375,043 16,136 13,570 11.98Dev. (%) -0.003 0.005 2.212 0.032

ε-MOEA Surrogate 6,375,158 16,137 13,871 12.00Simulation 6,375,235 16,136 13,597 12.00Dev. (%) -0.001 0.003 2.019 -0.001

CMA-ES Surrogate 6,373,763 16,136 13,772 12.00Simulation 6,373,576 16,131 13,573 11.93Dev. (%) 0.003 0.032 1.466 0.554

NSGA-III Surrogate 6,373,864 16,134 13,534 12.00Simulation 6,372,758 16,128 13,401 11.93Dev. (%) 0.017 0.038 0.996 0.557

SLSQP Surrogate 6,375,088 16,137 13,917 12.00Simulation 6,374,496 16,136 13,625 11.98Dev. (%) 0.009 0.008 2.140 0.126

Table 6: Profit maximum for fluid no. 2. Comparison between the prediction of the surrogatemodels and the original process simulation model for the variable settings at the optimum.

to both optimizations for fluid no.1 and fluid no. 2. The same applies to thecorresponding oil production rate. This is not surprising, since the oil revenuedominates the profit function. It is also interesting to see that the SLSQP al-gorithm is successful (after taking the square root of the objective function).There may be different reasons for the apparent success of the SLSQP algo-rithm for this type of problem. First it may suggest that the objective functionis not too non-convex. Further, the use of a surrogate model instead of opti-mizing the black-box process simulation model directly, is likely very helpful inavoiding noise [18, 19] in estimation of numerical derivatives by finite difference.This noise may arise from finite convergence criteria for recycles/tear streams,basically this means that an obtained solution from one run to another withidentical input, may generate slightly different output.

All the obtained solutions have been reproduced by the parent process simu-lation model using identical variable settings as obtained from the optimizationof the surrogate models. It is observed that the match between the Kriging mod-els and HYSYS is excellent for profit and oil rate. A slightly higher deviation isobserved for the RVP value, although still below 1% for most of the comparisons.Apparently the surrogate is more successful for fluid no.2 compared to fluid no.1. One reason may be that fact that some samples had to be skipped from theLHS for fluid no. 1, due to poor convergence of the simulation. An attempt toadd infill points to the Kriging model at maximum Mean Squared Error (MSE)was not successful. It turned out these areas of suggested infill where exactly

19

Page 21: Applied Process Simulation-Driven Oil and Gas Separation

-10.0

0.0

10.0

20.0

30.0

40.0

50.0

60.0

70.0

80.0

NSGA-II GDE3 SPEA2 ε-MOEA CMA-ES NSGA-III SLSQP

Tem

pera

ture

(˚C)

Sep 1 Sep 3 Scrub 3

Scrub 2 Scrub 1 Refrig

(A)

6.294.34 4.44

6.33 6.41 6.36 6.37

1.41 1.26 1.17 1.30 1.43 1.25 1.35

0.0

10.0

20.0

30.0

40.0

50.0

60.0

70.0

NSGA-II GDE3 SPEA2 ε-MOEA CMA-ES NSGA-III SLSQP

Pre

ssure

(barg

)

Sep 1 Sep 2 Sep 3 Comp 1

(B)

Figure 7: Optimal variable settings for fluid no. 1 as found by the different optimizationroutines. (A) shows temperature and (B) shows pressure.

where the model suffered from convergence problems due to extreme build-upof condensate recycle. For fluid no. 2 the surrogate model is accepted as-isand no infill points were added. The prediction of total power requirements iscertainly the least well predicted response, and while the deviation is limited toapprox. 2% for fluid no. 2, up to almost 12% deviation is observed for fluid no.1 when comparing the output of the surrogate model with the parent processsimulation model. Again, the dropped samples from the LHS for fluid no. 1may be one source of this error. Luckily, due to the fact that the penalty ofused fuel gas, both in loss of sales gas revenue as well as due to CO2 taxation,is still a relatively weak, the obtained optimum does not seem to suffer. Hence,this is not investigated further.

20

Page 22: Applied Process Simulation-Driven Oil and Gas Separation

-10.0

0.0

10.0

20.0

30.0

40.0

50.0

60.0

70.0

NSGA-II GDE3 SPEA2 ε-MOEA CMA-ES NSGA-III SLSQP

Tem

pera

ture

(˚C)

Sep 1 Sep 3 Scrub 3

Scrub 2 Scrub 1 Refrig

(A)

Tem

pera

ture

(˚C)

0.92 0.96 0.97 0.88 1.63 1.42 0.87

7.90 7.91 7.73 7.86 7.71 7.78 7.87

0.0

10.0

20.0

30.0

40.0

50.0

60.0

70.0

NSGA-II GDE3 SPEA2 ε-MOEA CMA-ES NSGA-III SLSQP

Pre

ssure

(barg

)

Sep 1 Sep 2 Sep 3 Comp 1

(B)

Figure 8: Optimal variable settings for fluid no. 2 as found by the different optimizationroutines. (A) shows temperature and (B) shows pressure.

21

Page 23: Applied Process Simulation-Driven Oil and Gas Separation

The optimized variable settings for the different evolutionary algorithms aresummarized in Figure 7 and 8. The results for the SLSQP algorithm have beenincluded for comparison. For SLSQP it is generally found that the optimalsettings match settings of the evolutionary algorithms. The SLSQP results willnot be discussed further.

First addressing the similarities across the different algorithms for fluid no.1, it is found that the profit optimum is obtained at 60 barg after the HPcompressor (lower bound), 32 barg in the 1st stage separator (upper bound),25◦C in the first stage (HP compressor suction) scrubber (lower bound), -5◦C inthe dew point control unit (lower bound on refrigerant). From here on consensusbetween the different optimization algorithms is less pronounced.

The temperature in the 3rdstage (LP compressor suction) scrubber is eitherat the upper bound (SPEA2 and ε-MOEA) or lower bound for the other algo-rithms. The temperature in the 2nd stage (MP compressor suction) scrubberis also either at the lower bound (NSGA-II/III) or upper bound. This mayimply that the temperature in the scrubber can be set arbitrarily and has littleinfluence on the objective function. The temperature in the 1st stage separatorvaries from approx. 64◦C (ε-MOEA and NSGA-III) to 68◦C (NSGA-II) and70◦C (upper bound) for the rest. The inlet temperature for the 3rd stage sepa-rator is between 66 and 70◦C with NSGA-II and CMA-ES preferring the higherend.

In terms of the 2nd stage separator pressure apparently two different levels,but equally good in terms of profit (cf. Table 5), are found. The GDE andSPEA2 algorithm finds an optimum at a separator pressure of 4.3 and 4.4 barg,respectively. The other algorithms converge to a value between 6.3-6.4 barg. Asimilar yet more attenuated pattern is seen for the 3rd stage separator, whereSPEA2 converges to a value of 1.17 barg, and CMA-ES finds the highest pressureof 1.43 barg, the others are in between. It seems the 3rd stage separator inlettemperature correlates with the separator pressure. A higher pressure requiresa higher temperature, in order not to violate the RVP constraint,

For fluid no. 2 there is a much more uniform 2nd stage separator pressurearound 7.7–7.8 barg, compared to the results for fluid no. 1. On the otherhand the variation in the 3rd stage separator pressure is much more distinctacross the different optimization algorithms. CMA-ES and NSGA-III finds anoptimum at 1.63 and 1.42 barg, respectively. All the other are in the range0.88-0.96 barg. A clear compensation by a high inlet temperature is seen. Thesimilarities include 32 barg in the 1st stage separator (upper bound - as for fluidno. 1), 60 barg after the HP compressor (lower bound), approx. 25◦C in the 2nd

stage (MP compressor suction) scrubber (lower bound), 50◦C inlet temperaturefor the 1ststage separator, and -5◦C in the dew point control unit (lower boundon refrigerant).

The 1ststage (HP compressor suction) scrubber temperature is at or nearthe upper bound, except for NSGA-III which finds a value of 30◦C. The 3rd

stage (LP compressor suction) scrubber temperature seems to be at an optimumaround 28◦C, except for GDE3 which find an optimum at the lower bound. The3rd stage separator temperature is near the lower bounds for all except CMA-ES

22

Page 24: Applied Process Simulation-Driven Oil and Gas Separation

(A)

(B)

Figure 9: Profit function for fluid no. 2 as a function of 2nd and 3rd stage separator pressureusing the surrogate model. Objective function calculated with 52◦C and 32 barg in 1st stageseparator, 25◦C in all compressor suction scrubbers, 60 barg after the HP compressor, and-5◦C in the refrigeration/dew point control unit. The profit function has been masked forRVP > 12 psia.

and NSGA-III as discussed in the previous paragraph in relation to pressure.From the above results it is observed that there is not a single optimal pres-

sure in the 2nd and 3rd stage separators. This is somewhat in contradiction tothe common belief that there is one set of optimal settings for separator pres-sure. In the present study, in some cases two or more different levels appearto be equally good, as observed for the 3rd stage separator for fluid no. 2 and

23

Page 25: Applied Process Simulation-Driven Oil and Gas Separation

in particular the 2nd stage separator pressure for fluid no. 1. The multiplelevels appear to be realized due to flexible settings for the inlet temperature tothe separators. This may not always be a control option in real applicationsdue to equipment constraints etc. Previous studies, in relation to determiningthe optimal separator pressures, often assume that the temperature is constantor without heating/cooling equipment i.e. not controllable [1, 2, 7, 8]. Never-theless, Gheadi et al. [2] found that, for a three stage separation train undersummer conditions, the optimal operating pressure was higher, than for winterconditions where the crude had a lower temperature.

The apparent plurality in optimal pressure in the separators is investigatedfurther, by visualizing the profit as a function of 2nd and 3rd stage separatorpressure for fluid no. 2, for two levels of the temperature in the 3rd stageseparator. The results are shown in Figure 9. The contour plots have beenmasked by the RVP constraint i.e. only regions where the constraint is notviolated is visible. First, it is noticed that the higher the temperature, thehigher feasible pressure in the 3rd stage separator. Also it is noted that the 3rd

stage separator pressure is capped by the RVP constraint. On the other handthe RVP does not limit the 2nd stage separator pressure noticeably. The mostinteresting part is the relatively flat/horizontal contours between 4-9 barg. Inother words it seems that the profit objective in some regions is a relativelyweak function of the pressure.

To summarize, apparently more levels of pressure in the final separation stagemay provide more or less equal profit, due to compensation by the separatortemperature and the cap provided by the RVP constraint. Further, the 2nd stageseparator pressure has little influence on the profit function or the optimum isa flat bottomed well, where small perturbations may determine if one or theother pressure is determined as the optimal.

In order to verify that the above conclusions regarding the apparent non-unique optimal settings of the separator pressures are not just an artifact ofthe surrogate modeling, optimization is performed directly using the black-boxprocess simulation model. This time only the NSGA-II/III, ε-MOEA, and CMA-ES algorithms are used. Results with direct black-box optimization of the profitfunction are summarized for fluid no. 2 in Table 7. As seen from the table againthe different algorithms provide identical results to the fourth digit, and theoptimal profit function value is similar to the one obtained using the surrogatemodels cf. Table 6. The optimal variable settings are summarized in Figure 10.

Profit Oil Power RVPAlgorithm ($/day) (m3/d) (kW) (psia)

NSGA-II 6,374,471 16,132 13,473 11.99ε-MOEA 6,375,061 16,134 13,661 11.99CMA-ES 6,373,556 16,133 13,975 11.96NSGA-III 6,374,221 16,131 13,591 11.99

Table 7: Profit maximum for fluid no. 2 obtained by optimization of the black-box model(process simulation) directly using the different algorithms.

24

Page 26: Applied Process Simulation-Driven Oil and Gas Separation

-10

0

10

20

30

40

50

60

70

NSGA-II ε-MOEA CMA-ES NSGA-III

Tem

pera

ture

(˚C)

Sep 1 Sep 3 Scrub 3

Scrub 2 Scrub 1 Refrig

(A)

7.4953475825.509286218

7.6017386665.165236542

1.013781784 0.834881905 0.888302519 1.173306043

0

10

20

30

40

50

60

70

NSGA-II ε-MOEA CMA-ES NSGA-III

Pre

ssure

(barg

)

Sep 1 Sep 2 Sep 3 Comp 1

(B)

Figure 10: Optimal variable settings for fluid no. 2 as found by direct black-box optimization.(A) shows temperature and (B) shows pressure.

25

Page 27: Applied Process Simulation-Driven Oil and Gas Separation

Figure 11: Profit function for fluid no. 2 as a function 3rd stage separator pressure andtemperature. Profit function contour calculated using the surrogate model with the followingparameter settings: 54◦C and 31 barg in 1st stage separator, 6.5 barg in the 2nd stage sepa-rator, 35,33, and 27◦C in the compressor suction scrubbers, 60 barg after the HP compressor,and -5◦C in the refrigeration/dew point control unit. Red points are the optimal settings fromthe direct black-box optimization. Profit function has been masked for RVP > 12 psia.

As seen from Figure 10 it is generally found that the 1st stage separator pres-sure is optimal near its upper bound, the pressure after the booster compressoris optimal near its lower bound, as well as the temperature in the dew pointcontrol unit/refrigeration is optimal at its lower bound. The scrubber tempera-tures are more scattered with the HP (first stage) compressor suction scrubbershowing optimal settings around 30–38◦C, the MP compressor suction scrubberbetween 27–40◦C, and the LP compressor suction scrubber between 25–40◦C.With respect to the separator pressure in the 2nd and 3rd separators again dif-ferent levels are observed. Apparently, the 2nd stage separator is optimal ateither 5.1–5.5 or at 7.5–7.6 barg. The 3rd stage separator has a range of optimalpressure settings. The correlation between the 3rd stage separator pressure andthe temperature is further investigated in Figure 11. In the figure the profitfunction (contour) is shown as a function of pressure and temperature in theseparator as calculated by the surrogate models. The contour has been maskedfor profit functions where the RVP constraint is exceeded. The found optimalsettings by the direct black-box optimization is shown as points connected withdashed lines. As seen from the figure the profit iso-curves follows the shape ofthe RVP cut-off. This means that equally good optimal conditions can be madewith different 3rd stage separator pressure, as long as the inlet temperature isproportionally increased to compensate with higher pressure requiring highertemperatures in order not to violate the RVP constraint. Likewise, if the pres-sure is lowered, so shall the temperature be in order not to obtain sub-optimalprofit.

26

Page 28: Applied Process Simulation-Driven Oil and Gas Separation

Early attempts to predict the optimal middle separator pressure in a threestage separation train used the geometrical mean pressure i.e.

p2 =√p1 · p3 (8)

The above formula results in equal pressure ratios between the various sep-arator stages. Also the geometric mean is smaller than the arithmetic meanpressure [8]. Al-Farhan et al. [8] discuss various correlations for predictingthe optimal middle stage separator pressure and compare the above equation,both with the method of Whinery & Campbell [3] and with optimization us-ing thermodynamic flash calculations for a range of different fluid compositionsand parameter settings. They observe that using the correlation of Whinery &Campbell for a crude oil, almost always results in a third stage separator pres-sure being lower than the geometric mean. The same applies when performingoptimization using flash calculations. These observations are consistent withthe work of Ling et al. [6] and Bahadori et al. [7], who also find optimal valuesbelow the geometric mean/constant pressure ratio relation. The second stageseparator pressures obtained in the present study is compared to the geometricmean value in Figure 12. As seen from the figure, in this study it is observedthat the optimal second stage separator pressure can acquire values both nearthe geometric mean and below in agreement with the findings of others [6, 7, 8].Interestingly it is also found that the optimal separator pressure can be signifi-cantly higher than the geometric mean value. It should be noted that the otherreferenced works [6, 7, 8] did neither include the flexibility of inter-stage heat-ing, nor was condensate recycle streams from the compression system included.This added complexity and hence added degrees of freedom is likely responsiblefor this apparently more complex behavior in the present study. It also impliesthat care shall be taken when optimizing separator pressures. It is not possibleto do this independently of all other process parameters, and correlations devel-oped for a simple separator train cannot be directly applied to a more realisticand complex process with both inter-stage heating and significant condensaterecycle streams from the compression system and dew point control unit.

In order to evaluate the levels of expected improvements in case optimiza-tion is performed, the results of the present study is compared with previoussimilar studies. Obviously, the level of improvement highly depends on thestarting point. Some processed are far from optimal parameter settings andsome will be closer to optimal settings to start with. Basically, this means thattwo studies using the same methods, the same process, parameter bounds andconstraints may conclude different potential improvements simply because theinitial/base case settings are different. Nevertheless, an attempt to quantifyexpected optimization improvements is provided in Table 8. In refs. [2, 7, 9, 40]an improvement in terms of increased liquid production is explicitly stated com-pared to a non-optimized liquid production. The improvement observed in thepresent study is estimated using the difference between the base case and op-timized profit cf. Table 3, 5, and 6. The lower range corresponds to fluid no.2, and the higher range correspond to fluid no. 1. As seen from Table 8, it

27

Page 29: Applied Process Simulation-Driven Oil and Gas Separation

4.0

4.5

5.0

5.5

6.0

6.5

7.0

7.5

8.0

4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.02nd

sta

ge s

ep. pre

ssure

(barg

)

Geometric mean separator pressure (barg)

Fluid no. 1

Fluid no. 2

x=y

Figure 12: Optimal 2nd stage separator pressure as a function of the geometric mean separatorpressure. Points shown for both fluid. no 1 and no. 2.

seems that separation train optimization may provide between approx. 0.1-2 %increase in liquid production/operating profit.

Source ∆ (%) With condensate recycle

Ghaedi et al. [2] 1.20–2.02 NoBahadori et al. [7] 0.09–0.10 NoMotie et al. [9] 0.1 NoKylling [40] 0.07-0.11 YesThis work 1.06–1.28 Yes

Table 8: Possible achievable improvement potential when optimizing an oil & gas separationtrain.

4. Conclusions

In the course of this study the optimization of a realistic oil and gas sepa-ration plant has been studied. Using the same separation plant topology twofluids have been investigated in terms of the optimization potential. UsingDACE utilizing LHS and a rigorous process simulation model, surrogate modelsusing Kriging have been established for selected model responses. The surrogatemodels have been used in combination with a variety of different evolutionaryalgorithms for optimizing the operating profit, mainly by maximizing the re-coverable oil production. The optimization is bounded in the variables and aconstraint function is included to ensure that the optimal solution allows exportof oil with an RVP < 12 psia.

It has been demonstrated that a surrogate model based on LHS and Krig-ing performs very well for optimizing an oil and gas separation plant. More

28

Page 30: Applied Process Simulation-Driven Oil and Gas Separation

or less identical response results are obtained using the different optimizationalgorithms. For some variables there seem to be unique settings which are opti-mal. This mainly applies to the first stage separator pressure, which is optimalat its higher bound. The recovery of condensate from the dew point controlunit is optimal when both the pressure and temperature is at the lower bound.The temperature in the suction cooling to the compressors seem to be less sen-sitive in terms of applied settings. One of the more interesting findings in thepresent work is the fact, that the pressure in the second and third stage sep-arators apparently does not have a single optimal value. For the second stageseparator, there seems to be at least two different levels which are more or lessequally optimal. Further, a range of third stage separator pressures may beequally optimal as long as the temperature in the separator is controlled also.The higher the temperature, the higher yet equally optimal pressure and viceversa. The findings using the surrogate models for optimization is confirmed byblack-box optimization by coupling the process simulation model directly to theoptimization algorithms. The existence of multiple optimal separator pressureshave not been observed in previous studies, where a single optimal pressure foreach separation stage is advocated.

The reason why the apparent more complex behavior revealed in the presentstudy, has not been seen previously, may be due to a number of reasons. First,many previous studies does not take the compression system into account, andif doing so, often the normally recycled condensate streams are ignored, Further,inter-stage heating/cooling between the separation stages are also not consid-ered. Finally, many previous studies assume close to atmospheric pressure inthe final separation stage (stock tank). In e.g. many offshore installations thefinal separation stage is often at elevated pressure (two to three times atmo-spheric pressure), while the RVP export specification is controlled by the inlettemperature.

The implication of the results from the present study is that one shouldnever focus only on finding optimal separator pressure settings. One shouldalways use a plant wide optimization approach and consider the entire process.There is a strong interplay between certain variables, which offers both someflexibility, but obviously also increases the number of variables that needs to betuned.

Acknowledgments

Nomenclature

BS&W Basic Sediment & WaterC1 MethaneC2 EthaneC3 PropaneC4 Butanes

29

Page 31: Applied Process Simulation-Driven Oil and Gas Separation

C5 PentanesCAPEX Capital ExpenditureCM Cooling MediumCOM Microsoft Component Object ModelCOSTALD Corresponding States Liquid DensityDACE Design of Computer Experimentsε EfficiencyFWHP Flowing Wellhead PressureFWHT Flowing Wellhead TemperatureGOR Gas Oil RatioHHV Higher Heating ValueHM Heating MediumHP High PressureLHS Latin Hypercube SamplingLHV Lower Heating ValueLP Low PressureLT Low TemperatureMP Medium PressureMSE Mean Square ErrorNGL Natural Gas LiquidNPV Net Present ValueOPEX Operating ExpenditureRVP Reid Vapor PressureSW SeawaterTVP True Vapor PressureVBA Visual Basic for Applications

References

[1] I. H. Kim, S. Dan, H. Kim, H. R. Rim, J. M. Lee, E. S. Yoon, Simulation-based optimization of multistage separation process in offshore oil and gasproduction facilities, Industrial & Engineering Chemistry Research 53 (21)(2014).

[2] M. Ghaedi, A. N. Ebrahimi, M. R. Pishvaie, Application of genetic al-gorithm for optimization of separator pressures in multistage produc-tion units, Chemical Engineering Communications 201 (7) (2014) 926–938(2014). doi:10.1080/00986445.2013.793676.

[3] K. F. Whinery, J. M. Campbell, A method for determining optimum secondstage pressure in three stage separation, Journal of Petroleum Technology10 (04) (1958) 53–54 (1958). doi:10.2118/901-G.

[4] M. S. Al-Jawad, O. F. Hassan, Correlations For Optimum SeparationPressures For Sequential Field Separation System - SPE-118225-MS, So-ciety of Petroleum Engineers, Abu Dhabi, UAE, 2008, p. 13 (2008).doi:10.2118/118225-MS.

30

Page 32: Applied Process Simulation-Driven Oil and Gas Separation

[5] M. S. Al-Jawad, O. F. Hassan, Correlating optimum stage pressure for se-quential separator systems, SPE Projects, Facilities & Construction 5 (01)(2010) 13–16 (2010). doi:10.2118/118225-PA.

[6] K. Ling, X. Wu, B. Guo, J. He, New method to estimate surface-separatoroptimum operating pressures, Oil and Gas Facilities 2 (03) (2013) 65–76(2013). doi:10.2118/163111-PA.

[7] A. Bahadori, H. B. Vuthaluru, S. Mokhatab, Optimizing separator pres-sures in the multistage crude oil production unit, Asia-Pacific Journal ofChemical Engineering 3 (4) (2008) 380–386 (2008). doi:10.1002/apj.159.

[8] F. A. Al-Farhan, L. F. A. H., Optimization of surface condensateproduction from natural gases using artificial intelligence, Journal ofPetroleum Science and Engineering 53 (1) (2006) 135 – 147 (2006).doi:10.1016/j.petrol.2006.05.001.

[9] M. Motie, P. Moein, R. Moghadasi, A. Hadipour, IPTC-19396-MS, Interna-tional Petroleum Technology Conference, Beijing, China, 2019, Ch. Separa-tor Pressure Optimisation and Cost Evaluation of a Multistage ProductionUnit Using Genetic Algorithm, p. 14 (2019). doi:10.2523/IPTC-19396-MS.

[10] A. Andreasen, K. R. Rasmussen, M. Mandø, Plant wide oil and gasseparation plant optimisation using response surface methodology, IFAC-PapersOnLine 51 (8) (2018) 178 – 184, 3rd IFAC Workshop on Auto-matic Control in Offshore Oil and Gas Production OOGP 2018 (2018).doi:https://doi.org/10.1016/j.ifacol.2018.06.374.

[11] D.-Y. Peng, D. B. Robinson, A new two-constant equation of state, In-dustrial & Engineering Chemistry Fundamentals 15 (1) (1976) 59–64 (Feb1976). doi:10.1021/i160057a011.

[12] R. W. Hankinson, G. H. Thomson, A new correlation for saturated densitiesof liquids and their mixtures, AIChE Journal 25 (4) (1979) 653–663 (1979).doi:10.1002/aic.690250412.

[13] B. Price (Ed.), GPSA Engineering Data Book, 13th Edition, Vol. I–II, GasProcessors Suppliers Association, 2012 (2012).

[14] M. D. Mckay, R. J. Beckman, W. J. Conover, A comparison of three meth-ods for selecting values of input variables in the analysis of output from acomputer code, Technometrics 42 (1) (2000) 55–61 (2000).URL http://www.jstor.org/stable/1271432

[15] C. Paulson, G. Ragkousis, pykriging: A python kriging toolkit (2015).doi:10.5281/zenodo.21389.URL https://doi.org/10.5281/zenodo.21389

31

Page 33: Applied Process Simulation-Driven Oil and Gas Separation

[16] A. Afzal, K.-Y. Kim, J. won Seo, Effects of latin hypercube sam-pling on surrogate modeling and optimization, International Jour-nal of Fluid Machinery and Systems 10 (2017) 240–253 (2017).doi:10.5293/IJFMS.2017.10.3.240.

[17] AspenTech, Aspen HYSYS customization. Ver. 10., Aspen Technology Inc.,2017 (2017).

[18] A. Aspelund, T. Gundersen, J. Myklebust, M. Nowak, A. Tomas-gard, An optimization-simulation model for a simple lng process, Com-puters & Chemical Engineering 34 (10) (2010) 1606 – 1617 (2010).doi:https://doi.org/10.1016/j.compchemeng.2009.10.018.

[19] J. A. Caballero, I. E. Grossmann, An algorithm for the use of surrogatemodels in modular flowsheet optimization, AIChE Journal 54 (10) (2008)2633–2650 (2008). doi:10.1002/aic.11579.

[20] D. Krige, A statitical approach to some mine valuation and allied problemson the Witwatersrand (Master thesis), University of the Witwatersrand,1951 (1951).

[21] G. Matheron, Principles of geostatistics, Economic Geology 58 (8) (1963)1246–1266 (1963). doi:10.2113/gsecongeo.58.8.1246.

[22] E. Davis, M. Ierapetritou, A kriging method for the solution of nonlinearprograms with black-box functions, AIChE Journal 53 (8) (2007) 2001–2012 (2007). doi:10.1002/aic.11228.

[23] N. Quirante, J. Javaloyes, R. Ruiz-Femenia, J. A. Caballero, Optimizationof chemical processes using surrogate models based on a kriging interpo-lation, in: K. V. Gernaey, J. K. Huusom, R. Gani (Eds.), 12th Interna-tional Symposium on Process Systems Engineering and 25th EuropeanSymposium on Computer Aided Process Engineering, Vol. 37 of Com-puter Aided Chemical Engineering, Elsevier, 2015, pp. 179 – 184 (2015).doi:10.1016/B978-0-444-63578-5.50025-6.

[24] T. Oliphant, NumPy: A guide to NumPy, [Online; accessed today] (2006–).URL http://www.numpy.org/

[25] S. v. d. Walt, S. C. Colbert, G. Varoquaux, The NumPy array: A structurefor efficient numerical computation, Computing in Science and Engg. 13 (2)(2011) 22–30 (Mar. 2011).

[26] E. Jones, T. Oliphant, P. Peterson, et al., SciPy: Open source scientifictools for Python, [Online; accessed today] (2001–).URL http://www.scipy.org/

[27] J. D. Hunter, Matplotlib: A 2d graphics environment, Computing In Sci-ence & Engineering 9 (3) (2007) 90–95 (2007).

32

Page 34: Applied Process Simulation-Driven Oil and Gas Separation

[28] L. Ochoa-Estopier, M. Enriquez Gutierrez Victor, L. Chen, J. Fernandez-Ortiz, L. Herrero-Soriano, M. Jobson, Industrial application of surrogatemodels to optimize crude oil distillation units, Chemical Engineering Trans-actions 69 (2018) 289–294 (2018). doi:10.3303/CET1869049.

[29] H. Djikpesse, B. Couet, D. Wilkinson, A practical sequential lex-icographic approach for derivative-free black-box constrained opti-mization, Engineering Optimization 43 (7) (2011) 721–739 (2011).doi:10.1080/0305215X.2010.512085.

[30] Emissions to air, [Online; accessed today] (2019).URL https://www.norskpetroleum.no

[31] K. Deb, A. Pratap, S. Agarwal, T. Meyarivan, A fast and elitist multiob-jective genetic algorithm: NSGA-II, IEEE Transactions on EvolutionaryComputation 6 (2) (2002) 182–197 (April 2002). doi:10.1109/4235.996017.

[32] S. Kukkonen, J. Lampinen, GDE3: the third evolution step of gen-eralized differential evolution, in: 2005 IEEE Congress on Evolu-tionary Computation, Vol. 1, 2005, pp. 443–450 Vol.1 (Sep. 2005).doi:10.1109/CEC.2005.1554717.

[33] E. Zitzler, M. Laumanns, L. Thiele, SPEA2: Improving the strength paretoevolutionary algorithm, Tech. rep., Computer Engineering and NetworksLaboratory (TIK) Department of Electrical Engineering, Swiss Federal In-stitute of Technology (ETH) (2001).

[34] K. Deb, M. Mohan, S. Mishra, A fast multi-objective evolutionary algo-rithm for finding well-spread pareto-optimal solutions, KanGAL report2003002 (01 2003).

[35] N. Hansen, The CMA evolution strategy: a comparing review, in:J. Lozano, P. Larranaga, I. Inza, E. Bengoetxea (Eds.), Towards a new evo-lutionary computation. Advances on estimation of distribution algorithms,Springer, 2006, pp. 75–102 (2006).

[36] K. Deb, H. Jain, An evolutionary many-objective optimization al-gorithm using reference-point-based nondominated sorting approach,Part I: Solving problems with box constraints, IEEE Transactionson Evolutionary Computation 18 (4) (2014) 577–601 (Aug 2014).doi:10.1109/TEVC.2013.2281535.

[37] D. Hadka, Platypus - a free and open source python library for multiobjec-tive optimization (2019).URL https://github.com/Project-Platypus/Platypus

[38] D. Kraft, Algorithm 733: TOMP–Fortran modules for optimal control cal-culations, ACM Trans. Math. Softw. 20 (3) (1994) 262–281 (Sep. 1994).

33

Page 35: Applied Process Simulation-Driven Oil and Gas Separation

[39] J. M. Campbell, Gas conditioning and processing, 8th Edition, Vol. 1 –The Basic Principles, John M. Campbell and Company, 2004 (2004).

[40] Ø. W. Kylling, Optimizing separator pressure in multistage crude oil pro-duction plant (Master thesis), Norwegian University of Science and Tech-nology, 2009 (2009).

34