You are on page 1of 8

SPE 79692

A New Formulation for the Implicit Compositional Simulation of


Miscible Gas Injection Processes
Garf Bowen, Paul Crumpton, Schlumberger

Copyright 2003, Society of Petroleum Engineers Inc.


Time Discretisation in Compositional models
This paper was prepared for presentation at the SPE Reservoir Simulation Symposium held in For much of the history of reservoir simulation there has been
Houston, Texas, U.S.A., 3–5 February 2003.
a discussion around the time discretisation used in finite
This paper was selected for presentation by an SPE Program Committee following review of
information contained in an abstract submitted by the author(s). Contents of the paper, as
difference simulators. While the pressure equation is almost
presented, have not been reviewed by the Society of Petroleum Engineers and are subject to always solved implicitly, the saturation or compositional
correction by the author(s). The material, as presented, does not necessarily reflect any
position of the Society of Petroleum Engineers, its officers, or members. Papers presented at component equations can be treated either explicitly or
SPE meetings are subject to publication review by Editorial Committees of the Society of
Petroleum Engineers. Electronic reproduction, distribution, or storage of any part of this paper
implicitly. The explicit or IMPES (implicit pressure explicit
for commercial purposes without the written consent of the Society of Petroleum Engineers is saturation) technique leads to a relatively fast solution of a
prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300
words; illustrations may not be copied. The abstract must contain conspicuous time step but stability constraints limit the time step size. In
acknowledgment of where and by whom the paper was presented. Write Librarian, SPE, P.O.
Box 833836, Richardson, TX 75083-3836, U.S.A., fax 01-972-952-9435.
production simulators this time step constraint can lead to a
lack of robustness as small differences in variables due to the
smaller time step may result in significantly different time step
Abstract histories. An alternative to IMPES is a fully implicit scheme
Compositional simulation is an important tool in gas injections which results in larger time step sizes being stable at the
studies. Often the aim of a gas injection project is to enhance expense of a significantly increased cost to solve a time step.
the sweep efficiency by generating miscible displacement,
either by utilizing a first contact or multiple-contact process. In black oil simulation the trend has been towards the use
The compositional simulator is the only tool available to of implicit schemes for most applications. The trade-off is
quantitatively study this behavior in a field setting. that the implicit solution of the three black oil conservation
equations is not prohibitively expensive when set against the
The paper introduces the concept of treating a single-phase increased robustness and sometimes speed gain of the solution
hydrocarbon as a separate distinct phase. This has the effect technique. Once we consider compositional cases, the storage
of reducing discretisation non-linearities in single-phase required for an implicit scheme grows as the square of the
regions and allowing an implicit solution to converge number of components and the work required as the cube. In
efficiently. A number of small illustrative models will be used practice modern cache based computers tend to hide the cubic
to demonstrate the technique, where the effect of varying behavior. However, if we’re interested in ten or twelve
degrees of implicitness will be reported, these being fully component fluid descriptions then the implicit scheme is
implicit, IMPES and AIM. In several of the example cases the prohibitively expensive. Even with fewer components the
standard implicit solutions are shown to fail entirely. The technique is intolerant of small changes to the fluid description
CPU advantage of the reduced non-linearity will be illustrated involving extra components.
using a field scale example solved with an adaptive
implicit method. To try and gain the advantages of an implicit scheme in
compositional modeling, the industry has moved towards
Introduction adaptive implicit schemes (AIM) where only selective cells
There is an increasing trend towards a higher degree of that need to be are solved implicitly, while the rest are solved
implicitness in compositional studies. This can be using an IMPES type method. A number of authors1 have
accomplished either by utilizing a fully implicit formulation, shown that these schemes are unlikely to lead to a significant
where explicit methods are not applicable such as in dual improvement in performance. However, they do hold out the
porosity cases, or alternatively by using an adaptive implicit promise of improved robustness in production codes.
scheme to allow increased time step lengths and to improve
robustness. Non-linearities associated with the transition from Adaptive implicit schemes throw a heavy burden on the
a heavy hydrocarbon (oil like) to a light hydrocarbon (gas like) programmer, both to realize the potential memory efficiency
state without passing through the two-phase region are and because for an AIM run to work well the code must
examined in this paper. This can be thought of as a first effectively run both IMPES and Implicit cases. The time step
contact miscible process or as part of a multi-contact selection and implicit cell selection must keep the explicit
miscible displacement. model stable, while the non-linear solver must be able to
2 SPE 79692

converge out the implicit cells. There is little point in making cell j. For any implicit solution method the derivatives of this
cells implicit if the poor convergence leads to longer run times flux need to be accounted for in the Jacobian. For good
than the corresponding IMPES solution. convergence it is essential that these terms do not oscillate. If
an arbitrary phase is associated with a single-phase
Convergence of any implicit formulation is intolerant to hydrocarbon cell which can flip phase due to small pressure or
discontinuities. In this paper the discontinuities that arise from compositional change, then this should not cause
arbitrary phase labeling of super-critical fluids are addressed, discontinuities in the flux, as, physically, all fluid properties
which enables implicit treatment of the miscible process. In are “smooth” in this region.
this paper the numerical discontinuities are matched to the
physical ones, i.e. at phase boundaries. The mobility term
The mobility term λc+,α in the dicretisation used here is a cell-
The continuous oil-gas transition
Many authors have described a compositional model based on centre quantity, and the value is associated from the upwind
a cubic equation of state2,3. Here we assume that the standard cell. The upwind cell for a particular phase is determined
2 phase flash calculations and the single-phase stability test from the sign of the velocity of phase α , i.e. vij ,α in equation
are available. The focus is on those features of a compositional (2). In the formulation used here, for cell i and phase α , it is
fluid description that can have an adverse effect on
given by
convergence of the flow equations.

A fundamental difference between an equation of state Kkα


λc ,α ,i = xc ,α ,i bc ,i (3)
model and a black-oil fluid description is that a vapor phase µα
can seamlessly change into a liquid phase without an
intermediate 2-phase transition. Typically we illustrate this Consider now the effects of an arbitrary flip of phase for a
idea by considering a ternary diagram, Figure 2, with an single-phase hydrocarbon cell. The molar phase density
injection fluid that would be considered a gas, in an oil
reservoir. In this case first contact miscibility will be achieved xc ,α ,i bc ,i will be re-labeled but retain the same value and
and all the mixtures between injected and reservoir fluids are derivatives. That is, the molar density bc ,i is invariant to
“single-phase”. The transition from a gas-like fluid to an oil-
like fluid is continuous. This is in contrast to multi-contact phase, and since the state is a single-phase
miscibility conditions where fluids will separate into 2-phases, hydrocarbon, x c ,α ,i = 1, ∀c .
each having different fluid properties. As fluids pass from
single to multi-phase conditions, discontinuities exist as the
phases separate. The viscosity term in equation (3), µα , is evaluated
from a correlation which is a function of pressure, temperature
The conservation equations and composition6,7. Consequently if a 100% oil cell is re-
The component conservation equations can be written. labeled 100% gas, the value and derivatives remain the same.
∂M The problematic terms when considering a phase in equation
c
+ ∇ .F c = Q c (1) (3) are the relative permeabilities kα . These are derived from
∂t
for all components c. The primary variables used here are user-defined tables. For the purpose of the analysis here,
molar densities and are well documented in the literature2,4. consider a single-phase hydrocarbon water system. The
All the approaches described here can be easily generalized to characteristics of oil-in-water k row and gas-in-water
deal with other variable sets3. Calculation of the mass term is
unambiguous to phase and is not described here. In addition k rg curves can be very different, so re-labeling can have
the well terms are not described. The main focus of the adverse effects on the mobility term.
following derivation is the flow terms where the degree of
implicitness in the formulation is critical. Details of the finite To estimate the phase of a single-phase hydrocarbon, the
volume discretisation are also not described here4,5. correlation of Li8 is used to approximate the critical
temperature of a mixture. With this temperature the “phase”
In order to analyze the non-linearities, consider the
definition of the discrete flux between two cells i and j as seen can be labeled. That is, define ω = Tcrit . Then
Tres
in Figure 1. The flux for component c is given by
Fc ,ij = ∑ Ti , j λ+c ,α vij ,α (2)
ω > 1 implies oil like and ω < 1 implies gas like
phases. This correlation has the advantage of being easy and
∀α
cheap to calculate, which is important as we need to estimate
Conventionally α can be oil, gas and water. Here a fourth
the critical temperature for all cells and at all non-linear
“hydrocarbon” phase is introduced which represents all single-
phase hydrocarbon cells. iterations of the simulator. To enforce continuity of kα as the
composition moves from oil-to-gas, a simple interpolation
For single-phase hydrocarbon cells i and j in Figure 1, parameter ϖ is introduced where
consider the effects of arbitrarily re-labeling the phase of one
SPE 79692 3

Potential difference terms


kα = ϖ k row ( S ) + (1 − ϖ )k rg ( S
* *
) (4) The potential difference across the interface of cells i and j for
oil gas
a phase α is given by
where
1 for ω > ω oil vij ,α = (∆Pij + ∆Pc ,ij ,α + ρ α ,ij g∆z ij ) (5)
 ω −ω

ϖ = for ω gas < ω < ω oil
gas
(5) Each term will be discussed below. Firstly, consider the
 ω oil − ω gas gravity density term. Clearly g∆zij is fixed on the grid and
0 for ω < ω gas independent of phase. However, the mass density term is a
function of phase. The first question is what happens if
Most importantly, in equation (4) the interpolation is adjoining cells have a phase missing.
* *
performed using saturations S gas and S oil that have been end - In a black-oil model, if phase α is oil or gas we can
point scaled. take ρα , ij = 1 / 2( ρα ,i + ρα , j ) , which is a reasonable
The critical endpoints used for the evaluation of relative
permeability are interpolated usingϖ , as can be seen in assumption because we know a good estimate of the density of
a fluid, even if the fluid is absent, via table look-up. In a
Figure 3. The critical “hydrocarbon” relative permiacility is
compositional model this is not the case. One solution is to
k rhc = ϖ .S owc + (1 − ϖ ).S gc use saturation weighting,
( S α ,i ρ α ,i + ρ α , j S α , j )
This end-point scaling is required to prevent over- ρ α ,ij = . (6)
estimation of recovery during water flooding of a near critical ( S α ,i + S α , j )
single phase oil.
This leads to no contribution from cells where a phase is
For example, consider the relative permeability curves in absent. While solving the problem of absent phases, this
Figure 3 and an “oil-like” fluid with ϖ close to, but less than discretisation does lead to discontinuities of a single phase re-
1. Then without end-point scaling, the relative permeability at labeling. Suppose in Figure 1 cells i and j are labeled as 100%
low saturations will include a contribution from the k rg term, oil ( S oil ,i = S oil , j = 1 ). Then the gravity contribution to the
making the kα non-zero. Hence the effective critical endpoint oil potential difference is:

of kα will be close to the gas critical, k rgc . Thus a water ( S oil ,i ρ oil ,i + ρ oil , j S oil , j ) ( ρ oil ,i + ρ oil , j )
flood of a near critical oil will overestimate the recovery. = (7)
End-point scaling will prevent this. ( S oil ,i + S oil , j ) 2

To ensure consistency between the single and 2-phase If cell j was re-labeled as a gas and we assume the flow is
hydrocarbon states, this interpolation is also performed in the from cell i to cell j, then oil will flow from cell i to cell j due to
2-phase region. Here, this interpolation will only take effect up-winding of the mobility. However the gravity contribution
as the fluid approaches the approximated critical point. to the oil potential difference reduces to ρ oil,i as S oil , j = 0 .

A single-phase hydrocarbon cell will be re-labeled when Now if the densities of the fluids in cell i and cell j are
ϖ passes through ½, and so from equation (4) the relative significantly different this will result in a step change in the oil
permeability will be continuous there. The difficulties with potential difference leading, in turn, to a discontinuity in
the flow.
this approach are choice of the limits ωoil and ω gas and the
calculation of derivatives of kα ,which now involves end-point For the IMPES case, this discontinuity is unlikely to have
any effect on the convergence behavior because, for a given
scaling, andϖ which is a function of saturation. time-step, the phase labeling will be fixed. However, for an
implicit flux term arising from either a fully implicit or AIM
Having established this model the mobility term in a run, this type of discontinuity in the flux may cause severe
single-phase hydrocarbon cell, equation (3), is continuous to convergence difficulties as Newton-Raphson based solvers
phase re-labeling. Indeed the mobility terms in single-phase typically can’t deal with a discontinuous residual.
hydrocarbon cells are not associated with oil or gas but with
hydrocarbon. The crux of the work done here is to treat these At this point let’s re-visit equation (2) and consider the
cells as single-phase hydrocarbon, not as oil or gas. This is sum over all phases α to include oil, gas, water, and
implemented as a 4th phase. hydrocarbon. The mobility calculation in equation (4)
essentially calculates the “hydrocarbon” mobility. An
evaluation of density for the gravity terms in the velocity
calculation, equation (6), is now invariant to sudden phase
4 SPE 79692

changes since S α ,i = S h ,i , the saturation of hydrocarbon. straddling a dew or bubble line. The phase labeling problem
here cannot be ignored, and again the correlation of Li8 is used
Hence treating the single-phase hydrocarbon as a separate to estimate a critical temperature of the single-phase cell j
phase entirely removes this discontinuity from from which a phase choice can be made. Consequently the
single-phase flows. phase labeling of single-phase hydrocarbon cells is only
important in the calculation of those potential differences
The non-linearity in the gravity density terms of the flux straddling the single-phase to two-phase cells (i.e. the
are now at the boundaries between cells which have a different simulator must decide between a dew and bubble line).
number of phases, which has physical justification. And
rather than leading to a discontinuity in the flows, a change This need for labeling the single-phase hydrocarbon cells
from one phase to two will be continuous with a change at the dew and bubble lines is entirely consistent with
of gradient. the physics.
Capillary pressure terms Quarter Five-Spot case
The robustness of the capillary terms in equation (5) to a In the 1st example a quarter-five-spot is considered, on a
change of state is now considered. Capillary forces are only 10x10x10 grid. Permeability is uniform in each aerial layer.
present when two phases exist. In traditional simulators, However, in depth the model represents a highly permeable
however, the capillary part of the potential difference, e.g. the layer surrounded above and below with progressively poorer
∆Pc ,ij ,α terms in equation (5), are calculated for a particular quality formation; with lower permeability, higher connate
phase. These capillary terms are functions of phase saturation, water and higher oil-gas capillary pressure. The cross-section
and are evaluated by a table look-up. If two neighboring cells permeability distribution is illustrated in Figure 4.
are 100% Oil, then ∆Pc ,ij ,oil = 0 by virtue of the fact
This configuration exacerbates the need for a good
that Pc , j ,oil = Pc ,i ,oil . The difficulty arises in a miscible gas treatment of the gravity density term, because after the “light”
injection gas has imbibed into the high permeability layer,
flood for example, when a 100% oil filled cell is re-labeled to then the situation of heavy “oil-like” hydrocarbon above light
a 100% gas filled cell, and these terms cause a non-physical “gas-like” hydrocarbon exists. A consistent treatment of the
discontinuity in the potential difference term, equation (5). gravity density term becomes important. Although this may
seem contrived, this configuration could easily be taken from
Here, for all cells with a “single-phase-hydrocarbon” many field cases. Figure 2 shows a ternary diagram
phase, the capillary terms are set to zero. This is completely illustrating the injection fluid and reservoir fluid. For the
physical as there are not, and should not be, oil-gas capillary majority of this simulation, first contact miscible conditions
force terms within a single-phase hydrocarbon. One goal here prevail. Nearly all the cells are single-phase hydrocarbon
is that the simulation solution should be invariant to capillary cells. Other than connate water, the water phase plays no part
terms if: (a) there is no mobile water, and (b) all the cells in this model. Oil-water, and Oil-gas capillary forces are
remain single phase. This is the case for the formulation used specified, which will directly illustrate the need for a
here. The difficulty with this approach is when a single-phase continuous treatment of capillary forces in a single-phase
hydrocarbon cell (say i), neighbors a two-phase cell (say j). hydrocarbon environment. Again this case may seem “hand-
Let us in turn consider the potential difference needed by the picked” to illustrate the point. However, this is a very simple
single-phase cell i (i.e. vij ,h ) and the potential differences case, which ought to be straightforward for a simulator.
needed by the two-phase cell j (i.e. vij ,oil , vij , gas ).
Two versions of the case are presented. The first has a
zero gas-oil capillary pressure, which demonstrates the effect
The potential difference term for the single-phase cell i of the 4-phase treatment on the density terms only. The
will be second case includes significant capillary pressures, with
(
vij ,h = ∆Pij + ρ α ,ij g∆z ij ) (8) higher capillary pressures in the poorer quality rock.

Figure 5 shows the CPU usage for IMPES, AIM and fully
Remembering ρα ,ij is evaluated using equation (6). This implicit for the base case, where all cells single phase cells are
term will be continuous with possible neighboring single- labeled “oil” or “gas”. The AIM case is marginally faster than
phase hydrocarbon cells. For the two-phase cell j the potential the IMPES case. Note that all cases converge reasonably well
and completed the simulation. Figure 6 shows the improved
difference of oil vij ,oil and gas vij ,oil are
performance of the AIM case running twice as fast due to the
vij ,oil = (∆Pij + ∆Pc ,ij ,oil + ρ oil ,ij g∆z ij ) convergence behavior of the 4-phase formulation. Figure 7

vij , gas = (∆Pij + ∆Pc ,ij , gas + ρ gas ,ij g∆z ij )


(9) demonstrates that the results (gas production), while changing
somewhat, are within engineering accuracy given the differing
where again the density is calculated using equation (6). time step history. Figure 8 is included to illustrate the
Capillary terms ∆Pc ,ij ,α depend on the phase labeling of the differing time step lengths for the three solution methods.

single-phase hydrocarbon cell; i.e. whether cells i and j are


SPE 79692 5

The second case, with gas-oil capillary pressure, shows


the advantage of the 4-phase treatment far more dramatically.
Figure 9 show the performance of the base runs, with both the

∑∀ F
Implicit and AIM cases essentially failing. When we run the
equivalent cases using the 4-phase treatment, both AIM and
fully implicit cases complete is a respectable time, and, i c c ,ij j
indeed, AIM proves to be the fastest method. So in this
particular case the capillary pressure discontinuities in the base
case essentially prevent the implicit method from working.

Full Field Model


The 4-phase formulation has been tested in a full field
application based on a real case. In reality the reservoir was
occupied by a near critical fluid produced by primary
depletion followed by gas injection later in the field life. This Figure 1 cells in a grid
production scenario was modified to create miscible
conditions by injection gas at day one.

The field contains 52 wells of which 6 are gas injectors. dew line
The simulation model contains 56K active cells and the covers
a period of 5 years. Figure 11 shows the grid and the mole bubble line
fraction of methane at the end of the simulation. This gives an
injection gas
indication of the extent of the injected gas.

CPU performance of three cases is shown in Figure 12.


The three runs are, IMPES, AIM base case and AIM using the reservoir oil
4-phase formulation. The fully implicit treatment of the full
field case is possible, but uncompetitive and consequently not
shown here. In the full field example the improvement in
convergence behavior is less marked than in the quarter-five
spot. However the AIM run time was reduced by over a factor
of two and is slightly faster than the IMPES case.

Figure 13 shows the produced GOR for the whole field


for both the base (AIM) case and the 4-phase formulation
showing the same results to engineering accuracy.
Figure 2: Ternary diagram for miscible gas injection
Conclusions
The introduction of a “4th phase” into the numerical flux term,
along with careful treatment of the mobility terms, has
removed any discontinuities caused by arbitrary labeling of 0.7
single-phase hydrocarbon cells. With this formulation the 0.6
KRG
non-linearities remain at the boundaries between phases, KROW
where they physically exist. Having established a continuous 0.5
KRH
formulation of the flux, this enables a more implicit treatment
0.4
Kh

of miscible injection processes, which, in turn, can lead to a


more rapid and robust numerical method. 0.3
k rhc = ϖ .S owc + (1 − ϖ ).S gc
0.2

0.1

0
0 0.2 0.4 0.6 0.8
Sh

Figure 3 An example of the interpolation of rel-perm data


6 SPE 79692

Figure 7: Gas Production Comparison

Figure 4: Quarter Five spot permeability variation

AIM FULLIMP

IMPES

Figure 5: CPU time – Base case, no capillary pressure case Figure 8: Time Step Size

Figure 6: CPU time – Base & 4-phase cases (AIM) Figure 9: CPU time – base case with capillary pressure
SPE 79692 7

Figure 13: GOR full field model, base and 4-phase AIM
Figure 10: IMPES, AIM and Implicit CPU times using the
case
4-phase formulation

Nomenclature
Mc Mass accumulation term for component c
Fc Flux for component c
Qc The well terms for component c
Fi , j Flux between cells i and j.
Ti , j Transmissibility between cells i and j.
λc ,α ,i Generalized Mobility for component c, phase α and
cell i
+
λ Upwind mobility
xc ,α ,i Fraction of component c in phase α for cell j
bc ,i Molar density component c in cell i
µα Viscosity
Figure 11: Field Example: Methane Fraction K Permeability
k row Relative permeability of oil in water
k rg Relative permeability of gas
kα Relative permeability of phase α
S owc Critical oil to water saturation
S gc Critical gas saturation
vij ,α Potential difference between cells i & j for phase α
ρ α ,i Density of phase α in cell i
Pc ,i ,α Capillary pressure for cell i, phase α
∆Pc ,ij ,α Capillary pressure difference between cells i & j
Tcrit Mixture critical temperature
Figure 12: CPU time, showing the improved AIM
performance.
Tres Reservoir (grid block) temperature
8 SPE 79692

Subscripts:

oil oil
gas gas
h single-phase hydrocarbon
c component
α phase

Reference:

1. L. Young, R.F.Russell. “Implementation of an


Adaptive Implicit Method”, 12th SPE Symposium on
Reservoir Simulation 1993, New Orleans, SPE
25245.
2. D. Ponting, H.H.Hsu, L.Wood, “Field wide
Simulation for HPHT gas condensate reservoirs using
the Adaptive Implicit Method”, Beijing China 1996,
SPE 29948.
3. K.H.Coats, L.K.Thomas, R.G.Pieson.
“Compositional and Black Oil simulation”, 13th SPE
Symposium on Reservoir Simulation, San Antonio
1995, SPE 29111
4. D. Ponting, “Non-linear effects in compositional
simulation”, IBM EPAC conference Stavanger,
Norway 1991.
5. Eclipse Manual 2002a, Geoquest.
http://www.sis.slb.com/content/software/simulation/e
clipse_simulators/compositional.asp
6. Lorentz, J., Bray, B. G. and Clark, C. R. J.
“Calculating Viscosity of Reservoir Fluids from their
Composition”, J.Pet.Tech., 1171, Page 231, 1964
7. Pedersen, K. S., Fredenslund, Aa. Thomassen P.
“Properties of Oils and Natural Gases. Contributions in
Petroleuam Geology and Engineering”, Vol. 5, Gulf,
Houston, 1989
8. C.C. Li , Canadian Journal of Chem Eng.
( 1971)

You might also like