You are on page 1of 13

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

net/publication/254513179

Optimization of Production Operations in Petroleum Fields

Article · September 2002


DOI: 10.2118/77658-MS

CITATIONS READS
71 3,550

3 authors, including:

Wang Pengju Khalid Aziz


Wuhan University Stanford University
4 PUBLICATIONS   154 CITATIONS    314 PUBLICATIONS   14,190 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Optimal Reconstruction of State-Dependent Constitutive Relations for Complex Fluids in Earth Science Applications View project

All content following this page was uploaded by Khalid Aziz on 05 December 2014.

The user has requested enhancement of the downloaded file.


SPE 77658

Optimization of Production Operations in Petroleum Fields


Pengju Wang, SPE, Stanford University; Michael Litvak, SPE, BP; Khalid Aziz, SPE, Stanford University

Copyright 2002, Society of Petroleum Engineers Inc.


some fields, by switching well connections from one flowline
This paper was prepared for presentation at the SPE Annual Technical Conference and to another flowline, implementation of these controls in an
Exhibition held in San Antonio, Texas, 29 September–2 October 2002.
optimal manner is not easy. The objective of dynamic
This paper was selected for presentation by an SPE Program Committee following review of
information contained in an abstract submitted by the author(s). Contents of the paper, as
production optimization is to find the best operational settings
presented, have not been reviewed by the Society of Petroleum Engineers and are subject to at a given time, subject to all constraints, to achieve certain
correction by the author(s). The material, as presented, does not necessarily reflect any
position of the Society of Petroleum Engineers, its officers, or members. Papers presented at operational goals. These goals can vary from field to field and
SPE meetings are subject to publication review by Editorial Committees of the Society of
Petroleum Engineers. Electronic reproduction, distribution, or storage of any part of this paper
with time. Typically one may wish to maximize daily oil rates
for commercial purposes without the written consent of the Society of Petroleum Engineers is or minimize production costs.
prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300
words; illustrations may not be copied. The abstract must contain conspicuous Various aspects of production optimization have been
acknowledgment of where and by whom the paper was presented. Write Librarian, SPE, P.O.
Box 833836, Richardson, TX 75083-3836, U.S.A., fax 01-972-952-9435.
addressed in the literature. For example, several researchers1-5
have studied the problem of allocating limited amount of
available gas to specified wells for continuous gas-lift. Fang
Abstract and Lo6 proposed a linear programming technique to allocate
For some petroleum fields, optimization of production lift-gas and well rates subject to multiple flow rate constraints.
operations can be a major factor for increasing production Barnes et al.7 developed an optimization technique for a
rates and reducing production costs. While for single wells or portion of the Prudhoe Bay field in Alaska. This model
other small systems simple nodal analysis can be adequate, maximizes oil production while minimizing the need for gas
large complex systems demand a much more sophisticated processing. Several papers8-10 have reported results for the
approach. Many mature fields are produced by gas-lift under production optimization of the Kuparuk River field in Alaska.
multiple constraints imposed by the field handling capacity of The techniques published so far1-10 either addressed only a part
the system. In this paper we present an optimization technique of the optimization problem of interest to us or made
for allocating production rates and lift-gas rates to wells significant simplifications during the optimization process.
of large fields subject to multiple flow rate and In most commercial reservoir simulators11,12, flow rate
pressure constraints. constraints on facilities are handled sequentially by ad hoc
The well rate and lift-gas rate allocation problem has been rules. In addition, gas-lift optimization is done separately from
addressed in the literature1-13. However, existing methods are the allocation of well rates. Because of the nonlinear nature of
either inefficient or make significant simplifications. This the optimization problem and complex interactions, results
often leads to suboptimal operations. This paper proposes a from such procedures can be unsatisfactory.
new formulation of the problem that is able to handle flow In a companion paper Wang et al.13 presented a procedure
interactions among wells and can be applied to a variety of for the simultaneous optimization of well rates, lift-gas rates,
problems of varying complexities. We show that the proper and well connections subject to multiple pressure, flow rate,
formulation of the optimization problem is important in the and velocity constraints. While this approach was successful,
practical use of modern optimization techniques. Once it was limited in its ability to handle flow interactions among
formulated, the optimization problem is solved by a sequential wells when allocating well rates and lift-gas rates.
quadratic programming algorithm. Our results show that the Here we extend the work of Wang et al.13 and propose a
procedure developed in this paper is capable of handling new formulation for the problem of simultaneously optimizing
complex oil production problems. the allocation of well rates and lift-gas rates. The optimization
problem is solved by a sequential quadratic programming
Introduction algorithm, which is a derivative-based nonlinear optimization
In petroleum fields, hydrocarbon production is often algorithm. The proposed method is tested on several
constrained by reservoir conditions, deliverability of the examples. Results show that the method is capable of handling
pipeline network, fluid handling capacity of surface facilities, flow interactions among wells and can be applied to a variety
safety and economic considerations, or a combination of these of problems of varying complexities and sizes.
considerations. While production can be controlled by
adjusting well production rates, allocating lift-gas rates, and in
2 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

Description of the Optimization Problem functions. It is desirable to have an optimization method that is
able to handle the flow interactions and is computationally
Reservoir Model. The reservoir is modeled by a conventional efficient. Such methods are often derivative-based nonlinear
black-oil reservoir simulator. It provides the conditions at the optimization algorithms. In this paper, we use a sequential
well blocks that form the boundary conditions for the quadratic programming algorithm to solve the well rates and
gathering system. lift-gas rates optimization problem.

Model of the Gathering System. The gathering system is Example Problem. Formulation plays an important role in
modeled as a tree-like network without loops. It includes optimization. We use an example problem to illustrate the
wells, links, and nodes. A well refers to a wellbore and its difficulties in formulating the well rates and lift-gas rates
surrounding reservoir conditions (potentially the whole optimization problem and show how can these difficulties can
reservoir). Links refer to any device or facility across which be resolved. In the example problem, two gas-lifted wells are
pressure changes. A link can be a tubing string, a choke, or a connected to a common manifold, then they are connected to a
pipeline. A node represents a flow junction or the terminal separator through a common pipeline. The separator is
point of a link. The fluid injection system is not considered in operating at a fixed pressure. The flow rates of each well are
this work. Fig. 1 is a schematic illustration of such a controlled by a choke between the tubing string and the
gathering system. manifold. The tubing strings, chokes, and pipelines are
For the multiphase flow in the gathering system, fluid modeled as links. The junctions of two or more links are
properties are represented by a black-oil model. The pressure modeled as nodes. Fig. 1 illustrates the gathering system of
drop through a tubing or a pipeline is modeled by a drift-flux this problem. The oil production in this problem is constrained
model presented in reference 12. We choose the drift-flux by the water handling capacity of the separator and a
model because of its differentiability, which is an important minimum bottom hole pressure limit on each well. The
property when we solve the optimization problem using objective is to maximize the daily oil production by allocating
derivative-based optimization algorithms. The pressure drop the lift-gas rate and well rates of each well. We first look at
through chokes is modeled by a multiphase choke model how the multiphase flow in this system can be modeled. Then
developed by Sachdeva et al14. This model is able to handle we analyze the potential difficulties of this optimization
both critical and subcritical multiphase flows through problem. Finally we propose a formulation that is able to
a restriction. handle these difficulties.

Optimization Problem. The objective can be maximizing or Governing Equation. The multiphase flow in a gathering
minimizing the oil, gas, or water flow rate from the field or system is described by mass conservation and the Kirchoff’s
some facilities. For example, we can maximize the total oil law. The mass conservation requires that every node should
flow rate from the field, or minimize the total lift-gas rate for have zero net flow rate unless it is a boundary node. The
gas-lift wells. The decision variables include the well Kirchoff’s law requires that the pressure for a node should be
production rates (controlled by the well chokes) and the lift- the same no matter from which path it is computed.
gas rates. The constraints include maximum/minimum flow We choose the oil flow rate of each well as the
rates and pressure constraints imposed on production wells or independent variables and demonstrate how to construct the
network nodes, and maximum amount of lift-gas available for governing equations for multiphase flow of the
gas-lift wells. example problem.
In this work we optimize the short-term production Given the oil flow rate of a well, we obtain the water and
operation based on static reservoir conditions. However, the gas flow rates of that well using appropriate well models.
optimization tools can be combined with a reservoir simulator, Because the gathering system has a tree-like structure and the
and applied repeatedly to optimize the long-term fluid flows from the bottom up through the production tree,
production operations. according to mass conservation, the flow rate in every node
can be determined by summing up all the flow streams
Optimization Method entering that node:
For the optimization problem described here, Wang et al.13 q np ,i = ∑ q wp , j , p = o, g , w , …………………(1)
presented a mixed integer linear programming (MILP) method j∈Ω iw
and a genetic algorithm. The MILP method is efficient,
however, it ignores flow interactions during the optimization where q np ,i denotes the flow rate of phase p in node i , q wp , j
process, thus allocates well rates based on possibly inaccurate denotes the flow rate of phase p for well j (phase g includes
well deliverabilities (how much flow rate we can produce both the formation gas and lift-gas), and Ω iw denotes the set
from each well). As a result, in some cases, the MILP method
tends to over-inject lift-gas and cannot optimally allocate well of wells whose flow streams enter node i .
rates. The genetic algorithm partially handles the flow Because of the tree-like structure of the gathering system,
interaction, however, it is inefficient because it does not utilize there is a unique path connecting the separator with any well.
any derivative information of the objective and constraint Suppose node j receives fluids only from well j . We can
SPE 77658 OPTIMIZATION OF PRODUCTION OPERATIONS IN PETROLEUM FIELDS 3

calculate the pressure of node j from two pressure transverse solved to obtain the oil flow rate for each well. In some cases,
calculations. The first calculation is from the reservoir to node this can cause severe computational difficulties. For instance,
j . Denote the pressure for node j obtained from this if some wells are so deep that they cannot produce without
appropriate amount of lift-gas, Equation (2) will have no
calculation as p rj . The second calculation is from the feasible solutions unless appropriate amount of lift-gas is
separator (we assume the separator is operating at a fixed allocated to those wells. In addition, Equation (2) will have no
pressure) to node j along the path connecting the separator feasible solutions if excessive amount of gas is injected to a
and node j , Denote the pressure for node j obtained from well while the choke for that well is set to a small value in the
optimization process. Therefore, there is a large chance that
this calculation as p sj . We name node j as the solution node the solution process for problem (P1) will fail because we can
of well j . We choose a solution node for every well and not evaluate the objective and constraint functions for a
particular x .
perform the described pressure transverse calculations.
Another significant drawback of formulation (P1) is that it
According to Kirchoff’s law, the feasible set of oil flow rates
is not good at handling well shut-in actions. When a well, say
is governed by:
well j , is converted from open status to shut-in status, we
p rj − p sj = 0 , j ∈ Ω ns , Ω ns = nw , …………..(2)
need to solve two sets of Equation (2) with different
where Ω ns denotes the set of solution nodes, nw denotes the dimensionalities (one set without well j and one set with well
number of production wells. j being slightly opened) to evaluate the partial derivatives of
In principle, for a particular well, we can choose its the objective function and constraint functions with respect to
solution node from any node that receives fluids only from the choke diameter for that well. This procedure can be time-
that well. For instance, in the example problem, we can choose consuming and the results can be inaccurate, time-consuming
either node 3, 5, or 7 as the solution node for well 1, node 4, 6, because we need to solve two sets of nonlinear equations to
or 8 as the solution node for well 2. In practice, we always obtain one partial derivative, inaccurate because we have to
choose the wellbores, i.e., node 7 and 8, as the solution nodes. use finite differences to approximate the derivatives of a
This choice has certain computational advantages. For potentially non-smooth function.
instance, when computing the pressure drop across a surface Some of these computational difficulties are inherent in the
choke, we always compute its upstream pressure based on its governing equation, Equation (2). When we formulate
downstream pressure and the flow rate across it. This Equation (2), we assume that the fluid flows up the production
guarantees a unique upstream pressure no matter the flow tree. Replacing Equation (2) with another set of governing
through the choke is critical or subcritical. equations may help to resolve some computational difficulties,
Equation (2) has nw independent variables and nw but some difficulties will persist, such as infeasible
equations. It forms a closed system of equations, and can be combination of lift-gas rates and choke settings, and well shut-
solved by the Newton-Raphson method. Appendix A shows a in handling. Furthermore, as we will demonstrate by an
example, even when these computational difficulties do not
procedure for calculating the partial derivatives of p sj with appear, the computational efficiency of formulation (P1) can
respect to the independent variables, which are required in the be disappointing.
Newton-Raphson method.
New Formulation. Here we derive a new formulation to
Computational Difficulties of Standard Formulation. A overcome these limitations. The fundamental idea of the new
straightforward formulation of the well rates and lift-gas rates formulation is to avoid solving Equation (2) when evaluating
allocation problem is to choose the choke diameters and lift- the objective and constraint functions.
gas rates as the decision variables and formulate the In the new formulation we choose the oil flow rate and the
optimization problem as follows lift-gas rate for each well as the decision variables and use the
(P1) maximize f (x ) , ………………….(3a) fact that for fixed flow rates the pressure drop across the choke
subject to l ≤ F (x ) ≤ u , ………...(3b) increases as the choke closes. In the example problem, we
choose the wellbores as the solution nodes. For a particular set
where f (x ) denotes the objective function, F (x ) denotes the of oil and lift-gas rates, denoted as x , we calculate the bottom
constraint functions, and l and u denote the lower and upper hole pressures using the two pressure transverse calculation as
bounds of the constraints. For the example problem, f (x ) is described before. When we perform the pressure transverse
the oil flow rate from the separator, F (x ) represents the water calculation from the separator side, we set all surface chokes
fully open. The set of oil and lift-gas rates x is within the
flow rate from the separator, and the bottom hole pressures of
the two wells. We name this standard formulation as (P1). deliverability capacity of the gathering system if we have
In (P1), given x , a particular set of choke diameters and p rj − p sj ≥ 0 , j = 1,..., n w , ………………………(4)
lift-gas rates, to evaluate f (x ) and F (x ) , the flow rates and
pressures of some wells and facilities, Equation (2) has to be
4 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

where p rj is the bottom hole pressure for well j calculated SQP is a derivative-based optimization algorithm. Its
successful application requires efficient and accurate
from the reservoir side, p sj is the bottom hole pressure for evaluations of gradients of objective and constraint functions.
well j calculated from the separator side. In other words, if a In this work, we are able to compute the gradient information
efficiently and accurately by exploring the tree-like structure
set of oil and lift-gas rates satisfies inequality (4), we can
of the gathering system and utilizing automatic differentiation
produce the gathering system with that set of oil and lift-gas
techniques17. The details of this procedure are presented in
rates by, where appropriate, adjusting some of the well
Appendix B.
chokes.
The well rates and gas-lift optimization problem is now
Examples
formulated as
We present three examples in this section. The first example
(P2) maximize f (x ) , ………………….(5a) compares the performance of the MILP method with the SQP
subject to l ≤ F (x ) ≤ u , ………...(5b) method for a well rates and lift-gas allocation problem. The
p rj − p sj ≥ 0 , j = 1,..., n w . ….…(5c) second example compares the computational efficiency of
formulation (P1) and (P2). The third example demonstrates the
We name constraint (5c) the deliverability constraint. As in computational efficiency of formulation (P2) on problems of
formulation (P1), f (x ) and F (x ) denote the flow rates and various sizes and properties.
pressures of some wells or facilities. However, in (P2), they
are evaluated in a different way. In (P2), given a set of oil and Example 1: Comparison between the MILP Method and
lift-gas rates, x , the flow rate and bottom hole pressure of a the SQP Method. This is a synthetic example with ten
well are computed from the reservoir side using appropriate vertical wells. The reservoir grid block pressures around these
wells vary between 3400 psi to 4900 psi. All wells are
well models when computing p rj ; the flow rate and pressure
connected to the same platform through tubing strings, chokes
in network nodes are computed from the separator side when with a maximum diameter of 48/64 inches, and surface
computing p sj . Constraint (5c) ensures the optimal oil and a pipelines with a diameter of 3.5 inches and lengths between 60
to 2000 ft. The platform is connected to a separator through a
lift-gas rate for problem (P2) is within the deliverability
pipeline with a diameter of 5.5 inches and a length of 4000 ft.
capacity of the gathering system. Thus they can be produced
The separator is operated at a fixed pressure of 160 psi. The
from the gathering system by appropriately adjusting the
oil gravity is 31° API. The specific relative gravity of gas is
choke diameters.
0.8. Fig. 2 shows the configuration of the gathering system.
In the optimization process of (P2), we calculate p rj and Table 1 shows the reservoir conditions and wellbore
p sj , but do not require them to satisfy Equation (2), thus we information for each well. Table 2 shows the length, depth,
diameter, and absolute roughness of every pipe and tubing in
avoid the limitations encountered in (P1). In addition, we need this example.
not pay special attentions to well shut-in actions. After we The problem is to maximize the total oil production rates
obtain the optimal solution, we can decide the well status by allocating production rates and unlimited lift-gas to
according to their oil rate and the status of constraint (5c). In individual wells. The constraint is that the total water
the optimal solution, for well j , a zero oil flow rate indicates production rate can not exceed 5000 STB/D.
that well j should be closed; a positive oil rate but inactive The optimization problem is solved by the MILP method13
as follows.
deliverability constraint ( p rj > p sj ) indicates that well j
1. Choose a realistic flowing pressure at the platform.
should be partially closed; a positive oil rate and active Suppose wells are producing with a set of un-optimized
deliverability constraint ( p rj = p sj ) indicates that well j lift-gas rates as shown in column 2 of Table 3. We
should remain fully open. simulate the multiphase flow in the gathering system and
obtain the flowing pressure at the platform, which is 1545
Solution of the Optimization Problem. Formulation (P1) and psi. Table 3 also shows the oil flow rate, the water cut,
(P2) are nonlinear constrained optimization problems. In this and the gas oil ratio (GOR) for each well obtained in
work, they are solved by SNOPT15, a general-purpose system this step.
for solving large-scale optimization problems. SNOPT 2. Construct the gas-lift performance curves. First we fix the
implements a sequential quadratic programming (SQP) platform pressure at 1545 psi. Then for any well, say well
algorithm that obtains search directions from a sequence of j , given its gas-lift rate, we can determine its oil flow
quadratic programming subproblems. SNOPT requires rate by solving the multiphase flow problem for the flow
relatively few evaluations of the problem functions. Hence it path connecting well j and the platform. For each well,
is especially effective if the objective or constraint functions we compute its oil flow rate for different gas-lift rates,
are expensive to evaluate15. The SQP algorithm used in namely, 0, 200, 500, 1000, 2000, 3000, 4000, 5000, 6000,
SNOPT is fully described in Gill et al.16 and 7000 MSCF/D, and obtain its gas-lift performance
SPE 77658 OPTIMIZATION OF PRODUCTION OPERATIONS IN PETROLEUM FIELDS 5

curve. Fig. 3 plots the gas-lift performance curves we method allocates much less lift-gas but produces 8% more
obtained in this step. oil than the MILP method does.
3. Allocate the lift-gas. First we approximate each gas-lift 4. The major computational effort of the MILP method is in
performance curve using a piece-wise linear curve, and constructing the gas-lift performance curves. Thus the
formulate the well rates and lift-gas allocation problem as computational time of the MILP method is proportional to
a mixed integer linear programming (MILP) problem13. the number of wells in the system. The computational
Then we solve the MILP problem and obtain the optimal time of the SQP method depends on many factors and is
solution, which predicts that the field will produce at an hard to predict. For this particular example, the
oil flow rate of 12449 STB/D. The allocated lift-gas rate computational time required for the MILP method and the
and oil rate for each well are presented in Table 4. SQP method is of the same order.
4. Update the multiphase flow. We allocate the optimal set Finally we mention that this problem cannot be solved by
of lift-gas rate from Step 3 to each well, simulate the formulation (P1), because some wells (i.e. well 7) are too
multiphase flow in the gathering system, and obtain the weak to flow under certain conditions and well shut-in actions
oil flow rate of each well. Results indicate that the field (i.e. well 1, 4, and 8) must be performed in the optimization
can produce at a total oil flow rate of 12045 STB/D and a process.
total water flow rate of 4830 STB/D, which does not
violate the total water flow rate constraint. The flowing Example 2: Efficiency Comparison of Formulation (P1)
pressure at the platform is 1595 psi. and (P2). Formulation (P2) is easier to implement and is more
We now proceed to solve the same optimization problem robust than formulation (P1). However, formulation (P2) turns
using the SQP method with formulation (P2). We select the oil an unconstrained optimization problem into a constrained one.
flow rate and lift-gas rate for each well as the decision We must ensure that such a reformulation does not make an
variables. Starting with an initial guess of 400 STB/D oil flow easy problem hard to solve. The purpose of this example is to
rate and 3000 MSCF/D lift-gas rate for every well, the show that the performance of formulation (P2) is not
program converges to the optimal solution using 27 function necessarily worse than formulation (P1) on problems that can
evaluations. One function evaluation refers to one complete be solved by both formulations.
evaluation of the objective and constraint functions and their In this example, the reservoir conditions and the
derivatives. The allocated oil rate and lift-gas rate for each configuration of the gathering system is exactly the same as in
well is shown in Table 4. Results indicate that the field will Example 1. The difference is that the tubing strings and pipes
produce at a total oil flow rate of 13019 STB/D and a total are made shorter in this example so that all wells can produce
water flow rate of 5000 STB/D. The flowing pressure at the without gas-lift.
platform is 1079 psi. Note that in this example the flowing We present two scenarios. The first scenario is an
pressure at the platform is sensitive to the flow rates in the unconstrained gas-lift optimization problem. The objective is
common flow line. to maximize the total oil production by allocating lift-gas.
Some comments on the MILP method and the SQP method Both formulation (P1) and (P2) are used to solve this problem,
are appropriate at this stage: and they yield the same optimal solution, which is zero lift-gas
1. In Step 2 of the MILP method, in order to construct the rate for every well. However, formulation (P2) converges
gas-lift performance curves, we need to fix the platform much faster than formulation (P1). Formulation (P2) optimizes
pressure to a rather arbitrary value. The results of the both the oil flow rate and lift-gas rate of every well. Starting
MILP method will largely depend on this value. However, with an initial guess of 400 STB/D oil flow rate and 5000
there is no simple way to tell which value is appropriate MSCF/D lift-gas rate for every well, formulation (P2)
to choose. converges to the optimal solution with 21 function
2. In Step 3 of the MILP method, the lift-gas is allocated evaluations. Formulation (P1) optimizes only the lift-gas rate.
based on existing gas-lift performance curves. It ignores Starting with an initial guess of 5000 MSCF/D lift-gas rate for
the fact that increasing the flow rate from one well will every well, formulation (P1) converges to the optimal solution
decrease the flow rate from other wells sharing a common with 67 equivalent function evaluations. The convergence
flowline. So the MILP method tends to over-inject lift-gas history of formulation (P1) and (P2) is plotted in Fig. 4.
in Step 3. The second scenario is a constrained well rates and gas-lift
3. The SQP method takes the flow interaction into account optimization problem. The objective is to maximize the total
through the deliverability constraint (5c), and is able to oil production rate by allocating lift-gas and adjusting choke
make more informed decisions. For example, well 8 and 9 diameters. The total water flow rate can not exceed 20,000
have high GORs. For the same amount of oil produced, STB/D. Again, both formulations yield the same optimal
these two wells will cause a larger pressure drop through solution: zero lift-gas rate for all wells, and the well choke for
the common flowline than the rest of the wells, well 4, the well with highest water cut, is partially closed.
consequently it will reduce the flow rates from other However, formulation (P2) is much more efficient than
wells. The SQP method identifies this. It shuts in well 8 formulation (P1). Starting with an initial guess of 400 STB/D
and partially close well 9 to fully utilize the deliverability oil flow rate and 5000 MSCF/D lift-gas rate for every well,
capacity of the common flowline. As a result, the SQP formulation (P2) converges to the optimal solution with 20
6 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

function evaluations. Starting with an initial guess of 5000 in actions and avoid other computational difficulties.
MSCF/D lift-gas rate and fully open choke status, formulation Furthermore, with (P2) the optimization problem can be
(P1) converges to the optimal solution with 82 equivalent solved efficiently.
function evaluations. The convergence history is plotted in There are however some limitations of formulation (P2). In
Fig. 5. the optimal solution of (P2), sometimes a well can have a zero
In both scenarios, formulation (P2) performs better than oil rate and a positive lift-gas rate, which is not realistic. This
formulation (P1). positive lift-gas rate is used to lighten the oil column+ so that
constraint (5c) is satisfied. Fortunately, our experience shows
Example 3: Efficiency of Formulation (P2). The purpose of that the value of this lift-gas rate usually is small and has little
this example is to demonstrate the computational efficiency of impact on the solution of the optimization problem.
formulation (P2) on problems with various sizes and More research work can be done on this subject. We can
properties. incorporate more decision variables into the optimization
We consider three gathering systems with 2, 10, and 50 problem, such as pump horsepower and subsurface choke
production wells, respectively. Fig. 6 shows the configuration settings for multilateral and multisegment wells. We can
of these gathering systems. For each gathering system, we modify the construction procedure of Equation (2) to allow
consider three optimization problems: unconstrained, loops in the network. It is also necessary to investigate the
constrained by total water flow rate, constrained by total gas performance of the linear optimization methods and the
and water flow rates. The objectives of all problems are to nonlinear optimization method under different conditions. We
maximize the daily oil production by allocating the well and are currently extending formulation (P2) to handle
lift-gas rates. We solve the 9 optimization problems using multiobjective optimization of production operations in
formulation (P2). The initial guess for every optimization petroleum fields.
problem is 400 STB/D oil flow rate and 3000 MSCF/D lift-gas
rate for every well. The convergence criteria for the Conclusions
optimization process are presented in Table 5. 1. A new formulation is proposed for the optimization
Table 6 shows the number of function evaluations problem of allocating well rates and lift-gas rates. The
required to solve the optimization problem and the total oil, new formulation is able to handle flow interactions among
gas, water, and lift-gas rate of the optimal solution for every wells and can be applied to difficult situations where
problem. Constraints can greatly influence problem difficulty. some wells are too weak to produce without appropriate
For example, problem 7, 8, and 9 have the same size but amount of lift-gas injection.
require 62, 50, and 28 function evaluations, respectively. The 2. The optimization problem is solved by a derivative-based
number of function evaluations required is not sensitive to the optimization method (SQP). The gradient information is
problem size. All of the problems discussed here can be solved computed efficiently and accurately by exploring the tree-
within about 60 function evaluations (one function evaluation like structure of the gathering system and utilizing
is equivalent to one Newton iteration when Equation (2) is automatic differentiation techniques.
solved by the Newton-Raphson method). In other words, all of 3. The proposed formulation is tested on several examples.
the problems discussed here can be solved within Results show that the new formulation is both robust and
approximately 10 times the number of iterations normally efficient.
required to solve the network problem (defined by Equation 4. The proposed optimization method can be used for real-
(2)) by the Newton-Raphson method. Thus, we conclude that time production control or for reservoir developments.
the SQP method with formulation (P2) is computationally
efficient. Acknowledgements
The financial support of members of the Stanford University
Discussion Reservoir Simulation Industrial Affiliates Program (SUPRI-B)
We have proposed a new formulation (P2) for the optimization is gratefully acknowledged. We thank the systems
problem of allocating well rates and lift-gas rates optimization lab. at Stanford University for supplying us
simultaneously subject to multiple flow rate and pressure SNOPT 5.315, a general purpose nonlinear constrained
constraints. The optimization problem is solved by a SQP optimizer. We thank Mathematics and Computer Science
algorithm. Results demonstrate that the SQP method performs Division at Argonne National Laboratory and the Center for
much better on certain problems than the MILP method Research on Parallel Computation at Rice University for
reported elsewhere6,13. This is due to the fact that the MILP
method optimizes the well rates and lift-gas rates based on
gas-lift performance curves and ignores the deliverability
+
constraint of the gathering system in the optimization process, In calculating the pressure drop through a tubing string, when
while the SQP method makes no such simplifications. We the flow rates approach zero (the well is closing), we still use
demonstrated that formulation (P2) is appropriate for the the same multiphase flow model to compute the pressure drop
simultaneous optimization of well rates and lift-gas rates, through the tubing string, so that the pressure drop changes
because with this formulation, it is easier to handle well shut- smoothly when the flow rates approach zero.
SPE 77658 OPTIMIZATION OF PRODUCTION OPERATIONS IN PETROLEUM FIELDS 7

supplying us ADIFOR 2.017, an automatic differentiation Systems”, paper SPE 35616 presented at the Gas Technology
software. Conference held in Calgary, Alberta, Canada, April 28 – May 1,
1996.
3. Nishikiori, N., Redner, R. A., Doty, D. R., Schmidt, Z.: “An
Nomenclature
improved Method for Gas Lift Allocation Optimisation”, paper
BHP = bottom hole pressure, psi SPE19711 presented at the 64th Annual Technical
f (x ) = objective function of an optimization problem Conference and Exhibition of SPE held in San Antonio, TX,
F (x ) = constraint functions of an optimization October 8-11, 1989.
problem 4. Martinez, E. R., Moreno, W. J., Moreno, J. A., and Maggiolo,
R.: “Application of Genetic Algorithm on the Distribution of
l = lower bounds of constraints
Gas Lift Injection”, paper SPE 26993 presented at the III Latin
u = upper bounds of constraints American/Caribbean Petroleum Engineering Conference held in
n w = number of production wells Buenos Aires, Argentina, April 27-29, 1994.
p = pressure in nodes or wells, psi 5. Dutta-Roy, K., and Kattapuram, J.: “A New Approach to Gas-
Lift Allocation Optimisation”, paper SPE 38333 presented at the
p rj = pressure of solution node j calculated from 1997 SPE Western Regional Meeting held in Long Beach,
the reservoir side, psi California, June 25-27, 1997.
pj s = pressure of solution node j calculated from 6. Fang, W. Y., and Lo, K. K.: “A Generalized Well-Management
the separator side, psi Scheme for Reservoir Simulation”, SPE Reservoir Engineering,
May 1996, 116-120.
n
q p,i = flow rate of phase p in node i , STB/D or 7. Barnes, D. A., Humphrey, K., and Muellenberg, L., A.:
MSCF/D “Production Optimization System for Western Prudhoe Bay
q tp = total field flow rate of phase p , STB/D or Field, Alaska”, paper SPE 20653 presented at the SPE 65th
MSCF/D Annual Technical Conference and Exhibition held in New
Orleans, LA, September 23-26, 1990.
w
q p,i = flow rate of phase p in well i , STB/D or 8. Stoisits, R. F., Batesole, E. C., Champion, J. H., and Park, D. H.:
MSCF/D “Application of Nonlinear Modelling for Rigorous
x = decision variables (choke diameters and lift- Representation of Production Facilities in Reservoir
gas rates in formulation (P1); oil flow rates Simulation”, paper SPE 24898 presented at the 67th Annual
and lift-gas rates in formulation (P2)) Technical Conference and Exhibition of the SPE held in
Washington, DC, October 4-7, 1992.
α ij = parameters that affect the pressure drop
9. Stoisits, R. F., Scherer, P. W., and Schmidt, S. E.: “Gas
between node i and node j Optimization at the Kuparuk River Field”, paper SPE 28467
Ω n = set of solution nodes presented at the SPE 69th Annual Technical Conference and
s
Exhibition held in New Orleans, LA, September 25-28, 1994.
w
Ωi = set of wells whose fluids enter node i 10. Stoisits, R. F., Crawford, K. D., MacAllister, D. J., and
McCormack, M. D., Lawal, A. S. L., and Ogbe, D. O.:
Operators “Production Optimization at the Kuparuk River Field Utilizing
= dimensionality of a set Neural Networks and Genetic Algorithms”, paper SPE 52177
• presented at the 1999 mid-continent Operations Symposium
held in Oklahoma City, Oklahoma, March 28-31, 1999.
Subscripts 11. VIP-EXECUTIVE Technical Reference. Landmark Graphics
g = gas phase, including formation gas and lift-gas Corporation, 1997.
o = oil phase 12. ECLIPSE 300 Technical Description, Schlumberger
p = GeoQuest, 2001.
fluid phase 13. Wang, P., Litvak, M., and Aziz, K.: “Optimization of Production
s = solution node from Mature Fields”, paper presented at the 17th World
w = water phase Petroleum Congress, Rio de Janeiro, Brazil, 1-5
September 2002.
Superscripts 14. Sachdeva, R., Schmidt, Z., Brill, J.P., and Blais, R.M.: “Two-
n = network nodes Phase Flow Through Chokes”, paper SPE 15657 presented at
r = reservoir side 61st SPE Annual Technical Conference and Exhibition held in
s = separator side New Orleans, LA October 5-8, 1986.
t = total field flow rate 15. Gill, P.E., Murray, W., and Saunders, M.A.: User’s Guide for
SNOPT (version 5.3): A Fortran Package for Sparse Nonlinear
w = wells
Programming. Technical Report SOL 86-2, 1998.
16. Gill, P.E., Murray, W., and Saunders, M. A.: An SQP Algorithm
References for Large-scale Constrained Optimization, Numerical Analysis
1. Kanu, E. P., Mach, J., and Brown, K. E.: “Economic Approach Report 97-2, Department of Mathematics, University of
to Oil Production and Gas Allocation in Continuous Gas Lift”, California, San Diego, La Jolla, CA, 1997.
Journal of Petroleum Technology, October 1981, 1887-1892. 17. Bischof, C., Carle, A., Hovland, P., Khademi, P., and Mauer, A.:
2. Buitrago, S., Rodríguez, E., and Espin, D.: “Global Optimization ADIFOR 2.0 User’s Guide. Technical Report CRPC-95516-S,
Techniques in Gas Allocation for Continuous Flow Gas Lift Centre for Research on Parallel Computation, Rick University.
8 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

SI Metric Conversion Factors The pressure gradients of node j can be computed as


°API 141.5/(131.5 + °API) = g/cm3 ∂p j ∂p j ∂pi ∂p j ∂α ij ,m
bbl × 1.589 873 E-01 = m3 = • +∑ • , …..(A2)
ft × 3.048* E-01 = m ∂x k ∂pi ∂x k m ∂α ij ,m ∂x k
ft3 × 2.831 685 E-02 = m3 where x k is the kth decision variable, for example, the oil
°F (°F-32)/1.8 = °C
rate of a well, α ij, m is the mth parameter that affects the
in. × 2.54* E-02 = m
psi × 6.894 757 E-00 = kPa pressure drop between node i and node j .
scf × 2.863 640 E-01 = std m3 Note that we already have ∂pi / ∂x k and pi .
scf/bbl × 1.801 175 E-01 = std m3/m3
* ∂α ij ,m / ∂x k can often be computed analytically. ∂p j / ∂pi
Conversion factor is exact
and ∂p j / ∂α ij ,m can be approximated using finite
Appendix A: Computation of Gradients differences or computed using automatic differentiation
When solving problem (P2) using the SNOPT15, we need to techniques. In this work, we use ADIFOR16 (see Appendix
compute the derivatives of the objective function f (x ) and B) to generate an augmented computer program that
the constraint functions F (x ) , p rj , and p sj with respect to computes ∂p j / ∂pi and ∂p j / ∂α ij ,m .
the decision variable x . In this appendix, we illustrate a 3. Repeat Step 2 for all nodes or wells in level l + 1 .
procedure that computes the pressure gradients of all nodes 4. Let l := l + 1 . Repeat Step 2 and 3 until we obtain the
efficiently and accurately by exploring the tree-like structure pressure and pressure gradients for all nodes of the
of the gathering system and utilizing an automatic gathering system.
The derivatives obtained through this procedure have the
differentiation technique. The gradients of p rj , p sj , f (x ) ,
same accuracy as the corresponding simulation model.
and F (x ) can either be obtained during this procedure or are
straightforward to compute. Appendix B: ADIFOR
ADIFOR17 is a tool for the automatic differentiation of
Computation of Pressure Gradients for Network Nodes. functions written in Fortran 77. Given a Fortran 77 source
We need to define some terminology. A well or a node can code and a set of user specified dependent and independent
have one active output node, which is the adjacent variables, ADIFOR will generate an augmented derivative
downstream node connected to that well or node. A node can code that computes the partial derivatives of all of the
have multiple input nodes or wells, which are the adjacent specified dependent variables with respect to all of the
upstream nodes or wells connected to that node. Nodes are specified independent variables. ADIFOR is a collaborative
arranged in levels. The nodes with fixed pressure are assigned project between the Mathematics and Computer Science
to the first level. For a node in level l , all its input nodes or Division at Argonne National Laboratory and the Center for
wells are in level l + 1 . The pressure of all nodes and their Research on Parallel Computation at Rice University.
derivatives are computed as follows:
1. For level 1, all nodes are boundary nodes. The pressures
are specified by the user and their derivatives are zero.
2. For node j or well j in level l + 1 , suppose we know
the pressure and pressure gradients of its output node, say
node i , in level l , then the pressure of node j can be
expressed as
( )
p j = f pi , α ij , …………………………….(A1)

where α ij denotes the parameters that affects the pressure
drop between node i and node j , such as the flow rates
or the pipe diameter between node i and node j . In this
work, a drift flux model12 is used to compute the pressure
drop across a tubing string or a pipeline. The Sachdeva
model14 is used to model the multiphase flow across
a choke.
SPE 77658 OPTIMIZATION OF PRODUCTION OPERATIONS IN PETROLEUM FIELDS 9

Node 1 Table 1: Well data for Example 1


(separator) No. Diam. skin kx ky Sw Sg Block Pres.
Pipe (ft) (md) (md) (psia)
1 0.400 1 50 50 0.60 0.10 3800
Node 2 2 0.475 0 100 100 0.30 0.40 3400
(manifold) 3 0.400 1 70 70 0.50 0.15 4500
4 0.475 0 500 500 0.70 0.00 3900
5 0.400 1 50 50 0.25 0.40 4800
6 0.475 0 100 100 0.20 0.30 3400
Node 3 Node 4
7 0.400 1 70 70 0.50 0.25 3500
Choke 8 0.475 0 500 500 0.20 0.50 4900
Node 5 Node 6 9 0.400 1 70 70 0.20 0.45 4200
10 0.475 0 500 500 0.40 0.39 3900
Tubing

Node 7 Node 8 Table 2: Tubing string and pipeline data for Example 1
*
No. Diam. Length Depth Up-temp. Down- Roughness
(inch) (ft) (ft) (°F) temp. (°F) (inch)
Well 1 Well 2 1 3.0 8000 8000 160 110 0.0003
2 3.5 8000 8000 160 110 0.0003
Figure 1: Example optimization problem 3 3.5 7500 7500 160 110 0.0003
4 3.5 7800 7800 160 110 0.0003
5 3.5 8000 8000 160 110 0.0003
6 3.5 7700 7700 160 110 0.0003
7 3.5 8500 8500 160 110 0.0003
Separator 8 3.5 7000 7000 160 110 0.0003
21 9 3.5 8000 8000 160 110 0.0003
10 3.5 8000 8000 160 110 0.0003
Platform 11 3.0 500 0 110 110 0.0003
12 3.5 60 0 110 110 0.0003
13 3.5 1200 0 110 110 0.0003
14 3.5 300 0 110 110 0.0003
11 12 13 14 15 16 17 18 19 20 Pipes 15 3.5 400 0 110 110 0.0003
16 3.5 700 0 110 110 0.0003
Chokes 17 3.5 1800 0 110 110 0.0003
18 3.5 2000 0 110 110 0.0003
19 3.5 1000 0 110 110 0.0003
20 3.5 600 0 110 110 0.0003
1 2 3 4 5 6 7 8 9 10 Tubing 21 5.5 4000 0 110 110 0.0003
*
strings No. 1-10 are tubing strings. No. 11-21 are pipelines. Fig. 2 shows
the connectivity between the tubing strings, pipelines and nodes.

1 2 3 4 5 6 7 8 9 10 Wells

Figure 2: Configuration of the gathering system


for Examples 1 and 2
10 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

Table 3: Well rates obtained in Step 1 of the MILP method for Example 1
Well Lift-gas Rate Oil Rate Water Cut Gas Oil Ratio
(MSCF/D) (STB/D) (MSCF/STB)
1 3000.00 735.35 0.53 1.21
2 0 988.90 0.26 12.50
3 2000.00 2590.69 0.38 1.65
4 3000.00 828.18 0.70 1.02
5 0 1168.80 0.16 13.41
6 0 1143.09 0.07 6.84
7 2000.00 144.49 0.47 2.87
8 0 933.03 0.11 40.38
9 0 740.73 0.10 31.41
10 3000.00 2911.25 0.22 1.02
* **
Total Flow Rate 13000.00 121842.52 6149.55 10618.42
*
total water flow rate, STB/D
**
total formation gas flow rate, MSCF/D

Table 4: Allocated gas-lift and oil rates for Example 1


Step 3 of the MILP Method Step 4 of the MILP method the SQP method
Well lift-gas rate oil flow rate lift-gas rate oil flow rate lift-gas rate oil flow rate
(MSCF/D) (STB/D) (MSCF/D) (STB/D) (MSCF/D) (STB/D)
* *
1 2674.00 668.36 2674.00 649.60 - -
2 0 988.64 0 947.07 0 1237.64
3 5000.00 2678.83 5000.00 2608.54 0 3233.68
* * * * * *
4 - - - - - -
5 0 1168.09 0 1149.46 0 1293.56
6 506.22 1149.29 506.00 1082.15 0 1621.08
7 7000.00 927.29 7000.00 872.57 750.15 3108.30
* *
8 0 932.62 0 933.03 - -
** **
9 0 741.21 0 731.75 0 270.72
10 7000.00 3194.95 7000.00 3070.97 2769.25 4301.56
Total Flow Rate 22180.22 12449.24 22180.00 12045.15 3519.40 13019.66
*
shut-in wells
**
partially closed wells

3500

3000

2500 Well 1
Well 3
OIL RATE, STB/D

2000 Well 4
Well 6
1500 Well 7
Well 10
1000

500

0
0 1000 2000 3000 4000 5000 6000 7000 8000
LIFT-GAS RATE (MSCF/D)

Figure 3: Gas-lift performance curves generated in Step 2 of the MILP method for Example 1.
For clarity, the gas-lift performance curves for high GOR wells (like well 6) are not plotted.
SPE 77658 OPTIMIZATION TECHNIQUES FOR PRODUCTION OPERATION IN PETROLEUM FIELDS 11

Separator

Pipe
40000

35000 Choke
OBJECTIVE FUNCTION, STB/D

30000
P2
25000 P1 Tubing
string
20000

15000 Wells
10000 a) Gathering system with 2 wells
5000
Separator
0
0 10 20 30 40 50 60 70
NUMBER OF FUNCTION EVALUATIONS Platform

Figure 4: Convergence history of formulation (P1) and (P2) for the Pipes
first problem in Example 2

Chokes
40000

35000
OBJECTIVE FUNCTION, STB/D

Tubing
30000 strings
25000 P2

20000 P1 Wells
15000 b) Gathering system with 10 wells

10000
Separator
5000

0
0 20 40 60 80 100
NUMBER OF FUNCTION EVALUATIONS
Manifold Manifold

Figure 5: Convergence history of formulation (P1) and (P2) for the Manifold
second problem in Example 2 Manifold
Manifold

Wells
c) Gathering system with 50 wells (with a choke installed right
before the manifold for every well)

Figure 6: Schematic illustration of the gathering systems for


Example 3
12 P. WANG, M. LITVAK, AND K. AZIZ SPE 77658

Table 5: Convergence criteria for optimization problems in Example 3


*
Major feasibility tolerance 5.0e-4
*
Major optimality tolerance 1.0e-3
*
Minor feasibility tolerance 5.0e-4
*
Please refer to reference 15 for an explanation of these convergence criteria.

Table 6: Computational efficiency of formulation (P2) on various optimization problems


Optimization Number of Constraints Number of Total Oil Rate Total Water Rate Total Gas Rate
Problem Wells Function (STB/D) (STB/D) (MSCF/D)
Evaluations
1 2 None 21 1976.52 1557.85 33788.40
2 2 11 1480.38 1000.00 30678.47
qwt ≤ 1000 STB/D
3 2 14 1267.21 1000.00 20000.00
qwt ≤ 1000 STB/D
qgt ≤ 20000 MSCF/D
4 10 None 49 14884.96 9457.70 69325.22
5 10 37 14585.92 8000.00 65930.24
q wt ≤ 8000 STB/D
6 10 45 14333.10 8000.00 50000.00
qwt ≤ 8000 STB/D
q gt ≤ 50000 MSCF/D
7 50 None 62 83423.14 42877.16 342617.65
8 50 50 81698.21 35000.00 357747.04
qwt ≤ 35000 STB/D

9 50 28 81067.22 35000.00 300000.00


qwt ≤ 35000 STB/D
q gt ≤ 300000 MSCF/D

View publication stats

You might also like