You are on page 1of 11

SPE 37979

A New Generation EOS Compositional Reservoir Simulator: Part I – Formulation and


Discretization.
P. Wang, SPE, I. Yotov, M. Wheeler, SPE, T. Arbogast, SPE, C. Dawson, M. Parashar, and K. Sepehrnoori, SPE, The
University of Texas at Austin

Copyright 1997, Society of Petroleum Engineers, Inc.


management constraints both at the surface and subsurface.
This paper was prepared for presentation at the 1997 SPE Reservoir Simulation Symposium. These requirements raise a variety of research issues. The
This paper was selected for presentation by an SPE Program Committee following review of information tools being developed in this research will initially serve as
contained in an abstract submitted by the author(s). Contents of the paper, as presented, have not been
revparashar
vehicles for studying ideas and algorithms aimed at these
iewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The issues.
material, as presented, does not 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
To achieve the goals above, a research team formed by
Committees of the Society of Petroleum Engineers. Electronic reproduction, distribution, or storage of researchers with multidisciplinary knowledge and from dif-
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 to an abstract of not more than 300 ferent organizations has been working simultaneously on the
words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of
where and by whom the paper was presented. Write Librarian, SPE, P.O. Box 833836, Richardson, TX
design and development of both the formulation for physical
75083-3836, U.S.A., fax 01-972-952-9435. models and Problem Solving Environment (PSE) for parallel
implementation. The PSE developed in this work is not
Abstract directly related to a specific simulation model, rather it mainly
A fully implicit equation-of-state (EOS) compositional deals with important multiprocessing issues such as data
simulator for large scale reservoir simulation is presented. The structure and distribution, parallelism, dynamic load-
simulator uses a multiblock, domain decomposition approach; balancing, grid adaptivity, and communication between fault
that is, the reservoir is divided into non-overlapping blocks. The PSE is detailed in Part II of this work. In Part I we
subdomains that are solved locally in parallel (inner iteration). describe a fully implicit EOS compositional model that being
The subdomain grids are defined independently of each other developed as a work engine of the PSE infrastructure.
and their connections are attained through a global interface Our design and development of the EOS compositional
problem (outer iteration) formulated in terms of appropriate model is guided by the overall objectives of this research and
equations that guarantee continuity of total component fluxes. requirements of the PSE infrastructure. We adopted the
Parallel, iterative techniques are employed to solve the following criteria:
resulting nonlinear equations. The model formulation has been •a general fully implicit formulation is needed, which can
successfully tested for a dry gas cycling process on a single offer a flexible switching to an IMPEC-type formulation
fault block. The numerical results show that the simulator and for the development of an adaptive implicit option;
fluid-related calculations can be conducted efficiently and •a fully implicit black-oil model can be treated as a subset
robustly. Promising results have been obtained using the of the EOS compositional model;
proposed multiblock approach for nonmatching grids between •flexible procedure for handling flash calculations for
fault blocks for two-phase flow problems. hydrocarbon phases and the equilibrium mass transfer
This work is presented in two parts. In Part I we outline the between hydrocarbon phases and the aqueous phase; and
mathematical formulation and discuss numerical solution •capability of handling nonmatching grids between
techniques, while in Part II we address framework and subdomain as well as independent grids on interfaces.
multiprocessing issues. In this paper, an overview of the governing equations for
describing fluid flow through a porous medium is given. A
Introduction fully implicit solution procedure for solving the governing
The overall objective of this research is the development of a equations for primary variables is outlined. Reduction of the
new-generation framework and simulator suitable for mas- EOS compositional formulation to a black-oil model is de-
sively parallel processors. The next generation of reservoir scribed. The multiblock interface formulation and associated
simulators may need, at least, to be able to run high-resolution numerical techniques are presented. An extended mixed finite
reservoir studies on the order of a million gridblocks; to model element method for discretization and parallel domain
complex physical processes in a realistic manner; to perform decomposition implementation are given. Some important
conditional simulation efficiently, and to integrate field
2 P. WANG, I. YOTOV, M. WHEELER, T. ARBOGAST, C. DAWSON, M. PARASHAR, and K. SEPEHRNOORI, SPE 37979

fluid-related calculations are discussed and numerical results Usual capillary pressure constraints are also imposed.
are given.
Description of the Governing Equations. Molar energy balance.
Multicomponent and multiphase flow in a porous medium can The molar energy balance for the control volume using
be described using four different types of equations: 1
internal energy as a primary variable can be expressed as
•partial differential component-material balances de-
scribing component flow, in which Darcy's law is used to ∂u ρ p
n ρ
govern the transport of phases from one cell to another; + ∇ • ∑ ξ j λj h j ( ∇Pj − γ j ∇D ) − ∇ • (λT∇ T) − q H + q L = 0 (4)
∂t j =1
•phase equilibrium equations dealing with equilibrium
component mass transfer between phases;
•equations constraining phase saturations and component Equations 1-4 give (npnc + 2) independent equations and
concentrations; and unknowns for each cell.
• energy balance controlling energy flow.
There is no conservation of momentum equation although Primary and Secondary Variables
this may be important for modeling fluid flow in and near the Several choices are available for the independent variables for
1,2,3,4,5
wellbore and in surface equipment. a fully implicit solution procedure . We believe that
Considering the mutual solubility between water and hy- P, N1 , N 2 , Λ , Nn c , ln K1 , ln K2 , Λ , ln Kn c
drocarbon phases, for a system consisting of nc components are likely to be the
best choice largely because it makes the fugacity equation
(including water) and np fluid phases (including the aqueous
more nearly linear. It is further divided into primary and
phase), the above four types of equation may be mathemati- secondary variables. The primary variables are
cally expressed for a control volume as follows (the dispersion P, N1 , N 2 ,Λ , N nc
term is ignored for simplicity): , because they are coupled between adjacent
cells through the component mass-balance equations and need
Component material balance in terms of moles per unit to be solved simultaneously. The lnK-values are the secondary
time variables because they can be determined by Eq. 2 at given
primary variables.
∂N i ρ n p kkrj
Vb −Vb ∇ • ∑ ξj xij (∇Pj − γ j∇ D) − q i = 0 Solution Procedure
∂t j =1 µj In this section, we will only describe the fully implicit
(1)
solution procedure for an isothermal case, hence Eq. 4 will not
i = 12
, , Λ , nc be used. Furthermore, the solution procedure for cases where
for .
no mass transfer occurs between hydrocarbon phases and the
aqueous phase will be dealt with first. Then, the solution
Phase-equilibrium relationship.
procedure is modified slightly to include the mutual solubility
The first partial derivative of the total Gibbs free energy
between hydrocarbon phases and the aqueous phase.
with respect to the independent variables gives equality of
The component-material balance equation, Eq. 1, needs to
component fugacities among all phases:
be discretized using a proper scheme on the grid system that
represents the geometry of a given reservoir. A discussion on
fi = fi j − fi r = 0 (i =1,2,L ,nc ; j = 1,2,L ,n p ) this subject is given in the next section.
(2)
To solve the governing equations for the independent
variables over a timestep, we take the following steps.
(n p − 1)nc f j = ln( x ijφ ij ) (1) Initialize pressure, temperature, and overall compo-
for variables. In Eq. 2, i , and su- sition of fluids at each cell.
perscript r denotes a reference phase. (2) Determine number of phases, properties and identity
The following equations are used in the solution of Eq. (2) of each phase.
(3) Linearize the governing equations in terms of the
nc
z i ( Ki − 1) independent variables and form Jacobian matrix.
nc ∑ 1 + v( K =0
i − 1) (4) Factorize the Jacobian and reduce the size of the
∑x
i =1
ij − 1 = 0 ( j = 1,2, Λ , n p ) , i =1
(2a)
linear system. In the step, a row elimination is performed to
2nc + 1 n
reduce the size of the linear system from to c for
Volume and capillary constraints. each cell. To do so, the linearized fugacity equation and the
The pore volume in each cell must be filled completely by
volume constraint are used to eliminate the secondary vari-
the total fluid volume as
ables and one of the overall component moles from the
nc np linearized component molar balance equations.
Vb ∑N ∑ L vi j j − Vp = 0 (3) (5) Solve the reduced linear system for the primary
variables.
i=1 j =1
SPE 37979 A New Generation EOS Compositional Reservoir Simulator. Part I: Formulation and Discretization. 3

(6) Calculate the secondary variables using a back sub-


1.10
stitution.
(7) Update phase densities and viscosities, and estimate 1.05

Vapor-phase mole fraction


phase relative permeability.
1.00
(8) Check for convergence. The residuals of the linear
Traditional flash Negative flash
system obtained in Step 3 are used to determine convergence. 0.95
If a tolerance is exceeded, the elements of the Jacobian and the
0.90
residuals of the governing equations are then updated and
another Newton iteration is performed by returning to Step 4. 0.85
If the tolerance is met, a new timestep is then started by
returning to Step 3. 0.80
240 280 320 360 400
Pressure (atm)

Fluid-Related Calculations Using EOS Figure 2. The flash and negative flash calculations for a gas condensate.

Phase-Stability Analysis. The solution of a flash calculation must simultaneously


Some extensive studies on the development and use of the satisfy Eqs. 2 and 2a. The phase fraction, v , is usually
phase-stability principle can be found in the literature
6,7,8,9
. bounded by a physically acceptable range during the itera-
The procedure for the stability analysis being used in this tions; if the bounds are exceeded the flash calculation is
simulator is similar to the numerical solution approach terminated and a single phase is assumed. If the bounds are
7 relaxed to allow negative or greater-than-one v value in order
developed by Michelsen .
to satisfy Eq. 2a, the flash calculations that result in a
The phase-stability test handles the following two situa-
physically unacceptable v value are called the negative flash.
tions:
The number of phases present is determined by the value of v:
•single-phase fluid is checked to see whether a phase split
• fluid is unstable if v is between zero and one; and
occurs; and
• fluid is stable if v is out of the range of zero and one.
•previous two-phase fluid is checked to see if the fluid
The K-values from the negative flash calculation can serve
becomes a single phase under current conditions.
as good initial guesses for the flash calculations at a
Such a test usually takes a significant portion of the total
10,11 subsequent time level. Figures 1 and 2 show the results of the
CPU time . For single-hydrocarbon-phase cells, the phase 13
negative flash calculation using the PR EOS for a light oil
change test is even more expensive because of a poor initial
and a gas condensate. The purpose here is to show that the
guess of the trial phase composition. To reduce the
12 calculations can smoothly transit across the phase boundary,
computational cost, a negative flash is likely to be a good either from a two-phase region to a single-phase region or
choice since the search for the solution can start with a very from a one-phase to a two-phase region.
good initial guess except in the stage of the initialization of a
simulation. Flash Calculation.
Equation 2 is used for the flash calculation. The lnK-values
0.8
are the unknowns. A Newton method is adopted to solve Eq.
7
2.
0.6 The flash calculation is used for the initialization of a
reservoir simulation. This procedure is also used to generate
Vapor-phase mole fraction

0.4
the linear system for cells in which fluids change their state
from single-hydrocarbon phase to two-hydrocarbon phase
0.2
during the iteration. For cells containing two-hydrocarbon-
Traditional flash Negative flash
0.0 phase fluids at the previous iteration level, Eq. 2 is already
included in the system of equations for the entire simulator.
-0.2 It has been realized that the flash calculation formulated
above can be performed efficiently for IMPEC formula-
-0.4 11,14,15
100 150 200 250 300 350 400 tions . The convergence problem is unlikely to occur
Pressure (atm) because a good initial guess can often be obtained from such a
Figure 1. The flash and negative flash calculations for a light oil. formulation, which in the majority of the simulation period
satisfies the tolerance of Eq. 2 for the IMPEC formulations.

Reformulation of the Rachford-Rice Equation.


The amounts and compositions of each equilibrium phase
must be evaluated using a material-balance equation after each
update of the K-value. This is done by solving the following
equation
4 P. WANG, I. YOTOV, M. WHEELER, T. ARBOGAST, C. DAWSON, M. PARASHAR, and K. SEPEHRNOORI, SPE 37979

10 -1
nc
( Ki − 1) zi
r( v ) = ∑ = 0. (5) 10 -3
i =1 1 + v ( Ki − 1)
10 -5
Original
Binary mixture: z1 =10 -13 ,
10 -7
And, the phase compositions are computed from

Residual
K 1 =2,
10 -9 K =10 -13 ,
2
initial v=1.0
zi K i 10 -11
yi = 10 -13 Reformulated
zi 1 + v ( Ki − 1)
xi = ; . (6) 10 -15
1 + v( Ki − 1)
10 -17
0 1 2 3 4 5 6 7 8 9 10
Number of iterations
The range for v is defined by
Figure 4. A comparison between two solution procedures for vapor phase mole fraction

1
vr = >0
1 1 − K min
vl = < 0; . (7)
1 − Kmax Phase Identification.
The phase identification deals with the following two
Equation 5 is a monotonically decreasing function of v situations :
8,18

v v • a multiple phase fluid is found and remains to know the


with asymptotes at l and r . Usually, a Newton iteration
can efficiently solve Eq. 5 for v . However, Eq. 5 can state of each equilibrium phase; and
sometimes result in round-off errors. One such example is • a single-hydrocarbon-phase fluid is detected by the phase-
shown in Figure 3, in which arbitrary values for overall stability test and remains to know the state of this single-
composition and K-values are taken. phase fluid.
To avoid the round-off errors, one may reformulate the For multiphase cases, some studies suggested to use phase
original Rachford-Rice equation into a form that is more linear mass density to identify phase state. As indicated by
9
in respect to v . One such example is the work of Leibovici Perschke , the mass-density criterion is not valid for the
16
and Neoschil : purpose of labeling a three-hydrocarbon-phase or a liquid-oil
fluid when a substantial amount of CO2 is present, because of
nc
( K i − 1) zi the mass density inversion between phases. Based on the
r~ (v ) = (v − v l )( v r − v ) ∑ =0 (8) 9
extensive study, Perschke developed a method for the phase
i = 1 1 + v ( K i − 1)
identification and tracking in which both phase mass density
17
and phase composition are used. This procedure has been
Wang and Barker showed that use of Eq. 8 can avoid the implemented in an IMPEC EOS compositional simulator,
round-off problems for the cases they tested. For the example 10
UTCOMP and successfully tested.
in Figure 3, for instance, no round-off problems occur when Phase identification may be more difficult when a single-
Eq. 8 is used (see Figure 4). 19
hydrocarbon-phase fluid is present. Gosset et al. proposed a
simple approach for this for a two-parameter EOS. This
10 0
procedure works well when single-phase fluids are not close to
20
a phase boundary. Wang and Barker noticed that, when
10 -1 Binary mixture: z1 =10 -13 ,
K 1 =2,
applying it to determine the phase state of fluids at different
K 2 =10 -13 ,
depths with different compositions, this procedure tends to
Residual

10 -2 initial v=1.0 identify a dense gas as a light liquid phase when fluid is near
its phase boundary.
To resolve this problem, the negative flash calculation
10 -3
briefly described earlier is a good candidate. As shown in
Figures 1 and 2, a negative v value from the negative flash
10 -4
0 1 2 3 4 5 6 7 8 9 10
calculation shows that the fluid is in single-liquid state, and a
Number of iterations greater-than-one v value identifies the fluid to be in single-gas
Figure 3. Round-off problem when solving the Rachford-Rice equation for vapor
state.
phase mole fraction
Hydrocarbon Solubility in Water
The mutual solubility between hydrocarbon phases and the
aqueous phase can be treated using either the:
SPE 37979 A New Generation EOS Compositional Reservoir Simulator. Part I: Formulation and Discretization. 5

•simplified approach, in which the solubility calculation is • gas can dissolve in the oleic phase;
performed separately from the flash calculations using a • gas phase contains only solution gas; and
different model than that for the flash calculations; or • water stays in the aqueous phase only.
•rigorous approach, in which the aqueous phase is Some changes need to be made in reducing Eq. 1 to a
considered as one of the equilibrium phases and water is black-oil component-mass balance:
included in the flash calculations. • use mass density in place of the molar density; and
In this section, we describe a implicit procedure for the • use mass fraction in place of mole fraction.
hydrocarbon solubility calculation using the EOS-Henry's law We can now readily obtain the mass-balance equations for
approach. The vaporization of water into hydrocarbon phases the black-oil components in terms of mass per unit time from
is ignored. 23
Eq. 1. Pope et al. gives a detailed description of this
When the solubility calculations are treated separately procedure.
from the flash calculations, the component-molar-balance It is easy to show that, when a three-component EOS
equations, Eq. 1, are conveniently written in the form of model is used and the K-value is assumed to be a function of
pressure only, the EOS compositional model is, in nature, very
∂ (Nih + Nia ) ρ n p q similar to the black-oil model. One major difference is the
− ∇ • ∑ ξj λ j xij (∇ Pj − γ j ∇ D) − i = 0 (9)
inclusion of the mutual mass transfer between oil and gas for
∂t j =1 Vb
the EOS compositional model. The flash calculation is
performed using Eq. 5, the phase-stability test is simplified:
Nh fluid forms two phases if:
for hydrocarbon component i. We select i as the primary
variables in place of the total number of moles. The solution
procedure is identical to that outlined earlier, except that the nc nc
zi
solubility of hydrocarbon components in the aqueous phase ∑K z > 1 and ∑ >1; (13)
i =1
i i
i =1 Ki
needs to be computed using the unknowns during the Newton
iterations of the governing equations. This is done as follows. otherwise, a single phase fluid is formed.
In Step 2, the solubility of each component in the aqueous
phase is computed using Henry's law Switch to an IMPEC Model
a a The formulation and the solution procedures for both EOS
fi Ni , (10) compositional and black-oil models can be easily switched to
x ia = = nc
Hi an IMPEC model. To do so, the row-elimination operation in
N +∑N
a a
w
i =1
i
Step 4 is performed all the way to the end of the linearized
system, thus leaving pressure as the only variable in the
and the mole fraction of water in the aqueous phase is resultant equation. For the IMPEC model, it would be natural
to switch the order of the volume-constraint and the
nc
N wa component molar-balance equations in the linearized sys-tem.
x wa = 1 − ∑ x ia = nc
, (11)
N + ∑N
i =1 a a
w i Numerical discretization
i =1
In this section we describe the multiblock formulation of the
problem and our numerical technique. We employ a mixed
Dividing Eq. 10 by Eq. 11 yields
finite element method approximated as cell-centered finite
differences to discretize the compositional model. It provides
x ia a local conservation of mass and continuous normal fluxes
Nia = N . (12)
x wa w across element faces.

It appears that inclusion of the solubility calculations does Gridding strategy


Na The reservoir domain Ω is divided into a series of nbl non-
not increase the number of primary variables, because i in
Eq. 10 can be computed using the primary variables as shown overlapping subdomains (blocks) Ω k , k = 1, K , nbl . Each
in Eq. 12. block is covered by a smooth, logically rectangular grid. The
grids are constructed locally and are not required to match on
Reduction to a Fully Implicit Black-Oil Model the interfaces. This provides great flexibility in describing
Deriving a black-oil formulation from an EOS compositional irregular geometries and allows for the modeling of faults and
21,22 other internal boundaries such as interfaces between rock
formulation has been reported in the literature . Such
treatment leads to a natural and consistent selection of the strata and locally refined grids. The curvilinear grid on Ω k is
primary variables. considered as the image of a rectangular grid on a reference
ˆ
During the derivation of the black-oil formulation, we brick Ω k . All computations are performed on the union of
make the following assumptions in dealing with the equilib- ˆ n bl ˆ
rium mass transfer between phases: reference blocks Ω = ∪ k=1 Ω k .
6 P. WANG, I. YOTOV, M. WHEELER, T. ARBOGAST, C. DAWSON, M. PARASHAR, and K. SEPEHRNOORI, SPE 37979

Ω k by Thk , where hk is associated with the size of the


Multiblock formulation.
elements. The lowest order Raviart-Thomas spaces RT0 are
30
For convenience we denote the molar flux of the i-th
component by Th
np
defined on k
by
Ui = − ∑ξ λ j j x ij (∇Pj − γ j ∇D). (14)
˜ h = {v = (v1 , v2 , v 3 ) :v |E = (α1x 1 + β1,α 2 x2 + β2 , α3 x3 + β3 )T :
V
j=1 k

α l , βl ∈R for all E ∈T h , and each vl is continuous in


Let Γkl = ∂Ω k ∩ ∂Ω l be the interface between Ω k and Ω l .
k

thel - th coordinate direction},


Let us denote the isothermal phase equilibrium relations by the
operator Vh = v ∈ Vk
h {
˜ : v ⋅ v = 0 on ∂Ω ∩ ∂Ω
k kk
}
Φ : ( Ni , P) → (x ij , ξ j , S j , Pj ). (15)
{
Wh = w : w | E = α : α ∈R, for all E ∈Th .
k k
}
We consider the following multiblock formulation. For each
To impose the interface matching condition Eqs. 17 and 18 we
block Ω k we have
introduce a Lagrange multiplier or mortar finite element space
∂N i defined on a rectangular grid on Γkl . In this space we
+ ∇ ⋅ U i = qi approximate the interface pressures and molar densities, and
∂t . (16) we use this space to impose weakly normal continuity of
component fluxes.
On each interface Γkl , 0 ≤ k < l ≤ nbl , we impose If the grids adjacent to Γkl are non-matching, the interface
grid need not match either of them. Later we impose a mild
j = 1,K , n p , condition for solvability of the numerical scheme. We define
Pj |Ωk = Pj |Ω l , (17)
i = 1,K ,n c . our mortar space Mh on an element to be piecewise continuous
[U i ⋅ v ]kl ≡ U i |Ω k ⋅vk + U i | Ω l ⋅vl = 0, (18)
or discontinuous bilinear functions.
n

It is easy to see that the above formulation, combined with Let t0 = 0 < t1 < t2 < K , let ∆t = tn − tn−1 , and let
n
f = f (tn ) .
np
With the above defined finite element spaces we have the
∑S j = 1, following backward Euler expanded mixed finite element
j =1
(19) 29 1 ≤ j ≤ np
approximation of Eqs. 16-19. Following , let, for ,
u˜ j = −∇Pj .
and Eq. 15 is equivalent to the original problem.
Since the capillary pressure relations could be different in Then
np
S
each block, the saturations j and the molar densities N i Ui = ∑ξ λ j j x ij (u˜ j + γ j ∇D) .
could be discontinuous across the interfaces. To simplify the j =1
S
presentation, we will assume that j and N i are single valued
on the interface. Our method, however, handles properly 1 ≤ i ≤ n c , 1 ≤ j ≤ n p , 1 ≤ k < l ≤ nbl
We seek, for , and
S ˜ Pn | ∈W , N n | ∈W ,
double valued j and N i , since in this case the phase
n
n =1, 2, 3,K , Uh ,i |Ω ∈Vh , u˜ hn ,j |Ωk ∈Vh h Ω
k h h,i Ω
k h k k k k k
equilibrium operator on the interface provides a functional Phn | Γ ∈Mh , N hn,i | Γ ∈Mh
relation between the two values. kl kl
and kl kl
such that
n n−1
An expanded mixed finite element method. N h,i − N h,i
∫ ∫ ∫
n
The implementation and analysis of the expanded mixed finite wdx + ∇ ⋅ U h,i wdx = qi wdx ,
Ωk ∆t n Ωk Ωk
element method for single-phase flow on logically rectangular w ∈Wh
grids have been described in several previous works on single k
, (20)
∫ ∫ ∫
n n n
block
24,25,26
and multiblock
27,28
domains. The original problem u˜ h, j ⋅v = p ∇ ⋅ vdx −
h,j P v ⋅ v k dσ ,
h ,j
Ωk Ωk ∂Ω k \ ∂Ω
is transformed to a problem on a union of rectangular v ∈ Vh ,
computational grids, and the permeability becomes a full k
(21)
np
tensor. The mixed method is then approximated by cell-
∫ ∫ ∑ξ
n n
centered finite differences for the pressure, which is an U h ,i ⋅ v˜ dx = h, j λnh, j x nh, ij (u˜ hn, j + γ nh, j ∇D) ⋅ v˜ dx ,
Ωk Ωk
29 j =1
efficient and highly accurate scheme .
˜
v˜ ∈ V
To simplify the presentation we will discuss here only h
k
, (22)
rectangular grids. Let us denote the rectangular partition of
SPE 37979 A New Generation EOS Compositional Reservoir Simulator. Part I: Formulation and Discretization. 7

np
w ∈Wh Mh = ⊕ Mh
∫ ∑S ∫
n
h,j wdx = wdx , k
, (23) 1≤ k<l≤ nbl
kl

Ωk Ωk
j=1
µ ∈M h
∫ [U ] Γ = ∪ 1≤k < l≤nbl Γkl
n
h,i ⋅ v kl µdσ = 0, kl
, (24) denote the mortar space on and let
Γ kl
nc+ 1
np M h = ( Mh ) . We define a nonlinear interface functional
µ ∈M h
∫ ∑S µ dσ = ∫ µ dσ ,
n
h, j
kl
. (25)
Γkl Γkl
j=1
B : M h × Mh → R

Ph,n j , ξh,n j , λ nh, j, and x nh,ij Wh


ψ = ( Phn , Nh,1n , K , Nhn,n )T ∈ M h
Here are functions in k
and are
as follows. For c
and
Wh
calculated from the phase equilibrium operator on k µ = ( µ p , µ1 , K , µnc ) ∈ M h
, let
n n n n n n
Φ h : (N , P ) → (x , ξ , S , P ).
h,i h h,ij h,j h,j h, j (26)  np nc 
B(ψ , µ ) = ∑ ∫  (∑ S n
h,j (ψ ) − 1) µ p + ∑ [U n
h,i (ψ ]
) ⋅ v kl µ i d σ ,
 Γkl

Sh,n j ∈M hkl
1≤k< l≤nbl j=1 i=1
The mortar functions are calculated from the phase
equilibrium operator on
Mhkl
S n (ψ )
where h, j is calculated by Eq. 27 and
Nh,i (ψ ), U h,i(ψ ) ( n n
)
are the solutions to the series of subdomain problems Eqs. 20-
Φ h : (N h,in , Phn ) → (x h,ij
n
, ξh,jn , Sh,jn , Ph,jn ). Pn
(27) 23 with boundary data h, j calculated by Eq. 27.
Remark Define a nonlinear interface operator B : M h → M h by

Introducing the pressure gradients j in the expanded Bψ , µ = B(ψ , µ), ∀m ∈ M h ,
mixed method allows for proper handling of the degenerate
S =0
(for j
λ
) mobility j in Eqs. 21 and 22. It also allows for
where ⋅, ⋅ is the L -inner product in M h . It is now easy to
2
an approximation of the mixed method by cell-centered finite
differences, even for a full permeability tensor k .
29
see that
(
ψ , N hn, i (ψ ), U hn,i (ψ ) )
, where ψ ∈ Mh solves

Remark B(ψ ) = 0, (28)


2 ∗ nc + np +1
The system Eqs. 20-25 consists of equations
2 ∗ nc + np +1 Ω n + 1 is a solution to Eqs. 20-25.
for unknowns on k and of c equations
for nc + 1 unknowns on Γkl . Parallel domain decomposition.
A necessary condition for solvability of the system Eqs. We solve the system of nonlinear equations on the interface
20-25 is that the mortar grid on each interface is not too fine Eq. 28 by an inexact Newton method. Each Newton step s is
compared to the subdomain grids. A good practical choice is computed by a forward difference GMRES iteration for
to take the mortar grid to be a coarsening by two of the trace
of the finer subdomain grid. A rigorous mathematical solving B' (ψ ) s = −B(ψ ) . On each GMRES iteration the
condition for solvability can be found in
27,28,31
. action of the Jacobian B' (ψ ) on a vector µ is approximated
The mixed method (Eqs. 20-25) is implemented as cell- by the forward difference
Nn n
centered finite differences for h,i and Ph on each block Ω k ,

coupled with mortar matching conditions. This is achieved by 0,
approximating the vector integrals in Eqs. 21 and 22 by a µ = 0,

u˜ n Un
trapezoidal quadrature rule and eliminating h,j and h,i from  B(ψ + δ ψ µ / µ )− B(ψ )
24,25,29 Dδ B(ψ : µ) =  µ , µ, ψ ≠ 0,
the system .  δψ

Interface formulation.  µ B(δµ / µ )− B(ψ ) , µ ≠ 0, ψ = 0.

We reduce the system Eqs. 20-25 to a system of nonlinear δ
equation in the mortar space. This approach is based on a
domain decomposition algorithm for single phase flow first
32 We take δ = ε , where ε is the machine precision. The
proposed by Glowinski and Wheeler for conforming grids , 33
and later generalized to non-matching grids coupled with inexact Newton-GMRES algorithm is described in detail in .
27 Note that each GMRES iteration only requires one
mortars . Let
evaluation of the nonlinear operator B . The evaluation of B
involves solving subdomain problems Eqs. 20-23 in parallel
8 P. WANG, I. YOTOV, M. WHEELER, T. ARBOGAST, C. DAWSON, M. PARASHAR, and K. SEPEHRNOORI, SPE 37979

and two inexpensive projection steps - from the mortar grid


onto the local subdomain grids and from the local grids onto Table 1. Initial physical parameters:
the mortar grid. Each block itself is divided between a number
of processors. Size of each block 15 ft x 136 ft x 136 ft
Initial oil pressure at 17 ft 870 psia
Numerical Results Initial water saturation at 17 ft .2
The EOS compositional formulation described above has been Residual water saturation .15
implemented into the IPARS framework and successfully Oil density 48 lb/cu-ft
tested. One such example was the simulation of the case of the Oil compressibility -5
th 34 4.2 x 10 1/psi
SPE 5 project . During this test, the PR EOS was used for -6
Water compressibility 3.3 x 10 1/psi
phase behavior calculation. The Peaceman well model was
used to treat the source term of Eq. 1. The grid system was Oil viscosity 1.6 cp
enlarged to have 900 gridblocks, which gives a total of 12,600 Water viscosity 0.23 cp
unknowns to solve. A solver from a package named PETSc
35 Porosity .28
was used to solve the linear system. The method of the Vertical permeability 10 md / 30 md / 10 md
restarted general minimum residual method (GMRES) with a Horizontal permeability 150 md/450 md/150 md
restart of 30 was used. The incomplete LU(0) factorization
was used as a preconditioner. The matrix data structure was Water is being injected at bottom hole pressure of 900 psia
block-compressed row with a block size of 7. in the front left corner. A producer with bottom hole pressure
For this test example, Step 4 of the solution procedure of 830 psia is placed at the back right corner. The simulation
outlined earlier was not applied, so the entire linear system of was done using eight processors on IBM SP2, each block
12,600 unknowns was solved. The solubility of hydrocarbon divided into four processors. The oil pressure and
in the aqueous phase was ignored. The results indicate that the concentration contours at time 0.1 days and 2.1 days are given
simulator takes 2 to 3 iterations to reach the solution at each in Figs. 6-9.
timestep of around 100 days. The CPU time on an IBM
RS6000/590 machine is around 30 seconds for each timestep,
in which the PETSc linear solver takes about 28%, the
framework setup takes 6%, and the rest of the calculations
takes 66%. The simulation results were quite comparable with
10
those of the UTCOMP simulator .
In the next example, we demonstrate two phase oil and
water flow through a layered reservoir. A fault cuts through
the middle of the domain and divides it into two blocks. The
geological layers and numerical grids are both non-matching
across the fault (see Figure 5). The middle layer is three times
more permeable (450 md) than the top and bottom layers (150
md). Each block is covered by a numerical grid of size
6 × 16 × 16 .

Figure 6. Oil pressure at 0.1 days.

Figure 5. Numerical grids and permeability layers.

The initial physical characteristics of the system are given


in Table 1.
SPE 37979 A New Generation EOS Compositional Reservoir Simulator. Part I: Formulation and Discretization. 9

Acknowledgement
Figure 7. Oil concentration at 0.1 days. We gratefully acknowledge the financial support of the U.S.
Department of Energy ER/MICS and ER/LTR programs that
funded Argonne National Laboratory (ANL) and the
University of Texas as part of the Advanced Computational
Technology Initiative (ACTI) project New Generation
Framework for Petroleum Reservoir Simulation. (ANL
contract 951522401 to UT). The authors wish to thank the
other participants of this project and in particular Carlos
Celentano, Mojdeh Delsahd, F.J. Eaton, Mike Edwards, Daene
McKinney, G. A. Pope and Kefei Wang of the University of
Texas and Satish Balay, L.C. McInnes, Tom Morgan, Barry
Smith of Argonne National Laboratory and our industrial
partners. We also wish to acknowledge partial support of this
research under the Department of Energy grant DE-FG07-
96ER14720.

Nomenclature

Figure 8. Oil pressure at 2.1 days. D depth from a reference datum plane
fi residual of Eq. 2
a
fi fugacity of component i in the aqueous phase
g gravitational acceleration constant
hj molar enthalpy of phase j
Ki equilibrium ratio for component i, yi x i
Kmax the maximum K-value among all the K-values
Kmin the minimum K-value among all the K-values
k formation permeability
k rj relative permeability for phase j
Lj ratio of moles in phase j to the total number of moles
in the mixture
Ni moles of component i per unit bulk volume
a
Ni moles of component i in the aqueous phase
g
Ni moles of component i in the gas phase
h
Ni moles of component i in the hydrocarbon phases
a
Nw moles of water in the aqueous phase
Figure 9. Oil concentration at 2.1 days. n time level
Conclusion n bl number of blocks
The fully implicit model, the multiblock domain decomposi- ni
j
moles of component i in phase j per unit bulk
tion approach, and the solution strategy presented in this work volume
have been implemented and successfully tested in the context nb number of cells
of the PSE developed in this research. The model offers nc number of components (including water)
flexibility for handling complex reservoirs, since it allows np
different grids in each subdomain as well as independent grids number of phases (including aqueous phase)
on subdomain interfaces. Furthermore, the number of degrees Pj pressure of phase j
of freedom (unknowns) on the interfaces, which determines qH enthalpy injection rate per unit rock volume
the size of the global problem, can be selected dynamically. qL heat loss to the over- and underburdens per unit rock
Thus, it is possible to achieve an "optimal" combination volume
between computing speed and accuracy for a particular qi molar injection (positive) or production (negative) rate
application. for component i
The numerical results show that the model formulation and R universal gas constant
the fluid-related calculations work well for the cases r(v ) residual of the Rachford-Rice equation
examined. Future work will be focused on the multiprocessing Sj saturation of phase j
of the model using the PSE as a driver for more realistic and T temperature
complex problems, and further refinement of the solution t time
procedure and some of the fluid-related calculations.
10 P. WANG, I. YOTOV, M. WHEELER, T. ARBOGAST, C. DAWSON, M. PARASHAR, and K. SEPEHRNOORI, SPE 37979

U sum of the internal energies per unit rock and the fluid Simulation with an Equation of State," SPE Res. Eng., 259-
contained in the unit rock 264(May 1992).
6. Baker, L.E., Pierce, A.C. and Luks, K.D.: "Gibbs Energy
Ui molar flux of component i
Analysis of Phase Equilibria," Soc. Pet. Eng. J., 22, No.5, 731-
Vb bulk volume for a cell 742 (1982).
Vp pore volume for a cell 7. Michelsen, J.L.: "The Isothermal Flash Problem. Part I.
v gas-phase molar fraction in absence of water Stability," Fluid Phase Equilibria, 9,1-19 (1982).
vk outward normal vector to ∂Ωk 8. Trangenstein, J.A.: "Customized Minimization Techniques for
vj molar volume of phase j Phase Equilibrium Computations in Reservoir Simulation,"
Chem. Eng. Sci., 42, 515-530 (1987).
xi mole fraction of component i in all phases 9. Perschke, D.R.: "Equation of State Phase Behavior Modeling
a
xi mole fraction of component i in the aqueous phase for Compositional Simulator," PhD dissertation, U. of Texas at
xij mole fraction of component i in phase j Austin, 1988.
a
xw mole fraction of water in the aqueous phase 10. Chang, Y.B, G.A. Pope, and K. Sepehrnoori: "A Higher-Order
yi mole fraction of component i in gas phase Finite Difference Compositional Simulator," J. Pet. Sci. Eng. , 5
zi overall mole fraction of component i (1990) 35-50.
11. Young, L.C.: "Full-Field Compositional Modeling on Vector
Processors," SPE Res. Eng., 107-114 (Feb. 1991).
Greek Symbols 12. Whitson, C.H. and Michelsen, M.L.: "The Negative Flash," pre-
sented at the International Conference on Fluid Properties and
Γ kl interface between reservoir blocks Phase Equilibria for Chemical Process Design, Banff, Canada
ρ jg (April 30-May 5, 1986)
γj gravity term for phase j, defined as
13. Peng, D.-Y. and Robinson, D.B.: "A New Two-Constant
∇ gradient operator Equation of State," Ind. Eng. Chem.Fundam., 15, 59-64 (1976).
r
∇• divergence operator 14. Wang, P. and Stenby, E.H.: "Noniterative Flash Calculation
ξj molar density of phase j Algorithm in Compositional Reservoir Simulation," Fluid
Phase Equilibria, 94 (1994) 93-108.
λT rock effective thermal conductivity 15. Wang, P. and Barker, J.: "A Comparison of Flash Calculations in
µj viscosity of phase j Compositional Reservoir Simulation," paper SPE 30787 to be
ρj mass density of phase j presented at the 70th SPE Annual Technical Conference and
Exhibition, Dallas, TX (Oct. 22-25, 1995).
Φ phase equilibrium operator 16. Leibovici, C.F. and Neoschil, J.: "A New Look at the Rachford-
φ porosity Rice Equation," Fluid Phase Equilibria, 74, 303-308 (1992).
φ ij fugacity coefficient of component i in phase j 17. Wang, P. and Barker, J.: "Reformulation and Solution of the
Ω multiblock reservoir domain Rachford-Rice Equation for Flash Calculations," Elf GRC/ORE
ˆ 93-016, London (Dec. 10, 1993).
Ω union of reference blocks 18. Nghiem, L.X. and Aziz, K.: "A Robust Iterative Method for flash
Ωk reservoir block Calculations Using the Soave-Redlich-Kwong or the Peng-
ˆ
Ω reference block Robinson Equation of State," paper SPE 8285 presented at the
k
SPE 54th Annual Technicxal Conference and Exhibition, Las
∂Ω k boundary of Ω k Vegas, NV(Sept. 23-26, 1979).
19. Gosset, H. and Kalitventzeff: "An Efficient Algorithm to Solve
References Cubic Equations of State," Fluid Phase Equilibria, 25,51-64
(1986)
1. Brantferger, K., Pope, G.A. and Sepehrnoori, K.: "Development 20. Wang, P. and Barker, J.: "EOS Parameter Tuning with Composi-
of a Thermodynamically Consistent, Fully Implicit, Composi- tional Variation with Depth," Elf GRC/ORE 94-020, London
tional, Equation-of-State Steamflood Simulator," paper SPE (Dec. 10, 1996).
21253 presented at the 11th SPE Symposium on Reservoir 21. Watts, J.W.: "A Compositional Formulation of the Pressure and
Simulation, Anaheim, CA. (Feb. 17-20, 1991). Saturation Equations," SPE Res. Eng., 243-252 (May. 1986).
2. Coats, K.H.: "An Equation of State Compositional Model," SPE 22. Wong, T.W., Firoozabadi, A. and Aziz, K.: "Relationship of the
J., 363-376 (Oct. 1980). Volume-Balance Method of Compositional Simulation to the
3. Chien, M.C.H., Lee, S.T. and Chen, W.H.: "A New Fully Newton-Raphson Method," SPE Res. Eng., 415-22 (Aug.
Implicit Compositional Simulator," paper SPE 13385 presented 1990).
at the SPE Reservoir Simulation Symposium, Dallas, TX (Feb. 23. Pope, G.A., Sepehrnoori, K, Wheeler, M. and Morgen, T.:
10-13, 1985). "Advanced Computational technology Initiative. New Gen-
4. Mifflin, R.T., Watts, J.W. and Weiser, A.: "A Fully Coupled, eration Framework for Petroleum Reservoir Simulation," The
Fully Implicit Reservoir Simulator for Thermal and Other First Annual report, Argonne national laboratory and The
Complex Reservoir Processes," paper SPE 21252 presented at University of Texas at Austin (May 31, 1996).
the 11th SPE Symposium on Reservoir Simulation, Anaheim, 24. Arbogast, T., Dawson, C.N., Keenan, P.T., Wheeler, M.F. and
CA. (Feb. 17-20, 1991). Yotov, I.: “Enhanced cell-centered finite differences for elliptic
5. Collins, D.A., Nghiem, L.X. and Grabenstetter, J.E.: "An equations on general geometry,” to appear in SIAM J. Sci.
Efficient Approach to Adaptive-Implicit Compositional Comp., 1997.
25. Arbogast, T., Keenan, P.T., Wheeler, M.F. and Yotov, I.:
“Logically rectangular mixed methods for Darcy flow on
SPE 37979 A New Generation EOS Compositional Reservoir Simulator. Part I: Formulation and Discretization. 11

general geometry,” presented in Thirteenth SPE Symposium on


Reservoir Simulation, San Antonio, Texas, Society of
Petroleum Engineers, Feb. 1995, pp.51-59. SPE 29099.
26. Arbogast, T., Wheeler, M.F. and Yotov, I.: “Logically rec-
tangular mixed methods for groundwater flow and transport on
general geometry,” Computational Methods in Water Resources
X, A. Peters et al., eds., Kluwer Academic Publishers,
Dordrecht, The Netherlands, 1994, pp. 149-156.
27. Yotov, I.: Mixed finite element methods for flow in porous
media, PhD thesis, Rice University, Houston, Texas, 1996.
28. Arbogast, T., Wheeler, M.F. and Yotov, I.: “Logically
rectangular mixed methods for flow in irregular, heterogeneous
domains,” Computational Methods in Water Resources XI, A.
A. Aldama et al., eds., Computational Mechanics Publications,
Southampton, 1996, pp. 621-628.
29. Arbogast, T., Wheeler, M.F. and Yotov, I.: “Mixed finite
elements for elliptic problems with tensor coefficients as cell-
centered finite differences,” SIAM J. Numer. Anal., 34 (1997).
30. Raviart, R.A. and Thomas, J.M.: “A mixed finite element
method for 2nd order elliptic problems,” Mathematical Aspects
of the Finite Element Method, Lecture Notes in Mathematics,
vol. 606, Springer-Verlag, New York, 1977, pp. 292-315.
31. Arbogast, T., Cowsar, L.C., Wheeler, M.F. and Yotov, I.:
“Mixed finite element methods on non-matching multiblock
grids,” To appear.
32. Glowinski, R. and Wheeler, M.F.: “Domain decomposition and
mixed finite element methods for elliptic problems,” presented
in First International Symposium on Domain Decomposition
Methods for Partial Differential Equations, R. Glowinski, G. H.
Golub, G. A. Meurant, and J. Periaux, eds., SIAM, Philadelphia,
1988, pp. 144-172.
33. Kelley, C.T.: “Iterative methods for linear and nonlinear
equations,” SIAM, Philadelphia, 1995.
34. Killough, J.E. and Kossack, C.A.: "Fifth Comparative Solution
Project: Evaluation of Miscible Flood Simulators", paper SPE
16000 presented at the Ninth Soc. Pet. Eng. Symposium on
Reservoir Simulation, San Antonio, TX (Feb. 1-4, 1987).
35. Balay, S., Gropp, W., McInnes, L.C. and Smith, B.: “Efficient
Management of Parallelism in Object Oriented Numerical
Software Libraries,” Modern Software Tools in Scientific
Computing, Argonne National Laboratory (Oct. 1997).

You might also like