Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

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

net/publication/290177449

Optimal grid coarsening: A fast proxy for large reservoir optimization

Article · January 2007

CITATIONS READS
0 158

6 authors, including:

Alexander V. Mamonov W. Bailey


University of Houston Schlumberger Limited
26 PUBLICATIONS   203 CITATIONS    90 PUBLICATIONS   927 CITATIONS   

SEE PROFILE SEE PROFILE

Michael Prange
Retired from Schlumberger-Doll Research Center
78 PUBLICATIONS   277 CITATIONS   

SEE PROFILE

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

Reduced order models for large scale wavefield simulation and imaging View project

Microseismics View project

All content following this page was uploaded by Alexander V. Mamonov on 22 December 2017.

The user has requested enhancement of the downloaded file.


SPE 111378

Optimal Grid Coarsening: A Fast Proxy for Large Reservoir Optimization


A.V. Mamonov† , B. Couët‡ , SPE, W.J. Bailey‡ , SPE, M. Prange‡ , SPE, H.A. Djikpesse‡ , SPE, V. Druskin‡

Rice University, Houston, TX ‡ Schlumberger-Doll Research, Cambridge, MA

Copyright 2007, Society of Petroleum Engineers Inc. coarsening is determined by an optimizer that preserves
This paper was prepared for presentation at the 2007 SPE/EAGE Reservoir Characterization and Simulation Con-
ference held in Abu Dhabi, U.A.E., 28–31 October 2007.
the accuracy of a predefined aggregate objective value.
This paper was selected for presentation by an SPE Program Committee following review of information contained In this work we optimize injection and production rates
in an abstract submitted by the author(s). Contents of the paper, as presented, have not been reviewed by the
Society of Petroleum Engineers and are subject to correction by the author(s). The material, as presented, does not to maximize the field oil production total (FOPT) over a
necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Papers presented
at SPE meetings are subject to publication review by Editorial Committees of the Society of Petroleum Engineers. fixed period of time. The proxy optimizer will seek the
Electronic reproduction, distribution, or storage of any part of this paper for commercial purposes without the
written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted best coarsening that preserves this objective value over a
to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspic-
uous acknowledgment of where and by whom the paper was presented. Write Librarian, SPE, P.O. Box 833836, range of injection/production rates for each well. The re-
Richardson, Texas 75083-3836 U.S.A., fax 01-972-952-9435.
sulting coarse-grid model has a similar physical behavior
in these output values to that of the fine-grid model. The
Abstract grid coarsening problem is a non-linear discrete optimiza-
tion problem, where the optimizer adjusts the grid coars-
Reservoir simulation models often require grids sufficiently
ening while preserving the fine-grid response of interest.
resolved to capture the complexities of the geological struc-
Although we focus on FOPT here, other reservoir objectives
tures present so that pressure and saturation profiles are
can also be handled.
deemed reasonable enough for decisions to be made with
confidence. However, high resolution often implies long
simulation run times, which is compounded in optimization Introduction
problems. Reservoir optimization problems usually involve Many attempts have been made to develop techniques for
localized decisions, e.g., production control for a specific reservoir model simplification by upscaling the model from
time-dependent objective function. With this tighter fo- the fine grid to a coarser grid. Most of these studies are
cus on optimization objectives, the reservoir simulator can motivated by a need to obtain a reservoir model from a
often be replaced by an approximate proxy function, e.g., highly resolved geological description (see Selley, 1998 and
decline curves, neural networks and polynomial response Carlson, 2003). A typical approach is to use some sort
surfaces. This accelerates the run time, allowing the opti- of local error analysis to determine which cells of the fine
mizer to make more calls to the simulator, but at the cost model should be merged together to form a single cell in
of simplified physics and some consequent loss of accuracy. the coarse model (King et al., 2005). The goal is usually to
Recent work in numerical solutions of partial differen- create a reservoir model that would provide the most ac-
tial equations (PDE) by Druskin and Knizhnerman (2000) curate flow description possible under certain restrictions
introduced a finite-volume optimal grid approach to im- like the total number of simulation cells.
prove solution accuracy of linear PDEs at targeted points In our work we are not interested in the most accurate
of a computational domain. This approach was applied representation of the flow parameters (pressures, satura-
to the solution of electromagnetic and acoustic forward tions, velocities) throughout the reservoir. Instead we fo-
and inverse problems arising in oil exploration and medi- cus our attention on preserving an integral objective value
cal imaging. We extend this work to non-linear PDEs by (e.g., field oil production total) to be optimized as a func-
introducing a reservoir simulator that is used as its own tion of input parameters (e.g., injection and production
proxy. We distinguish our optimal grid from an optimal rates). Since the optimizer would make numerous calls to
upscaling in that it may not preserve local features of the the reservoir model to evaluate the objective for different
model, but will preserve some aggregate objective value points in the space of input parameters, we would like our
used in production optimization. This narrow focus al- coarse model to be accurate over the values of input pa-
lows greater coarseness than a properly upscaled grid by rameters that are likely to be explored by the optimizer.
replacing the fine-grid model with a coarser grid whose We would like to build a proxy for the following general
2 Mamonov, Couët, Bailey, Prange, Djikpesse & Druskin SPE 111378

production optimization problem optimization problems, we first consider some methods of


solving the grid optimization problem Eq.2.
maximize V f (r), (1)
r∈R
Grid Optimization Problem: Formulation
where r is a vector of surface flow rates for each produc- To find a grid c∗ that is optimal in the sense of Eq.2, we
tion and injection completion, R is a set of admissible flow need to minimize the expression kV f (r) − V c (r)kr,R with
rates, and V f is an optimization objective, which usually respect to coarse grid c. The first issue we encounter is that
involves production values for one or several production of computing the norm k·kr,R . Norms on functional spaces
completions, as well as some sort of economic model to usually require knowledge about the function values at (al-
take into account variable oil price, the price of injecting most) every point. A few examples are the infinity norm
water or gas, etc. The simplest case is to take V f to be on a space of continuous functions, kV k∞ = supr∈R |V (r)|,
the field oil production total FOPT. From here on, the su- and the 2-norm on q a space of Lebesgue square-integrable
perscripted index f denotes a quantity computed on the
R
functions, kV k∞ = r∈R
|V (r)|2 dr. Since it is not possi-
fine simulation grid. ble to evaluate the objective V (r) for every possible vector
The non-linear optimization problem (Eq.1) is usually of input parameters r ∈ R, we have to define an alterna-
solved using an optimizer that successively evaluates the tive measure of coarse grid quality. As our intent is to
objective (and possibly its derivatives with respect to con- use the coarse grid model for a specific production opti-
trol parameters r) at a number of iterates rk , until a con- mization problem, we target our interest in a proxy V c (r)

vergence criterion is satisfied. The number of iterations that is accurate over the range of r values that the opti-
performed to achieve convergence usually grows with the mizer is likely to investigate. For this purpose we define
number of control parameters r. If the reservoir model is a training set T as a set of Nt vectors of flow rates rt ,
complex and each evaluation of the objective function takes t = 1, . . . , Nt , for which we want the coarse-grid produc-
a long time to compute, the overall optimization process tion objective function values V c (rt ) to match the fine-grid
may require many CPU hours to complete. production values V f (rt ).
Instead of evaluating the objective, V f (r), on a fine We can now redefine the grid optimization problem in
grid, we would prefer to make use of a coarse grid proxy terms of a discrete least-squares quality measure over a
V c (r). This proxy must be accurate enough to capture the finite set of flow rate vectors T :
objective behavior of the fine grid model. The accuracy re-
Nt  f 2
quirement can be formulated as a general grid optimization 1 X V (rt ) − V c (rt )
problem minimize . (4)
c∈C Nt t=1 V f (rt )
minimize kV f (r) − V c (r)kr,R , (2)
c∈C
To evaluate the least-squares coarse grid quality measure
where c is a parameterized coarse grid, C is the set of all for a particular grid c we need to evaluate the values of V c
admissible coarse grids, and k · kr,R is a functional norm for Nt distinct vectors of flow rates rt . This can be done
over the space of surface flow rates r ∈ R. in parallel using different instances of the reservoir simula-
If the optimizer used to solve the production optimiza- tor. The reference values V f (rt ), t = 1, . . . , Nt can also be
tion (Eq.1) requires evaluation of the derivatives ∂V /∂r, evaluated in parallel. Moreover, we only need to evaluate
the norm k · kr,R may include the derivatives of V (r) the reference values once, as long as we do not change the
as well as its value. For example, if a Newton-type training set T . A particular choice of the training set is
method is used to solve Eq.1, the norm k · kr,R might discussed later.
be the standard norm of a Hilbert space H 1 : kV kH 1 = Before we can attempt to solve Eq.4, we must parame-
1/2
|V (r)|2 dr + r∈R |V ′ (r)|2 dr
R R
r∈R
. terize the coarse grid c in some way. Following the work of
After we obtain an optimal grid c∗ as the solution to Druskin and Knizhnerman (2000), we restrict our attention
the problem Eq.2, we can approximate the solution of Eq.1 to tensor-product coarse grids. This approach is proven to
by solving work for elliptic problems with piecewise constant coeffi-

maximize V c (r). (3) cients when the discontinuities in the PDE coefficients are
r∈R
parallel to the coordinate axes. The optimal grids can be
Notice that although the coarse grid production opti- constructed in such a way that the exponential conver-
mization problem Eq.3 is cheaper to solve than Eq.1 (due gence of the Dirichlet-to-Neumann map is achieved at the

to the fact that V c is cheaper to evaluate than V f ), we interfaces, provided the grid in transversal direction is fine
must consider the additional cost of finding an optimal grid enough. If we take a tensor product of such grids, we can
c∗ in evaluating the overall optimization cost. Our goal in achieve exponential convergence at specific points of the
constructing a good proxy is to find a way to solve Eq.2 computational domain that are located at the intersection
so that the combined run time required to solve both Eq.2 of the interfaces.
and Eq.3 is substantially less than the run time needed A typical example of a production optimization objec-
to obtain a solution to Eq.1. Since we use the same op- tive V (r) would be the total oil production of a field over a
timizer to solve both the coarse- and fine-grid production fixed period of time. The objective is then just a sum of the
SPE 111378 Optimal Grid Coarsening: A Fast Proxy for Large Reservoir Optimization 3

solutions at the production completions (sinks) integrated Grid Optimization Problem: Solution Method
over the period of time being considered. If we achieve ex- We solve Eq.4 parameterized by the variables BX =
ponential convergence at the sinks for some grids, then by {BX1 , . . . , BXNXc −1 }, BY = {BY1 , . . . , BYNYc −1 } and
linearity we would have exponential convergence of the ob- BZ = {BZ1 , . . . , BZNZc −1 } using a custom-built direct
jective. It was also shown by Borcea, Druskin and Knizh- search method. The method finds the solution by per-
nerman (2005) that the same grids would work even in forming both local searches and globalization steps. The
the case of inhomogeneous media, i.e., we no longer need local search is performed by the following algorithm:
an assumption about piecewise constant equation coeffi-
cients. Note that the mentioned studies have been per- Local Search Algorithm
formed for elliptic equations only. While the equations 1. Start with an initial guess, marking all variables BX,
describing reservoir behavior have non-elliptic parts, we BY , BZ as unvisited.
assume sans proof that an analogous approach will work
for reservoir problems as well. This allows us to work with 2. Choose an unvisited variable BWn , where W is ei-
c
tensor product coarse grids, which are easily parametrized. ther X, Y or Z, and n ∈ [1, . . . , NW − 1].
3. Evaluate the grid optimization objective
When working with a coarse grid reservoir model, an Nt  f 2
important issue is one of upscaling. The upscaling facili- 1 X V (rt ) − V c (rt )
F (c) =
ties of the reservoir simulator that we use are limited to Nt t=1 V f (rt )
lumping together several whole cells of the fine grid model
into each coarse grid cell. Combining this feature with for each value of BWn in the interval [BWn−1 +
the tensor-product grid restriction we obtain the follow- 1, BWn+1 − 1], keeping all other variables fixed (here
f
ing coarse grid parameterization. Consider a fine grid of we assume BW0 = 1, BWNW c = NW − 1). Much
f
size NX × NYf × NZf cells and a coarse grid of dimen- parallelism is present in this step; the Nt simula-
sions NX × NYc × NZc . We parameterize the coarse grid
c tions corresponding to different points in the train-
c f ing set can be performed in parallel, as can the
by (NX + NYc + NZc − 3) integers, BXi ∈ [1, NX − 1],
c f c
i = 1, . . . , NX − 1, BYj ∈ [1, NY − 1], j = 1, . . . , NY − 1, (BWn+1 − BWn−1 − 2) evaluations of the grid op-
timization objective, resulting in a total of Nt ×
BZk ∈ [1, NZf − 1], k = 1, . . . , NZc − 1. Since we must
(BWn+1 − BWn−1 − 2) simulation runs than can be
place the coarse grid lines on top of the fine grid lines
parallelized.
because of whole-cell lumping, each integer describes the
fine grid coordinate lines on which we place coarse grid 4. Pick a value of BWn ∈ [BWn−1 + 1, BWn+1 − 1] that
f
lines. A fine grid of dimension NX × NYf × NZf has corresponds to the smallest grid optimization objec-
f f f
(NX + 1) + (NY + 1) + (NZ + 1) grid lines including those tive value and assign it to BWn .
on the boundary of the simulation domain. Since the grid
lines on the boundary of the simulation domain remain 5. Mark BWn as visited.
there for every coarsening, we restrict the integer param- 6. If all variables BX, BY , BZ are marked as visited
f
eters BXi , BYj and BZk to the intervals [1, NX − 1], then exit the loop, otherwise go to step 2.
f f
[1, NY − 1] and [1, NZ − 1] respectively. Notice that if
two grid-line parameters for the same coordinate direction Note that variables corresponding to the grid lines in the
are equal, this effectively reduces the number of coarse same direction (X, Y or Z) remain sorted in ascending or-
grid cells in this direction by one. Swapping two param- der. For all test cases considered in this work, one iteration
eters corresponding to one direction produces the same provided coarse grids of sufficient quality.
coarse grid. Due to these two facts we prefer to work with It is possible that one iteration of the local search may
the sorted parameters BXi < BXi+1 , BYj < BYj+1 and not be sufficient for some complex reservoir models. In
BZk < BZk+1 . this case another local search iteration can be performed,
preceded by one or more globalization steps. The global-
ization steps prevent the local search from getting stuck in
Using the above parameterization for the coarse grid c, a local minimum. We have found that a good globaliza-
the problem Eq.4 becomes a discrete optimization prob- tion strategy can be obtained using a statistical analysis
lem. Two types of methods suitable for this type of of the sensitivity of the grid optimization objective value
problem are the deterministic direct search and stochas- to changes in optimization variables. Our goal is to find
tic methods. We implemented and tested several meth- a variable for which the objective is locally insensitive so
ods including modified versions (adopted for discrete vari- that a broad search on this particular variable can be per-
ables) of differential evolution of Storn and Price (1997) formed. Since we evaluate the grid optimization objective
and downhill simplex of Nelder and Mead (1965), but F (c) for the values of the variables in the whole local search
the best results were obtained with a custom-built direct interval [BWn−1 + 1, BWn+1 − 1], we can use as a measure
search method. of sensitivity the deviation from the minimum objective
4 Mamonov, Couët, Bailey, Prange, Djikpesse & Druskin SPE 111378

value for this interval. Note that our definition of devia- Coupling Production Optimization with Coarse
tion given below is slightly different from the one used in Grid Optimization
statistics, since we measure the deviation against the min- Our ultimate objective is to find a solution to the produc-
imum value instead of the mean value. The algorithm for tion optimization problem Eq.1, which we would like to
globalization is given below: approximate with a solution to problem Eq.3. We usu-
ally solve problem Eq.1 with a composite method that
Globalization Algorithm employs both Downhill Simplex (Nelder and Mead, 1965)
and Neural Network techniques. While we would like our
1. For each variable BWn perform the following: ∗
proxy V c (r) be as accurate as possible over the iterates rk
that the production optimizer produces, we do not know
(a) Mark the variable BWn as unvisited. a priori which rk the optimizer will explore. We resolve
(b) At step 3 of the local search let Fm be a value this issue by first solving Eq.3 using a suboptimal coarsen-
of the objective F (c) corresponding to an mth ing c1 instead of the optimal c∗ . Examples of suboptimal
value of the variable BWn in the search interval coarsenings include generic coarsening, such as a uniform
[BWn−1 + 1, BWn+1 − 1], m = 1, . . . , M , where coarsening, and custom coarsening, in which an interpreter
M = BWn+1 − BWn−1 − 1 is a number of local attempts to select, by some means, a coarsening appropri-
search trials. ate for a particular reservoir model. Since the coarsened
model V c1 (r) still captures the behavior of the production
(c) Find the smallest value Fmin = min Fm .
m=1,...,M optimization objective as a function of surface flow rates
(d) Compute the deviation r, the iterates rk that the production optimizer explores
while trying to solve Eq.3 give us a good estimate of the
v !2 regions of the space of surface flow rates that the optimizer
M
u
u 1 X Fm − Fmin is going to visit while optimizing a better quality model.
σW,n =t
M m=1 Fmin We can now formulate the whole framework for solving
the production optimization problem with a coarse proxy
in the following procedure:
2. Pick an unvisited variable BWn with the smallest de-
viation and evaluate the grid optimization objective Optimization Framework
f
F (c) for all possible values of BWn ∈ [1, NW − 1]
keeping all other variables fixed. Assign to BWn the 1. Pick an initial coarsening c = c1 .
value giving the smallest objective value and mark
the variable BWn as visited. Similarly to the step 2. Solve the production optimization problem
3 of the Local Search algorithm, this step requires
f maximize V c (r)
a total of Nt × (NW − 1) simulations, which can be r∈R
performed in parallel.
and obtain the iterates rk , k = 1, . . . , K, where rK
3. If more than one globalization step is asked for, go is a solution to the optimization problem.
to step 2, otherwise exit.
3. If |V f (rK ) − V c (rK )| is sufficiently small, then exit
Since at step 2 of the globalization algorithm we allow the loop, otherwise continue.
the variable BWn to assume any value in the interval
f
[1, NW − 1], we must sort the variables after globalization 4. Use the procedure outlined in the previous section to
in order to preserve the ascending order. find an optimal coarse grid c = c∗ , using some of the
iterates from step 2 as the training set T .
The globalization procedure is expensive as it requires
numerous calls to the reservoir simulator. For a single 5. Go to step 2.
f
variable BWn we need to make Nt (NW − 1) evaluations
of the grid optimization objective. Thus, we would like to The procedure above will continue until the optimal value
use just the local search, the cost of which can be roughly of V obtained on the coarse grid is sufficiently close to the
f
estimated as 2(NX +NYf +NZf ) evaluations of the grid opti- production optimization objective evaluated for the same
mization objective if we visit each variable once. The factor flow rates on the fine grid model. As it will be shown later,
of two appears because the values investigated by neigh- the most computationally expensive step is step 4, so we
boring local search domains overlap, covering the values of would like to keep the number of iterations of the above
each dimension twice. method to a minimum. Fortunately, for all of our test
In order to make the above procedure well defined, we cases, both real and synthetic, the relative error at step 3
need a method for obtaining the training set T = {rt }N t=1 .
t
was less then 1%, which is sufficient for most engineering
Our choice of the training set provides a link between the purposes.
production optimization problem and the coarse grid op- To complete the procedure above we need to define the
timization problem, as described in the next section. choice of an initial coarse grid c1 and an algorithm for
SPE 111378 Optimal Grid Coarsening: A Fast Proxy for Large Reservoir Optimization 5

choosing the points for the training set T from the iterates cretized flow equations, so that only the size of the
rk , k = 1, . . . , K. linear system solved at every Newton iteration gov-
As an initial coarse grid c1 we use a uniform coars- erns the overall simulation time. The size of the lin-
c
ening of the fine grid. In a simple case when NX , NYc , ear system in turn is proportional to the number of
c f f f the active cells present in the model. We estimate
NZ divide NX , NY and NZ respectively, the cells of
the coarse grid are obtained by just lumping together the simulation run time of a single V (r) evaluation in
(NX f
/NX c
) × (NYf /NYc ) × (NZf /NZc ) adjacent cells of the fine terms of the number of active cells as A(NX NY NZ )α ,
grid. The grid dimensions NX c
, NYc , NZc defining the level where α is the exponent associated with the linear
of coarseness of the coarse grid are obtained from consid- solver used in the simulator and A is the proportion-
eration of computational cost. The computational cost of ality factor.
the coarse model enters the cost analysis that we will pro-
• The time required to set up the simulation model Ts
vide below and determines whether the whole coarse proxy
is the same for both fine and coarse models. This
approach provides enough speedup compared to just opti-
assumption is due to the fact that the simulator that
mizing the fine grid model V f (r). Another consideration,
we use first sets up the fine model and then does the
besides that of computational cost, is one of accuracy. For
coarsening.
a very rough coarsening the simulator may simply fail to
produce an answer. Even if the simulator does not fail, the • The total simulation run time including the model
coarse grid can still be too small to capture the behavior set up is thus A(NX NY NZ )α + Ts .
of the fine grid model. It can, therefore, be beneficial to
use an initial grid c1 that is more refined (higher values of • The parallel evaluation of the FOPT for the flow rate
NX c
, NYc and NZc ), compared to the grid optimized in step vectors in the training set has no overhead, i.e., eval-
4. uating all V (rt ) for t = 1, . . . , Nt requires the same
The choice of the training set T is related to the way amount of time on a parallel machine as evaluating
we compute the grid optimization objective. Recall that in a single case V (r).
order to compute the grid optimization objective for a par-
• The number of simulations required to solve the pro-
ticular coarse grid c we need to evaluate both the coarse
duction optimization problem nopt is the same for
grid model V c (r) and the fine grid model V f (r) for Nt
the coarse and fine model production optimization.
training vectors of surface flow rates rt . Since the training
set remains unchanged throughout the step 4 of the above We introduce the coarse- and fine-grid simulation run
f
procedure, we may evaluate the fine grid model only once. times tc = A(NX c
NYc NZc )α + Ts , tf = A(NX NYf NZf )α + Ts .
When we evaluate the coarse grid model V c (rt ), the runs Under the above assumptions we estimate the run time re-
for different flow rate vectors rt are unrelated, so we can quired for one iteration of the optimization framework as
perform all the runs simultaneously using a parallel com- follows. Step 2 requires 2nopt tc , where the factor 2 is due
puter. The choice of the size of the training set Nt then to the fact that we always perform an optimization with
is determined by the number of simulations we can afford the initial grid c1 (here we additionaly assume tc∗ = tc1 ).
to run in parallel without slowing down the whole pro- In step 4, as we mentioned before, one iteration of the lo-
f
cedure. For the test cases (discussed later) we chose the cal search method requires 2(NX + NYf + NZf ) evaluations
training points in a uniform manner from the iterates rk , of the grid optimization objective, so the run time for this
f
k = 1, . . . , K. For example if we could afford to run 10 sim- part is 2(NX + NYf + NZf )tc . We also need to evaluate
ulations in parallel, and the number of iterates produced the fine model for the flow rate vectors in the training set,
by the production optimization method is 30, we would which takes tf if we evaluate different cases in parallel.
pick every third iterate for the training set, including the The time required to do the optimization using the fine
final iterate rK . grid model only is proportional to nopt tf . The speedup of
our procedure over the fine grid production optimization
Computational Complexity is thus
Before we test the procedure described above, we perform
a brief analysis of computational complexity of the proce- nopt tf
S= h i
dure and compare it to the production optimization per- 2nopt + 2(NX + NYf + NZf ) tc + tf
f

formed using a fine model only. To make the analysis easier (5)
we make the following assumptions: nopt tf
≈ f
,
2(nopt + NX + NYf + NZf )tc
• The number of active cells in the simulation is pro-
c
portional to the total number of cells: NX NYc NZc for where we assumed that the many coarse-grid evaluations
f f f
the coarse model and NX NY NZ for the fine model. require significantly more time to compute than one fine-
grid evaluation.
• The dynamic reservoir simulation requires the same We now derive the theoretical limit on the speedup that
number of time steps and the same number of New- we could achieve within our optimization framework. Sup-
ton iterations at each time step to solve the dis- pose that the simulation run time for the coarse model
6 Mamonov, Couët, Bailey, Prange, Djikpesse & Druskin SPE 111378

is relatively small compared to the model set up time grid model. We use a uniform coarsening for step 1 of the
c
A(NX NYc NZc )α ≪ Ts , then tc ≈ Ts . We denote the fine Optimization Framework. The resulting grid is given in
f
model simulation time by A(NX NYf NZf )α = tfsim . Our Fig. 1a.
speedup estimate then becomes The production optimization in step 2 with the uni-
formly coarsened grid required 15 model evaluations, with
nopt (tfsim /Ts + 1) an average simulation time of 4.26 seconds each, totaling
Supper = f
, (6)
2(nopt + NX + NYf + NZf ) 1.06 minutes.
For step 4 of the Optimization Framework we use all
which is the theoretical upper bound indicating how good 15 iterates from step 2 to form the training set T . We
can the performance of the optimization framework can be. make one iteration of the local search to find an optimized
Notice that if the set up time is a significant part of the coarsened grid. The convergence history of the local search
total run time of the fine grid simulation (tsim
f /Ts ≈ 1), method is given in Fig. 2. The local search made a total
nopt
then Supper ≈ n +N f +N f +N f < 1, so no speedup is pos- of 355 evaluations of the grid optimization objective F (c)
opt X Y Z
sible. Only when the simulation run time dominates the with the runtime required to do so being 37.6 minutes.
model set up time (tfsim ≫ Ts ) can we expect Supper ≫ 1 The average time of evaluation of the grid optimization
and S > 1. In the following sections we present three case objective is thus 6.35 seconds. We can see that though we
studies. evaluate F OP T (rt ) in parallel for all 15 points in the train-
ing set, the evaluation of the grid optimization objective
Case Study 1: Synthetic Model is more expensive that a single simulation (6.35 seconds
As in the studies of optimal grids for other types of prob- versus 4.26 seconds). The parallel overhead is almost 50%
lems (Druskin and Knizhnerman, 2000), we begin our anal- of the simulation run time in this case. The resulting op-
ysis with a homogeneous medium case. We consider a fine timized coarse grid is given in Fig. 1b. We notice that the
rectangular grid model of size 105 × 105 × 15 cells with grid is not symmetric with respect to the injector wells on
homogeneous material properties (Fig. 1a). The perme- the corners. This is because the points in the training set
abilities in X and Y directions are equal and have the T were not symmetric in terms of injection rates and we al-
same value for all cells, and the permeability in Z direc- lowed the production optimizer to explore non-symmetric
tion is 10% of the permeabilities in X and Y directions. solutions in order to make the problem more challenging,
The model has two liquids: water and oil. Five wells are as mentioned above.
present in the model: four water injectors, located at the Finally, with our optimized coarse grid we go to step 2
corners of the grid (completed in the bottom layer) and of the optimization framework again and perform the pro-
a single producing well, located in the middle of the grid duction optimization one more time, using the solution of
(completed in the top 5 layers). The reservoir is simulated the production optimization problem that we computed
over a period of one year. All the computations for this with a uniformly coarsened grid as our initial guess of
case, and others, have been performed on a shared memory flow rates. It requires another 9 evaluations of F OP T (rk ),
parallel machine with 32 CPUs. which adds another 46.8 seconds to the total run time. The
We formulate a production optimization problem with optimal value of oil produced computed on the optimized
5 variables: the four injection rates and one production coarse grid is 1.321 × 106 stb. For the same values of flow
rate. The surface flow rates are subject to bound con- rates, the FOPT computed using a fine grid was 1.303 × 106
straints, i.e., for every variable we set the lower and upper stb. The difference is 1.3%, which is considered acceptable
bounds. Since the model is symmetric with respect to the for engineering purposes.
injectors, the solution of the optimization problem should Though the difference between the coarse and fine mod-
also possess this symmetry. However, if we just use the els for the flow rates obtained by a production optimizer
constraint that all the injection rates should be equal to is relatively low, we cannot estimate the quality of the so-
each other, the production optimizer would just set the lution itself, as we have been optimizing a coarse model so
rates to the corresponding upper bounds and the study far. Hence, the ultimate test is to perform the production
would be inconclusive. To make the problem more chal- optimization using the fine grid model for test purposes
lenging for the production optimizer we allow the injection only. The fine grid production optimization using the same
rates to assume non-equal values, but we also add a linear production optimizer took 532.4 minutes to complete, the
constraint in the form that the sum of the injection rates optimizer made 15 calls to the simulator, each call took
should be less than some prescribed quantity. Such for- 35.5 minutes (on average). The optimal FOPT value ob-
mulation makes the production optimizer explore a space tained was 1.294 × 106 stb, which is within 0.7% of the
of the injection rates in a broad fashion and thus provides optimal value obtained using the optimization framework,
a good analogy to real production optimization problems. which is an excellent accuracy. Notice that the solution
For simplicity we take the production optimization objec- obtained using the framework is slightly better than the
tive V (r) to be the field oil production total (FOPT). solution given by the production optimizer for the fine grid
As a coarse grid proxy for the production optimization model, which is due to the termination criteria of the op-
we use a 15 × 15 × 5 grid model upscaled from the fine timizer.
SPE 111378 Optimal Grid Coarsening: A Fast Proxy for Large Reservoir Optimization 7

Having established the accuracy of the solution ob- evaluations of the grid optimization objective F (c). No-
tained using our framework, we would like to compare tice that since F (c) involves evaluation of all 16 training
the computational cost to the conventional method of set vectors rt the average time per evaluation includes the
optimizing the fine grid model. The run time required parallel overhead. After we obtained the optimal grid c∗
by the framework consists of the following components: we perform step 2 with c = c∗ with an initial guess ob-
production optimization using a uniformly coarsened grid tained from the production optimization performed with
1.06 minutes, evaluation of the FOPT on the fine model c = c1 . This takes another 17 evaluations of the coarse
for the flow rates in the training set 36 minutes, coarse model. We measure the performance of the optimization
grid optimization using the local search method 37.6 min- framework against the fine grid production optimization
utes, production optimization on the optimized coarse performance, as given in the last row of Table 1. Using
grid 0.78 minutes. The total run time is 75.44 minutes. the exact same settings of the production optimizer the
The speedup over the fine grid production optimization is fine grid production optimization required 38 calls of the
532.4/75.44 ≈ 7, i.e., the production optimization using reservoir simulator with a fine grid model.
our framework is seven times faster than the conventional The total run times of the optimization framework and
approach for this case. the fine grid production optimization allow us to compute
the speedup S = 51.15/38.9 = 1.31, which is still a signifi-
Case Study 2: Gullfaks Field cant 31% speedup, but is much smaller than the speedup
Our second example is an offshore field in the North Sea. obtained for the synthetic example. For the chosen degree
The fine grid model has dimensions 34 × 58 × 19 cells, out of coarseness, the coarse model simulation time tcsim is 40%
of which 17950 are active. A total of 11 wells are present of the total simulation run time tc , with the other 60% be-
in the model: 5 water injectors and 6 producers. The field ing the set up time Ts . If we could use the simulation
is simulated over the period of four years. software more efficiently such that the set up time is elimi-
As in the previous example we take the production op- nated, each coarse simulation would become 60% cheaper.
timization objective to be the FOPT. The problem has 11 That would give us an optimization framework run time
variables, which are the surface flow rates for the wells of (5.06 + 29.7 + 2.8) × 0.4 + 1.34 = 16.36 mins. To make
present in the model. The variables are subject to bound a fair comparison we also subtract the set up time from
constraints. In addition to the bound constraints we intro- the fine grid production optimization run time, presuming
duce one linear constraint, which requires the total water that it can also be avoided. However, in the case of fine
injection rate to be below the prescribed value. grid simulation, the set up time accounts only for 5% of
The coarse proxy grid is given a size of 10 × 15 × 6 cells. total run time, resulting in an adjusted fine grid produc-
The run times for the significant steps of the optimiza- tion optimization run time of 48.59 minutes. The speedup
tion framework are summarized in the Table 1. in this case would become S = 48.59/16.36 = 2.97, a solid
197% acceleration compared to the 31% observed.
We now perform the same accuracy analysis as in the
Step Fine or Average Step
number coarse Evals time per time synthetic case. Let rc∗ be a vector of surface flow rates
(comment) (parallel) eval (sec) (min) obtained as a solution to production optimization prob-
2 (c = c1 ) coarse 31 9.8 5.06 lem using the optimization framework, and rf∗ be a so-
4 (V f (rt )) fine 1 80.4 1.34 lution to fine grid production optimization problem. By
(parallel) F OP T c (r) and F OP T f (r) we denote the objective value
4 (find c∗ ) coarse 158 11.28 29.7 V (r) = F OP T (r) computed on coarse and fine grids re-
(parallel) spectively for a particular flow rate vector r. c∗ is the
2 (c = c∗ ) coarse 17 9.8 2.8 coarse grid obtained by the local search in step 4 of the
Optimization framework run time: 38.9 optimization framework. We measure the quality of the
fine grid grid using the quantity
production fine 38 80.76 51.15

optimization |F OP T f (rc∗ ) − F OP T c (rc∗ )|
Table 1 — Gullfaks reservoir optimization Qgrid = , (7)
F OP T f (rc∗ )
run times.
which gives us the relative error of the optimal coarse grid
As follows from the table we first perform step 2 of model. The quality of the solution rc∗ itself is measured by
the optimization framework solving production optimiza- the quantity
tion problem on a uniformly coarsened grid c1 . This step
requires 31 iterations rk out of which we select 16 to form |F OP T f (rf∗ ) − F OP T f (rc∗ )|
a training set T . We then evaluate the values of V f for Qsol = , (8)
F OP T f (rf∗ )
the training set flow rates in parallel for all 16 rt , which
we count as one fine grid evaluation. We continue with which represents the relative error in the fine grid objective
step 4 by solving the grid optimization problem using one value for the solutions obtained by different approaches.
iteration of the local search algorithm, which requires 158 The values for this example are summarized in the Table 2.
8 Mamonov, Couët, Bailey, Prange, Djikpesse & Druskin SPE 111378

Quantity Value pected speedup is thus S = 735.09/137.96 = 5.32. By



F OP T c (rc∗ ) 1.560 × 108 m3 eliminating the set up times we may improve the perfor-
F OP T f (rc∗ ) 1.560 × 108 m3 mance of the framework by over 50 times for this large
f ∗
F OP T (rf ) 1.583 × 108 m3 model.
Qgrid < 0.1%
Qsol 1.4% Quantity Value
c∗ ∗
Table 2 — Gullfaks optimization F OP T (rc ) 1.437 × 108 m3
framework accuracy F OP T f (rc∗ ) 1.470 × 108 m3
f ∗
We observe an excellent grid quality and a satisfactory so- F OP T (rf ) 1.483 × 108 m3
lution accuracy of 1.4%. Qgrid 2.2%
Qsol 0.8%
Case Study 3: Offshore Field A Table 4 — Offshore Field A optimization
framework accuracy
Our final example is a detailed model of an offshore field
in the North Sea. The fine grid model has dimensions
Conclusions
60 × 147 × 76 cells, out of which over 128000 are active. A
A unified production optimization framework is developed,
total of 11 wells are present in the model: 3 water injectors
which uses a coarse-grid proxy computed for a specific ob-
and 8 producers. The field is simulated over a period of
jective. We have developed a method of finding an optimal
five years.
grid coarsening which provides a fast and accurate proxy
The optimization problem follows that in the previous
model of a certain integrated objective value. The proxy is
examples, i.e., we maximize FOPT subject to bound and
built to put more emphasis on the regions in the optimiza-
linear constraints imposed on the flow rates. We chose a
tion variable space that the production optimizer is likely
coarse proxy grid of size 10 × 23 × 12 cells. As previously
to visit. A theoretical analysis of the optimization frame-
discussed, the initial coarsening c1 can have a finer gran-
work shows the importance of simulator initialization time
ularity, and was chosen in this case to be 12 × 30 × 15
in achieving excellent speedup from this proxy-based opti-
cells. The run times are summarized in the Table 3, and
mizer. Our case studies support this theoretical analysis,
the accuracy numbers are given in Table 4. Though the
indicating that the performance of our optimization frame-
grid accuracy is not very high, which can be expected from
work can be radically improved by reducing or eliminating
such a massive coarsening, the resulting optimal value is
the simulator initialization time.
within 1% of the fine grid solution.
Step Fine or Average Step References
number coarse Evals time per time 1. Druskin, V. and Knizhnerman, L.: “Gaussian Spectral
(comment) (parallel) eval (sec) (min) Rules for Second Order Finite-Difference Schemes,” Nu-
2 (c = c1 ) coarse 28 61.50 28.7 merical Algorithms, 25, No. 1-4, September 2000, pp.
4 (V f (rt )) fine 1 1520 25.33 139-159.
(parallel)
4 (find c∗ ) coarse 426 87.23 619.33 2. Borcea, L., Druskin, V. and Knizhnerman L.: “On the
(parallel) Continuum Limit of a Discrete Inverse Spectral Problem
2 (c = c∗ ) coarse 14 62.14 14.5 on Optimal Finite Difference Grids,” Communications
on Pure and Applied Mathematics, 58, Issue 9, Febru-
Optimization framework run time: 687.86
ary 2005, pp. 1231-1279.
fine grid
production fine 30 1515.66 757.83 3. King, M. J., Burn, K. S., Wang, P., Muralidharan, V.,
optimization Alvarado, F., Ma X. and Datta-Gupta, A.: “Optimal
Table 3 — Offshore Field A reservoir optimization Coarsening of 3D Reservoir Models for Flow Simulation,”
run times. SPE 95759 presented at the SPE Annual Technical Con-
ference and Exhibition, Dallas, TX, October 9-12, 2005.
The speedup is S = 757.83/687.86 = 1.1, or just
10%. As in the previous example we estimate the possi- 4. Nelder, J. A. and Mead, R.: “A Simplex Algorithm for
ble speedup by substracting the time spent on initializing Function Minimization,” Computer Journal, 7, 1965, pp.
308-313.
the model from both fine and coarse grid run times. In
this example, where the model is very complex and the 5. Storn R. and Price K.: “Differential Evolution - A Sim-
initialization is time consuming, the influence of the set ple and Efficient Heuristic for Global Optimization over
up time on the overall performace is large. For the coarse Continuous Spaces,” Journal of Global Optimization, 11,
model only 17% of total simulation run time is spent per- No. 4, December 1997, pp. 341-359.
forming the actual simulation and 83% is spent setting up 6. Selley R.C.: “Elements of Petroleum Geology,” Second
the model. For the fine model the set up time accounts Edition, Academic Press, 1998, ISBN 0-12-636370-6, San
for 3% of the total run time. The adjusted run times are Diego, CA.
(28.7+619.33+14.5)×0.17+25.33 = 137.96 minutes for the 7. Carlson, M.: “Practical Reservoir Simulation: Using, As-
optimization framework and 757.83 × 0.97 = 735.09 min- sessing, and Developing Results,” PennWell Books, 2003,
utes for the fine grid production optimization. The ex- ISBN 0-87-814803-5, Tulsa, OK.
SPE 111378 Optimal Grid Coarsening: A Fast Proxy for Large Reservoir Optimization 9

a) b)

Figure 1 — Synthetic example 15 × 15 × 5 uniformly coarsened (a) and optimized (b) grid obtained from the 105 × 105 × 15 fine grid model.
The grid blocks are colored according to the oil saturation at the final time step of the simulation.

0
10
F(c)1/2
10% line
1% line
0.5% line

−1
10
1/2
F(c)

−2
10

−3
10
0 50 100 150 200 250 300 350 400
Number of objective evaluations

Figure 2 — Synthetic example: convergence history of the grid optimization local search method. The square root of the grid optimization
objective F (c) is plotted versus the number of evaluations.

View publication stats

You might also like