A041 Production Optimization under Constraints Using ... - Earthdoc

2 downloads 0 Views 415KB Size Report
The authors are grateful to ENI, Schlumberger, and Statoil for permission to publish this paper. Thanks are also due to Total and Norsk Hydro for contributing to ...
A041 Production Optimization under Constraints Using Adjoint Gradients P. de Montleau* (ENI SpA - E&P Div.), A. Cominelli (ENI E&P), K. Neylon (Schlumberger), D. Rowan (Schlumberger), I. Pallister (Schlumberger), O. Tesaker (Statoil ASA) & I. Nygard (statoil ASA)

SUMMARY The introduction of controllable downhole devices has greatly improved the ability of the reservoir engineer to implement complex well control strategies to optimize hydrocarbon recovery. The determination of these optimal control strategies, subject to limitations imposed by production and injection constraints, is an area of much active research and generally involves coupling some form of control logic to a reservoir simulator. Some of these strategies are reactive: interventions are made when conditions are met at particular wells or valves, with no account taken for the effect on the future lifetime of the reservoir. Moreover, it may be too late to prevent unwanted breakthrough when the intervention is applied. Alternative proactive strategies may be applied to the lifetime of the field and fluid flow controlled early enough to delay breakthrough. This paper presents a proactive, gradient­based method to optimize production throughout the field life. This method requires the formulation of a constrained optimization problem, where bottomhole pressure or target flow rates of wells, or flow rates of groups, represent the controllable parameters. To control a large number of wells or groups at a reasonably high frequency, efficient calculation of accurate well sensitivities (gradients) is required. Hence, the adjoint method has been implemented in a commercial reservoir simulator to compute these gradients. Once these have been calculated, the simulator can be run in optimization mode to find a locally optimal objective function (e.g., cumulative production). This optimization procedure usually involves progressively activating constraints, with each new constraint representing a significant improvement in the objective. Proper management of degrees of freedom of the parameters is essential when calculating the constrained optimization search direction. Adjoint methods have already been used for production optimization within reservoir simulation; however, an accurate analysis of optimal management of active and inactive constraints for different type of recovery processes in field­like cases has not been discussed to our knowledge. 

10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

Introduction In reservoir engineering, improvement of field production is a continuous challenge. The desired improvement may simply be maximization of oil production over a given time period, but it can be a more complex objective that incorporates the need to reduce produced gas and injected water and that includes a financial discount coefficient. Moreover, each component of the objective may be subjected to physical and/or economic constraints; typically, for example, production and injection are constrained by surface handling capacities. Traditionally, reservoir engineers have made optimization decisions based on observed local conditions around each well, or on fluid and pressure distributions predicted by a reservoir simulator. This reactive approach to field management means that decisions made at a certain stage of the field lifetime can induce detrimental effects later on. For example, a potential-based allocation of well target rates will prioritize production from highpermeability zones, which may lead to early water or gas breakthrough. In addition, an action of the type “shut the well when breakthrough occurs” is a local control that cannot influence the period preceding breakthrough. Careful control of the early life of well production could improve recovery and delay breakthrough. Work is required by the reservoir engineer to manually modify field, group, and well controls to construct a set of production scenarios from which a field development plan can be selected. This effort may be huge in the case of fields of complex geology, uncertainty in the reservoir model, and large numbers or wells. Maximizing oil or gas production using a numerical reservoir simulator is an optimal control problem. The reservoir simulator plays the role of a dynamic system, able to compute a response function (e.g., cumulative oil production) for some controllable parameters (well flowing rates, bottomhole pressures), and subject to nonlinear constraints (both equality and inequality). The optimization used in this study is a gradient-based algorithm. Compared with genetic algorithms, e.g., (Goldberg, 1989), a gradient-based method is ideal for constrained optimization problems. The gradient method is commonly applied to solve history-matching problems, e.g., (Schlumberger, 2006b, Gosselin et al., 2003), but while it is not yet widely used for industrial dynamic optimization, a number of studies have shown promise (Brouwer et al., 2001, 2002b, Sarma et al., 2005). Once an objective (or cost) function is defined, the gradients of this function with respect to the set of control parameters are computed and used in a maximization algorithm. Because the number of controllable parameters can be extremely large, the expense of the gradient computation is an issue. For instance, if well control intervention is desired every month, then in the case of a field with N controllable wells to be simulated for 30 years, the total number of controllable parameters will be 360·N. So, there are thousands of controllable parameters for most reservoir models. Because of the size of the system, gradients are calculated using the adjoint method (Ramirez et al., 1984, Zakirov et al., 1996). The method is computationally efficient, but there is a requirement that the reservoir simulation is fully implicit (Brouwer and Jansen, 2002a). The role of constraints in the successful application of an optimization method is crucial. Constraints in reservoir simulation may be simple bounds on the control parameters or complex nonlinear functions of reservoir and well operating conditions. Such nonlinear constraints (e.g., that a well or group may not flow above a certain rate limit) typically become active as the optimizer attempts to maximize production. The addition of each new active constraint to the system removes one degree of freedom (and hence one controllable “free” parameter) from the optimization; this is because that “dependent” parameter has to be used to honor the constraint. The details of how the optimization proceeds as constraints become active or inactive is discussed in the next section. Great care must be taken when the constraints are not directly influenced by the control parameters (insensitive constraints), and a method to deal with this is proposed and demonstrated. After a short discussion on the treatment of constraints in a Lagrangian formulation of the optimization problem, three example cases are discussed. The first synthetic example highlights the insensitive constraint problem and the need for improved constraint management. This new treatment of insensitive constraints is applied with success. A second optimization is proposed for a highly channeled layer that is produced using a repeated five10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

spot pattern. This optimization combines control of both injectors and producers and investigates how different objective functions influence the optimization in addition to the constraints. The final application concerns the optimization of the water injection in part of a real field, for which vertical heterogeneities make the water distribution an issue.

Optimization Method The primary influence that can be exerted on the recovery from a reservoir is the setting of the well and group operating conditions (e.g., flow rates, bottomhole pressure, valve settings, etc.) for both the injection and production systems. These are the control parameters. The problem considered in this paper is to determine the set of control parameters, P, that maximize an objective function, J, over the lifetime of the field. This objective function can be as simple as cumulative oil or gas production, or a more sophisticated measure of the recovery performance such as the net present value of the hydrocarbon production taking into account costs incurred in both injection and in disposal of unwanted produced fluids. While attempting to maximize the objective function, certain physical and economic constraints, C, must be obeyed. For example, the water cut in the producers must not exceed a certain limit, or the production from a particular group must not exceed the capacity for the surface facilities of that group. These (generally nonlinear) optimization constraints can always be written in the form C ≤ 0. These constraints can be divided into those for which currently C = 0 (called the active constraints, CA) and those for which currently C < 0 (called the inactive constraints). A commercial compositional reservoir simulator (Schlumberger, 2006a) is used to solve this constrained maximization problem. The simulator equations themselves are constraints upon the optimization process, indicating that the simulator must obey laws for conservation of mass, fluid flow, etc. These simulator equations can be represented by R(X, P) = 0, where X is the vector of simulator solution variables and includes the well model equation set. To solve this constrained optimization problem, the Kuhn-Tucker conditions (Kuhn and Tucker, 1951) for optimality are invoked. This leads to the formation of the Lagrangian function, L, which is the objective function, J, augmented with the reservoir equation constraints, R, and the active optimization constraints, CA. L(X, P) = J(X, P) + ΨR R(X, P) + ΨC CA(X, P)

(Eq. 1)

Here ΨR and ΨC are reservoir and constraint Lagrange multiplier vectors respectively (also termed the “adjoint” or “state” vectors) and are determined by the Kuhn-Tucker conditions such that at the solution all active constraints are met and the objective function is an optimum in all feasible directions. Because of the nonlinear nature of the components of the Lagrangian, and the determinacy of the problem, this requires an iterative method. Following (Zakirov et al., 1996), an active set method and a projected gradient technique are used to ensure that the gradient search direction obeys the simulator and optimization constraints. For a gradient based optimization method, the derivative of the Lagrangian with respect to the control parameters (Eq. 2) is needed, which in turn requires partial derivatives described in (Eq. 3) and (Eq. 4):

dL ∂L ∂L ∂X = + dP ∂P ∂X ∂P

(Eq. 2)

∂C A ∂R ∂L ∂J = + ΨR⋅ + ΨC ⋅ ∂X ∂X ∂X ∂X

(Eq. 3)

∂C A ∂L ∂J ∂R = + ΨR⋅ + ΨC ⋅ . ∂P ∂P ∂P ∂P

(Eq. 4)

10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

The expensive computation of the partial derivative of all the solution variables with respect to all the control parameters (∂X/∂P) can be avoided by choosing the Lagrange multiplier vectors such that ∂L/∂X is zero in Eq. 2. If there are NA active constraints, then there are only enough degrees of freedom to set NA of the ∂L/∂P equations to zero, that is, each active constraint removes a freely controllable parameter. The system of equations (Eq. 5 and Eq. 6) is solved for the Lagrange multiplier vectors ΨR and ΨC, and then ∂L/∂Pi is calculated for i > NA. This is called the free parameter search direction.

∂C A ∂J ∂R + ΨC ⋅ + ΨR⋅ =0 ∂X ∂X ∂X

(Eq. 5)

∂C A ∂R ∂J = 0 ∀i ≤ N A + ΨC ⋅ + ΨR⋅ ∂Pi ∂Pi ∂Pi

(Eq. 6)

This solution approach is called the “adjoint method”. Because of the coupled time structure of the reservoir simulator equations, this step essentially means solving these equations backwards in time. The state of the simulation is saved to file at various (report) times in the conventional forward simulation, then the simulation is stepped backward from the end to the start, reading the saved state to allow the reconstruction of the Jacobian matrix and the well model quantities that are needed for the backward solve. Following (Zakirov et al., 1996), linearization of the simulator and optimization constraints allows the calculation of the remaining ∂ L/∂Pi for i ≤ NA (the dependent parameter search direction) by stepping forward through the saved states, giving the entire dL/dP search direction (and largest magnitude) which obeys the constraints. This search direction is then used in a steepest descent, or conjugate gradient, maximization algorithm, in conjunction with a line-search algorithm, which requires a forward simulation at each step. Choice of free parameters and handling of insensitive constraints The choice of which NA of the N control parameters to use as the free parameters is apparently arbitrary. However, there are some algorithmic considerations that dictate the choice of the most suitable ones to make the solution of the system of equations (Eq. 5 and Eq. 6) stable. The most efficient way to solve the system is to eliminate ΨC using Eq. 6, and then solve for ΨR using Eq. 5. This requires the inversion of the ∂CA/∂Pi matrix. With this solution approach, the free parameters are chosen to be those that make the inversion of the ∂CA/∂Pi matrix stable. However, care must be taken in the case of an insensitive constraint, where ∂CA/∂Pi = 0 (as would occur, for example, for a constraint on a production well with the control parameters only on the injection wells) as the algorithm would break down. In this case, the more expensive approach (in terms of both operations and storage) of eliminating ΨR using Eq. 6 and then solving for ΨC using Eq. 5 must be used. This requires the inversion of a matrix of the form ∂CA/∂X (∂R/∂X) ∂R/∂Pi. Again, when this solution approach is used, the free parameters are chosen to make the inversion of this matrix stable. The implementation used switches from the efficient algorithm to the expensive one dynamically during the calculation of the gradients (and only when necessary).

Applications A five-layer problem: Constraints insensitive to the control parameters This example is a synthetic reservoir composed of five independent, one-dimensional, homogeneous layers, with a different permeability in each layer (see Figure 1 top). On the 10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

right side, five injectors are completed independently in each layer, while a single producer is completed in each of the five layers on the left. The objective is to maximize the oil production under a water production rate constraint. The control parameters are the water injection rates in the five injectors. The production period is divided into 16 steps of 12.5 days such that there are 90 (= 16 × 5) parameters to optimize. The producer is operated so that it maintains a bottomhole pressure (BHP) target of 99 bar. The optimization starts from a point where the BHP of the five injectors is set to 160 bar, leading to water displacements proportional to the permeability of each layer (Figure 1 middle). K=600 mD K=400 mD K=400 mD K=200 mD K=100 mD

Figure 1. Top: Permeability. Middle: Oil saturation in fixed BHP case. Bottom: Oil saturation in optimized simulation.

In the first step of the optimization, no constraints are active, so each well tries to inject as much water as possible to increase recovery. The water in the high-permeability (top) layer travels to the producer fastest, and soon the water cut constraint is violated. Since the control parameters are on the injectors and the constraint is on the producer, then this is an example of an insensitive constraint situation. Without any special handling of the insensitive constraints, the optimization algorithm breaks down when the first constraint is encountered at a time period because of water breakthrough in the top layer, and the recovery is only 82% of the original oil in place (OIP). However, with proper consideration given to the insensitive constraints, the optimization can proceed and converges after seven iterations, with the constraint being active for three time periods. The optimizer reduces injection in the top layer to allow recovery in the other layers, which improves the overall objective while not violating the constraints. The recovery is 90.3% of the original OIP. A piston-like displacement (Figure 1 bottom) is achieved starting from an unfavourable starting point. A Multiple Five-Spot Pattern This example concerns a synthetic plane layer taken from a real channeled reservoir. The permeability field (Figure 2) presents an interesting high/low permeability profile, ranging from 50 mD (blue) to 2,400 mD (red). The field is produced by means of 3 five-spot patterns (3 water injectors and 8 producers).

Figure 2. The multiple five-spot pattern: 3 injectors and 8 producers. Map of the permeability.

In this first part of this study, the objective is to maximize the oil cumulative production (FOPT): J = FOPT. To compare the effect of the constraints, the field production is subject to two different sets of rates: (1) only on the water production rate (FWPR) and (2) on both FWPR and oil production rate (FOPR). The injection pressure is fixed at 200 bar. The control parameters are the liquid production rates (LPR) of the eight producers with a lower limit on the BHP set to 10 bar. 10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

The production life is divided into 100 report steps of 4 months, so there is a total of 800 (= 8 × 100) control parameters. For both cases, the optimized solution (opt) is compared with a “base case” (base) for which the producers are under a group control: An oil rate target is set at the value of the oil rate constraint (or an arbitrary high value if there is no oil rate constraint) and switched to the water rate constraint once it is overshot. Characteristics and results for the two cases are presented in Table 1. Objective function: FOPT, Optimizer parameters: 0 < LPR < 10,000 m3/d Case

Constraints (m3/d)

A

FWPR < 1,500

A-CO

FOPR < 3500 , FWPR < 1,500

Active constraints steps: FOPR, FWPR

FOPT opt/base (× 106 m3)

- , 63

50.2/43.1 (+ 16.5%)

91 , 27

40.6/37.3 (+ 8.4%)

Table 1. Results for the multiple five-spot pattern: objective function FOPT.

For both cases, the constraints are active for a significant number of steps and the optimizer increases the cumulative oil production. The results of the case A-CO are displayed in Figure 3. In particular, Figure 3 (left) shows the constraints (red = oil, blue = water) for the optimized and the base simulation (thick and thin lines respectively). The water constraint forces a reduction of the oil production earlier in the optimized case; subsequently the oil plateau is maintained for a longer period, gaining 8% cumulative oil production overall. This improvement is achieved because the two constraints (water and oil rates) are active a) for a longer period, and b) during the same period, roughly from year 2024 to year 2030. This is also illustrated in Figure 3 (right) where the objective function, and the number of steps for which constraints are active, are plotted against the number of simulations performed. 100

4.5E+07

80

3.6E+07

const FOPR const FWPR FOPT

60

2.7E+07

40

1.8E+07

20

9.0E+06

0

0.0E+00 0

10

20

30

40

50

60

Figure 3. Optimization case A-CO.

Another optimization is performed with the objective of maximizing the total oil production while reducing the water injected (FWIT): the objective function is J = FOPT – 0.5 × FWIT. The water injection rate (WIR) on the three injectors is added to the previous set of control parameters, so there is a total of (8 + 3) × 100 = 1,100 control parameters. The upper limit on the BHP of the injectors is set to 200 bar. The base cases are built in the same way as in the previous section. The cumulative oil and water produced, as well as water injected, are shown in Table 2, and compared to the base case. Figure 4 shows results of the optimized case, B_CO (thick line), compared to the corresponding base case (thin line). On the left are the oil (red) and water (blue) constraints and on the right are the reduction of the water injection total (blue) and water production total (yellow). 10th European Conference on the Mathematics of Oil Recovery — Amsterdam, The Netherlands 4 - 7 September 2006

Objective function: FOPT - 0.5 × FWIT; Optimizer parameters: 0 < LPR, WIR < 10,000 m3/d

Case

Constraints (m3/d)

Active constraints: FWPR, FOPR

FOPT opt/base (× 106 m3)

FWPT opt/base (× 106 m3)

FWIT opt/base (× 106 m3)

B

FWPR

Suggest Documents