compositional modeling by the combined discontinuous galerkin and mixed methods · 2008-03-17 ·...

16
Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods H. Hoteit and A. Firoozabadi, Reservoir Engineering Research Inst. (RERI) and Yale U. Summary In this work, we present a numerical procedure that combines the mixed finite-element (MFE) and the discontinuous Galerkin (DG) methods. This numerical scheme is used to solve the highly non- linear coupled equations that describe the flow processes in ho- mogeneous and heterogeneous media with mass transfer between the phases. The MFE method is used to approximate the phase velocity based on the pressure (more precisely average pressure) at the interface between the nodes. This approach conserves the mass locally at the element level and guarantees the continuity of the total flux across the interfaces. The DG method is used to solve the mass-balance equations, which are generally convection- dominated. The DG method associated with suitable slope limiters can capture sharp gradients in the solution without creating spu- rious oscillations. We present several numerical examples in ho- mogeneous and heterogeneous media that demonstrate the superi- ority of our method to the finite-difference (FD) approach. Our proposed MFE-DG method becomes orders of magnitude faster than the FD method for a desired accuracy in 2D. Introduction There has been gradual progress in the development of algorithms for the compositional simulation of hydrocarbon reservoirs in the last 15 years. Before that, there were several major advances in the numerical solution of the combined flow equations and the ther- modynamic equilibrium with the equations of state. Despite the advances of the last 25 to 30 years and the enormous progress in the speed of computers in the same period, we cannot yet perform field-scale compositional modeling satisfactorily in heterogeneous reservoirs. The main problem is the continued use of the FD dis- cretization scheme and its inherent limitations. Most of the current compositional simulators use the upstream weighted FD method to approximate the flow equations. Because of the fact that the flow processes are usually convection-dominated, FD methods may produce significant numerical diffusion (Coats 1980). The exces- sive numerical diffusion requires unrealistic gridding, especially with heterogeneities. Recently, the DG methods have been successfully implemented to approximate various physical problems, notably hyperbolic sys- tems of conservative laws. One property of these methods is that they conserve mass at the element level in a finite-element frame- work. Consequently, they enhance the flexibility of finite elements in describing flow in complicated geometries. Furthermore, the choice of the spatial approximation without the continuity across inter-element boundaries allows a simple treatment of combined finite-element cells with different geometries as well as different degrees of approximating polynomials. These methods associated with suitable slope limiters can capture discontinuities or sharp gradients in the solution. The DG method was first implemented for nonlinear scalar conservative laws by Chavent and Salzano (1982). However, these authors noted that a very restrictive timestep should be used to keep stability of the scheme. Later, Chavent and Cockburn (1989) introduced the slope limiter idea following the work of Van Leer (1978). In 1D, the modified scheme proved to be the total variation diminishing (TVD) under a fixed Courant-Freidricks-Levy (CFL) condition. Another class of DG methods such as the Runge-Kutta Discontinuous Galerkin (RKDG) was developed by Cockburn and Shu (1989, 1998). The RKDG method is an extension of the DG method to higher tem- poral and spatial approximation spaces. Recent developments have extended the DG method to approximate elliptic, diffusion, and convection-diffusion problems (Chen et al. 1995, Riviere et al. 1999, Oden et al. 1998). These methods have also been successfully implemented to approximate physical problems in aerodynamics, Navier-Stocks equations, and flow and transport in porous media. To the best of our knowledge, the DG method has not been yet implemented in compositional modeling. In this work, we use the DG method to approximate the nonlinear equations describing the species balance. When using constant approximation functions (shape functions), the numerical diffusion caused by upwinding is high enough to keep the scheme stable; in structured grids we get a FD scheme, and in unstructured grids, we get a finite volume (FV) scheme. The use of high-order approximation spaces pro- duces nonphysical oscillations near the shocks. In such a case, the use of an appropriate slope limiter ensures the stability of the method. Our scheme is stabilized by using the multidimensional slope limiter introduced by Hoteit et al. (2004), which is an im- proved version of that used by Chavent and Jaffré (1986). Other high-order upwind schemes such as TVD, essentially nonoscillatory (ENO), and weighted-ENO schemes have been used for two-phase multicomponent flow (Mallison et al. 2003, Thiele and Edwards 2001). However, these methods are, generally, limited to 1D space problems. In multidimensional streamline based models, these methods are used to approximate the 1D so- lution along the streamlines (Douglas et al. 1983). Our proposed algorithm in this work is intended for multidimensional space in both structured and unstructured grids. The accuracy of the velocity field (that is, the flux calculation) at the interface between the nodes is a key element in the numeri- cal simulation of transport processes. In classical finite-element (FE), FV, and FD methods, the nodal pressures (in FE) and aver- age element pressures (in FD and FV) are approximated first, and then the flux is calculated by local derivatives. This widely used approach for the calculation of the flux in two-phase flow may not be accurate, especially in heterogeneous media, because of pro- nounced change of pressure gradient across the physical interface. A key solution is to use the MFE method to approximate interface fluxes from Darcy’s law (Raviart and Thomas 1977). The main features for this choice include the fact that the pressure and the fluxes are approximated simultaneously with the same order of convergence; furthermore, the method is locally conservative and can readily accommodate the full permeability tensor. The MFE method is more accurate in flux calculation than the FV and FE methods (Mosé et al. 1994, Durlofsky 1994 ). In our MFE formu- lation, we use the lowest-order Raviart-Thomas space (Brezzi and Fortin 1991). The original MFE formulation leads to a saddle-point problem where the primary unknowns are the cell pressure aver- ages and the fluxes across the interfaces. A remedy is to use a hybridization technique (Chavent and Roberts 1991, Ewing and Heinemann 1983) where new degrees of freedom are appended at the element edges. The additional unknowns, which become the Copyright © 2006 Society of Petroleum Engineers This paper (SPE 90276) was first presented at the 2004 SPE Annual Technical Conference and Exhibition, Houston, 26–29 September, and revised for publication. Original manuscript received for review 26 October 2004. Revised manuscript received 14 September 2005. Paper peer approved 21 September 2005. 19 March 2006 SPE Journal

Upload: hadat

Post on 16-May-2019

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

Compositional Modeling by theCombined Discontinuous Galerkin and

Mixed MethodsH. Hoteit and A. Firoozabadi, Reservoir Engineering Research Inst. (RERI) and Yale U.

SummaryIn this work, we present a numerical procedure that combines themixed finite-element (MFE) and the discontinuous Galerkin (DG)methods. This numerical scheme is used to solve the highly non-linear coupled equations that describe the flow processes in ho-mogeneous and heterogeneous media with mass transfer betweenthe phases. The MFE method is used to approximate the phasevelocity based on the pressure (more precisely average pressure) atthe interface between the nodes. This approach conserves the masslocally at the element level and guarantees the continuity of thetotal flux across the interfaces. The DG method is used to solve themass-balance equations, which are generally convection-dominated. The DG method associated with suitable slope limiterscan capture sharp gradients in the solution without creating spu-rious oscillations. We present several numerical examples in ho-mogeneous and heterogeneous media that demonstrate the superi-ority of our method to the finite-difference (FD) approach. Ourproposed MFE-DG method becomes orders of magnitude fasterthan the FD method for a desired accuracy in 2D.

IntroductionThere has been gradual progress in the development of algorithmsfor the compositional simulation of hydrocarbon reservoirs in thelast 15 years. Before that, there were several major advances in thenumerical solution of the combined flow equations and the ther-modynamic equilibrium with the equations of state. Despite theadvances of the last 25 to 30 years and the enormous progress inthe speed of computers in the same period, we cannot yet performfield-scale compositional modeling satisfactorily in heterogeneousreservoirs. The main problem is the continued use of the FD dis-cretization scheme and its inherent limitations. Most of the currentcompositional simulators use the upstream weighted FD method toapproximate the flow equations. Because of the fact that the flowprocesses are usually convection-dominated, FD methods mayproduce significant numerical diffusion (Coats 1980). The exces-sive numerical diffusion requires unrealistic gridding, especiallywith heterogeneities.

Recently, the DG methods have been successfully implementedto approximate various physical problems, notably hyperbolic sys-tems of conservative laws. One property of these methods is thatthey conserve mass at the element level in a finite-element frame-work. Consequently, they enhance the flexibility of finite elementsin describing flow in complicated geometries. Furthermore, thechoice of the spatial approximation without the continuity acrossinter-element boundaries allows a simple treatment of combinedfinite-element cells with different geometries as well as differentdegrees of approximating polynomials. These methods associatedwith suitable slope limiters can capture discontinuities or sharpgradients in the solution. The DG method was first implementedfor nonlinear scalar conservative laws by Chavent and Salzano(1982). However, these authors noted that a very restrictivetimestep should be used to keep stability of the scheme. Later,

Chavent and Cockburn (1989) introduced the slope limiter ideafollowing the work of Van Leer (1978). In 1D, the modifiedscheme proved to be the total variation diminishing (TVD) undera fixed Courant-Freidricks-Levy (CFL) condition. Another class ofDG methods such as the Runge-Kutta Discontinuous Galerkin(RKDG) was developed by Cockburn and Shu (1989, 1998). TheRKDG method is an extension of the DG method to higher tem-poral and spatial approximation spaces. Recent developments haveextended the DG method to approximate elliptic, diffusion, andconvection-diffusion problems (Chen et al. 1995, Riviere et al.1999, Oden et al. 1998). These methods have also been successfullyimplemented to approximate physical problems in aerodynamics,Navier-Stocks equations, and flow and transport in porous media.

To the best of our knowledge, the DG method has not been yetimplemented in compositional modeling. In this work, we use theDG method to approximate the nonlinear equations describing thespecies balance. When using constant approximation functions(shape functions), the numerical diffusion caused by upwinding ishigh enough to keep the scheme stable; in structured grids we geta FD scheme, and in unstructured grids, we get a finite volume(FV) scheme. The use of high-order approximation spaces pro-duces nonphysical oscillations near the shocks. In such a case, theuse of an appropriate slope limiter ensures the stability of themethod. Our scheme is stabilized by using the multidimensionalslope limiter introduced by Hoteit et al. (2004), which is an im-proved version of that used by Chavent and Jaffré (1986).

Other high-order upwind schemes such as TVD, essentiallynonoscillatory (ENO), and weighted-ENO schemes have beenused for two-phase multicomponent flow (Mallison et al. 2003,Thiele and Edwards 2001). However, these methods are, generally,limited to 1D space problems. In multidimensional streamlinebased models, these methods are used to approximate the 1D so-lution along the streamlines (Douglas et al. 1983). Our proposedalgorithm in this work is intended for multidimensional space inboth structured and unstructured grids.

The accuracy of the velocity field (that is, the flux calculation)at the interface between the nodes is a key element in the numeri-cal simulation of transport processes. In classical finite-element(FE), FV, and FD methods, the nodal pressures (in FE) and aver-age element pressures (in FD and FV) are approximated first, andthen the flux is calculated by local derivatives. This widely usedapproach for the calculation of the flux in two-phase flow may notbe accurate, especially in heterogeneous media, because of pro-nounced change of pressure gradient across the physical interface.A key solution is to use the MFE method to approximate interfacefluxes from Darcy’s law (Raviart and Thomas 1977). The mainfeatures for this choice include the fact that the pressure and thefluxes are approximated simultaneously with the same order ofconvergence; furthermore, the method is locally conservative andcan readily accommodate the full permeability tensor. The MFEmethod is more accurate in flux calculation than the FV and FEmethods (Mosé et al. 1994, Durlofsky 1994 ). In our MFE formu-lation, we use the lowest-order Raviart-Thomas space (Brezzi andFortin 1991). The original MFE formulation leads to a saddle-pointproblem where the primary unknowns are the cell pressure aver-ages and the fluxes across the interfaces. A remedy is to use ahybridization technique (Chavent and Roberts 1991, Ewing andHeinemann 1983) where new degrees of freedom are appended atthe element edges. The additional unknowns, which become the

Copyright © 2006 Society of Petroleum Engineers

This paper (SPE 90276) was first presented at the 2004 SPE Annual Technical Conferenceand Exhibition, Houston, 26–29 September, and revised for publication. Original manuscriptreceived for review 26 October 2004. Revised manuscript received 14 September 2005.Paper peer approved 21 September 2005.

19March 2006 SPE Journal

Page 2: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

primary unknowns, represent the edge pressure averages (pressuretraces). It has been shown that, by using a lumped-mass techniqueto approximate some integrals, the MFE formulation, on rectan-gular elements, becomes the same as the classical cell-centered FDmethod (Russell and Wheeler 1983). However, this approach islimited to structured rectangular griddings and isotropic media.Our formulation is based on analytical calculations of all integralswithout restrictions on the discretized elements. In order to use theMFE method in two-phase flow to solve the pressure equation, weintroduce the concept of the total velocity following the work ofvarious authors (Durlofsky and Chien 1993, Chen and Ewing1997a, Chen and Ewing 1997b). This formulation ensures the massconservation for each component.

The combination of the DG and MFE methods has been imple-mented by many authors. Chavent et al. (1990) used these methodsto solve two-phase incompressible, immiscible fluid flow prob-lems. The combined methods were used to solve convection-diffusion equations by Siegel et al. (1997). Bués and Oltean (2000)combined these methods to solve incompressible, single-phaseflow in porous media, where they varied the density as a functionof concentration. Hoteit and Firoozabadi (2005) combined the DGand MFE methods to approximate single-phase flow of compress-ible and multicomponent fluid in fractured media. To the best ofour knowledge, the combined MEF-DG method has not beenimplemented in the literature for two-phase, compressible, andmulticomponent fluid flow in porous media.

This paper is organized as follows: First, the differential andalgebraic equations describing the displacement of two-phasecompositional flow are presented. Second, we describe the numeri-cal model that combines the MFE and DG methods. We use theMFE method to approximate Darcy’s law and the pressure equa-tion and the DG method to approximate the species flow equation.In this work, we ignore the capillary pressure and the physicaldiffusion. Finally, we present numerical examples in homogeneousand heterogeneous media to demonstrate the efficiency and robust-ness of our numerical approach.

Governing EquationsThe governing system describing the two-phase (gas and oil) flowof an nc-component mixture is given by the component balanceequations, and the thermodynamic equilibrium between the phases(as stated previously, in this work we neglect capillary pressureand diffusion processes).

The material balance for each component in the two phases canbe expressed as

��czi

�t+ �.Ui = 0, i = 1, . . . , nc, . . . . . . . . . . . . . . . . . . . . (1)

where Ui�(coxio�o+cgxig�g). The compositions zi, xio, and xig areconstrained by

�i=1

nc

zi = �i=1

nc

xio = �i=1

nc

xig = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2)

In the previous equations, � denotes the porosity, c is the overallmolar density, g and o refer to gas and oil phases, i is the com-ponent index, zi is the overall mole fraction of component i, xi� isthe mole fraction of component i in phase � (��o, g), and c� isthe molar density of phase �. Other variables are Ui, the molar fluxof component i; �� is the phase velocity.

The velocity for each phase is given by the Darcy law

�� = −kkr�

��

��p − �� g�, � = o, g, . . . . . . . . . . . . . . . . . . . (3)

where k is the absolute permeability of the porous medium, kr�,��, and �� are the relative permeability, viscosity, and mass den-sity of phase �, respectively; p denotes the pressure and g thegravitational vector.

Based on the concept of volume balance, one can obtain thepressure equation (Ács et al. 1985, Watts 1986):

�cf

�p

�t+ �

i=1

nc

vi�.Ui = 0, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4)

where cf is the total fluid compressibility and vi is the total partialmolar volume for component i.

Neglecting the capillary pressure simplifies the pressure equa-tion and reduces the coupling between the pressure and the speciesbalance equations. We like to mention here that in certain appli-cations such as immiscible gas injection and water injection inheterogeneous and fractured porous media, one has to account forcapillary pressure. On the other hand, physical diffusion and dis-persion can be much more important than capillary pressure insome applications such as gas injection in fractured reservoirs.Both capillary pressure and physical diffusion will be consideredin our future work for the applications in which these mechanismsare important.

Thermodynamic equilibrium is assumed between the fluidphases. The equilibrium implies the equality of the fugacities ofeach component in the two phases:

foi �T, p, xjo,j=1, . . . , nc−1� = fgi �T, p, xjg, j=1, . . . , nc−1�,

i = 1, . . . , nc. . . . . . . . . . . . . . . . . . . . . (5)

Numerical ModelThe numerical procedure proposed in this work is based on theMFE method for the pressure equation and the DG method for themass-balance equations.

The computational domain is discretized into a grid consistingof triangles and/or quadrilaterals. No restrictions are imposed onthe geometrical shape of the elements. In this paper, we presentresults using rectangles. In works in progress, triangles are beingused for the spatial discretization. The following notations aredefined: K is the discretized element or cell, E is the edge of cellK, Ne is the number of edges for each cell (Ne�3 or 4), NK isthe number of cells in a mesh, and NE is the number of edges ina mesh.

Solution of the Pressure Equation. The basic idea of the MFEmethod is to approximate simultaneously the pressure and its gra-dient. In order to apply the MFE method to solve the pressureEq. 4 and Darcy’s velocities from Eq. 3, we introduce the totalvelocity term, that is, the sum of gas and oil velocities (Durlofskyand Chien 1993).

Total Velocity. The total velocity, �, is defined as

� = ��=o,g

�� = −��=o,g

K���p − ��g�, . . . . . . . . . . . . . . . . . . . . . . (6)

where Ka�kkr�/�� is the mobility of phase �.In a more compact form, Eq. 6 becomes

� = −K��p − �g�, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7)

where

K = �Ko + Kg� and � = �Ko�o + Kg�g���Ko + Kg�.

Note that � is independent of the absolute permeability, k.From Eq. 7, we can write

�p = −K−1� + �g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8)

Substituting Eq. 8 into Eq. 3, we express the phase velocity �� interms of total velocity � independent of �p:

�� = ���� − G��, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (9)

where

�� = K��K, and G� = �Ko��o − �g�g, � = g

Kg��g − �o�g, � = o.

Approximation of the Total Velocity. The total velocity field isapproximated in the so-called Raviart-Thomas space of the lowestorder (RT0). In each cell K, the total velocity can be expressed withrespect to the normal flux qK,E across the cell edges E:

20 March 2006 SPE Journal

Page 3: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

� = �E∈�K

qK,EwK,E , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (10)

where wK,E, E∈�K is the RT0 basis function with continuous nor-mal component across each cell edge E.

Multiplying Eq. 9 by wK,E and integrating by parts, then thetotal flux qK,E is expressed through each edge E as a function of thecell pressure average pK and the edge pressure average tpK,E foreach cell K:

qK,E = K,E pK = �E�∈�K

�K�E,E �tpK,E� − �K,E , E ∈ �K, . . . . (11)

where K,E,(K)E,E� and �K,E are the coefficients that depend onthe geometrical shape of the element and the local mobility coef-ficient. For more details on the formulation of Eq. 11, one mayrefer to Chavent and Roberts (1991) and Hoteit et al. (2002).

By imposing the flux continuity across the cell interfaces,(qK,E=qK�,E E=K∩K�), the flux unknown can be eliminated fromEq. 11. As a result, the following linear system with main un-knowns; the cell average pressures P and the edge average pres-sures TP are obtained.

RTP − MTP = I, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (12)

where M is a sparse square matrix of dimension NE, R is a sparseNK×NE rectangular matrix, and I is a vector of dimension NE.

Approximation of the Pressure Equation. Replacing the phasevelocity �� in Eq. 4 (see also Eq. 1) by its expression given in Eq.9, the pressure equation becomes

�cf

�p

�t+ �

i=1

nc

vi�.�mi�si� = 0, . . . . . . . . . . . . . . . . . . . . . . . . . . (13)

where mi = ��=o,g

c�xi��� and si = ��=o,g

c�xi���G�.

Integration of Eq. 13 over each cell K and the use of the divergencetheorem yields

�Kcf,K

�pK

�t= −�

i=1

nc

�K

vi�.�mi�si�,

= �i=1

nc

��K

vi�mi�.n − si.n�, . . . . . . . . . . . . . . . . . . . (14)

where n is the outward unit normal to the cell boundary �K,�K,cf,K, and pK are the average values of �, cf, and p in cell K,respectively. In the scope of this work, the pressure is a smoothfunction of space and there is no need to consider higher-orderspatial approximation of the composition and densities in thepressure equation. The coefficients cf,misi, and vi are, therefore,evaluated at the cell centers. However, using higher-order spatialapproximation of the composition is expected to reduce the nu-merical diffusion in the species balance equations at the expenseof complexity.

Because the total fluid compressibility coefficient cf,K in Eq. 14is outside the time derivative, the local conservation of the methodat the cell level is not guaranteed. However, this should not causea numerical deficiency, because the pressure and velocity calcu-lations have no effect on the material balance in the species flowequations, which is always conserved at the element level thanksto the DG method. Note that other numerical methods such as FVor FD may have a similar conservation problem in solving Eq. 13.

The MFE method of lowest order supports a constant approxi-mation of the flux along each cell interface; for each cell K, theflux qK,E across edge E is

qK,E = |E |�K.nE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (15)

Using Eqs. 15 and 11 in Eq. 14, the flux unknown can be elimi-nated to obtain an expression in terms of the pressures. By apply-ing the Euler backward scheme to discretize the time operator andconsidering all the coefficients explicitly in time, we obtain a

second linear system in terms of the cell average pressures P andthe edge average pressures TP:

DP − R̃TP = G. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (16)

In this equation, D is a square diagonal matrix of dimension NK, R̃is a sparse NK×NE rectangular matrix, and G is a vector of dimen-sion NK.

Combining systems in Eqs. 12 and 16, one obtains

� D R̃

RT −M�� P

TP� = �G

I �. . . . . . . . . . . . . . . . . . . . . . . . . . (17)

Because D is a diagonal matrix, the Schur complement matrix isreadily computed to have the final linear system in which thepressure traces are the primary unknowns.

�M − RTD−1R̃�TP = RTD−1G − I. . . . . . . . . . . . . . . . . . . . . . . . . (18)After calculating TP, the cell pressure average, the flux can becomputed locally through Eqs. 16 and 11.

Solution of the Material Balance Equations. The DG method isused to discretize the species balance equations from Eq. 1. Themethod consists of a discontinuous, piecewise, linear (on tri-angles), or bilinear (on quadrilaterals) approximation of the un-knowns czi, i=1, . . . , nc. By using constant approximation over thecells, the DG method reduces to the first-order cell-centered finitevolume method.

For the sake of simplicity, we only describe the implementationof the DG method to the equation obtained by summing Eq. 1 overthe species and using the constraints given by Eq. 2:

��c

�t+ �.��

�=o,g

c���� = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . (19)

Over each cell K the unknown K is approximated in a discontinu-ous finite element space, so that

cK = �j=1

Nc

cK, j�K, j , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (20)

where �K,j is the classical bilinear finite element shape function.Multiplying Eq. 19 by the test function �K,� and integrating byparts yields

�K �K

�cK

�t�K,t − �

K��=o,g

cK,���.��K,t

+ ��K

��=o,g

cK,�in�out�K,t��.n = 0, � = 1, . . . , Ne ,

. . . . . . . . . . . . . . . . . . . . . . . . . . (21)

where the superscript “in/out” denotes the upstream values, whichare used to calculate the upstream weighted numerical fluxes. De-pending on the incoming or outgoing fluxes with respect to a cell K,

cK,�in�out = �cK,�

in if ��.n 0,

cK,�out otherwise.

The local system of Eq. 21 allows us to calculate the nodal values cK,j,j�1, . . . , Ne. Because the solution may have nonphysical oscil-lations, a reconstruction step is required for the scheme stability.

Data Reconstruction by Slope Limiter. It is widely known thatwith a variable approximation, the DG method becomes unstable.The use of an appropriate slope limiter avoids overshoots andundershoots in the solution. Such a slope limiter is the one intro-duced by Chavent and Jaffré (1986), which can be interpreted as ageneralization of the Van Leer MUSCL 1D slope limiter (1978).The basic idea is to impose local constraints in a geometric mannerso that the reconstructed solution satisfies an appropriate maxi-mum principle. These constraints state that the value of the statefunction at a node I, for example, should lie between the minimumand the maximum of the cell averages of all elements containing I

21March 2006 SPE Journal

Page 4: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

as a vertex. The slope limiter from Van Leer was later modified byHoteit et al. (2004). They found that limiting the state edge aver-age is more appropriate than limiting the nodal values as proposedby Chavent and Jaffré. This modification improved the slope lim-iter in eliminating spurious oscillation and reduced the numericaldiffusion. Further details on slope limiters are given in the Appendix.

Algorithm. The coupling between the pressure and the mass-balance equations is performed through an implicit pressure andexplicit overall compositions procedure. The pressure equation isapproximated by the MFE method implicitly in time with thecoefficients evaluated from the previous timestep. The mass-balance equations are solved explicitly by the DG method. Theprincipal steps of the combined MFE-DG algorithm are as follows:

1. For a given temperature, pressure, and overall compositionzi, stability analysis is first performed to determine whether thesystem is in single phase or in dual phase. If in dual phase, flashcalculations are performed. This step provides partial molar vol-umes in single and in dual phase, phase composition if in dualphase, two-phase compressibility (Wong et al. 1990), and otherrelevant parameters. We use the Peng-Robinson equation of state(1976) (PR-EOS) in our phase and volumetric calculations.

2. Based on phase composition, pressure, and temperature, phaseviscosity is calculated by the methodology of Lohrenz et al.(1964).

3. The pressure equation is solved by the MFE method. In thisstep, only the average pressure across the interfaces (the pressuretraces) is calculated globally from Eq. 18.

4. The DG method is used to calculate czi, i=1, . . . , nc from themass balance equations. Then czi, i�1, . . . , nc are reconstructedby the slope limiter procedure.

5. The previous steps are repeated until a predetermined timeis reached.

Numerical ResultsWe have extensively tested the algorithm described in the preced-ing section. In the following, we present some of our results forbinary, ternary, and six-component mixtures for homogeneous andheterogeneous media in 1D and 2D. Linear relative permeabilitiesare used in all examples except for Example 3, where the relativepermeability is a quadratic function of the saturation. The fluidmixtures with only two to three components reveal the essence ofthe advances in a simple way. All the results are for structuredgrids. Results for unstructured grids will be presented in a forth-coming publication. Even in a structured grid, the proposed algo-rithm is far superior to the FD schemes, as we will see shortly. Acommercial FD simulator was used to compare with our resultsfrom the combined MFE-DG methods. The simulator uses theconventional, five-point orthogonal Cartesian grid in 2D with theimplicit pressure explicit saturation (IMPES) option. The linearsolver in the commercial simulator is the Orthomin preconditionedby ILU. Because DG formulation is explicit in time, the timestepis restricted to a CFL condition. We used a simple adaptivetimestep algorithm that controls the timestep by limiting the maxi-mal local variations in pressure and concentrations. All runs wereexecuted on a 2.4GHz PC-Pentium 4.

1D Problems. The 1D porous medium is 50 m in length for Ex-amples 1 and 2 with a unit sectional area. The length is 1 m inExample 3. The porosity and permeability are 20% and 10 md,respectively. Constant volumetric flow rate is used in the injectionend. At the production end, the pressure is kept constant; it is equalto initial pressure. Three examples are presented for two-, three-,and six-component mixtures.

Example 1. In this example, we inject C1 at one end in order todisplace C3 to the other end. Initially, the domain is saturated withC3. The data for this example are given in Table 1. In Example 1a,the initial pressure and temperature are p�50 bar and T�397 K,respectively. The injection rate is 0.017 PV/D.

Fig. 1 shows the results in terms of the composition of methanevs. the distance from the injection point. The reference solution is

obtained by 500 nodes in the combined MFE-DG methods, wherea shock is firmly predicted. Fig. 1 reveals that the combined MFE-DG method has low numerical diffusion with 100 nodes, and thesolution converges to the reference solution. The results also showthat the FD scheme has a substantial numerical diffusion whichdecreases as the number of nodes increases. The results with theFD method with 500 nodes and the MFE-DG method with 100nodes are comparable. The average timesteps used by the FDsimulator on the grids of 50, 100, and 500 nodes are approximately0.30, 0.18, and 0.04 days, respectively. The average timestep usedby the MFE-DG method on the grids of 50 and 100 nodes areapproximately 0.18 and 0.10 days, respectively. By changing thepressure and temperature to p�69 bar and T�311 K (Example1b), a two-phase region appears. Fig. 2 shows that there are twoshocks for the two-phase example. As with Example 1a, the 500-node FD solution and the 100-node MFE-DG solution are com-parable. Tables 2 and 3 show the CPU time performance of Ex-amples 1a and 1b. Because the results of the FD scheme with 500nodes and the MFE-DG method with 100 nodes are comparable,then for this particular example, the latter is four times faster thanthe former. Note that for the same number of nodes, the MFE-DGmethod is slower than the FD method, partly because of the ad-ditional pressure calculation at the interfaces.

Example 2. We consider the displacement of a binary liquid mix-ture of C2/C3 by a gas mixture of C1/C3. The injection gas, com-posed of 90% of C1 and 10% of C3, is injected at a rate of 0.017PV/D. The fluid and rock properties for this example are given inTable 4. Fig. 3 shows the phase-behavior data of the ternarymixture C1/C2/C3 at the initial pressure (also the outlet pressure)and temperature conditions (Table 4). Line AB joins the points ofthe initial injected gas and domain liquid compositions crossingthe two-phase region. A two-phase region is thus expected toappear in the solution after certain injection. The compositionprofiles of methane and propane in oil and gas phases are depictedin Figs. 4 and 5 after injecting nearly 51% of the pore volume. Thereference solution is obtained by the MFE-DG method with 500nodes. The CPU time is shown in Table 5. It appears that the FDcode is two to three times faster than the MFE-DG solution if thesame number of nodes is considered. However, the FD solutionshows significant numerical diffusion compared to the MFE-DGsolution. If comparable accuracy is desired, the MFE-DG methodbecomes nearly five times more efficient than the DF method.

Example 3. In this six-component problem, CO2 is injected todisplace the C1/C4/C10/C14/C20 liquid mixture. The fluid and rockproperties for this example are given in Table 6. Two initial pres-sures, 110 and 191 bar, are considered. With p�110 bar (Example3a), the solution is composed of several propagating shocks. Theseshocks appear in the K-values (Fig. 6), which are plotted at PVinjection�0.66. In Fig. 7, the gas saturation is plotted for variousgrid refinements by the MFE-DG and FD methods. The referencesolution is obtained by the MFE-DG method with 500 nodes. Allshocks are captured with 2,000 nodes in the FD method. Resultsfor C14, CO2, and C1 are plotted in Fig. 8. By increasing the initialpressure (p�191 bar, Example 3b), two shocks appear in thesolution. The gas saturation and mole fractions of CO2 and C20 aredepicted in Fig. 9. Compared with the reference solution that isobtained with 200 nodes by the MFE-DG method, the results by

22 March 2006 SPE Journal

Page 5: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

the FD method introduce significant numerical diffusion. Thieleand Edwards (2001) have assumed constant K-values and constantvelocity using the same composition as we used in this example.These authors used a higher-order Godunov method. Their resultsare somewhat different from those in Figs. 7 and 8 because ofthese assumptions.

2D Homogeneous Problem. Example 4. We consider a homo-geneous 2D horizontal domain of area 50×50 m2. Methane isinjected at one corner to displace propane to the opposite produc-ing corner; the domain is initially saturated with propane (seeTable 7). At the production well, the pressure is kept constant. Aswith the 1D examples given previously, we compare our code to

the FD commercial code. In Fig. 10, the composition profile of C1

by the FD and MFE-DG codes are shown at nearly 29, 58, and73% PV displacements. The gridding is fixed in this example. TheFD solution has a pronounced numerical diffusion compared to theMFE-DG solution. Even with more refined grids (80×80,160×160, and 200×200), the FD result is still very diffusive; theMFE-DG method for a 40×40 gridding introduces less numericaldiffusion than the FDM on a 200×200 grid (see Figs. 10 and 11).The MFE-DG algorithm is two to three orders of magnitude fasterthan the FDM for the same accuracy (see Table 8).

2D Heterogeneous Problem. Example 5. We consider the samemixture as in Example 4. The porous medium, in this example, is

Fig. 1—Methane composition in gas phase vs. distance at two different PV injections for various refinements in the MFE-DG andFD methods: Example 1a (p=50 bar, T=311 K).

23March 2006 SPE Journal

Page 6: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

a 2D horizontal domain of area 50×20 m2. Two zones of differentpermeabilities are considered. The permeabilities in Zone 1 (50×10m2) and Zone 2 (50×10 m2) are 10 md and 0.1 md, respectively(see Fig. 12). Methane is injected with a rate of 3.13×10–2 PV/D

uniformly distributed across the left side of the domain. Pressure isheld constant along the right side of the domain. Two examples,Example 5a and Example 5b, are considered with different pres-sure and temperature conditions (see Table 6). In Example 5a,

Fig. 2—Methane composition in gas phase vs. distance at two different PV injections for various refinements in the MFE-DG andFD methods: Example 1b (p=69 bar, T=311 K).

24 March 2006 SPE Journal

Page 7: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

there is a first-contact miscibility displacement where one shockoccurs at the gas/liquid interface. Results for methane compositionfrom the FD and MFE-DG methods are presented in Fig. 13 forfour progressively finer grids. The numerical diffusion by the FDmethod is excessive. We notice that the solution by the MFE-DGmethod on a 40×20 grid and the FD solution on a 320×160 havenearly the same accuracy. The CPU time given in Table 9 showsthat our algorithm is at least three orders of magnitude more effi-cient than the FD method. In Example 5b, a two-phase regionappears. Fig. 14 presents methane composition in a 3D view by theFD and MFE-DG methods on 160×80 and 80×40 grids, respec-

Fig. 3—Methane composition in gas and liquid phases vs. distance for various refinements in the MFE-DG and FD methods:Example 2; PV injection=0.51.

25March 2006 SPE Journal

Page 8: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

tively. Fig. 15 shows the extract of composition data from Fig. 14along the line y�2 m, parallel to the x-axis. In Example 5b, the FDmethod produces less numerical diffusion than in Example 5a. TheFD and MFE-DG methods seem to converge and give similarresults on 160×80 and 80×40 grids, respectively.

Summary and Conclusions

An algorithm is developed for two-phase multicomponent fluidflow in homogeneous and heterogeneous porous media with inter-face mass transfer. Our numerical approach combines the MFEand the DG methods. The MFE method is used to solve implicitly

the pressure equation. To reduce the size of the linear system bythe classical MFE method, where the cell pressure averages andthe fluxes are the primary unknowns, the hybridized MFE methodis used. With this technique, the traces of the pressure are theprimary unknowns. The cell pressure averages and the fluxes canbe calculated locally. The species-balance equations are thensolved explicitly using the DG method. In order to avoid spuriousoscillations, a slope-limiting operator is used to stabilize the DGmethod. The slope limiter imposes local monotonicity constraintson the DG solution so that the solution profile is reconstructed freefrom any local minima or maxima at the edge centers. After solv-ing the pressure and the overall composition, flash calculations are

Fig. 4—Propane composition in gas and liquid phases vs. distance for various refinements in the MFE-DG and FD methods:Example 2; PV injection=0.51.

26 March 2006 SPE Journal

Page 9: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

Fig. 5—Phase diagram of the ternary mixture C1/C2/C3 at p=69bar and T=311 K): Example 2.

Fig. 6—K-values vs. distance: Example 3a; PV injection=0.66.

Fig. 7—Gas saturation for various grid refinements by the MFE-DG and FD methods: Example 3a; PV injection=0.66, p=110 bar.

27March 2006 SPE Journal

Page 10: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

performed to obtain the compositions, phase densities, and rel-evant coefficients.

The main features of this approach are:1. The MFE method provides a highly accurate approximation of

the fluxes, especially in heterogeneous media. This method isnaturally adapted to treat a full-permeability tensor. In this pa-per, the numerical results are performed on structured grids witha scalar permeability.

2. The DG method, combined with an appropriate slope limiter,has superiority to capture shocks or sharp gradients in the so-lution without creating spurious oscillations or excessive nu-merical diffusion. This method is also flexible to describe com-plicated geometries by using unstructured grids.The numerical results presented in this work, where we com-

pare the accuracy and the performance of our algorithm with anFD-based commercial software, show that the MFE-DG method in

Fig. 8—The composition of C14, CO2, and C1 for various grid refinements by the MFE-DG and FD methods: Example 3a, PVinjection=0.66, p=110 bar.

28 March 2006 SPE Journal

Page 11: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

1D is three to four times faster than the FD method, but in 2D itis at least two to three orders of magnitude more efficient than theFD method for comparable accuracy. The advantage of our algo-rithm is mainly for 2D problems. It is clear that the gain in 2D ismuch more than that in 1D. This is mainly because in 2D we mayhave additional numerical diffusion because of the mesh orienta-tion. In both of the 2D examples presented in the paper, the meshis anisotropic (that is, the flow is not perpendicular to the meshinterfaces). Unlike the MFE-DG method, the FD method on aniso-

tropic meshes may produce significant numerical diffusion evenfor fine meshes.

Nomenclaturec � overall molar density, mole/m3

cf � total fluid compressibilityc� � molar density of the �-phase, mole/m3

E � mesh edge

Fig. 9—Methane composition in gas phase for various grid refinements by the MFE-DG and FD methods: Example 3b; PV injec-tion=0.37, p=191 bar.

29March 2006 SPE Journal

Page 12: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

fgi � fugacity of component i in gas phasefoi � fugacity of component i in oil phaseg � acceleration of gravity, m/s2

k � absolute permeability, m2

kra � relative permeabilityK � mesh cell

K� � effective mobility, m.s/kgnc � number of componentsNe � number of edges of a cellNE � number of edgesNK � number of cells in a mesh

p � pressure, PaqK,E � flux across edge E in K

t � time, stp � pressure trace, PaT � temperature, K

Ui � molar flux of component iwK,E � RT0 basis function

� � viscosity, kg/m/svi � total partial molar volume of i

�� � mass density of phase �, kg/m3

� � porosity, %� � total velocity, m/s

�� � velocity of phase �, m/s

AcknowledgmentsThis work was supported by the member companies of the Res-ervoir Engineering Research Inst. (RERI).

ReferencesÁcs, G., Doleschall, S., and Farkas, E.: “General Purpose Compositional

Model,” SPEJ (1985) 25, No. 4, 543.Brezzi, F. and Fortin, M.: Mixed and Hybrid Finite Element Method,

Springer-Verlag, New York City (1991).Buès M.A. and Oltean, C.: “Numerical Simulations for Saltwater Intrusion

by the Mixed Hybrid Finite Element Method and Discontinuous FiniteElement Method,” Transport in Porous Media (2000) 40, 171.

Chavent, G. and Cockburn, B.: “The local projection P0 P1—discontinuousGalerkin finite element method for scalar conservation laws,” M2AN(1989) 23, 565.

Chavent, G., Cohen, G., Jaffré, J., Eyard, R., Guerillot, D.R., and Weill, L.:“Discontinuous and Mixed Finite Elements for Two-Phase Incompress-ible Flow,” SPERE (1990) 5, No. 4, 567; Trans., AIME, 289.

Chavent, G. and Jaffré, J.: Mathematical Models and Finite Elements forReservoir Simulation, Studies in Mathematics and Its Applications,North Holland, Amsterdam (1986).

Chavent, G. and Roberts, J.-E.: “A unified physical presentation of mixed,mixed-hybrid finite element method and standard finite difference ap-proximations for the determination of velocities in water flow prob-lems,” Adv. Water Resour. (1991) 14, 3.

Chavent, G. and Salzano, G.: “A finite-element method for the 1-D waterflooding problem with gravity,” J. Comput. Phys. (1982) 45, 307.

Chen, Z., Cockburn, B., Gardner, C., and Jerome, J.: “Quantum hydrody-namic simulation of hysteresis in the resonant tunneling diode,” J.Comput. Phys. (1995) 117, 27.

Chen, Z. and Ewing, R.: “Comparison of various formulations of the three-phase flow in porous media,” J. Comp. Phys. (1997a) 132, 362.

Chen, Z. and Ewing, R.: “From single-phase to compositional flow: ap-plicability of mixed finite elements,” Transport in Porous Media(1997b) 27, 225.

Coats, K.: “An Equation of State Compositional Model,” SPEJ (1980) 20,363.

Cockburn, B. and Shu, C.: “TVB Runge Kutta local projection discontinu-ous Galerkin finite element method for conservative laws II: Generalframe-work,” Math. Comp. (1989) 52, 411.

Cockburn, B. and Shu, C.: “The Runge-Kutta Discontinuous GalerkinMethod for Conservative Laws V: Multidimensional Systems,” J.Comput. Phys. (1998) 141, 19.

Douglas, J., Ewing, R., and Wheeler, M.F.: “Approximation of the pressureby a mixed method in the simulation of miscible displacement,”R.A.I.R.O. Anal. Numér. (1983) 17, 17.

Durlofsky, L.: “Accuracy of mixed and control volume finite elementapproximations to Darcy velocity and related quantities,” Water Re-sour. Res. (1994) 30, 4965.

Durlofsky, L.J. and Chien, M.C.H.: “Development of a Mixed Finite-Element-Based Compositional Reservoir Simulator,” paper SPE 25253presented at the 1993 SPE Symposium on Reservoir Simulation, NewOrleans, 28 February–3 March.

Ewing, R.E. and Heinemann, R.F.: “Incorporation of Mixed Finite-Element Methods in Compositional Simulation for Reduction of Nu-merical Dispersion,” paper SPE 12267 presented at the 1983 SPE Res-ervoir Simulation Symposium, San Francisco, 15–18 November.

Hoteit, H., Ackerer, P., Mosé, R., Erhel, J., and Philippe, B.: “New Two-Dimensional Slope Limiters for Discontinuous Galerkin Methods onArbitrary meshes,” Int. J. Numer. Meth. Eng. (2004) 61, No. 14, 2566.

Hoteit, H., Erhel, J., Mosé, R., Philippe, B., and Ackerer, P.: “Numericalreliability for the mixed methods applied to flow problems in porousmedia,” Computational Geosciences (2002) 6, 161.

Hoteit, H. and Firoozabadi, A.: “Multicomponent fluid flow by discontinu-ous Galerkin and mixed methods in unfractured and fractured media,”Water Resour. Res. (2005) 41, doi:10.1029/2005WR004339.

Lohrenz, J., Bray, B.G., and Clark, C.R.: “Calculating Viscosities of Res-ervoir Fluids From Their Compositions,” JPT (1964) 1171.

Mallison, B., Gerritsen, M., Jessen, K., and Orr, F.M. Jr.: “High-OrderUpwind Schemes for Two-Phase, Multicomponent Flow,” paper SPE79691 presented at the 2003 SPE Reservoir Simulation Symposium,Houston, 3–5 February.

Mosé, R., Siegel, P., Ackerer, P., and Chavent, G.: “Application of themixed-hybrid finite element approximation in a ground water flowmodel: Luxury or necessity?,” Water Resour. Res. (1994) 30, 3001.

Oden, J., Babuska, I., and Baumann, C.: “A discontinuous hp finite elementmethod for diffusion problems,” J. Comput. Phys. (1998) 146, 49.

Peddibhotla, S., Datta-Gupta, A., and Xue, G.: “Multiphase StreamlineModeling in Three Dimensions: Further Generalizations and a FieldApplication,” paper SPE 38003 presented at the 1997 SPE ReservoirSimulation Symposium, Dallas, 8–11 June.

Peng, D. and Robinson, D.: “A New Two Constant Equation of State,” Ind.Eng. Chem. Fund. (1976) 15, 59.

Raviart, P. and Thomas, J.: “A mixed hybrid finite element method for thesecond order elliptic problem,” Lecture Notes in Mathematics 606,Springer-Verlag, New York City (1977) 292.

Riviere, B., Wheeler, M.F., and Girault, V.: “Improved Energy Estimatesfor Interior Penalty, Constrained and Discontinuous Galerkin Methodsfor Elliptic Problems. Part I,” Computational Geosciences (1999) 8,337.

Russell, T. and Wheeler, M.F.: “Finite element and finite difference meth-ods for continuous flows in porous media,” SIAM, R. Ewing (ed.), TheMathematics of Reservoir Simulation (1983) 35, 106.

Siegel, P., Mosé, R., Ackerer, P., and Jaffré, J.: “Solution of the advection-dispersion equation using a combination of discontinuous and mixedfinite elements,” Int. J. Numer. Meth. Fluids (1997) 24, 595.

Thiele, M.R. and Edwards, M.G.: “Physically Based Higher-Order Go-dunov Schemes for Compositional Simulation,” paper SPE 66403 pre-

30 March 2006 SPE Journal

Page 13: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

sented at the 2001 SPE Reservoir Simulation Symposium, Houston,11–14 February.

Van Leer, B.: “Towards the ultimate conservative scheme: II,” J. Comput.Phys. (1978) 14, 36.

Watts, J.W.: “A Compositional Formulation of the Pressure and SaturationEquations,” SPERE (1986) 1, No. 3, 243; Trans., AIME, 281.

Wong, T.W, Firoozabadi, A., and Aziz, K.: “Relationship of the Volume-Balance Method of Compositional Simulation to Newton-RaphsonMethod,” SPERE (1990) 5, No. 3, 415; Trans., AIME, 289.

AppendixThe DG method may produce nonphysical oscillations near shocksin the solution. This may lead to a numerical stability problem.Slope or flux limiters are a common cure for this problem. Theslope limiter used in this work to stabilize the DG method can beapplied for unstructured rectangular or triangular meshes. Beforeoutlining the procedure, let us consider a typical gridblock P withsurrounding blocks E, W, N, S, and EN, NW, SE, EN. Let en, nw,ws, and en be the nodes of block P (see Fig. A-1). The objective

Fig. 10—Methane composition in gas phase at different PV injections: Example 4, 40×40 grid.

31March 2006 SPE Journal

Page 14: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

of the slope limiter is to reconstruct the values of the unknown(say, the concentration) at the nodes so that the solution is freefrom nonphysical oscillations. The procedure is performed in twosteps as follows:

1. In the first step, the edge average values of the concentrationce, cw, cn, and cs are reconstructed so that we avoid having localminima or maxima at the edge midpoints without modifying theaverage material in the block, for example:

�min�cP, cE� � ce � max�cP, cE�

min�cP, cW� � cw � max�cP, cW��avoid local extrema�

ce + cw = 2cP �conserve the average block material�. . . . . . . . . . . . . . . . . . . . . . . . (A-1)

and

�min�cP, cN� � cn � max�cP, cN�

min�cP, cS� � cs � max�cP, cS��avoid local extrema�

cn + cs = 2cP �conserve the average block material�. . . . . . . . . . . . . . . . . . . . . . . . (A-2)

Eqs. A-1 and A-2 can be solved separately by using a 1D slopelimiting procedure, such as minmod, Van Leer, Osher, or otherslope limiters.

2. In this step, we reconstruct the concentrations at the nodesen, nw, ws, and en of block P. The material conservation leads tothe equations

Fig. 11—Methane composition in gas phase for various grid refinements by the MFE-DG and FD methods: Example 4; PVinjection=0.58.

Fig. 12—2D horizontal domain with two different rock perme-abilities.

32 March 2006 SPE Journal

Page 15: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

Fig. 13—Methane composition for various grid refinements by the MFE-DG and FD methods: Example 5a; PV injection=0.37 (p=50bar, T=397 K).

Fig. 14—3D view of methane overall composition by the MFE-DG and FD methods: Example 5b; PV injection=0.37 (p=40 bar, T=311 K).

33March 2006 SPE Journal

Page 16: Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods · 2008-03-17 · Compositional Modeling by the Combined Discontinuous Galerkin and Mixed Methods

cen + cse = 2ce

cnw + cws = 2cw

cen + cnw = 2cn

cws + cse = 2cs

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-3)

The nodal concentrations cannot be uniquely calculated fromthe previously described system of equations. To guarantee aunique solution, we append additional constraints so that the con-centration at each node lies between the minimum and the maxi-

mum values of concentrations of the blocks that have this node incommon, for instance:

min�cNW , cN , cP , cW� � cnw � max�cNW , cN , cP , cW�

min�cN , cEN , cE , cP� � cen � max�cN , cEN , cE , cP�

min�cP , cE , cSE , cS� � cse � max�cP , cE , cSE , cS�

min�cW , cP , cS , cWS� � cws � max�cW , cP , cS , cWS�

. . . . . (A-4)

The problem can then be formulated so that we seek the nodalunknowns to be at minimal distance from the initial nodal con-centrations so that the constraints in Eqs. A-3 and A-4 are satisfied.The minimization problem is of rank 3, with 4 unknowns. Thus, itcan be reduced to a minimization problem with one variable. Thesolution can be efficiently obtained with a noniterative procedure.For more details, refer to Hoteit et al. (2004).

Hussein Hoteit is a scientist at the Reservoir Engineering Re-search Inst. (RERI) in Palo Alto, California. His research interestsinclude numerical modeling of multiphase miscible and immis-cible flow in homogeneous and fractured media. He holds MSand PhD degrees in applied mathematics from U. Rennes 1,France. Abbas Firoozabadi is a senior scientist and director atRERI. He also teaches at Yale U. and at Imperial College, Lon-don. e-mail: [email protected]. His main research activities centeron thermodynamics of hydrocarbon reservoirs and productionand on multiphase-multicomponent flow in fractured petro-leum reservoirs. Firoozabadi holds a BS degree from AbadanInst. of Technology, Abadan, Iran, and MS and PhD degreesfrom the Illinois Inst. of Technology, Chicago, all in gas engi-neering. Firoozabadi is the recipient of both the 2002 SPE An-thony Lucas Gold Medal and the 2004 SPE John Franklin CarllAward.

Fig. 15—Methane overall composition for various grid refinements by the MFE-DG and FD methods, data are extracted along theline y=2m: Example 5b; PV injection=0.37 (p=40 bar, T=311 K).

Fig. A-1—Typical gridblock with the surrounding elements.

34 March 2006 SPE Journal