Documente Academic
Documente Profesional
Documente Cultură
SPE
SocIety of PetroIelm EngIneers of AIME
©Copyright 1980, American Institute of Mining, Metallurgical, and Petroleum Engineers, Inc.
This paper was presented at the 55th Annual Fall Technical Conference and Exhibition of the Society of Petroleum Engineers of AIME, held in Dallas, Texas, September 21-24, 1980.
The material is subject to correction by the author. Permission to copy is restricted to an abstract of not more than 300 words. Write: 6200 N. Central Expwy., Dallas, Texas 75206.
The techniques developed emphasize simplicity and Several applications and examples are provided.
clarity. The governing equations, written in fully A water coning example is included to show the
implicit form are treated as functions. These coupled stability and convergence characteristics of the
nonlinear functions are solved by Newtonian iteration, Newtonian iteration. A vertical cross-section oil
th~ derivatives of the Jacobian matrix being evaluated resaturation problem with variable bubble point is
numerically. A procedure is described for the used to illustrate the pseudo solution gas
efficient evaluation of the Jacobian. formulation. The modified Crank-Nicholson method is
applied to a one-dimensional Buckley-Leverett type
A technique is presented for avoiding variable problem.
substitution in variable bubble point problems. This
is accomplished by means of a novel pseudo solution INTRODUCTION
gas formulation.
It is well known that fully implicit methods are
An. efficient method for including two-point up- remarkably stable and can tolerate much larger time
stream into fully implicit simulators, without steps than those used in explicit formulations. How-
increasing the Jacobian bandWidth, is described. The ever, fully implicit methods are not widely applied
scheme is based on a fully implicit upstream mobility in large scale numerical problems such as oil
plus an explicit correction term derived from the two- reservoir simulation. The larger matrix bandwidth
point mobility formulation. In addition a new method associated with fully implicit approach demands more
called centralized upstream is given. The new method computation effort per time step and computer core
has less truncation error then two-point upstream. and memory compared with explicit methods. Other consid-
is little more difficult to implement. erations such as time truncation error associated
with the large time step size and the difficulties in
A modified Crank-Nicholson method is described the implementation of higher order methods to reduce
for reducing the time truncation error associated with spatial truncation have also made the fully implicit
large time steps in implicit models. The modified method less attractive.
version does not exhibit the usual stability problems
associated with the Crank-Nicholson method on non- A collection of techniques for resolving these
linear problems. difficulties in fully implicit simulation is con-
tained in this paper.
A section on well models shows how a simple en-
hancement of conventional well models can be used to GENERAL CHARACTERISTICS OF NEWTONIAN ITERATION
account for the position of a well within a grid block.
It is also shown how to introduce a multib10ck well The Newton algorithm is a well known iterative
completion into an implicit simulator without des- process for the numerical solution of equations. For
troying the block-banded form of the Jacobian. or a given function
without increasing the bandwidth.
f(x) =0 (1)
the solution x is obtained by the iterative procedure
References and illustrations at end of paper.
2 TECHNIQUES FOR FULLY IMPLICIT RESERVOIR SIMULATION SPE 9302
the oil resaturation problem given in Appendix A and Pi '" initial pressure
the water coning problem given in Appendix B.
c is a number between 0 and 1, and with the above
PSEUDO SOLUTION GAS definitions the gas saturation is identically zero at
the initial bubble point. If the pressure rises
Pseuso solution gas is a technique whereby vari- above the initial bubble point pressure small nega-
able bubble point black oil problems can be handled tive gas saturations will be calculated.
without any variable substitution in the numerical
solution procedure. An example of a variable bubble point problem
using the pseudo solution gas formulation is given in
The technique involves replacing the true solu- Appendix A.
tion gas-oil ratio Rs by a pseudo solution gas-oil
ratio Rsp defined as SPATIAL TRUNCATION
R '" ~(S )'R • •• (4) Fully implicit simulators generally use sing1e-
sp g s
point upstream mobilities. Inclusion of two-point
where upstream mobilities would drastically increase the
bandwidth of the Jacobian matrix, if it were done in
R true solution gas-oil ratio assuming an a fully implicit manner. However, in many cases the
s
unlimited supply of free gas. Rs is a spatial truncation error from single-point upstream
function of pressure, but has no dis- is unacceptable. A compromise is made
continuity in slope at the bubble point.
• • • (11)
(~~~r tf:>u N
• • • (19)
Equation (19) is only first order correct in time with
truncation error
where AN is the two-point upstream value.
uu
1 aZu) - -1 /::;x 2
The slope is constrained such that the interb10ck
E
E =·/::;T (-2 ~
at 12
mobility lies between the upstream and downstream 3
2(16" at3"
a u) + •..
mobilities /::;T • •• (20)
4
• (13) 1 au ) (22)
4~+···
When using centralized upstream, in addition to the The C-N method is guaranteed to be unconditionally
constraints (12), another set of constraints is re- stable for the linear case; however, stability is not
quired on the opposite face of the upstream block. guaranteed for the nonlinear case. It is primarily
Define for this reason that the C-N method has not been ex-
(A - A ) tensively applied to reservoir simu1ation l •
AN AN trx d uu
u~ u -2· 2f).x • • • (14)
The Crank-Nicholson method can be generalized by
then the slope is constrained such that replacing the 0.5 weighting factors by a variable
factor w
N
min IAUU' Au I :s:. AU~ :s:. max IAUU' Au I (is)
/::;2u)N+1 (/::;2ul N
w (/::;X 2 + (l-w) /::;X2j • •• (23)
An example given in Appendix C showed the trunca-
tion error for centralized upstream to be slightly with the truncation error
less than for two-point upstream. No stability 1 aZu a3u l 1 2 a4 u
problems have been observed with the explicit part of EGCN = /::;T (2 atZ" - w ax2atj- 12 /::;X ~ +
the interb10ck mobility. On all the simulation runs
3 4
performed to date, centralized upstream was better 2(1 a u. w a u )
/::;T 6" at3" - 2 ~ + • • . •• (24)
than two-point upstream.
The truncation error of the generalized Crank-
TIME TRUNCATION Nicholson method reduces to that of the implicit method
when w equals 1 and to that of the C-N method when w
The standard implicit finite-difference repre- 1
sentation of the parabolic equation equals 2.
aZu au For nonlinear problems, stability can be achieved
ai2" = at • •• (16)
by increasing the value of w towards 1. The percent-
is ages of the fully implicit first order time truncation
error associated with each ware
UN+1_UN
(f).2U(+1
2
== • • • (17)
f).X f).T
4 TECHNIQUES FOR FULLY IMPLICIT RESERVOIR SIMULATION SPE 9302
In the second section, it is assumed the An expression for P can be obtained from (38)
pressure drops due to friction and inertial b
losses are negligible compared to the gravity NBW NP
head. The we1lbore pressure distribution is I: I: Tij (Pi + Head i ) - Qmb
then equal to the specific weight contribution or i=l j=l
ap NBW NP
a; = pg • • • (34) I: I: Tij
i=l j=l
where • (39)
p = SgP g + SoP o + SwPw Equation (39) has been used in various
S = we11bore gas saturation simulators. However. the efficient implementation
g of this equation in a fully implicit simulator is
S
o
= we11bore oil saturation not simple.
S we11bore water saturation
w In order to maintain the second order con-
p. = density of phase j vergence' characteristics of the Newtonian iter-
.:....J ~ ation. the flow rate for each phase in each grid
pg we11bore gradient ft
block, Q~1l, which is derived from equation (39)
The bore pressure of block i within a mu1tib10ck
completion well is should be calculated fully implicitly. There
would be contributions to the Jacobian matrix from
all blocks in the mu1tib10ck completion well.
Pi = P _lZi pgdz • •• (35) This would increase the bandwidth of the Jacobian
b
zb matrix and increase computation time. To circum-
vent this problem an approximation to
It is possible to determine p using empirical k+1
mu1tiphase flow ca1culations 5 • However for most Q has been developed which still maintains
ii
we11S~pgdZ is small over the producing zone com- nearly second order convergence in the Newtonian
iteration.
£ared to the drawdown. The assumption of constant
P introduces only minor error. Equation (35) The approximation is based on two assump-
reduces to tions. The first is that
NBW <l k
I: aP" Qii oPm = 0 • • • (40)
m=l m
• • • (36)
where This can be shown to be identically true under the
following conditions:
P = bottom hole pressure
1 oP = pk+1 _ pk .. constant for all
(1)
vertical length of we11bore in m m m
block j m=l ••••• NBW
i.e. pressure change in the well blocks
The pressure gradient along the we11bore can is uniform over a Newtonian iteration,
also be estimated 6 •
and
Rate Constrained Wells
(2) the dependence of transmissibilities on
The algorithm used to distribute a desired pressure, is negligible.
mu1tib1ock well production rate (Qmb) among the
we11bore grid blocks assumes that: The second assumption is that the total flow
from each block is constant over a Newtonian
NBW NP iteration. That is
T. (P - [lZi pg<lz])
~ j (P.1 -
I: I:
i=l j=l 1
b NP
Zb Q .. I: Q h = constant • • • (41)
or
. (37) iT i=l i.(..
k+1
NBW NP The equation for Q now becomes
ii
~b I: I: T •• (P. - (P - Head »
i=l j=l 1J 1 b i k+1
Qit
where
. (38)
Head represents the expression in square
i
brackets
NBW number of blocks along the we11bore •• (42)
NP number of phases Equation (42) has been implemented as follows.
:: ::~b::: ::::.f::,:::u::nsb:;ok(:~\~'
pressure of block i
Pi
Tij transmissibility of phase j in
block i
iT1
ar:' t
6 TECHNIQUES FOR FULLY IMPLICIT RESERVOIR SIMULATION SPE 9302
both calculated for the first n Newtonian A block iterative solution algorithm has been
iterations. For the remaining iterations the developed which encompasses two different options
total rates previously determined are used and depending on the difficulty of the problemS. The
only the phase distributions are calculated. It solution algorithm consists of an approximate factor-
was found that the calculated rates were insensi- ization followed by an acceleration technique. The
tive to the value of n. A value of 2 or 3 is different factorization options are described in
recommended. Furthermore, nearly second order reference 6. The acceleration technique is ORTHOMIN 7 •
convergence rates were obtained indicating that ORTHOMIN is a procedure which involves minimizations
the assumptions are justified. and orthogonalizations. The minimization step in
ORTHOMIN guarantees that the algorithm can never
JACOBIAN CONSTRUCTION diverge. The orthogonalizations mean that the
algorithm should terminate in a finite number of iter-
The construction of the Jacobian matrix with ations. Another advantage of this method is th4t no
numerical derivatives represents a significant portion iteration parameters are required.
of the computing time used in numerical reservoir
simulation. Consider the finite-difference equation The block iterative algorithm has proven success-
for a one-dimensional single-phase system written for ful on a wide variety of problems including steam
block i problems, in situ combustion problems, large black oil
problems, and gas resaturation problems •
.cONCLUSIONS
• (43) The techniques for fully implicit reservoir simu-
lation presented in this paper have been applied to
Each row in the Jacobian matrix includes the deriva-
the in situ combustion, steamflooding and black oil
tive of fi with respect to Pi-I' Pi and Pi +l • The simulators.
derivatives, calculated numerically, require four
function evaluations. If M blocks are used in the
The programming effort required is moderate if
grid system equation (43) and the associated PVT pro-
numerical derivatives are used. ,With proper evalua-
perties must be evaluated 4M times.
tion of the Jacobian and an efficient iterative matrix
solution technique the overhead previously associated
A more efficient method of Jacobian construction
with the fully implicit method can be greatly reduced.
is to make use of the relationship of interb10ck flow
terms for adjacent grid blocks. Consider block j New techniques have overcome the previous problems
which is adjacent to block i, associated with large time steps and spatial truncation
errors in highly implicit simulators.
N+1 N+l N+l
fj '" Tj~(Pj_l - Pj ) + Tj~(Pj+1 - Pj ) - We conclude that the fully implicit method, if
implemented properly, is an effective numerical
[(~jPj)N+1 _ (~jPj)N] _ Q~+1 (44) approach to reservoir simulation.
q - fractional well rate 5. Govier, G.W. and Aziz, K., The Flow of Complex
r - radius Mixtures in Pipes, Van Nostrand Reinhold, New
York (1972).
r - effective radius
e
r - well radius 6. Behie, A. and Vinsome, P.K.W., "Block Iterative
w Methods for Fully Implicit Reservoir Simulation,"
R - solution gas-oil ratio Paper to be presented at the SPE-AlME 55th Annual
s
R - pseudo solution gas-oil ratio Technical Conference and Exhibition, Dallas,
sp September 21-24, 1980.
S - saturation, skin
- transmissibility of phase j in block i 7. Vinsome, P .K.W., "ORTHOMIN, An Iterative Method
Tij for Solving Sparse Sets of Simultaneous Linear
t - time Equations," Paper SPE 5729 presented at the SPE-
u - dependent variable AlME Fourth Symposium of Numerical Simulation
of Reservoir Performance, Los Angeles, February
x - independent variable 19-20, 1976.
W - width
8. Blair, P.M. and Weinaug, C.F., "Solution of Two
z - depth Phase Flow Problems Using Implicit Difference
e: - small constant Equations," Trans. SPE of AlME, Vol. 246 (December
1969), 417-424 (SPEJ).
p - density
j.l - viscosity 9. Settari, A. and Aziz, K., "A Computer Model for
Two-Phase Coning Simulation," SPEJ (June 1974),
A - fluid mobility 221-236.
~ - porosity
10. Grabowski, J.W., Vinsome, P.K.W., Lin, R.C.,
~ - pseudo function Behie, A. and Rubin, B., "A Fully Implicit
w - weighting factor General Purpose Finite-Difference Thermal Model
for In Situ Combustion and Steam," Paper SPE 8396
Subscripts presented at the SPE-AlME 54th Annual Fall
Technical Conference and Exhibition, Las Vegas,
b - borehole September 1979.
2. Peaceman, D.W., "Interpretation of Well-Block As the reservoir depletes, the production rate
Pressures in Numerical Reservoir Simulation," decreases so that the total downhole production rate
of oil and gas approximately matches the injection
SPEJ (June 1978), 183-194. rate. Dead oil then sweeps through the reservoir from
3, Coats, K.H., George, W.D. and Marcum, B.E., the injector, and all the grid blocks where gas was
"Three-Dimensional Simulation of Steamflooding," evolved experience a second transition through the
SPEJ (December 1974), 573-592. (variable) bubble point. These second transitions
occur at a much lower pressure than the first.
4. Chappelear, J.E. and Williamson, A.S.,
"Representing Wells in Numerical Simulation - Using maximum saturation changes of 5% this run
Theory and Implementation," SPE paper 7697, took 60 time steps to reach 261 days, at which point
presented at the 5th SPE Symposium on Reservoir all the gas had gone back into solution. This means
Simulation, Denver, Jan. 3l-Feb. 2, 1979. that there were 94 transitions through the (variable)
8 TECHNIQUES FOR FULLY IMPLICIT RESERVOIR SIMULATION SPE 9302
bubble point in 60 time steps. Figure 3 shows the In Figure 5 the results are shown when 0.5 pore
contours of solution gas ratio after 261 days. volumes have been injected. The analytical result is
a 100% shock front at a fractional length of 0.5.
There were an average of 3.4 Newtonian iterations/ The results show that single point upstream exhibits
time step to reach a convergence tolerance of better much more numerical dispersion than the other methods
than 0.001 in saturations in every grid block. After and centralized upstream shows the least numerical
all the gas had redissolved the automatic selector dispersion.
increased the time step rapidly, and the run required
a further 5 time steps to reach 500 days. APPENDIX D
APPENDIX C
Reservoir Description
Relative Permeabilit1
(So - 0.3~ 2
k
ro 1 - 0.3
(S~ - 0.05) 2
k
rg 1 - 0.05
PVT Data
P R B E Po Pg
s 0 g
~ ~scf/stb) (bb1/s tb 2 (scf/bbl) (lb/ ft 3) (lb/ft 3 )
Well Data
o o
1
f=l c =0.41 f=l c =0.39
g g
ROW m 1 m- I m mtl
(d) centre of rectangular block (e) centre of rectangular block
llx/lly = 2 6x/6y 3/2
ROW i-I i it I
tIt
f=~
1 j
c =0.64
g
(f) corner of square
~
f=l,; c =0.56
g
(g) edge blocks half
<C
f=segment
block size
L
JACOBIAN MATRIX
INJECTOR PRODUCER
- - At • 25 days
0 Ilt • 100 days
25 t::. Settari and Aziz9
(Ilt 25 days)
20
;e
~
a:: 15
0
~
10
o~~~~--~----~----~----~----~
800 1000 1200 1400 1600 1800 2000
TIME (days)
1.0...-------r-------...-------,..-------,..--------.
Z
0
f;i 0.6
a:
::::>
I-
«
en
a: 0.4
w
I-
~
0.2
O~-----~------~------~--------~------J
o 0.2 0.4 0.6 O.B 1.0
FRACTIONAL LENGTH