Numerical modeling of two-phase binary fluid mixing … Pub... · Comput Geosci (2012)...

24
Comput Geosci (2012) 16:1101–1124 DOI 10.1007/s10596-012-9306-2 ORIGINAL PAPER Numerical modeling of two-phase binary fluid mixing using mixed finite elements Shuyu Sun · Abbas Firoozabadi · Jisheng Kou Received: 1 April 2011 / Accepted: 27 June 2012 / Published online: 27 July 2012 © Springer Science+Business Media B.V. 2012 Abstract Diffusion coefficients of dense gases in liq- uids can be measured by considering two-phase bi- nary nonequilibrium fluid mixing in a closed cell with a fixed volume. This process is based on convection and diffusion in each phase. Numerical simulation of the mixing often requires accurate algorithms. In this paper, we design two efficient numerical methods for simulating the mixing of two-phase binary fluids in one- dimensional, highly permeable media. Mathematical model for isothermal compositional two-phase flow in porous media is established based on Darcy’s law, ma- terial balance, local thermodynamic equilibrium for the phases, and diffusion across the phases. The time-lag and operator-splitting techniques are used to decom- pose each convection–diffusion equation into two steps: diffusion step and convection step. The Mixed finite element (MFE) method is used for diffusion equation because it can achieve a high-order and stable approx- S. Sun (B ) · J. Kou Computational Transport Phenomena Laboratory, Division of Physical Science and Engineering, King Abdullah University of Science and Technology, Thuwal 23955-6900, Kingdom of Saudi Arabia e-mail: [email protected] S. Sun · A. Firoozabadi Reservoir Engineering Research Institute, Palo Alto, CA, USA A. Firoozabadi Chemical and Environmental Engineering Department, Mason Laboratory, Yale University, New Haven, CT 06520, USA J. Kou School of Mathematics and Statistics, Hubei Engineering University, Xiaogan 432100, Hubei, China imation of both the scalar variable and the diffusive fluxes across grid–cell interfaces. We employ the char- acteristic finite element method with moving mesh to track the liquid–gas interface. Based on the above schemes, we propose two methods: single-domain and two-domain methods. The main difference between two methods is that the two-domain method utilizes the assumption of sharp interface between two fluid phases, while the single-domain method allows fractional satu- ration level. Two-domain method treats the gas domain and the liquid domain separately. Because liquid–gas interface moves with time, the two-domain method needs work with a moving mesh. On the other hand, the single-domain method allows the use of a fixed mesh. We derive the formulas to compute the diffusive flux for MFE in both methods. The single-domain method is extended to multiple dimensions. Numerical results indicate that both methods can accurately describe the evolution of the pressure and liquid level. Keywords Two-phase flow · Binary mixing · Multicomponent transport · Mixed finite element methods · Conservation law 1 Introduction Numerical modeling for single-phase and two-phase flow in porous media has wide applications in hydrol- ogy and petroleum reservoir engineering. Many inves- tigators have focused on incompressible and immiscible flow in porous media, for example [4, 68, 16, 22, 23, 3234]. Recently, two-phase nonequilibrium fluid mixing is attracting more attention because of its applications in a large number of problems. For example, in the

Transcript of Numerical modeling of two-phase binary fluid mixing … Pub... · Comput Geosci (2012)...

Comput Geosci (2012) 16:1101–1124DOI 10.1007/s10596-012-9306-2

ORIGINAL PAPER

Numerical modeling of two-phase binary fluid mixingusing mixed finite elements

Shuyu Sun · Abbas Firoozabadi · Jisheng Kou

Received: 1 April 2011 / Accepted: 27 June 2012 / Published online: 27 July 2012© Springer Science+Business Media B.V. 2012

Abstract Diffusion coefficients of dense gases in liq-uids can be measured by considering two-phase bi-nary nonequilibrium fluid mixing in a closed cell witha fixed volume. This process is based on convectionand diffusion in each phase. Numerical simulation ofthe mixing often requires accurate algorithms. In thispaper, we design two efficient numerical methods forsimulating the mixing of two-phase binary fluids in one-dimensional, highly permeable media. Mathematicalmodel for isothermal compositional two-phase flow inporous media is established based on Darcy’s law, ma-terial balance, local thermodynamic equilibrium for thephases, and diffusion across the phases. The time-lagand operator-splitting techniques are used to decom-pose each convection–diffusion equation into two steps:diffusion step and convection step. The Mixed finiteelement (MFE) method is used for diffusion equationbecause it can achieve a high-order and stable approx-

S. Sun (B) · J. KouComputational Transport Phenomena Laboratory,Division of Physical Science and Engineering,King Abdullah University of Science and Technology,Thuwal 23955-6900, Kingdom of Saudi Arabiae-mail: [email protected]

S. Sun · A. FiroozabadiReservoir Engineering Research Institute,Palo Alto, CA, USA

A. FiroozabadiChemical and Environmental Engineering Department,Mason Laboratory, Yale University,New Haven, CT 06520, USA

J. KouSchool of Mathematics and Statistics, Hubei EngineeringUniversity, Xiaogan 432100, Hubei, China

imation of both the scalar variable and the diffusivefluxes across grid–cell interfaces. We employ the char-acteristic finite element method with moving mesh totrack the liquid–gas interface. Based on the aboveschemes, we propose two methods: single-domain andtwo-domain methods. The main difference betweentwo methods is that the two-domain method utilizes theassumption of sharp interface between two fluid phases,while the single-domain method allows fractional satu-ration level. Two-domain method treats the gas domainand the liquid domain separately. Because liquid–gasinterface moves with time, the two-domain methodneeds work with a moving mesh. On the other hand, thesingle-domain method allows the use of a fixed mesh.We derive the formulas to compute the diffusive fluxfor MFE in both methods. The single-domain methodis extended to multiple dimensions. Numerical resultsindicate that both methods can accurately describe theevolution of the pressure and liquid level.

Keywords Two-phase flow · Binary mixing ·Multicomponent transport · Mixed finite elementmethods · Conservation law

1 Introduction

Numerical modeling for single-phase and two-phaseflow in porous media has wide applications in hydrol-ogy and petroleum reservoir engineering. Many inves-tigators have focused on incompressible and immiscibleflow in porous media, for example [4, 6–8, 16, 22, 23, 32–34]. Recently, two-phase nonequilibrium fluid mixingis attracting more attention because of its applicationsin a large number of problems. For example, in the

1102 Comput Geosci (2012) 16:1101–1124

petroleum industry, gas is injected into oil reservoirs tomaintain the reservoir pressure [15]. Once a substantialamount of the injected gas dissolves in the oil phase,fluid and surface properties, such as density, viscosity,and surface tension, may change significantly. This maycause the oil phase to flow faster through the reservoir,and the production is increased [13, 14].

Multicomponent mixtures are often treated as pseu-dobinaries in the petroleum literature [18, 30, 35, 36]studying the mixing occurring when hydrocarbon liq-uids are exposed to gases, such as methane and carbondioxide. To describe the mixing process accurately, werequire diffusion coefficients. However, conventionalmethods to measure diffusion coefficients can not beused at high pressures and temperatures [14]. The PVTcell technique [18, 28–30] is currently an attractiveand powerful alternative for measuring high-pressurediffusion coefficients. This technique allows two non-equilibrium fluid phases to interact inside a closed cellat the constant temperature. In the approach used in[30], the cell with a fixed volume is closed; that is, nogas and liquid is injected or extracted at the boundariesof the cell. Thus, the total mass and volume in the cellare kept constant, but the mass transfer occurs acrossthe interface of two fluid phases and inside each phase.The pressure and liquid volume will change with timewhich can be used to infer diffusion coefficients.

A numerical model has been developed in [14] todescribe nonequilibrium mass transport between thegas and liquid phases of a binary mixture in a closedPVT cell of fixed volume. In this paper, we consider thecase of porous media that are encountered in the pe-troleum industry. Mathematical model for isothermalcompositional two-phase flow in porous media will beobtained by Darcy’s law, material balance, thermody-namic equilibrium between the phases, and diffusionwithin and between phases. This model incorporatesdiffusion and dispersion (within bulk phases) into com-positional two-phase flow in porous media, and weconsider scenarios where diffusion and dispersion aresignificant. Although our model itself can apply tomultiple dimensions, for simplification, we focus on theone-dimensional, highly permeable porous media inthis paper.

Operator splitting technique [1, 9, 11, 20, 24, 32]is widely used to reduce the original complex time-dependent physical problem into simpler problemsbased on the time-lag of dimension or physics. TheIMplicit–EXplicit method [2, 3, 12, 17, 21] treats someterms implicitly and evaluates the others explicitly, andas a result, it is more stable than the fully explicitscheme and can convert the original equations intoan implementation-friendly form. Mathematical model

describing two-phase compositional flow in porous me-dia is a time-dependent and nonlinear system of par-tial differential equations. In order to design efficientalgorithm, we first apply the time-lag and operator-splitting techniques to decompose each convection–diffusion equation into two steps: diffusion step andconvection step. We apply an explicit temporal schemefor the diffusion step, while in convection step, we treatthe molar density of each phase implicitly, but withexplicit treatment for other variables.

We propose two different methods: single-domainand two-domain. In the two-domain approach, wemake assumption that the liquid and the gas have adistinct interface. This assumption often happens in thecase of two-phase flow in one-dimensional, highly per-meable media without capillarity. Different from two-domain method, the single-domain method removesthis assumption to simulate two-phase flow with thesaturation between 0 and 1. Moreover, it can be read-ily extended to multidimensional domain. We use thecharacteristic finite element method with moving mesh(for the two-domain method) or with fixed mesh (forthe single-domain method) to track the convection,and employ the mixed finite element (MFE) methodfor the diffusion equation. The characteristic finite ele-ment method alleviates the Courant number restrictionand can use reasonably large time steps, along withproducing nonoscillatory solutions without numericaldiffusion. The MFE method approximates simultane-ously the scalar variable (the mole fraction of com-ponent) and the diffusive fluxes across the numericalblock interfaces and can achieve a high-order and stableapproximation of both variables.

The article is organized as the following. In Section 2,we propose mathematical model for isothermal compo-sitional two-phase flow in porous media with moleculardiffusion and mechanical dispersion. In Section 3, atwo-domain method is developed to solve the systemof a binary fluid in one-dimensional, highly perme-able media. In Section 4, we propose a single-domainmethod to solve the two-phase convection–diffusionprocess in one-dimensional, highly permeable mediaand extend it to two dimensional domain. In Section 5,we provide two numerical examples to demonstrate theefficiency of our methods. Finally, we draw conclusions.

2 Mathematical model

Modeling equations for isothermal compositional two-phase flow in porous media consist of (1) Darcy’s lawfor phase velocities in the two phases, (2) transport

Comput Geosci (2012) 16:1101–1124 1103

equations for each species, and (3) local thermody-namic equilibrium at the interface between the phases.

Species transport equations In the past, the governingequations modeling transport of multicomponents insingle-phase flow have been outlined in the literature,such as [5]. In this paper, we propose the expression oftransport equations for two-phase compositional flow.The equations that model the transport of species areobtained from the material balance of each species:

φ∂ (czi)

∂t+ ∇ · (

Fconv,i + Fdiff,i) = qi, i = 1, 2, · · · , nc,

Fconv,i =∑

α=L,G

cαxi,αuα,

Fdiff,i = −∑

α=L,G

Sαcα Di,α∇xi,α.

Here, we denote porosity by φ and the overall molardensity by c. We use α as the phase index, and i as thecomponent or species index; nc is the total number ofcomponents in the system. zi is the overall mole fractionof component i; xi,α is the mole fraction of componenti in phase α; and cα is the molar density of phase α. qi

is the source term, which can be used to represent wellflux. The bulk flow causes the convection of species; theconvection flux Fconv,i is summation of convection fluxof component i in both phases. The molecular diffusionand mechanical dispersion together are modeled by thediffusion–dispersion flux Fdiff,i. In this paper, however,we neglect mechanical dispersion and focus only onmolecular diffusion. The linear relation between thediffusion flux Fdiff,i and the gradient of mole fractionabove is known as Fick’s law.

Darcy’s law The phase flux/velocity (uα) is given byDarcy’s law for multiphase flow:

uα = −krα

μα

K(∇ p − ραg

), α = L, G,

where K is the absolute permeability of the porousmedium; krα , μα , and ρα are the relative permeability,viscosity, and mass density of phase α, respectively; andp denotes the pressure and g the gravitational vector.We have neglected capillarity in this work. Relativepermeabilities are functions of saturations.

Fluid properties and phase equilibrium calculationsThe phase and volumetric behaviors (including thecalculations of the fugacities) are modeled by using thePeng–Robinson equation of state [27]. Viscosity of oiland gas phases is a function of temperature, pressure,and phase composition, and it is estimated based on themethodology of Lohrentz et al. [25].

Binary f luid in 1-D highly permeable media In the restof this paper, we first restrict our attention to a binaryfluid in a one-dimensional, highly permeable medium,and at the end of Section 4, we will consider multipledimensional cases. We also assume zero source termqi = 0. The transport equation and Darcy’s law arenow simplified to the following system over x ∈ � =[0, H], t ∈ [0, T f ]:

φ∂ (czi)

∂t+ ∂

∂x

×⎛

⎝∑

α=L,G

cαxi,αuα−∑

α=L,G

Sαcα Di,α∂xi,α

∂x

⎠=0, i=1, 2,

(2.1)

uα + krα Kμα

∂p∂x

=0, α= L, G. (2.2)

All boundaries are considered impermeable, andboth Darcy velocity uα and diffusive fluxes must vanishat the boundaries:

uα = 0, x ∈ ∂� = {0, H}, α = L, G,

cα Di,α∇xi,α = 0, x ∈ ∂� = {0, H}, i = 1, 2, α = L, G.

Initial conditions are imposed for the overall molardensity by c and the overall mole fraction zi:

c(x, t) = cinit(x), t = 0,

zi(x, t) = zi,init(x), t = 0.

Additional simplification can be made by taking theadvantage that the permeability K is sufficiently large.Noting that the Darcy velocity is a finite number, andthe relative permeability and viscosity are all bounded,but K is sufficiently large (infinity), we then con-clude that

∂p∂x

� 0,

or the pressure p is a constant with respect to the spatialdirection (varies as time changes). This fact will be usedbelow to design fast algorithm for this system.

We note that similar results can be obtained for thefluid flow in open space. In this case, for example, theflow is described by Navier–Stokes equations. As aresult, the system of a binary fluid in one-dimensional,highly permeable media can be also used to model thenonequilibrium mass transport between the gas andliquid phases of a binary mixture in a closed PVT cellof fixed volume.

1104 Comput Geosci (2012) 16:1101–1124

3 Two-domain mixed finite element method

In the section, we propose a two-domain method forsolving the system of a binary fluid in one-dimensional,highly permeable media. We make assumption that theliquid and the gas have a distinct interface; that is, weassume that the saturation SL = 1 − SG has the valueof either one or zero, but not between. We note thatwithout capillarity, two-phase flow in one-dimensional,highly permeable media often results in clear inter-face between two phases. This assumption allows usto define two domains: the gas region and the liquidregion.

�L := {x ∈ � : SL(x, t) = 1} ,

�G := {x ∈ � : SG(x, t) = 1} .

Clearly, �L and �G vary with time and � = �L ∪ �G.We assume �L = (0, HI) and �G = (HI, H), whereHI = HI(t) is the location of liquid–gas interface.

Within the liquid region �L, the species transportequation becomes as follows:

φ∂

(cLxi,L

)

∂t+ ∂

∂x

(cLxi,LuL − cL Di,L

∂xxi,L

)= 0,

i = 1, 2.

Similarly, within the gas region �G, the species trans-port equation becomes

φ∂

(cGxi,G

)

∂t+ ∂

∂x

(cGxi,GuG − cG Di,G

∂xxi,G

)= 0,

i = 1, 2.

We first apply time splitting to decompose the aboveconvection–diffusion equation into two steps: diffusionstep and convection step. In diffusion step, we solve

φ(

ckLxk+1/2

i,L − ckLxk

i,L

)

tk+1 − tk− ∂

∂x

(ck

L Dki,L

∂xxm

i,L

)= 0,

i = 1, 2,

where the superscripts k, k + 1/2, and m indicate thecorresponding time steps; m can be chosen to be m =k + 1/2 for implicit time stepping (backward Eulerscheme for time integration), or m = k for explicit time

stepping (forward Euler scheme for time integration).For a binary system, xk

1,L = 1 − xk2,L, so we need con-

sider only the first component in the simulation:

φ(

ckLxk+1/2

1,L − ckLxk

1,L

)

tk+1 − tk− ∂

∂x

(ck

L Dk1,L

∂xxm

1,L

)= 0.

(3.1)

Exactly the same approach can be applied for the gasregion, so we will not repeat it here and below.

In convection step, we solve

φ(

ck+1L xk+1

1,L −ck+1/2L xk+1/2

1,L

)

tk+1 − tk− ∂

∂x

(ck+1

L xk+1/21,L uk+1/2

L

)=0,

(3.2)

uk+1L + kk+1/2

rL K

μk+1/2L

∂pk+1

∂x= 0. (3.3)

Again, the same approach can be applied for the gasregion, which is skipped here for brevity.

Dif fusion step In this step, we attempt to solve Eq. 3.1using mixed finite element method. We first rewriteEq. 3.1 in a weak formulation: to seek for xk+1/2

1,L ∈W := L2(�L) and Fdiff ∈V := H0(div, �L)={

v∈ L2(�) :dvdx ∈ L2(�) and v|x=0 = 0

}such that the following two

equations hold:

⎝φ

(ck

Lxk+1/21,L − ck

Lxk1,L

)

tk+1 − tk, w

⎠ +∑

E

(Fdiff, w·n)∂ E

−∑

E

(Fdiff,

dw

dx

)

E= 0, ∀w ∈ W,

((ck

L Dk1,L

)−1Fdiff, v

)+ (

xm1,L, v · n

)∂�

−∑

E

(xm

1,L,dv

dx

)

E= 0, ∀v ∈ V.

Here, E represents the element, which is a subintervalin one dimension.

For finite dimensional approximation, we apply thelowest-order Raviart–Thomas space (RT0). Let 0 =Xk

0 < Xk1 < Xk

2 < · · · < Xkn = HI(tk) < Xk

n+1 < · · · <

XkN−1 < hk

N = H be the mesh at the time step k. LetWh ⊂ L2(�) be the piecewise-constant space and letVh ⊂ H0(div, �) be the conforming (thus continuous)

Comput Geosci (2012) 16:1101–1124 1105

piecewise linear space. The mixed finite element formu-lation becomes as follows: to seek for xk+1/2

1,L ∈ W := Wh

and Fdiff ∈ Vh such that the following two equationshold:

⎝φ

(ck

Lxk+1/21,L − ck

Lxk1,L

)

tk+1 − tk, w

+∑

E

(Fdiff, w·n)∂ E = 0, ∀w ∈ Wh, (3.4)

((ck

L Dk1,L

)−1Fdiff, v

)+ (

xm1,L, v·n)

∂�

−∑

E

(xm

1,L,dv

dx

)

E= 0, ∀v ∈ Vh. (3.5)

To reduce notation complexity, we denote the mixedfinite element solution and the exact weak solutionabove using the same symbol set. Since w is constantwithin each element, the term involving its derivativevanishes in Eq. 3.4. If we choose explicit time stepping(i.e., m = k), then Eq. 3.5 decouples from Eq. 3.4; thatis, we can calculate the diffusive flux first, then substi-tute it into Eq. 3.4 to compute the mole fraction xk+1/2

1,L .If we integrate the first term in Eq. 3.5 exactly, thisequation is still a system of simultaneous equations forall velocities on element interfaces. We can also applytrapezoid quadrature rule for the first term in Eq. 3.5to decouple the system and to get explicit formulas foreach individual diffusive flux.

Mass transfer between two domains The abovediffusion step is performed for each domain (liquid orgas region) individually. We still need to specify a rightboundary condition (or a top boundary condition for avertical domain) at x = HI for the diffusion in liquidregion and a left boundary condition (or a bottomboundary condition for a vertical domain) at x = HI

for the diffusion in gas region. We assume that at thegas–liquid interface, the composition is in two-phaseequilibrium. In a binary system, the composition at theinterface between two phases is uniquely determinedby thermodynamic equilibrium; that is, interfacial com-position is only a function of temperature and pressure.We denote the equilibrium composition by x∗

i,L and x∗i,G.

First, let us consider Fickian diffusion alone across thegas–liquid interface from the liquid side at time step(k + 1):

Jk+1i,L = −ck+1,n

L Dk+1,nL

x∗i,L − xk+1,n

i,L(hk+1

n /2) , i = 1, 2.

Similarly, Fickian diffusion across the gas–liquid inter-face from the gas side at time step (k + 1) is

Jk+1i,G = −ck+1,n+1

G Dk+1,n+1G

xk+1,n+1i,G − x∗

i,G(hk+1

n+1/2) , i = 1, 2.

In the above equations, the superscripts k + 1 andn indicate the time step and spatial point index,respectively.

Since in the convection step, our mesh follows themovement of gas–liquid interface, we account for thebulk flow between gas–liquid interface in the diffusionstep through the boundary condition on Fdiff. The massbalance across the gas–liquid interface (considering thebulk flow across the interface) has the following form:

Fi,L−G = Jk+1i,L + ck+1,n

L x∗i,LvL = Jk+1

i,G + ck+1,nG x∗

i,GvG,

i = 1, 2.

Summing this balance equation over the two compo-nents yields

ck+1,nL vL = ck+1,n

G vG.

Consequently, we have

Jk+1i,L − Jk+1

i,G = −ck+1,nG vG

(x∗

i,L − x∗i,G

)

= −ck+1,nL vL

(x∗

i,L − x∗i,G

), i = 1, 2.

We then conclude

Fi,L−G = Jk+1i,L + ck+1,n

L x∗i,LvL

= Jk+1i,L − Jk+1

i,L − Jk+1i,G

x∗i,L − x∗

i,G

x∗i,L,

which can be used to specify the boundary condition forFdiff for the diffusion computational step on the gas–liquid interface.

Convection step In this step, we solve the convectionpart Eqs. 3.2–3.3 by assuming the absolute permeabil-ity is sufficiently large. We can then assume that thepressure is constant in space (but varies with time).We use the characteristic finite element method withmoving mesh to track the convection. Let Xk+1

0 < · · · <

Xk+1n = HI(tk+1) < · · · < Xk+1

N be the mesh at the timestep (k + 1). We define the element size

hki := Xk

i − Xki−1, i = 1, 2, · · · , N.

Let ck,iL , pk and xk,i

1,L be the molar density of theliquid phase at time step k in element i. Similar notationapplies to the gas phase. We note that pk does not havea spatial subscript i because it is independent of the

1106 Comput Geosci (2012) 16:1101–1124

space. We use the following equation system to deter-mine pk+1, hk+1

i , ck+1,iL , xk+1,i

1,L , ck+1,iG , and xk+1,i

1,G :

xk+1,i1,L = xk,i

1,L, i = 1, 2, · · · , n, (3.6)

xk+1,i1,G = xk,i

1,G, i = n + 1, n + 2, · · · , N, (3.7)

hk+1i ck+1,i

L = hki ck,i

L , i = 1, 2, · · · , n, (3.8)

hk+1i ck+1,i

G = hki ck,i

G , i = n + 1, n + 2, · · · , N, (3.9)

ck+1,iL = cL

(xk+1,i

1,L , pk+1)

,

i = 1, 2, · · · , n, (3.10)

ck+1,iG = cG

(xk+1,i

1,G , pk+1)

,

i = n + 1, n + 2, · · · , N, (3.11)

N∑

i=1

hk+1i = H =

N∑

i=1

hki . (3.12)

The total number of equations above is (3N + 1). Wealso have (3N + 1) unknowns: xk+1,i

1,L (i = 1, 2, · · · , n, ),xk+1,i

1,G (i = n + 1, n + 2, · · · , N), hk+1i (i = 1, 2, · · · , N),

ck+1,iL (i = 1, 2, · · · , n, ), ck+1,i

G (i = n + 1, n + 2, · · · , N),and pk+1. All the other unknowns can be expressed asexplicit functions of pk+1, so the system can be reducedto a nonlinear equation of a single unknown, which canbe efficiently solved by Newton’s method.

We note that after the system undergoes convec-tion, some elements reduce their sizes while other ele-ments increase their sizes. This is problematic especiallyfor the element right besides the liquid–gas interface,which might quickly reduce its size to zero, causingcomputational pause due to CFL condition time steplimitation from diffusion step. A fix for this problem isto merge the smallest element to its neighboring ele-ment if its size is substantially smaller than its neighbor.To keep the number of elements constant, we also splitthe largest element into two whenever we merge twoelements into one.

4 Single-domain mixed finite element method

The two-domain method introduced previously tracksthe gas–liquid interface explicitly, and it thus can cap-ture the interface sharply. However, this method isdifficult to extend to multidimensional domain becauseit resolves the gas–liquid interface by a moving meshapproach. Moreover, for truly porous media two-phase

flow with the saturation between 0 and 1, the previ-ous two-domain method certainly does not apply. Inthis section, we introduce another method to solvethe two-phase convection–diffusion process in one-dimensional, highly permeable media. We do not needto make assumption that the liquid and the gas havea clear interface; that is, the saturation SL = 1 − SG

could have any value between one and zero.Instead of solving liquid-phase and gas-phase species

transport equation separately, we solve the combinedtwo-phase species transport Eq. 2.1. We again applytime splitting to decompose the convection–diffusionequation into two steps: diffusion step and convectionstep. We may consider only the first component in thesimulation for a binary system.

In diffusion step, we solve

φ(

ckzk+1/21 − ckzk

1

)

tk+1 − tk− ∂

∂x

⎝∑

α=L,G

Skαck

α Dk1,α

∂xxk

1,α

⎠=0,

(4.1)

where the superscripts k, and k + 1/2 indicate the cor-responding time steps. We have chosen to use explicittime stepping for convenience. However, implicit timestepping can be formulated in a similar way.

In convection step, we solve

φ(

ck+1zk+11 − ck+1/2zk+1/2

1

)

tk+1 − tk− ∂

∂x

×⎛

⎝∑

α=L,G

ck+1α xk+1/2

1,α uk+1/2α

⎠ = 0, (4.2)

uk+1α + kk+1/2

rα K

μk+1/2α

∂pk+1

∂x= 0. (4.3)

Dif fusion step The diffusion Eq. 4.1 can be also writ-ten as follows:

φ(

ckzk+1/21 − ckzk

1

)

tk+1 − tk+ ∂ Fdiff

∂x= 0,

Fdiff +∑

α=L,G

Skαck

α Dk1,α

∂xk1,α

∂x= 0.

We note that Sα , cα , Di,α , and xi,α can be calculated fromthe overall composition zi and pressure p using localequilibrium. The weak formulation of Eq. 4.1 is to seekfor zk+1/2

1,L ∈W := L2(�L) and Fdiff ∈V := H0(div, �L)=

Comput Geosci (2012) 16:1101–1124 1107

{v ∈ L2(�) : dv

dx ∈ L2(�) and v|x=0 = 0}, such that the

following two equations hold:⎛

⎝φ

(ckzk+1/2

1 − ckzk1

)

tk+1 − tk, w

⎠ +∑

E

(Fdiff, w · n)∂ E

−∑

E

(Fdiff,

dw

dx

)

E= 0, ∀w ∈ W,

Fdiff = SkL FL,diff + Sk

G FG,diff,

((ckα Dk

1,α

)−1Fα,diff, v

)+ (

xk1,α, v · n

)∂�

−∑

E

(xk

1,α,dv

dx

)

E= 0, ∀v ∈ V, α = 1, 2.

The mixed finite element scheme is just to replace Wand V above by appropriate finite dimensional spacesuch as the Raviart–Thomas space. This scheme workswell in two-phase region, but it needs special treatmentin singe-phase region. For example, (ck

L Dk1,L) is not well

defined in the gas single-phase region; however, FL,diff

is not needed in this region as it multiplies by SkL = 0

to get the desired Fdiff. Thus the number of equationsneed to be reduced properly in a single-phase region.

Hybrid mixed finite element method might be moreconvenient to apply in the current scenario. In hybridmixed finite element scheme, we introduce the over-all composition unknown zk

1,L on element interfaces.Considering a single element E, we can establish thehybrid mixed finite element scheme using the lowest-order Raviart–Thomas space:⎛

⎝φ

(ckzk+1/2

1 − ckzk1

)

tk+1 − tk, w

E

+∑

E

(Fdiff, w · n)∂ E = 0, ∀w ∈ Wh,

Fdiff = SkL FL,diff + Sk

G FG,diff,

((ck

α Dk1,α)−1 Fα,diff, v

)E + (

xk1,α, v · n

)∂ E

−∑

E

(xk

1,α,dv

dx

)

E= 0, ∀v ∈ Vh, α = 1, 2.

For a binary system, we can make further simplifica-tion by noting that the individual phase compositionin two-phase region is constant, and thus it must havezero Fickian diffusion in two-phase region. Without lossof generality, we consider the diffusive flux F∂ E

diff onthe right-hand boundary of an element E. We use the

original variables ckα , Dk

1,α , xk1,α , zk

1 etc. to denote thecorresponding variables at the center of the element(or they could also be viewed as the averaged valuesover the element); and we denote the value on theright-hand boundary of the element by ck,∂ E

α , Dk,∂ E1,α ,

xk,∂ E1,α , zk,∂ E

1 etc. The size of the element E is denotedby hE. The equilibrium composition at the interface oftwo phases is denoted by x∗

i,L and x∗i,G. To derive our

formulas, we make an assumption that the diffusive fluxis constant across the region from the element center toits right-hand boundary. Equivalently, we can employthe trapezoid quadrature rule to approximate the inte-gral

((ck

α Dk1,α)−1 Fα,diff, v

)E

, which leads to the followingexplicit formula to compute the diffusive flux:

Fα,diff = −ckα Dk

1,α

xk,∂ E1,α − xk

1,α

hE/2.

The formulas to compute the diffusive flux will beconsidered in the following cases. If Sk,∂ E

L = 1 and SkL =

1, then there exists only liquid phase in the element andits right-hand boundary, and thus we have the form as

F∂ Ediff = −ck

L Dk1,L

zk,∂ E1 − zk

1

hE/2, if Sk,∂ E

L = 1 and SkL = 1.

Similarly,

F∂ Ediff = −ck

G Dk1,G

zk,∂ E1 − zk

1

hE/2, if Sk,∂ E

L = 0 and SkL = 0.

If Sk,∂ EL ∈ (0, 1) and Sk

L ∈ (0, 1), the individual phasecomposition in two-phase region is constant for a binarysystem; that is, xk,∂ E

1,α = xk1,α = x∗

1,α . Therefore, it musthave zero Fickian diffusion:

F∂ Ediff = 0, if Sk,∂ E

L ∈ (0, 1) and SkL ∈ (0, 1).

If Sk,∂ EL ∈ (0, 1) and Sk

L = 1, there exists only liquidphase in the element, but its right-hand boundary is theinterface of two phases, so we have

F∂ Ediff =−ck

L Dk1,L

x∗1,L − zk

1

hE/2, if Sk,∂ E

L ∈ (0, 1) and SkL =1.

Similarly,

F∂ Ediff =−ck

G Dk1,G

x∗1,G − zk

1

hE/2, if Sk,∂ E

L ∈(0, 1) and SkL =0,

F∂ Ediff = −ck,∂ E

L Dk,∂ E1,L

zk,∂ E1 − x∗

1,L

hE/2,

if Sk,∂ EL = 1 and Sk

L ∈ (0, 1),

1108 Comput Geosci (2012) 16:1101–1124

F∂ Ediff = −ck,∂ E

G Dk,∂ E1,G

zk,∂ E1 − x∗

1,G

hE/2,

if Sk,∂ EL = 0 and Sk

L ∈ (0, 1).

If Sk,∂ EL = 1 and Sk

L = 0, we need first to determinethe interface of two fluid phases. Since the diffusive fluxacross a finite size of two-phase region must be zeroin a binary system, there must exist a sharp liquid–gasinterface (i.e., fine size of two-phase region does notexist) under the the assumption of constant diffusiveflux within the half cell region. We use hc to denotethe distance from the element center to the liquid–gasinterface. By the assumption that the diffusive flux isconstant across the region from the element center toits right-hand boundary, we have

F∂ Ediff = −ck,∂ E

L Dk,∂ E1,L

zk,∂ E1 − x∗

1,L

hE/2 − hc= −ck

G Dk1,G

x∗1,G − zk

1

hc.

We then obtain

hc = hE/2

1+ck,∂ EL Dk,∂ E

1,L

(zk,∂ E

1 −x∗1,L

)/(ck

G Dk1,G

(x∗

1,G−zk1

)) .

Consequently, the diffusive flux is expressed as follows:

F∂ Ediff = −ck,∂ E

L Dk,∂ E1,L

zk,∂ E1 − x∗

1,L

hE/2− ck

G Dk1,G

x∗1,G − zk

1

hE/2,

if Sk,∂ EL = 1 and Sk

L = 0.

We can analogously derive

F∂ Ediff = −ck,∂ E

G Dk,∂ E1,G

zk,∂ E1 − x∗

1,G

hE/2− ck

L Dk1,L

x∗1,L − zk

1

hE/2,

if Sk,∂ EL = 0 and Sk

L = 1.

We note that unlike the two-domain method inprevious section, no special treatment is necessary forthe mass transfer between the liquid region and thegas region because every element in this method canpotentially hold liquid-phase, gas-phase, or two-phasemixture.

Convection step In this step, we solve the convectionpart Eqs. 4.2–4.3 by assuming the absolute permeabilityis sufficiently large. Like before, we assume that thepressure is constant in space (varies with time). We usethe characteristic finite element method with movingmesh to track the convection. Using the same notationas we did in the previous section, we formulate the

following equation system to determine pk+1, hi, ck+1,i,and zk+1,i

1 :

zk+1,i1,L = zk,i

1,L, i = 1, 2, · · · , N,

hick+1,i = hki ck,i, i = 1, 2, · · · , N,

ck+1,i = c(

zk+1,i1 , pk+1

), i = 1, 2, · · · , N,

N∑

i=1

hi = H =N∑

i=1

hi.

The total number of equations above is (3N + 1), whichis the same as the number of unknowns. After elimina-tion, the system can be reduced to a nonlinear equa-tion of a single unknown (the pressure), which can beefficiently solved by Newton’s method.

After obtaining ck+1,i and zk+1,i1 in the mesh formed

by hi (let us call it Eh), we project them back to theoriginal mesh formed by hi (let us call it Eh):

Eck+1,idx =

E∈Eh

E∩Eck+1,idx, ∀E ∈ Eh,

Eck+1,izk+1,i

1 dx =∑

E∈Eh

E∩Eck+1,i zk+1,i

1 dx, ∀E ∈ Eh.

The computed values ck+1,i and zk+1,i1 will be used

for the calculation in the next time step while hi isdiscarded.

Extension to two dimensional domain The single-domain scheme can be conveniently extended to mul-tiple spatial dimension since it uses a fixed mesh. Themain difference between one-dimensional method andits multiple dimensional extension is to construct theapproaches for computing the pressure and updatingthe mole fractions by convection. For simplification, weconsider a two-dimensional domain with rectangularmesh. We assume that the mole fractions zk+1/2

i havebeen calculated by the diffusion equation similar toone-dimensional case. The pressure equation [37, 38]is described as

φc f∂p∂t

− (v1 − v2)∇ · (cLx1,LλL + cGx1,GλG)K∇ p

− v2∇ · (cLλL + cGλG)K∇ p = (v1 − v2)∇· (cLSL DL∇x1,L + cGSG DG∇x1,G),

Table 1 Relevant data for1-D experiment

Parameters Values

H 0.2194 mT 310.95K h0 0.0768 mP0 10.2 MPa

Comput Geosci (2012) 16:1101–1124 1109

Table 2 Component data used in the PR-EOS for 1-Dexperiment

Tc (K) Pc (MPa) ω s

C1 190.6 4.54 0.008 −0.154nC5 469.7 3.37 0.251 −0.042

where λα = krαμα

, c f is the total fluid compressibility, andvi is the total partial molar volume of the ith compo-nent. The details of c f and vi is found in [10]. Usingthe lowest-order Raviart–Thomas space on a single

element E, we can establish the hybrid mixed finiteelement scheme for pressure equation: for any w ∈Wh, v ∈ Vh, such that

(φck

fpk+1 − pk

tk+1 − tk, w

)

E+ ((

vk1 − vk

2

) ∇ · ua, w)

E

+ (vk

2∇ · ub , w)

E

= ((vk

1 − vk2

) ∇ · F, w)

E , (4.4)

Fig. 1 Influence of the meshon the simulated pressure andliquid level using thetwo-domain method

0 50 100 150 200 250 3007

7.5

8

8.5

9

9.5

10

10.5

time (hour)

pres

sure

(M

Pa)

2 cells5 cells10 cells20 cells40 cells80 cells

(a) Pressure as a function of time

0 50 100 150 200 250 3000

2

4

6

8

10

12

14

16

18

time (hour)

liqui

d le

vel (

mm

)

2 cells5 cells10 cells20 cells40 cells80 cells

(b) Liquid level as a function of time

1110 Comput Geosci (2012) 16:1101–1124

((ck

Lxk1,Lλk

L + ckGxk

1,GλkG

)−1K−1ua, v

)

E

= (pk+1, ∇ · v

)E − (

pk+1, v · n)∂ E , (4.5)

((ck

LλkL + ck

GλkG

)−1K−1ub , v

)

E

= (pk+1, ∇ · v

)E − (

pk+1, v · n)∂ E , (4.6)

F = FL + FG, (4.7)

((ck

LSkL DL

)−1FL, v

)

E=(

xk1,L,∇·v)

E−(xk

1,L, v ·n)∂ E ,

(4.8)

((ck

GSkG DG

)−1FG, v

)

E=(

xk1,G, ∇ · v

)E−(

xk1,G, v · n

)∂ E

.

(4.9)

Fig. 2 Influence of the meshon the simulated pressure andliquid level using thesingle-domain method

0 50 100 150 200 250 3007

7.5

8

8.5

9

9.5

10

10.5

time (hour)

pres

sure

(M

Pa)

2 cells5 cells10 cells20 cells40 cells80 cells

(a) Pressure as a function of time

0 50 100 150 200 250 3000

2

4

6

8

10

12

14

16

18

time (hour)

liqui

d le

vel (

mm

)

2 cells5 cells10 cells20 cells40 cells80 cells

(b) Liquid level as a function of time

Comput Geosci (2012) 16:1101–1124 1111

Similar to Eq. 3.5, we can also apply trapezoid quad-rature rule for the first term of Eqs. 4.5, 4.6, 4.8, and 4.9to decouple the system and to get explicit formulas foreach individual flux. We use piecewise-constant approx-imation for the compositions, and then Eq. 4.4 becomes(

φckf∂p∂t

, w

)

E+ (

vk1 − vk

2

) |E (ua · n, w)∂ E

+ vk2 |E (ub · n, w)∂ E

= (vk

1 − vk2

) |E (F · n, w)∂ E .

As a result, we can obtain the discretization equationof pressure. After obtaining the pressure, we define thetotal molar flux [26] as

uk+1 = − (ck

LλkL + ck

GλkG

)K∇ pk+1.

Let

f ki = ck

Lxki,Lλk

L + ckGxk

i,GλkG

ckLλk

L + ckGλk

G

.

Fig. 3 Molar densitysimulated on a mesh of 20cells

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 2.81hrtime= 6.74hrtime=15.56hrtime=32.41hrtime=133.17hrtime=243.17hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 5.04hrtime=10.18hrtime=20.47hrtime=51.32hrtime=102.74hrtime=205.58hr

(b) Single-domain method

1112 Comput Geosci (2012) 16:1101–1124

We now consider the convection equation to updatezi. Based on the operator splitting, the convection equa-tion becomes

φck

(zk+1

i − zk+1/2i

)

tk+1 − tk+ uk+1 · ∇ f k

i = 0. (4.10)

Integrating Eq. 4.10 over a single element E, we obtain

ck(

zk+1i − zk+1/2

i

)

tk+1 − tk+

Euk+1 · ∇ f k

i = 0.

Green’s theorem gives us

EuL · ∇ fi =

∂ Eu · n fi −

Efi∇ · u.

Let the elements E1γ and E2

γ share the edge γ with nγ

exterior to E1γ ; that is, γ = E1

γ

⋂E2

γ , then we define

f ∗i |γ =

{fi|E1

γ, if u · nγ ≥ 0,

fi|E2γ, if u · nγ < 0.

Fig. 4 Molar densitysimulated on a mesh of 40cells

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 0.67hrtime= 7.03hrtime=15.51hrtime=44.94hrtime=101.72hrtime=234.55hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 2.55hrtime= 5.12hrtime=12.83hrtime=25.68hrtime=128.53hrtime=231.37hr

(b) Single-domain method

Comput Geosci (2012) 16:1101–1124 1113

We take the upwind values of fi on the edges ∂ E ofelement E as

∂ Eu · n fi

∂ Eu · n f ∗

i .

Since fi is constant in each element, we have

Efi∇ · u = fi|E

E∇ · u = fi|E

∂ Eu · n.

Consequently, we reach

ck(

zk+1i − zk+1/2

i

)

tk+1 − tk+

∂ Euk+1 · n f k∗

i

− f ki |E

∂ Euk+1 · n = 0,

which is used to explicitly compute the values of zk+1i .

Finally, the fugacities and mixture properties are cal-culated by using the Peng–Robinson equation of state [27].

Fig. 5 Molar densitysimulated on a mesh of 80cells

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 0.16hrtime= 1.64hrtime= 9.54hrtime=19.72hrtime=99.28hrtime=173.30hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.253000

4000

5000

6000

7000

8000

9000

10000

11000

height (meter)

mol

ar d

ensi

ty (

mol

/m3 )

time= 0.00hrtime= 0.64hrtime= 6.42hrtime=12.85hrtime=32.13hrtime=64.27hrtime=192.82hr

(b) Single-domain method

1114 Comput Geosci (2012) 16:1101–1124

5 Numerical examples

5.1 1-D mixing dynamics: methane–pentane mixture

In this subsection, we simulate the mixing of methane–pentane mixture under the same condition as reportedin [14]. One of the more comprehensive models ofPVT cell experiments is tested on a methane–pentanemixture in [30]. The cell is initially saturated by pure

components as vapor methane and liquid pentane. Theevolution of pressure and liquid level for the sameexperiment has been simulated in [14] as a verificationof their model. In this paper, we use the proposednumerical models to simulate the evolution of pressure,liquid level, composition, and molar density.

The PVT conditions are chosen to match those pro-vided in [30]. The temperature (T) is constant both inthe entire domain and with time. The height (H) of

Fig. 6 Mole fraction ofmethane simulated on a meshof 20 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 2.81hrtime= 6.74hrtime=15.56hrtime=32.41hrtime=133.17hrtime=243.17hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 5.04hrtime=10.18hrtime=20.47hrtime=51.32hrtime=102.74hrtime=205.58hr

(b) Single-domain method

Comput Geosci (2012) 16:1101–1124 1115

the tested domain, and the initial values of liquid level(h0) and pressure (P0) are listed in Table 1. Provided inTable 2 are the component data used for calculating fu-gacity and mixture properties from the Peng–Robinsonequation of state (PR-EOS) [27]. These input parame-ters for the PR-EOS include critical temperatures (Tc),critical pressures (Pc), and acentric factors (ω), whichare from NIST Chemistry WebBook (http://webbook.nist.gov/chemistry). In addition, volume shift parame-

ters (s) are from Jhaveri and Youngren [19]. When mix-ture properties are calculated, the binary interactioncoefficient 0.054 is used in the PR-EOS. We use con-stant diffusion coefficients that are DL =1.3×10−8 m2 s−1

and DG = 1.0 × 10−7 m2 s−1, respectively [14].For purpose of simplification, we use the explicit

schemes for diffusion equations in the two methodsproposed in this paper. In this case, the proposedmethods suffer from the Courant number restriction

Fig. 7 Mole fraction ofmethane simulated on a meshof 40 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 0.67hrtime= 7.03hrtime=15.51hrtime=44.94hrtime=101.72hrtime=234.55hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 2.55hrtime= 5.12hrtime=12.83hrtime=25.68hrtime=128.53hrtime=231.37hr

(b) Single-domain method

1116 Comput Geosci (2012) 16:1101–1124

on the time steps. As a result, the two-domain methodneeds to take very small time steps when the length ofsome elements becomes small, but the single-domainmethod can alleviate this restriction because of usingfixed mesh. Therefore, the single-domain method canuse much larger time step than the two-domain method(three or four times larger); the former is also moreCPU efficient mainly due to allowed larger time step.In the future work, we will employ the implicit schemes

for diffusion equations of the proposed numerical mod-els to reduce Courant number restriction, and we willinvestigate the influence of this temporal treatment.

Figures 1 and 2 illustrate how the accuracy of sim-ulated pressure drop and liquid level is influenced bythe spatial mesh used for the two-domain and single-domain methods. The simulated results indicate thata mesh of ten (or more) grid cells can accurately sim-ulate the pressure evolution, while a mesh of 20 (or

Fig. 8 Mole fraction ofmethane simulated on a meshof 80 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 0.16hrtime= 1.64hrtime= 9.54hrtime=19.72hrtime=99.28hrtime=173.30hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

mol

e fr

actio

n of

C1 time= 0.00hr

time= 0.64hrtime= 6.42hrtime=12.85hrtime=32.13hrtime=64.27hrtime=192.82hr

(b) Single-domain method

Comput Geosci (2012) 16:1101–1124 1117

more) grid cells accurately simulates the liquid levelevolution, using either the two-domain or the single-domain method. On the other hand, a finer mesh isrequired for accurate resolution of the spatial profilesof quantities (such as molar density, mole fractions,saturations). With the same initial mesh, the single-domain method seems slightly less accurate than thetwo-domain method in predicting the evolution of the

pressure and liquid level. This is probably becausethe single-domain method introduces more numericaldiffusion in its solution (without capturing the satura-tion profile sharply or using much larger time steps).

Figures 3, 4, and 5 show molar density simulatedby the two-domain and single-domain methods ondifferent meshes. Figures 6, 7, and 8 show mole fractionof methane simulated by the two methods on different

Fig. 9 Saturation of liquidphase simulated on a mesh of20 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 2.81hrtime= 6.74hrtime=15.56hrtime=32.41hrtime=133.17hrtime=243.17hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 5.04hrtime=10.18hrtime=20.47hrtime=51.32hrtime=102.74hrtime=205.58hr

(b) Single-domain method

1118 Comput Geosci (2012) 16:1101–1124

meshes. Molar density changes with the composition,which is determined by mass transfer occurring on theinterface between two fluid phases by dissolution andevaporation, and in each fluid phase by the diffusionand convection. The processes occurring on the inter-face of two phases are generally much faster than thediffusive and convective time scales in either phase,and as a result, the overshoot of molar density happensaround two-phase interface. For a binary system, the

composition at the interface between two phases isuniquely determined by thermodynamic equilibrium;that is, interfacial composition depends only on temper-ature and pressure. In the problem, we keep the tem-perature constant. As shown in Figs. 6, 7, and 8, moregaseous methane dissolves in the liquid phase duringthe mixing process, and thus the pressure (constantin the entire domina) decreases with time, which isobserved in Figs. 1 and 2.

Fig. 10 Saturation of liquidphase simulated on a mesh of40 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 0.67hrtime= 7.03hrtime=15.51hrtime=44.94hrtime=101.72hrtime=234.55hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 2.55hrtime= 5.12hrtime=12.83hrtime=25.68hrtime=128.53hrtime=231.37hr

(b) Single-domain method

Comput Geosci (2012) 16:1101–1124 1119

Fig. 11 Saturation of liquidphase simulated on a mesh of80 cells

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 0.16hrtime= 1.64hrtime= 9.54hrtime=19.72hrtime=99.28hrtime=173.30hr

(a) Two-domain method

0 0.05 0.1 0.15 0.2 0.25

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

height (meter)

satu

ratio

n of

liqu

id p

hase

time= 0.00hrtime= 0.64hrtime= 6.42hrtime=12.85hrtime=32.13hrtime=64.27hrtime=192.82hr

(b) Single-domain method

Figures 9, 10, and 11 show the saturation of liquidphase simulated by two methods on different meshes.The two-domain method produces saturation profileswith a sharp front, while the single-domain method in-troduces artificial two-phase region between the liquid-phase region and the gas-phase region. However, theartificial two-phase region is narrow (only a single ele-ment wide), and its width tends to decrease when usinga finer mesh. Moreover, one can postprocess the result

of saturation from the single-domain method to recoverthe sharp-jump saturation if needed.

Table 3 Component data used in the PR-EOS for 2-Dexperiment

Tc (K) Pc (MPa) ω s

CO2 304.1 7.375 0.239 0.1137nC10 617.7 2.11 0.489 0.0865

1120 Comput Geosci (2012) 16:1101–1124

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Gas saturation

Length (meters)

Wid

th (

met

ers)

0

0.1

0.2

0.3

0.4

0.5

0.6

Fig. 12 Gas saturation at 5.0e+4 s

5.2 2-D displacement

In this example, we simulate the displacement of nor-mal decane (nC10) by carbon dioxide (CO2) in a two-dimensional domain. The void space of the medium isinitially fully saturated with nC10, and then we flood the

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Gas saturation

Length (meters)

Wid

th (

met

ers)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Fig. 13 Gas saturation at 2.0e+5 s

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Gas saturation

Length (meters)

Wid

th (

met

ers)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 14 Gas saturation at 5.0e+5 s

system by CO2 on the lower half of the left boundaryand produce outflow on the lower half of the rightboundary. The other boundaries are impermeable. Weuse the proposed numerical models to simulate theevolution of mixture composition.

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Gas saturation

Length (meters)

Wid

th (

met

ers)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Fig. 15 Gas saturation at 8.3e+5 s

Comput Geosci (2012) 16:1101–1124 1121

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16CO2 mole fraction

Length (meters)

Wid

th (

met

ers)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Fig. 16 CO2 mole fraction at 5.0e+4 s

The domain is 0.16m × 0.16m × 1m. The tempera-ture is 313.1 K, a constant over the entire domain andwith time. The initial pressure is 4.01 MPa in the entiredomain. Provided in Table 3 are the component dataused for calculating fugacity and mixture propertiesfrom the PR-EOS. The data are chosen from those pro-

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16CO2 mole fraction

Length (meters)

Wid

th (

met

ers)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Fig. 17 CO2 mole fraction at 2.0e+5 s

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16CO2 mole fraction

Length (meters)

Wid

th (

met

ers)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 18 CO2 mole fraction at 5.0e+5 s

vided in [31]. The inflow and outflow velocities are 2e −7 and 1.5e − 7 m/s. The effect of gravity is neglected.Diffusion coefficients are chosen to be constant: DG =1.5e − 7 m2/s and DL = 5.6e − 9 m2/s. The domainis homogeneous with the permeability being 109 md.The viscosities of gas and liquid phases are 0.1 and

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16CO2 mole fraction

Length (meters)

Wid

th (

met

ers)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 19 CO2 mole fraction at 8.3e+5 s

1122 Comput Geosci (2012) 16:1101–1124

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Molar density

Length (meters)

Wid

th (

met

ers)

5000

5500

6000

6500

7000

7500

Fig. 20 Molar density at 5.0e+4 s

1.0 cp, respectively. The cubic relative permeability isemployed.

An explicit scheme is used for convection anddiffusion equations, and a small time step size of 100 sis used. We note that the pressure is almost constantin the entire domain at any given time (but varyingwith time) when the permeability is very large. Figures

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Molar density

Length (meters)

Wid

th (

met

ers)

5000

5500

6000

6500

7000

7500

Fig. 21 Molar density at 2.0e+5 s

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Molar density

Length (meters)

Wid

th (

met

ers)

5000

5500

6000

6500

7000

7500

Fig. 22 Molar density at 5.0e+5 s

12, 13, 14, and 15 show gas saturation profiles. Molefraction of CO2 and mixture molar density are shownin Figs. 16, 17, 18, and 19, and Figs. 20, 21, 22, and 23,respectively. Like the 1-D example, we also observesharp moving fronts of saturation, mole fraction, andmolar density simulated by the algorithm. The convec-tion is dominated near the injection boundary, and the

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Molar density

Length (meters)

Wid

th (

met

ers)

5000

5500

6000

6500

7000

Fig. 23 Molar density at 8.3e+5 s

Comput Geosci (2012) 16:1101–1124 1123

fluid composition changes not only with convection anddiffusion but also with mass transfer occurring on theinterface between two fluid phases.

6 Conclusions

We have developed a mathematical model for isother-mal compositional two-phase flow in porous media. Ineach time step, we apply time splitting to decomposethe original equation into two steps: diffusion stepand convection step. Then we propose two deferentmethods: single-domain and two-domain methods. Inthe two-domain method, based on the assumption thatthere exists a distinct interface between the liquid andgas phases, we divide the entire computational domaininto two subdomains: the gas region and the liquidregion, and then we use the characteristic finite ele-ment method with moving mesh to track the interfacebetween two subdomains, which varies with time. Weemploy the mixed finite element method for diffusionequation. The single-domain method allows the satu-ration to vary between 0 and 1, and employs a fixedmesh. We derive the formulas to compute the diffusiveflux for MFE. The single-domain method is extendedto multiple dimensional domain.

Numerical results indicate that both two-domain andsingle-domain methods can accurately describe the evo-lution of the pressure and liquid level. We notice thatwith the same initial mesh, the single-domain methodallows much larger time steps than the two-domainmethod, and is more efficient in CPU time.

Finally, we give a remark on the two methods pro-posed in this work. The two-domain method requiresthe mesh moving to capture the liquid–gas interface,while the single-domain method does not. In two orthree spatial dimensional domains, it is difficult to cap-ture the liquid–gas interface because of its complexityand irregularity. Therefore, the extension to multipledimension is nontrivial for the two-domain method. Inthe two-domain method the refinement close to theinterface is both complicated and CPU time intensive,but it is needed for this method. On the other hand, inthe single-domain approach we do not need fine grids.All the grids can be the same size. In future, we willcontinue this effort and investigate the implicit schemesfor diffusion equations.

Acknowledgements This work was supported by the mem-ber companies of the Reservoir Engineering Research Institute.Their support is greatly appreciated. The authors also cheer-fully appreciate the generous support of the university researchfund to the Computational Transport Phenomena Laboratory at

KAUST. This work is partly support by Key Project of ChineseMinistry of Education (No.212109).

References

1. Abreu, E., Douglas, J., Furtado, F., Pereira, F.: Operatorsplitting for three-phase flow in heterogeneous porous media.Commun. Comput. Phys. 6, 72–84 (2008)

2. Akrivis, G., Crouzeix, M., Makridakis, C.: Implicit-explicitmultistep methods for quasilinear parabolic equations. Nu-mer. Math. 82(4), 521–541 (1999)

3. Ascher, U.M., Ruuth, S.J., Spiteri, R.J.: Implicit-explicitRunge-Kutta methods for time-dependent partial differentialequations. Appl. Numer. Math. 25(2–3), 151–167 (1997)

4. Chen, Z., Huan, G., Li, B.: An improved IMPES method fortwo-phase flow in porous media. Transp. Porous Media 54(3),361–376 (2004)

5. Chen, Z., Huan, G., Ma, Y.: Computational Methods forMultiphase Flows in Porous Media. Society for IndustrialMathematics (2006)

6. Coats, K.H.: IMPES stability: selection of stable timesteps.SPE J. 8(2), 181–187 (2003)

7. Dawson, C., Sun, S., Wheeler, M.F.: Compatible algorithmsfor coupled flow and transport. Comput. Methods Appl.Mech. Eng. 193(23–26), 2565–2580 (2004)

8. Dawson, C.N., Klíe, H., Wheeler, M.F., Woodward, C.S.:A parallel, implicit, cell-centered method for two-phaseflow with a preconditioned Newton–Krylov solver. Comput.Geosci. 1(3), 215–249 (1997)

9. Farago, I.: A modified iterated operator splitting method.Appl. Math. Model. 32(8), 1542–1551 (2008)

10. Firoozabadi, A.: Thermodynamics of Hydrocarbon Reser-voirs. McGraw-Hill Professional (1999)

11. Geiser, J.: Iterative operator-splitting methods with higher-order time integration methods and applications for parabolicpartial differential equations. J. Comput. Appl. Math. 217(1),227–242 (2008)

12. Gjesdal, T.: Implicit-explicit methods based on strong stabil-ity preserving multistep time discretizations. Appl. Numer.Math. 57(8), 911–919 (2007)

13. Haugen, K.B., Firoozabadi, A.: Composition at the inter-face between multicomponent nonequilibrium fluid phases.J. Chem. Phys. 130, 064707 (2009)

14. Haugen, K.B., Firoozabadi, A.: Mixing of two binary non-equilibrium phases in one dimension. AIChE J. 55(8), 1930–1936 (2009)

15. Hill, E.S., Lacey, W.N.: Rate of solution of propane in quies-cent liquid hydrocarbons. Ind. Eng. Chem. 26(12), 1327–1331(1934)

16. Hoteit, H., Firoozabadi, A.: Numerical modeling of two-phase flow in heterogeneous permeable media with differentcapillarity pressures. Adv. Water Resour. 31(1), 56–73 (2008)

17. Hundsdorfer, W., Ruuth, S.J.: IMEX extensions of linearmultistep methods with general monotonicity and bounded-ness properties. J. Comput. Phys. 225(2), 2016–2042 (2007)

18. Jamialahmadi, M., Emadi, M., Müller-Steinhagen, H.:Diffusion coefficients of methane in liquid hydrocarbons athigh pressure and temperature. J. Pet. Sci. Eng. 53(1–2), 47–60 (2006)

19. Jhaveri, B., Youngren, G.: Three-parameter modification ofthe Peng-Robinson equation of state to improve volumetricpredictions. SPE Reserv. Eng. 3(3), 1033–1040 (1988)

20. Kanney, J.F., Miller, C.T., Kelley, C.T.: Convergence of iter-ative split-operator approaches for approximating nonlinear

1124 Comput Geosci (2012) 16:1101–1124

reactive transport problems. Adv. Water Resour. 26(3), 247–261 (2003)

21. Koto, T.: Stability of IMEX Runge-Kutta methods for delaydifferential equations. J. Comput. Appl. Math. 211(2), 201–212 (2008)

22. Kou, J., Sun, S.: A new treatment of capillarity to improvethe stability of IMPES two-phase flow formulation. Comput.Fluids 39(10), 1293–1931 (2010)

23. Kou, J., Sun, S.: On iterative IMPES formulation for twophase flow with capillarity in heterogeneous porous media.Int. J. Numer. Anal. Model. Series B 1(1), 20–40 (2010)

24. Lanser, D., Verwer, J.G.: Analysis of operator splittingfor advection-diffusion-reaction problems from air pollutionmodelling. J. Comput. Appl. Math. 111(1–2), 201–216 (1999)

25. Lohrenz, J., Bray, B., Clark, C.: Calculating viscosities ofreservoir fluids from their compositions. J. Pet. Technol.16(10), 1171–1176 (1964)

26. Mikyska, J., Firoozabadi, A.: Implementation of higher-ordermethods for robust and efficient compositional simulation. J.Comput. Phys. 229(8), 2898–2913 (2010)

27. Peng, D.-Y., Robinson, D.B.: A new two-constant equationof state. Ind. Eng. Chem. Fundam. 15(1), 59–64 (1976)

28. Pomeroy, R.D., Lacey, W.N., Scudder, N.F., Stapp, F.P.: Rateof solution of methane in quiescent liquid hydrocarbons. Ind.Eng. Chem. 25(9), 1014–1019 (1933)

29. Reamer, H.H., Opfell, J.B., Sage, B.H.: Diffusion coefficientsin hydrocarbon systems methane-decane-methane in liquidphase-methane-decane-methane in liquid phase. Ind. Eng.Chem. 48(2), 275–282 (1956)

30. Riazi, M.R.: A new method for experimental measurementof diffusion coefficients in reservoir fluids. J. Pet. Sci. Eng.14(3–4), 235–250 (1996)

31. Rongy, L., Haugen, K.B., Firoozabadi, A.: Mixing fromfickian diffusion and natural convection in binary non-equilibrium fluid phases. AIChE J. 58(5), 1336–1345 (2012)

32. Sun, S., Geiser, J.: Multiscale discontinuous Galerkin andoperator-splitting methods for modeling subsurface flow andtransport. Int. J. Multiscale Com. 6(1), 87–101 (2008)

33. Sun, S., Wheeler, M.F.: A posteriori error estimation anddynamic adaptivity for symmetric discontinuous Galerkin ap-proximations of reactive transport problems. Comput. Meth-ods Appl. Mech. Eng. 195(7–8), 632–652 (2006)

34. Sun, S., Wheeler, M.F.: Anisotropic and dynamic mesh adap-tation for discontinuous Galerkin methods applied to reactivetransport. Comput. Methods Appl. Mech. Eng. 195(25–28),3382–3405 (2006)

35. Tharanivasan, A.K., Yang, C., Gu, Y.: Measurements ofmolecular diffusion coefficients of carbon dioxide, methane,and propane in heavy oil under reservoir conditions. EnergyFuels 20(6), 2509–2517 (2006)

36. Upreti, S.R., Mehrotra, A.K.: Experimental measurement ofgas diffusivity in bitumen: results for carbon dioxide. Ind.Eng. Chem. Res. 39(4), 1080–1087 (2000)

37. Watts, J.W.: A compositional formulation of the pressure andsaturation equations. SPE Reserv. Eng. 1(3), 243–252 (1986)

38. Young, L., Stephenson, R.: A generalized compositional ap-proach for reservoir simulation. Old Soc. Pet. Eng. J. 23(5),727–742 (1983)