Professional Documents
Culture Documents
a r t i c l e i n f o a b s t r a c t
Article history: In the process of reservoir development, one wishes to drill wells at optimal locations so that more
Received 9 January 2009 hydrocarbons can be extracted at a lower cost. Because well locations in a reservoir simulator are commonly
Accepted 6 July 2010 treated as discrete variables (well gridblock indices), standard implementations of gradient-based
optimization are not applicable for optimal well placement, so optimization is commonly done with a
Keywords: non-gradient-based method such as the genetic algorithm. This paper presents a novel idea to convert the
Adjoint gradient
discrete optimization problem into an optimization problem with continuous variables. The idea is to
Gradient projection
Well placement
initialize the problem by putting a well in every gridblock and maximize the net present value (NPV) with
respect to the rates of the hypothesized wells. The NPV includes an additional term to account for the cost of
“drilling a well." As the cost of “drilling a well” detracts from the NPV, when NPV is maximized with respect
to the well rates, the rates of some wells will be driven to zero and hence these wells are eliminated from the
system. As the control variables (well rates) are continuous, we are able to use adjoint gradient for the
optimization process and the gradient projection method to ensure that the constraints are satisfied. For the
synthetic homogeneous and heterogeneous reservoir examples where the problem is to determine the
optimal location of water injection wells, this problem formulation yields good results after the optimization
process.
© 2010 Elsevier B.V. All rights reserved.
0920-4105/$ – see front matter © 2010 Elsevier B.V. All rights reserved.
doi:10.1016/j.petrol.2010.07.002
K. Zhang et al. / Journal of Petroleum Science and Engineering 73 (2010) 220–226 221
simulation grid. In this case, given the current proposed (initial guess) The NPV functional including the drilling costs for each new well is
placement of the injection well, which is not in a gridblock adjacent to defined as
the reservoir boundary, a “pseudo-well” produced at a small rate is
"N !# " ! #
placed in each of the eight “neighboring” gridblocks. Then the Nt prod
ro qko;j −rw qkw; j k
Ninj
qkinj;i
gradient of the net present value (NPV) over the reservoir life with Jðqinj Þ = ∑ ∑ Δt − ∑ Cinj ; ð1Þ
= 365 qkinj;i + β
k
k=1 j=1 ð1 + bÞt i=1
respect to the rate at each pseudo-well is computed. The largest value
among these eight gradient values determines the direction in which
where Nt is the number of reservoir simulation timesteps, Nprod is the
the actual well moves to increase NPV the fastest. Specifically, the
total number of production wells, Ninj is the total number of water
injection well moves to the pseudo-well gridblock that has the largest
injection wells specified initially, ro in $/STB is the oil revenue per unit
gradient value.
volume, rw in $/STB is the water disposal cost per unit volume, qko, j and
The work by Sarma and Chen (2008) is an extension of the method k
qw, j, respectively, represent the average oil and water rates of the jth
in Handels et al. (2007) and Zandvliet et al. (2008). Sarma and Chen
producer over the kth simulation timestep, Δtk represents the size of
(2008) distribute a specified total well rate among the actual well and
the kth timestep in days, tk represents the total simulation time in
the pseudo-wells according to the position (xw, yw) of the actual well
days at the end of the kth timestep, β is an adjustment parameter, Cinj
within its gridblock. In the implementation, they used a 2D Gaussian
is the cost of drilling an injection well and b is the annual discount
distribution centered at the actual well (xw, yw) for rate distribution.
rate. In Eq. (1), qinj, i is the injection rate of the ith injection well, which
The rate assigned to each well is proportional to the integral of the
is fixed over the total simulation time, whereas qinj denotes the
Gaussian function over the area of the gridblock where the well
column vector which has qinj, i as its ith component. Note that because
resides. Therefore, the actual well is always assigned with the largest
the total water injection rate qt is fixed, there is no need to include a
portion of the total rate and then the rate of each pseudo-well
term in the NPV functional for the cost of water injection. The optimal
depends on its distance to the actual well position (xw, yw). With this
well placement problem is mathematically stated as maximizing the
approximation, the NPV or oil recovery is a continuous function of the
functional J defined in Eq. (1) subject to the constraint,
well location and the gradient-based algorithms can be then applied.
Wang et al. (2007) presented the underlying idea for the gradient-
based solution of the optimal well placement problem considered in Ninj
this paper. The supposition is that one wishes to add one or more ∑ qinj;i = qt ð2Þ
i=1
water injection wells to a 2D reservoir that contains some producing
wells. The optimization problem is initialized by putting an injection
well in every gridblock that does not have a well and constraining the where the total water injection rate, qt, is specified.
problem by specifying a maximum total injection rate that must be As stated in the introduction, the optimization problem is
allocated among the injectors remaining at each iteration of the initialized by putting a water injection well in every gridblock that
optimization algorithm. In the net present value, a drilling cost is does not have a well. Note that the first sum on the right side of Eq. (1)
assigned for each well so the greater the number of injection wells, the represents the traditional term for NPV and the second sum
greater the drilling cost. Decreasing the number of injectors decreases represents the total cost of all injection wells drilled. Also note that
the total drilling cost which by itself results in an increase in NPV but each individual term in the second sum on the right side of Eq. (1) is a
may also cause a decrease in NPV due to a decreased oil production. If differentiable function of qinj, i which decays to zero as qinj, i → 0 as long
the rate of a hypothesized injector is reduced to zero, the well is as β ≠ 0. Thus, J can be maximized using a gradient-based algorithm.
eliminated from the system. Initially, all injection wells inject at the When applying a gradient-based algorithm to maximize J, some of the
same rate which is determined by dividing the total allowable well injection rates go to zero, effectively eliminating the associated
injection rate by the number of injection wells. Then a steepest ascent terms from the sum that represents the cost of drilling the injection
algorithm is applied to adjust rates to maximize NPV over a specified wells in Eq. (1). At early iterations, one expects that the sum
reservoir lifetime. As the optimization proceeds, some well rates are representing drilling costs will dominate so that most of the increase
decreased to zero and are removed from the system. As the injection in NPV will be due to eliminating wells (setting injection rates to
rates have to be non-negative, it is a constrained optimization zero). However, at later iterations where only a few injection wells are
problem. The algorithm of Wang et al. (2007) uses a restricted step left, the first term may dominate and if this is the case, it may be
size to satisfy such constraints. It can only eliminate one injector possible to increase NPV by redistributing the total water injection
(drive the well injection rate to the bound of 0) at each step and hence rate among injection wells. Because the total rate of water injection is
is very inefficient for a large scale problem. In this paper, the fixed, there must be at least one injection well left at the end of the
constraints are ensured with a gradient projection method, which can iteration. The number of remaining injectors at the end of the
eliminate more than one injector at a time and hence make the optimization process depends on the balance between the first and
algorithm practical. Unlike the results in Wang et al. (2007), this paper second terms in the NPV of Eq. (1). As the cost of drilling a well
shows that it is possible to have more than one injector left at the end increases, the number of remaining injectors will decrease as the
of the optimization process. More generally, the number of injection second term in Eq. (1) reduces the NPV value.
wells to be drilled is not specified a priori, but is determined by the
algorithm. In addition to its computational efficiency, this is another 3. Adjoint gradient
distinct advantage our procedure has over the other references cited
above. For the well placement problem, one wishes to maximize the NPV,
J (Eq. (1)) by adjusting the control vector qinj subject to the constraints
2. Well placement problem formulation in Eq. (2). The calculation of the gradient is most efficiently done using
the adjoint method. Details on the calculation of the gradient of NPV
Given a reservoir with existing production and possibly water with respect to well controls using adjoint gradient can be found in
injection wells, the problem of determining the optimal location Brouwer and Jansen (2004) and Sarma et al. (2005) and thus are only
of new water injection wells subject to a fixed total injection rate summarized here.
(qt STB/D) is formulated as an optimization problem, which The simulator equations can be written as,
maximizes the net present value (NPV) over a specified reservoir
production lifetime. Fðx; qinj Þ = 0; ð3Þ
222 K. Zhang et al. / Journal of Petroleum Science and Engineering 73 (2010) 220–226
where x represents the vector of primary variables in the reservoir matrix of dimension M × Ninj and b = [b1, b2, ⋯, bM]T is an M-dimen-
simulator. Eq. (3) represents the discrete set of equations in the sional column vector. To maximize the NPV, J(qinj), we need to find an
reservoir simulator. uphill search direction dℓ at the ℓth iteration, i.e. we require that
To calculate the gradient of NPV, we define β using the Lagrangian
ℓ T ℓ
formulation as ðg Þ d N 0; ð14Þ
T
β = J½x; qinj + λF Fðx; qinj Þ; ð4Þ where gℓ is the gradient of J(qinj) with respect to the vector of controls
qinj, i.e.,
where λF is the adjoint vector for the flow equations. " #T
The total differential of β can be written as, ℓ ∂J ∂J ∂J ∂J ∂J
g = ; …; ; ; ; …; ; ð15Þ
∂qinj;1 ∂qinj;k−1 ∂qinj;k ∂qinj;k + 1 ∂qinj;Ninj
∂J ∂J T ∂F T ∂F qℓ
inj
dβ = dx + dq + λF dx + λF dq : ð5Þ
∂x ∂qinj inj ∂x ∂qinj inj
which is obtained through the adjoint formulation. The controls are
Eq. (5) can be rearranged as, updated as follows,
! ℓ+1 ℓ ℓ ℓ
∂J T ∂F ∂J T ∂F qinj = qinj + α d : ð16Þ
dβ = + λF dx + + λF dqinj : ð6Þ
∂x ∂x ∂qinj ∂qinj
Another requirement on the search direction dℓ is that any point
The gradient of β with respect to qinj can be calculated as along this direction satisfies the linear constraints of Eq. (13).
Assuming the linear constraints of Eq. (13) are satisfied at the ℓth
T ∂J T ∂F iteration, i.e.,
ð∇qinj βÞ = + λF ; ð7Þ
∂qinj ∂qinj
ℓ
Aqinj = b; ð17Þ
or,
!T !T we require that qℓ+1
inj also satisfies the linear constraints so that
∂J ∂F
∇qinj β = + λF ; ð8Þ ℓ+1 ℓ ℓ ℓ
∂qinj ∂qinj Aqinj = Aqinj + α Ad = b: ð18Þ
provided that λF satisfies the adjoint system of equations given by Comparing Eqs. (17) and (18), it follows that the linear constraints
can only be satisfied by requiring
∂J T ∂F
+ λF = 0: ð9Þ
∂x ∂x ℓ
Ad = 0: ð19Þ
0 ≤ qinj;i ≤ qt : ð10Þ Two types of line search methods using the projected gradient are
tested. The first method is essentially the same as the one from Wang
Here, a gradient projection method (Luenberger, 1984; Nocedal et al. (2007). In this method, the gradient is projected only onto the
and Wright, 1999) is applied to satisfy both the linear total injection total injection rate linear constraint, so A = ½1; 1; :::; 1. After gradient
rate constraint (Eq. (2)) and the above bound constraints (Eq. (10)). projection, the sum of the components of the search direction dℓ is
ℓ
equal to zero according to Eq. (19), i.e. ∑ N i = 1 di = 0. Thus, the
inj
4.1. Search direction updated injection rates (components of qℓ+1 inj ) automatically satisfy
the total injection rate constraint as long as that constraint is satisfied
The mathematical problem is to maximize the NPV, i.e. for the previous iteration (components of qℓ inj). The upper and lower
bound constraints of Eq. (10) can be satisfied by limiting the step size
max Jðqinj Þ; ð11Þ α ℓ at each iteration so that it is not larger than αmax ℓ
defined by
ℓ ℓ
subject to the following linear constraints: αmax = minðαmax;i Þ; ð21Þ
T
ai qinj = bi ; i = 1; ⋯; M; ð12Þ where
or, 8 ℓ
>
> −qinj;i
>
>
> if dℓ
i b 0;
Aqinj = b; ð13Þ < dℓi
ℓ
αmax;i = ð22Þ
>
>
where M is the number of constraints including the linear total >
>
> qt −qℓ
dℓ
inj;i
: if N 0:
injection rate and the active bound constraints, A = [a1, a2, ⋯, aM]T is a dℓ
i
i
K. Zhang et al. / Journal of Petroleum Science and Engineering 73 (2010) 220–226 223
ℓ
In the line search algorithm, αmax is used as the initial guess. If this
step size results in an increase in NPV, it is accepted. Otherwise, a new
trial step is obtained by cutting the step size in half until one finds a
step size which results in an increase in NPV. However, a standard
quadratic or cubic fit (Nocedal and Wright, 1999) can also be used in
line search. Unfortunately, the above procedure can only eliminate
one injector at a time, which makes the algorithm very inefficient if
the algorithm starts with an injector in each gridblock that is not
penetrated by a producing well, which is the initialization procedure
used here.
The following proposes an improved procedure, which allows the
deletion of more than one injector at an iteration. The procedure at
iteration ℓ + 1 is:
(1) Project the gradient g ℓ to the total injection rate constraint of
Eq. (2) to obtain a search direction d1, ℓ using Eq. (20). In this
step, only the total injection rate constraint (Eq. (2)) is active,
so A = [1, 1,..., 1] and b = qt in Eqs. (13) and (20). Fig. 1. NPV ($) contour map, Example 1.
(2) Find α1, ℓ that satisfies the conditions in Eqs. (21) and (22) to
ℓ+1
eliminate one injector, i.e. q1, inj = qℓ
inj + α
1, ℓ 1, ℓ
d puts one
wells) and the initial injection rate for each well of qt /165, our
component to its lower bound (zero injection rate for an
optimization algorithm converges to a solution with only a single
injector).
injector with a nonzero rate and it is at the center of the reservoir at
(3) Project the gradient g ℓ to the total rate constraint together with
gridblock (7, 7). Note that for an actual field case with a large
the active bound constraints to obtain search direction d2, ℓ
simulation grid system, the algorithm should be initialized by putting
using Eq. (20). For example, if the first injector is eliminated
a large number of wells at physically reasonable locations instead of
from step 2, b = [qt, 0]T and the matrix A becomes
putting a well in each gridblock. The algorithm proves to be
ð23Þ insensitive to the β values, as the same results were obtained for
1 1 ⋯1
A= : β = 10 − 10, 10 and 200. Fig. 2 shows the NPV increase as a function of
1 0 ⋯0
the iteration number for the two algorithms. With the first method, it
took about 90 iterations to converge. However, the second method
(4) Find α 2, ℓ as in step 2 to eliminate another injector, i.e.
ℓ+1 ℓ 2, ℓ 2, ℓ converges in about 10 iterations with L = 20 (i.e. up to 20 injectors can
q2,
inj = q1,
inj + α d puts one component to its lower
be deleted in an iteration). Both methods eliminated 164 injectors
bound.
during iteration and increased NPV from $ − 4 × 108 to $1.3 × 108. In
(5) Repeat steps 3 and 4 to eliminate a specified number (e.g. L) of
the first line search, there are some iterations where more than one
injectors.
ℓ+1 ℓ+1 injector was deleted because of the symmetry of the problem. The
(6) Evaluate NPV ( J) at qL,inj . If J(qL,
inj ) N J(qℓ
inj), move to the next
new algorithm with the improved line search improved the
iteration ℓ + 2. If eliminating L injectors does not yield an
ℓ+1 calculation efficiency greatly.
increase in NPV, we simply trace back to a point qk, inj and k b L
to find a point at which we have an improved NPV value. In the
5.2. Example 2
examples shown below, we have tried different values for L.
ℓ+1
Note that in the process of finding the sequence qk,
inj ,k = 1, ⋯, L −1, The second example pertains to the placement of injection wells in
we do not evaluate the NPV (J) at these points as this would require a heterogeneous reservoir under 2D, two-phase (oil–water) flow. The
running the reservoir simulator. reservoir contains two producing wells at the locations shown in Fig. 3,
which also depicts the known permeability distribution. Porosity is
5. Examples constant and equal to 0.25 throughout the reservoir. Note that the
producers are in a zone of relatively high permeability. Again we
For well placement optimization, two simple synthetic reservoir
examples are considered. For both examples, the oil price is set at 80 $/
STB and water production costs at 30 $/STB. The base cost to drill an
injection well is set equal to $800,000. In the second example, we
investigate the impact of the drilling cost.
Fig. 6. Final injector locations, Example 2. The background plot shows the permeability
Fig. 4. NPV ($) contour map, Example 2. (md) distribution.
K. Zhang et al. / Journal of Petroleum Science and Engineering 73 (2010) 220–226 225
Table 1
Injection rate (STB/D) allocation, Example 2.
value ($3 × 108), there is only one injector left for both L = 5 (Fig. 8(a))
and L = 10 (Fig. 8(b)). For both of these L values, we ended up with a
single injector at an optimal location compared to the NPV contour
map (Fig. 4).
6. Conclusions
Acknowledgement
Fig. 8. Final injector locations with high drilling cost, Example 2. The background plot
shows the permeability (md) distribution.
References
Bangerth, W., Klie, H., Wheeler, M.F., Stoffa, P.L., Sen, M.K., 2006. On optimization
algorithms for the reservoir oil well placement problem. Comput. Geosci. 10,
303–319.
Beckner, B.L., Song, X., 1995. Field development planning using simulated annealing —
optimal economic well scheduling and placement, Proceedings of the 1995 SPE
Annual Technical Conference and Exhibition. Dallas, Texas.
Bittencourt, A.C., Horne, R.N., 1997. Reservoir development and design optimization,
Proceedings of the 1997 SPE Annual Technical Conference and Exhibition. San
Antonio, Texas.
Brouwer, D.R., Jansen, J.D., 2004. Dynamic optimization of water flooding with smart
wells using optimal control theory. SPE J. 9 (4), 391–402.
Centilmen, A., Ertekin, T., Grader, A.S., 1999. Applications of neural networks in
multiwell field development, Proceedings of the 1999 SPE Annual Technical
Conference and Exhibition. Houston, Texas.
Chen, W.H., Gavalast, G.R., John, H., 1974. A New Algorithm for Automatic History
Matching. SPE J. 14 (6), 593–608.
Gao, Guohua, Reynolds, A.C., 2006. An improved implementation of the LBFGS
algorithm for automatic history matching. SPE J. 11 (1), 5–17.
Handels, M., Zandvliet, M.J., Brouwer, D.R., Jansen, J.D., 2007. Adjoint-based well-
placement optimization under production constraints, SPE–105797. SPE Reservoir
Simulation Symposium, Houston, Texas.
Kraaijevanger, J.F.B.M., Egberts, P.J.P., Valstar, J.R., Buurman, H.W., 2007. Optimal
waterflood design using the adjoint method SPE-105764. SPE Reservoir Simulation
Symposium, Houston, Texas.
Luenberger, D.G., 1984. Luenberger. Linear and Nonlinear Programming, Addison-
Wesley Publishing Company.
Li, Ruijian, Reynolds, A.C., Oliver, D.S., 2003. History matching of three-phase flow
Fig. 7. Final oil saturation distribution, Example 2. production data. SPE J. 8 (4), 328–340.
226 K. Zhang et al. / Journal of Petroleum Science and Engineering 73 (2010) 220–226
de Montleau, P., Cominelli, A., Neylong, K., Rowan, D., Pallister, I., Tesaker, O., Sarma, P., Chen, Wen H., 2008. Efficient well placement optimization with gradient-
Nygard, I., 2006. Production optimization under constraints using adjoint based algorithm and adjoint models. SPE–112257, Proceedings of the 2008 SPE
gradients. Proceedings of 10th European Conference on the Mathematics of Oil Intelligent Energy Conference and Exhibition.
Recovery. Wang, Chunhong, Li, Gaoming, Reynolds, A.C., 2007. Optimal well placement for
Nocedal, Jorge, Wright, Stephen J., 1999. Numerical Optimization. Springer. production optimization. SPE-111154, Proceedings of the 2007 SPE Eastern
Norrena, Karl P., Deutsch, Clayton V., 2002. Automatic determination of well placement Regional Meeting.
subject to geostatistical and economic constraints, Proceedings of the 2002 SPE Wu, Zhan, Reynolds, A.C., Oliver, D.S., 1999. Conditioning geostatistical models to two-
International Thermal Operations and Heavy Oil Symposium and International phase production data. SPE J. 4 (2), 142–155.
Horizontal Well Technology Conference. Calgary, Alberta, Canada. Yeten, Burak, Durlofsky, Louis J., Aziz, Khalid, 2002. Optimization of nonconventional
Ozdogan, Umut, Horne, Roland N., 2006. Optimization of well placement under time- well type, location and trajectory, Proceedings of the 2002 SPE Annual Technical
dependent uncertainty. SPE Reservoir Eval. Eng. 9, 35–145. Conference and Exhibition, San Antonio, Texas.
Sarma, P., Durlofsky, L.J., Aziz, K., 2005. Implementation of adjoint solution for optimal Zandvliet, M.J., Handels, M., van Essen, G.M., Brouwer, D.R., Jansen, J.D., 2008. Adjoint-
control of smart wells. SPE–92864, Proceedings of the SPE Reservoir Simulation based well-placement optimization under production constraints, SPE–105797.
Symposium. SPE J. 13 (4), 392–399.