You are on page 1of 5

SPE 10495 SPE

Society of Petroleun Engineers of AIME

The Mathematical Basis of the Adaptive Implicit Method

by G.W, Thomas* and D,H. Thurnau, * Scientific Software Corporation

'Mernber SPE-AIME

Copyright 1982, Society of Petroleum Engineers


This paper was presented at the Sixth SPE Symposium on Reservoir Simulation of the Society of Petroleum :::;'8 ,,,,,,,,, of AIME held in New
Orleans, LA January 31-February 3,1982. The material is subject to correction by the author. Permission to copy restricted to an abstract of
not more than 300 words. Write SPE, 6200 North Central Expressway, Dallas, TX. 75206 USA, Telex 730989

ABSTRACT implicitness.
The adaptive implicit method enables a reservoir In Reference 1, we demonstrate the applicability
simulator to choose the degree of implicitness in a of this technique to black-oil reservoir problems,
grid block to guarantee stability. At any moment and provide some quantitative results relative to the
different grid blocks can have different degrees of savings in computer cpu times and storage require-
implicitness. As a calculation proceeds these shift ments compared to fully implicit treatments. Here we
in space and time depending on simulator-supplied provide the mathematical basis for the adaptive
criteria. The technique can be applied to any simu- implicit method. As before, we use the expression,
lation problem involving N unknowns. The advantage degree of implicitness to mean the number of unknowns
is substantial reduction in computing time and stor~ that are computed implicitly. Thus an IMPES formu-
age requirements compared to fully implicit formula- lation is first degree since only pressure is treated
tions. implicitly, while a fully implicit treatment of a
black-oil problem is third degree. In what follows,
The mathematical procedure involves labeling we consider a problem involving N unknowns where the
the implicit/explicit mix of unknowns and then com- degree of implicitness in any grid block can poten-
posing the matrix problem. The latter is reducible tially be N or less. To clarify the mathematical
as long as there is one or more unknowns to be com- development we provide an example where N = 3. How-
puted explicitly; consequently, appropriate opera- ever, we emphasize that the technique is completely
tions are performed to put it in reduced form. This general, and can be applied to simulation problems
leads to matrix equations of lower order than the involving an arbitrary number of unknowns.
original problem which are solved at less cost. We
demonstrate each step of the procedure with an ~1ATHEMATI CAL FORMULATION
example.
For illustrative purposes, consider the flow
INTRODUCTION equations (Wass balances) for M components partition-
ing among M fluid (mobile) phases,
The adaptive implicit method is a procedure
=

-G~ ~ P~l
whereby a reservoir simulator automatically selects
the level of implicitness required on a block-by- Cip p ~ V
block basis to maintain stability. These levels, or p=l P lJ p Gip 9p
degrees of implicitness, can change both in space
and time as a simulation proceeds. l Thus a collec-
a jp M
t
tion of grid blocks will have wide variations in
implicitness levels throughout, depending upon how
rapidly the dependent variables locally change in
= at r L (C ip Pp Sp),
p=l
space and time. Unlike other approaches,2-6 which
supply a fixed level of implicitness in every grid i=1,2, ... ,M (1)
block at every time step, the adaptive implicit
method involves treating mixed levels of implicitness
which change automatically. The advantage one (By specializing the mass fractions, Cip' one can
accrues is unconditional stability at a fraction of readily deduce from Eqs. (1) the equations for a com-
the computer processing and storage costs associated positional model and a blaCk-oil model. 7) The
with fully implicit methods. 1 Moreover, there is no implicit finite difference approximation of Eqs. (1)
overkill/underkill problem with this technique as
there is with simulators offering fixed levels of References and illustrations at end of paper.

69
THE MATHEMATICAL BASIS OF THE ADAPTIVE IMPLICIT METHOD SPE 10495

is*
The choice of which unknowns in X are implicit
or explicit is largely determined by which variables
change most rapidly in the space-time continuum. 1
For example, if xl' X2' X5 and Xg undergo a surge in
block ,then OXl ' ,oX6 and would
normally be identified as implicit within that block
while the remainder are treated explicitly. An impor-
tant feature of the adaptive implicit method is that
1, 2, ... , M - (2) the final matrix problem [Eq. (4)J is composed only
after the labeling of the implicit/explicit mix of
variables is taken into account. Ultimately, A is put
where Tp T k rp / wp , the transmissibility of phase in reducible form by performing operations equivalent
to finding a permutation matrix P such that
p with T its time-invariant factor and Gp ~ 9p Vb .
The operator ~ is a second order correct spatial
finite difference operator and 6 denotes a change (5)
.
over a t lme s t ep, l.e.
. -oy:;;; y n+ 1 - y n ASSOCla
. t ed
with Eqs. (2) are a sufficient number of auxiliary
relationships and/or constraints to yield a well- '0
determined system. These auxiliary relationships are Here All is a diagonal submatrix consisting of
usually employed to reduce the total number of modified coefficients of the explicit variables, while
unknowns. We assume this is done, and we are left '0 rIJ

with a total of N unknowns to be determined in each A12 and A22 are submatrices consisting of modified
active grid block. We denote these remaining vari- coefficients of the implicit variables. The order of
ables as Xl' x2' ... , XN some of which are computed '0
A22 is equal to the total number of implicit vari-
implicitly. the others explicitly.
ables. By partitioning X and R similarly to PAp T ,
Most often the algebraic problem posed by the matrix problem becomes
Eqs. (2) is written in reBidual in which the
solution vector consists of changes in the unknowns
over an iteration. For example, let the operator 0 (6)
represent a change from iteration level k to k+l, i.e.
oy = y
k+l y k where -oy ~ y k+l - y n y k + oy - y n
(7)
After some rather extensive algebraic manipulations,
Eqs. (2) can be reduced to the matri x form
TX + OX ex + R (3) The solution of Eq. (7) for the implicit partition
X2 consumes the most computer time; nevertheless it
or simply is significantly less than that where every unknown
is implicit and Eq. (4) is solved. Furthermore,
AX :; ; R (4) Gaussian elimination becomes economically possible
for much larger grids than in the fully implicit
where A: T + D - e and is Nth order. Here T is approach. The solution of Eq. (6) for the explicit
a transmissibility matrix containing darcian inter- partition Xl consumes essentially no more time than a
blOCk flow.terms, 0 is a matrix of coefficients back-solution in Gaussian elimination. Moreover,
arising from implicit treatment of source/sink terms storage is conserved since Eqs. (6) and (7) are
and e is an accumulation matrix resulting from independent matrix equations of lower order than
expanding the right-hand sides of Eqs. (2). R is a Eq. (4). Since the total number of implicit variables
vector containing the kth iteration level residuals is subject to change from iteration to iteration (or
and time step to time step), the order of A22 is not
fixed, but rather is permitted to change dynamically.
GENERATION OF THE REDUCED MATRIX PROBLEM
We now give in detail the operations performed
to get the reduced problem depicted by Eqs. (6) and
(7) and illustrate the procedure with an example.
The transmissibility matrix contains the inter-
block transmissibilities which are typically expanded
the solution vector for m active grid blocks. in terms of the unknowns affecting them. For example,
if a transmiss.ibility, Tp say, is functionally depen-
dent on a 11 the unknowns, xl' X2' ... , xN ' then we
*A nomenclature of variables is appended.

70
SPE 10495 G.H. Thomas & D.H. Thurnau 3
typically approximate its value at the (n+l)st requiring high levels of implicitness is a small frac-
time level by tion of the total. Moreover, there are significant
periods of time when lower levels are adequate. The
adaptive implicit approach capitalizes on such situa-
1n+ 1 (8) tions, and supplies the requisite level of implicit-
P ness to maintain stability. Examples of the savings
in computing times and storage compared to fully im-
plicit methods are provided in Reference 1.
If any value of OX i ' 1, 2, ... , N ;s suffi-
ciently small, then its effect on Tnp+I can be If the degree of implicitness in each active grid
block is one and the implicit variable is pressure,
ignored, i.e. its corresponding partial derivative then the technique becomes identical to the IMPES
is set to zero. The unknown, Xi ' ;s then regarded method. This constitutes the degenerate case since
as an explicit variable. Thus, once the simulator one would never opt for fully explicit calculations.
has labeled certain unknowns as explicit variables. Thus the adaptive implicit method can be viewed as one
their corresponding coefficients in the transmissi- which offers continuity in the degrees of implicitness
bility matrix are set to zero.* Thereafter the mat- ranging from the degenerate case to a fully implicit
rix A is composed by combining T with 0 and C. Mat- approach.
rix A has a block-banded structure with each block an
N x N submatrix corresponding to an active grid cell. In implementing the adaptive implicit method, one
Gauss-Jordan reduction is performed on the submatri- does not need to literally program the formal matrix
ces along the main diagonal to reduce them to dia- manipulations discussed earlier. However, the same
gonal submatrices. Finally, matched row and column numerical operations must take place. It is possible
interchanges are carried out to get the final re- to build efficient code that combines some of the for-
duced form of Eqs. (6) and (7). mal steps while taking advantage of the sparsity of
the matrices involved. The programming effort is
To illustrate, consider the 3 x 2 system of grid somewhat more complex; however, the advantages of the
blocks depicted in Figure 1. We assume N 3 and adaptive implicit method are not diminished by imple-
normal grid ordering. The unknowns shown in the fig- mentation complexities.
ure with the parentheses are the explicit variables
while the remaining ones are implicit. The structure NOMENCLATURE
of the transmissibility matrix corresponding to this
problem is shown in Figure 2. The XiS represent non- Enqlish
zeros** while the letter "e" designates. those columns
that have b-een zeroed corresponding to the explicit A A coefficient matrix
unkhowns. The structure of the composed matrix, A, C Accumulation matrix
is shown in Figure 3. Observe that by adding the
matrix 0 - C to T. we get 3 x 3 nonzero submatrices Cip Mass fraction of component i in phase p
(blocks) along the main diagonal. These are dia- o Coefficient matrix of well terms
gonalized to yield the matrix problem whose structure
is shown in Figure 4. Notice that the columns desig- Gp Mass rate of phase p
nated by lIe" have only one nonzero element. Appro- 'V
Mass rate per unit volume of phase p
priate row and column interchanges are then employed :p
to arrive at the reduced problem in Figure 5. k Permeability tensor
CONCLUDING REMARKS krp Relative permeability of phase p
M Total number of components
A few brief remarks are in order regarding other
approaches that entail fixed levels of implicitness. M Total number of mobile phases
First, as long as one is not committed to fully P A permutation matrix
implicit calculations, then the coefficient matrix in
Eq. (4) will always be reducible, i.e. one is guar- R Res i dua 1 vector
anteed that the directed graph of A is not connected.' Saturation of phase p
Once one elects a fully implicit approach, he is com- Sp
mitted to an irreducible matrix problem entailing T Transmissibility matrix
more storage and computer costs. In our experience
to date, we have not found such a commitment neces Tp Transmissibility of phase p
sary. Frequently. the number of grid blocks
t Time
*For simplicity, we speak of setting coefficients to Vb Bulk volume of a grid block
zero. In practice, this is not literally done.
Instead the nonzero coefficients making up the X Solution vector
transmissibility matrix are not computed for the
unknowns carryin9 explicit labels. The holes
created by their absence are filled with machine-
supolied zeros. 6. Spatial difference operator
8 Change over an iteration
**Some" of these could be zero elements if a particu-
lar phase becomes immobile. a Change over a time step

71
4 THE MATHEMATICAL BASIS OF THE ADAPTIVE IMPLICIT METHOD SPE 10495

IIp Viscosity of phase p 2 3

Pp Density of phase p oXIl oX12 oX13

T Time-invariant factor of transmissibility (ox2d (OX22 ) (OX23)


~p Potential of phase p
( cSx 3d oX 32 ( 8X 33)
Porosity
oX14 oX 1 5 oXUi
Mathematical Symbols
2 oX24 oX25 ( 6X 26)
v Del or nabla operator
( 6X 34) oX35 ( 8X 3d
v ( ) Divergence of ( )
d
8f Partial derivative with respect to t Fi g. 1: Examp 1e Prob 1em
~t A time increment
L Summation symbol
Is defined by ... ee e ee e ee
~------r-----~-------r------,-------r---
'x IX x'I 'x X
- ~
, I 1

:x
I
:x
I
X:
I
:x
1
X
IX IX X, 'X X I I
1- - - ... - ,.. - - ... - ... ... - .... - - ...... - - ,.. - - - - - .... ... t' - ... - ....,

1. Thomas, G.W. and Thurnau, D.H.: "Reservoir Simu- :x


I
:x
I
x:x' I
XXX:
I
lation Using an Adaptive Implicit Method", :x ,X
I X ' X : X X X:
SPE 10120, 56 th Annual Fall Technical Conference
I
I I X X I X I

-----~--- ------1'----- --f ...... -- . . -:


and Exhibition, 5-7 October, 1981, San Antonio, : X x : x :x :
Texas. I
I X X , X
I
: X :
' I I I
I X X X II I IX I I

2. Coats, K.H.: "A Hi~hly Implicit Steamflood Model", I-----r-------~-~----~------~-------r------~


I
IX
I I
I
I I I
,X X IX X X I I
Soc. Pet. Eng. J. lOctober, 1978), 369. I I I I

:x ;x X : x X X:
:_x_ ____ ~ ...... __ _ X X I

3. Coats, K.H.: "An Equation of State Compositional I


I
-1- ... - - - - -
: X
i - ... - -
X I
- .',
Model", SPE 8284, 54th Annual Technical Confer- :x X : : X X ,X X X X I

ence and Exhibition, 23-26 September, 1979, Las :x X : : X X :x X X I X

Vegas, Nevada. , I
'X X
I
I
I
IX X
,
'X X XIX
I
1- __
, ,
""'--_
I
... _-""'"
I
'x X x, X I

4. Bansal, P.P., Harper, J.L., McDonald, A.E., I


: X X X: X
I

Moreland, E.E., Odeh, A.S. and Trimble, R.H.: ~~


I X X
_____ x'
~_L
X _____
_ ~
'
"A Strongly Coupled, Fully Implicit, Three
Dimensional, Three Phase Reservoir Simulator",
SPE 8329, 54 th Annual Technical Conference and
Exhibition, 23-26 September, 1979, Las Vegas, Fig. 2: Transmissibility Matrix
Nevada. with Zeroed Columns
5. Spillette, A.G., Hillestad, J.G. and Stone, H.L.:
"A High-Stability Sequential Solution Approach to e e e e e e e e
l-----~-----l-----~-----~-----~-----
Reservoir Simulation", SPE 4542, 48 th Annual :x x x:x x: :x x : :
Technical Meeting, 30 September - 3 October, 1973, :x x x:x x: :x x : : I
Las Vegas, Nevada. J~-~-~J~ ___ ~J _____ J~_~ __ J _____ J_____ J
:x :x x x:x : :x x x : :
6. MacDonald, R.C. and Coats, K.H.: "Methods for :x :x x x:x : :x x x : :
Numeri ca 1 Simul at; on of Water and Gas Coni ng
II ,
J~----J~-~-~J~ ____ J_____ J~_~_~J _____ J
Trans. AH1E (1970) 249, 425. : :x x:x x x: : :x :
: :x x:x x x: : :x :
7. Thomas, G.W.: "Principles of Hydrocarbon J_____ J~ ___ ~J~_~_~J _____ J_____ JC ____ J
Reservoir Simulation, International Human Re- :x : : :x x x:x x x : :
sources Development Corporation, Boston (1981). :x : : :x x x:x x x : :
J~____ J_____ J_____ J~_~_~J~_~_~J _____ J
: :x x : :x x :x x x :x :
: :x x : :x x :x x x :x :
J_____ J~ ___ ~J _____ J~_~ __ J~_~_~_~ ____ J
: : :x : :x x x :x x x:
: : :x : :x x x :x x x:
J_____ J_____ J~ ____ J_____ J~_~_~_~_~_~J

Fig. 3: Composed Matrix, A

72
SPE 10495 G.W. Thomas &D.H. Thurnau 5

-___ ___ _____ _____ !:l _________


~_ ~ ~ ~_~ EE._~_

- - -
lx x: :x x oXll Rll
x ,,ix x:, ,,Ix x oXZl RZI
,
-..,'x
-- ............ X x,.,.- ... - "1""'-,.'x...... ---
--_ ...... x ,T- - ,
- --.,._ ... - .... - -
oX31 R31
x Ix
I
lx
I
:I :x
,
x x:I 6x12 R12
X :
I
:x
I
:
1
:x
I
x xlI oxzz R22
X : xix: ixxx:
- - - ... --.,._ ... _ ...... .,. ........... - 'T'" - .... _ - , . ... - - - - T- - - .... _- CX32 R32
I I I I I
'x X 1'x
I ,
, ,
I
'x
I
oX13 R13
, I , j I
IX
I
XI ,
X I
[
,
I
'x
I oXz 3 RZ3
I I I I I

-... ----~~ ---~~ -- -~~4-- -- 100;-- - ~-~ ~-----


I J I I 1
6X33 R33
X ,
j
I
t I l
'X 'x X x,I OX14 R14
I t I I I
X , 1 1 IX X X, OXZ4 RZ4
I 1 I I 1
, I I I I
X
I
1
1
I
I
I
- - - - ... - ... ~ ----"" - - --"'!""t - - - - ....
I
+-----x'...I - . . ----
X'X X oX34 R34
'X
I
XI1 'xx
,
IX
1
'X
I oX 15 Rl S
1 1 I 1 I
IX
I
x'I 'X x 'I
I ,
'X Oxzs Rzs
I I i I I
IX XI 'xx, XIX
--- -- .......... _--- +-- - ... - .... - --- -. --- - -+ .... - - --- oX35 R3S
, t I I I
I
I
IX
I
,
I
'x
I
x'I X 6X16 RH;
I I 1 I 1
, IX , IX X XI X 6XZ6 R26
I I I I I
I I I I I

----- -~ ---- -~~ ----~- ----!:- ~ -~!----~- CX36 R36


f- -1 '- -
Fig. 4: Matrix Problem After
Gauss-Jordan Reduction
on the Diagonal Blocks

-eeeeeeee - .... - - -
,
...... - - ........... - - - - - - - - ... -1'" ... _-._ ... - .... - - - - - - - ............. _ - -

xx
x 'x X X R21
x
:
:x x X x x R31
I
x ,x x xx R22
I

x : x x X OX23 R23
I
, X X OX33 R33
:
:x x x x CX34 R34
:, aXZ6 R2 &
xl x
- .... --- ---- -- -- --- - i --- -_ .......... ---- ... _ ....... --_ ... -
xx x ,5X 3S R 36
'xxx
I
xx 8Xl1 Rll
I
:x x xxx oX 12 R11

o
:x x x x x x OX32
I
I x 6X13 R13
,
I

,:X
x xx x oXl4 R14
:x
I
xxxx aX24 R24
: xx xxx CX15 R1S
1
: x x X x x 6X2S R2S
t
: xx xx xx OX35 R35
I
,
... _ ... _ ....... ___________ J.. ___________ ...... ______ _ X X X X X 6X16 R16
- ..... - "-

Fig. 5: Reduced Matrix Problem

73

You might also like