You are on page 1of 7

Excerpt from the Proceedings of the COMSOL Conference 2008 Boston

COMSOL Implementation of a Multiphase Fluid Flow Model in


Porous Media
M.A. Diaz-Viera*,1, D.A. Lopez-Falcon1, A. Moctezuma-Berthier1, A. Ortiz-Tapia1
1
Instituto Mexicano del Petroleo
*Corresponding author: Eje Central Lazaro Cardenas # 152, 07730, Mexico, D. F., mdiazv@imp.mx

Abstract: Multiphase fluid flow models in shown its performance for a water flooding case
porous media are frequent in many important study through a sandstone core (reservoir rock
applications of Earth Sciences, such as in sample).
groundwater contamination, subsurface
remediation and reservoir modeling. The aim of 2. Multiphase Fluid Flow Model in
the present work is to implement in COMSOL Porous Media
Multiphysics a multiphase fluid flow model in
porous media, also known in the oil reservoir 2.1 The Black Oil Model
engineering literature as a black oil model, using
a standard finite element approach. In particular, A multiphase fluid flow model through
we are interested to apply this model coupled porous media, also known in the reservoir
with a multiphase, multicomponent transport engineering literature as black oil or beta model
model to study Enhanced Oil Recovery [2], can be obtained applying the systematic
processes at laboratory scale. The model is based approach for modeling continuum systems,
on the oil phase pressure and total velocity which basically consists of deriving a set of local
formulation in which the capillary pressure is balance equations for intensive properties (in this
taken in account. The numerical implementation case mass) by components and phases included
is validated comparing the results with the in the model [3].
analytical solution from the Buckley-Leverett The main assumptions considered in the
theory, and it is shown its performance for a model are: (1) there are three phases: water ( w ),
water flooding case study through a sandstone oil ( o ) and gas ( g ), (2) porous matrix and
core.
fluids are slightly compressible, (3) oil phase
consists of two components: non volatile oil and
Keywords: black oil, multiphase fluid flow,
dissolved gas, while the water and gas phases are
porous media, capillary pressure model, EOR.
pure, i.e., they are compound for only one
component respectively, (4) diffusion will be
1. Introduction neglected for all phases, (5) it is considered that
the porous medium is fully saturated, but the
The goal of this work is to implement a phases are separated in the pore space and (6) the
multiphase fluid flow model in porous media. In whole system is in local thermodynamic
particular, we are interested to apply this model equilibrium.
coupled with a multiphase, multicomponent The equation system of the black oil model
transport model, to study Enhaced Oil Recovery [2] is given by
processes at laboratory scale.
In view of the scale and resolution Sw 1
+ u w = qw (1)
requirements for the flow model, it could be t Bw Bw
acceptable to perform the implementation
making use of the standard finite element S 1
framework provided in COMSOL Multiphysics. o + u o = qo (2)
t Bo Bo
The model is based on the oil phase pressure
and total velocity formulation given by Chen Z. S R S 1 R
+ + u + u = q (3)
g so o so
[1] in which the capillary pressure, i.e., pressure
t B
g o g
B B B
difference between phases, is taken in account. g o g o

The implementation is validated comparing Here, u represents the volumetric phase


the numerical results with the analytical solution velocity, which can be expressed by the Darcy
for the Buckley-Leverett problem, and it is law as follows
kk r Since the oil is a continuous phase and
u = ( p
)
g ; = g , o, w (4) consequently its pressure is well behaved, we are
going to define the oil phase pressure po as the
Where and k denote the porosity and pressure variable p .
absolute permeability tensor of the porous After performing the corresponding notation
system, while S , , , p , u , B , k r substitution and appropriate manipulation on the
black oil model (1)-(3), the system of equations
and q are the saturation, viscosity, density, transforms in a single pressure equation
pressure, Darcy velocity, formation volume 1 1
u = B q S u
factor, relative permeability, and external source t B
= g , w,o B (6)
term, for each phase = g , o, w , respectively.
S o Rso 1
While Rso is the gas solubility and g is the Bg Rso qo + + u o Rso
Bo t Bo
gravitational, downward-pointing, constant
vector. and two saturation equations, for = w, o
As can be observed the equation system (1)- S
(3) consists of only three equations and it + u
t
contains six unknowns (p ,p ,p
o g w
, So , Sg , Sw ) ,
1 1
(7)
therefore the following three additional equations = B q S u B ;
are required for the system to be determined: t B
S g + So + Sw = 1 where, total and phase velocities are given by
pcgo ( S g ) = pg po (5)
u = k po f w pcow + f g pcgo gz f ;

pcow ( S w ) = po pw

(
)
u w = f w u + k f w o pcow ( o w ) gz
where pcgo and pcow are gas-oil and oil-water
+ k f ( ( p + p ) ( ) gz ) ;
capillary pressures, respectively.
w g cgo
(8)
cow g w

u = f u + k f ( p + ( ) gz )
o o o w cow o w

2.2 Formulation based on Oil Pressure and + k f ( p ( ) gz ) ;


o g cgo g o
Total Velocity
u = f u + k f ( ( p + p ) ( ) gz )
g g g w cow cgo w g

Usually the black oil model presented above + k f ( p ( ) gz ) ;


g o cgo o g
is solved numerically by finite difference or
finite volume methods [4]. For numerical
implementation using a finite element method 2.3 Laboratory Scale Flow Model
the black oil model has to be reformulated in
more convenient manner. A review of such kind The system of equations given in (6)-(8)
of formulations is given in [1]. Here, we will represent a quite general multiphase fluid flow
present a particular formulation based on oil model in porous media, but as was mentioned
phase pressure and total velocity. before, we are interested to apply our flow model
to reproduce the flow behavior at laboratory
For convenience, the following notation is scale. Hence, taking into account the laboratory
conditions, we can make the following further
introduced: for = w, o, g , = k r are assumptions to the flow model:
the phase mobility functions, =
is the Due to the small variation range of the
pressure, water and oil phases can be
total mobility and f = are the fractional
considered incompressible, i.e., Bo = Bw = 1 .
flow functions. So that f = 1.
The total
The term u g (1 Bg ) can be neglected
velocity is defined as u = u .
since the pressure gradient is small ( p 1 ).
The gas dissolution in the oil phase doesnt
take place ( Rso = 0 ). S o
( k f o p ) = q o ;
The effect of gravity g can be ignored. t
The porous medium is homogeneous S w dpcow
k f w p k f w S w (14)
( = const . ) and isotropic ( k = k I ). t dS w
After including the previous simplifications = qw ;
in the equation system (6)-(8) we obtain:
Total and phase velocities
1 dBg po
(1 S o S w ) + u dp
u = k po + k f w cow S w
Bg dp t (9) dS w
= q o + q w + Bg q g dpcgo dpcgo
+k fg S w + k f g S o ;
S o dS g dS g
+ u o = qo ;
t
(10) dpcow
S w u w = k f w po + k f w S w ; (15)
+ u w = qw ; dS w
t
Where, total and phase velocities can be u o = k f o p o ;
rewritten as follows dpcgo
u = k po + k f w pcow k f g pcgo ; u g = k f g p o + k f g ( S w + So )
dS g
u w = f w u + kf w ( o + g ) pcow + kf w g pcgo ; 3. Numerical Implementation
(11)
u o = f o u kf o w pcow + kf o g pcgo ;
A brief review of the state of the art literature
u g = f g u kf g w pcow kf g ( o + w ) pcgo ; concerning the numerical implementation of
multiphasic fluid flow model reflects that the
Finally, replacing velocities in pressure and
finite difference (FD) and finite volume (FV)
saturation equations (9)-(10) by the expressions
methods are the general framework for
given in (11) and expressing the capillary
numerical simulation in very large problems [4];
pressure gradients in terms of saturation:
however, the basic mixed finite element (MFE)
dp dpcgo method [5] has shown to be superior for accurate
pcow = cow S w ; pcgo = S g ; (12)
dS w dS g flux calculation in heterogeneous media in
comparison to conventional FD and FV methods.
the equation system for the fluid flow model in On the other hand, a mixed finite element
porous media becomes: approach requires a special Raviart-Thomas
mixed space for base and weighting functions,
Pressure equation which makes more difficult its implementation.
p
(1 S o S w ) cg o In view of the scale and resolution
t requirements for our flow model, we decided
that it could be acceptable to perform the
dpcow dpcgo implementation making use of the standard finite
k po k f w + fg S w (13)
dS w dS g element framework provided in COMSOL
Multiphysics [6].
dpcgo In particular, the numerical implementation
k f g S o = qo + qw + Bg qg
of previously derived model was accomplished
dS g using the PDE mode for time dependent analysis
1 dBg in the coefficient form.
where cg = is the gas compressibility. Although the model presented in the previous
Bg dpo
section is triphasic (water, oil and gas) hereafter,
Saturation equations for simplicity and without lost of generality, we
will reduce our discussion about the numerical problems in 1-D. For defining initial and
implementation to the biphasic case (water, oil). boundary conditions in those problems the
For the biphasic case, i.e., we have only two following notations will be introduced:
phases: water ( w ) and oil ( o ). It is assumed Initial conditions
that the fluids are incompressible, and p ( t 0 ) = p0 , S w ( t 0 ) = S w 0 (20)
consequently the equation system (13)-(15) is
Boundary conditions
simplified as follows:
p in in g p
in

dp r
in
in
( k p ) + k w cow S w in
, g
dS w (16) Sw g Sw
(21)
p out out g p
out
= q w + qo ;
r out , g out
out

S w dpcow Sw g Sw
+ k w S w
t dS w (17) Where q 0 , but h depends on the type of

( k w p ) = qw ;
boundary conditions.

The system of equations (16)-(17) can be 4. Numerical Simulations


rewritten in matrix form as follows:
0 0 p 4.1 Buckley-Leverett Problem
0 t S
w We first will verify the implemented
k k w
dpc numerical flow model with known analytical
solutions. To this end, we solve the Buckely

dS w p
+ (18) Leverett problem in a homogenous medium with
k dp S w
k w c
different fluid properties and zero capillary
w dS w pressure [7].
We consider a 1-D horizontal homogeneous
q w + qo domain of length 300 m, initially saturated with
= oil. Water is injected with a constant flow rate at
qw one end to displace oil to the other end, where
The previous matrix representation can be the pressure is kept constant.
translated in straightforward manner to the The relative permeability constitutive
standard COMSOL notation in coefficient form: equations are given by:
k rw = S e ; k ro = (1 S e ) ;

p 0 0
(22)
u , da ,
Sw 0 where = 1 is for the linear case and = 2 is
for the quadratic case, whereas S e is the
k k w
dpcow
(19)
dS w q +q
effective or normalized saturation, which is
c , f w o defined as:
dp qw S w S rw
k w k w cow Se = (23)
dS w 1 S rw S ro
where e a ,,,,a 0 . where S rw and S ro are the residual saturations
To complete the model only remains to for water and oil, respectively.
define suitable constitutive laws for relative In relation to the general model description
permeabilities ( k rw , k ro ) and oil-water capillary given in COMSOL notation in (19), only the
matrix c and vector f are modified
pressure pcow and to prescribe proper initial and
k 0 0
boundary conditions. c ; f (24)
In the next two sections the flow model k w 0
described above will be tested for two specific
Since pcow 0 and qw , qo 0 . Note that it Table 2: Simulated cases for Buckley-Leverett
problem
was introduced a small artificial diffusion
coefficient ( ) in the saturation equation to Cases Relative Viscosity Simulation
stabilize the numerical solution, due to its permeability ratio periods
hyperbolic nature, numerical instabilities can be model ( w o ) ( tmax )
appeared. ( )
[days]
Table 1: Buckley-Leverett problem data (a) 1 2 300-900
Property Units Value (b) 1 2/3 300-900
Domain length m 300 (c) 2 2/3 300-900
(xmax)
Absolute Permeability m2 1.00E-15 4.2 Water Flooding Case Study
(k )
Porosity ( ) 0.2 The second problem is about to reproduce
the flow behavior in a water flooding experiment
Water viscosity ( w ) Pa.s 1.00E-03
through a sandstone core under laboratory
Oil viscosity ( o ) Pa.s 1.00E-03 conditions. The intention is to couple this flow
model with multiphase and multicomponent
Residual water 0
transport equations to study Enhaced Oil
saturation ( S rw ) Recovery processes [9]. Data of this problem is
Residual oil saturation 0.2 given in Table 3.
( S ro ) In this case, the relative permeability
constitutive equations are based on the Brooks-
Injection rate m.s-1 3.4722E-07 Corey model [10]:
2 + 3 2 +
Production pressure MPa 10
k rw = S e ; k ro = (1 S e )
2

1 S e ; (28)
Artificial diffusion 1.00E-6
coefficient where characterizes the pore size distribution.
While oil-water capillary pressure is defined
For this problem the initial conditions are by the Leverett J-function:
p ( t 0 ) = p0 10MPa, S w ( t 0 ) = S w 0 0 (25) ( 1 )
S w S rw
and the corresponding boundary conditions are pcow ( S w ) = pt (29)
0 in g in 0 0
in 1 S rw S ro
r in , g p ,h
in
(26) where pt is the entry or left threshold pressure
Sw 0 0 1
assumed to be proportional to ( k ) .
12
p out out 0 out 1 0
r , g 0 ,h 0 0
out
(27) Consequently, we can express the oil-water
0 capillary pressure derivative as follows:
S w 0.8 , g p 3.47E-7 m s ,
in in -1
Where dpcow
( Sw ) =
10MPa . dS w
out
p
(1+ ) (30)
The relevant data are taken from [8] and are
pt S w S rw
provided in Table 1.
The simulations were carried out for three (1 S rw S ro ) 1 S rw S ro
cases with different water-oil viscosity ratios We impose the following initial conditions
p ( t 0 ) = p0 10MPa, S w ( t0 ) = S w 0 0.2 (31)
combining two types of relative permeability
models (linear and quadratic) for seven time
periods, (see Table 2). and boundary conditions
The numerical simulation of the water
0 in g in 0 0
in

r , g p ,h
in
(32) coreflooding experiment through a sandstone
0 0 0 0 core during a time period of 24 hours is shown in
figure 5. It can be observed the formation of a water
p out out 0 out 1 0 front displacing the oil through the porous medium
, g 0 ,h 0 0
out
r (33)
0 which is recovered at the production end of the core.
The main result of the present work is the
Where g p 5.3E 07 m s , p 10MPa .
in -1 out
implementation of a biphasic (water-oil) flow
model in porous media, including capillary
Table 3: Water coreflooding experimental data pressure, which coupled to multiphase and
multicomponent transport equations could be
Property Units Value useful to study Enhaced Oil Recovery processes
at laboratory scale.
Domain length ( xmax ) m 0.25 Even more, applying a flow model coupled
Absolute Permeability with transport equations can be serve to study the
m2 8.25E-13 impact in the flow conditions due to the porosity
(k )
and permeability alterations by transport
Porosity ( ) 0.2 processes, such as adsorption of some fluent
Water viscosity ( w ) Pa.s 1.00E-03 components.

Oil viscosity ( o ) Pa.s 1.00E-02 8. References


Residual water
0.2 1. Chen, Z., Formulations and numerical
saturation ( S rw )
methods of the black oil model in porous media,
Residual oil saturation SIAM J. Numer. Anal. 38, 489514 (2000)
0.15
( S ro ) 2. Aziz, K. and Settari, A., Petroleum Reservoir
Injection rate Simulation. Applied Science Publishers Ltd.,
m.s-1 5.3E-07
London UK, (1979)
Production pressure MPa 10 3. Allen, M.B., Herrera; I. and Pinder, G.F.,
Brooks-Corey Numerical modeling in science and engineering,
2
parameter ( ) John Wiley & Sons, USA (1988)
Entry threshold 4. Chen Z., Huan G., and Ma Y.,
MPa 1.00E-2 Computational Methods for Multiphase Flows in
pressure ( pt ) Porous Media, Computational Science and
Engineering, SIAM, (2006)
6. Results and Conclusions 5. Raviart, P.A. and J.M. Thomas, A mixed
finite element method for second order elliptic
In the figure 1, the numerical solutions of the problems, Lecture Notes in Math., 606, Springer,
BuckleyLeverett problem with linear relative Berlin, 292-315, (1977)
permeabilities and viscosity ratio w o = 1 for 6. COMSOL Multiphysics, Earth Science
Module, Users Guide Version 3.4, COMSOL
a time period of 300 days with different artificial AB (2007)
diffusion coefficients are shown. We can 7. Buckley S, Leverett M. Mechanism of fluid
observe that it is attained the best trade of in displacement in sands. Trans AIME, 146,18796,
terms of efficiency and accuracy for an artificial (1942)
diffusion coefficient value = 1e 7 . 8. Hoteit H., Firoozabadi A., Numerical
Figures 2-4 show a quite well qualitative modeling of two-phase flow in heterogeneous
reproduction of the analytic solution behavior for permeable media with different capillarity
the BuckleyLeverett problems for cases (a)-(c) pressures, Advances in Water Resources, 31, 56
described in table 2, respectively. These 73 (2008)
problems were numerically solved with the 9. Lopez-Falcon, D.A., Diaz-Viera, M.A. and
optimal artificial diffusion coefficient Ortiz-Tapia, A Transport, growth and decay of
value = 1e 7 previously obtained. Microorganisms and Nutrients through Porous
Media: A Simulation with COMSOL, present
conference, (2008)
10. Brooks, R. and A. Corey, Hydraulic
Properties of Porous Media, of Colorado State
University Hydrology Paper, 3, Colorado State
University, (1964).

Figure 3. Numerical solutions of the Buckley


Leverett problem for case (b) with linear relative
permeabilities and viscosity ratio w o = 2 3 for
time periods from 300 to 900 days.

Figure 1. Numerical solutions of the Buckley


Leverett problem with linear relative permeabilities
and viscosity ratio w o = 1 for a period of 300
days, varying artificial diffusion coefficient ( ).

Figure 4. Numerical solutions of the Buckley


Leverett problem for case (c) with quadratic relative
permeabilities and viscosity ratio w o = 2 3 for
time periods from 300 to 900 days.

Figure 2. Numerical solutions of the Buckley


Leverett problem for case (a) with linear relative
permeabilities and viscosity ratio w o = 2 for time
periods from 300 to 900 days.

Figure 5. Numerical simulation of the water


coreflooding experiment for a time period of 24 hours.