16
Adaptive simulations of two-phase flow by discontinuous Galerkin methods W. Klieber, B. Rivie `re * Department of Mathematics, University of Pittsburgh, 301 Thackeray, Pittsburgh, PA 15260, USA Received 4 October 2005; received in revised form 12 April 2006; accepted 3 May 2006 Abstract In this paper we present and compare primal discontinuous Galerkin formulations of the two-phase flow equations. The wetting phase pressure and saturation equations are decoupled and solved sequentially. Proposed adaptivity in space and time techniques yield accurate and efficient solutions. Slope limiters valid on non-conforming meshes are also presented. Numerical examples of homogeneous and heterogeneous media are considered. Ó 2006 Elsevier B.V. All rights reserved. Keywords: Error indicators; Discontinuous Galerkin; Adaptive time stepping; Slope limiters; Five-spot; NIPG; SIPG; IIPG; OBB 1. Introduction Accurate simulations of multiphase processes are essen- tial in problems related to the environment and the energy. There is a need for discretization methods that perform well on very general unstructured grids. Standard methods such as the finite difference methods, finite volumes and expanded mixed finite element fail to capture the flow phe- nomena in the case of highly heterogeneous media with full permeability tensors. Recently, discontinuous Galerkin (DG) methods have been applied to a variety of flow and transport problem [21,22,2,25,24] and due to their flexibil- ity, they have been shown to be competitive to standard methods. Furthermore, DG methods allow for unstruc- tured meshes and full tensor coefficients. Even though the discontinuous finite element methods are more expensive than the finite difference methods, oil engineers are willing to pay the price for accuracy and thus avoid costly mis- takes [20]. In this work, the pressure-saturation formulation (also known as the sequential formulation) of the two-phase flow problem is discretized using several discontinuous Galerkin methods. Description of the sequential model and other formulations for two-phase flow can be found in [14,6]. The unknowns are the wetting phase pressure and satura- tion and the equations are solved successively. One imme- diate advantage is the fact that the difficulty arising from the non-linearity is removed by time-lagging the co- efficients. The pressure equation is solved by the Oden– Baumann–Babuska (OBB) method [18] whereas the saturation equation is solved by either the OBB, the non- symmetric interior penalty Galerkin method (NIPG) [23], the symmetric interior penalty Galerkin method (SIPG) [27,1] or the incomplete interior penalty Galerkin method (IIPG) [9,26]. One can note that all four methods OBB, NIPG, SIPG and IIPG are very similar to each other, and can be described by the same variational formulation with a bilinear form involving constant parameters. For instance, OBB and NIPG only differ by the addition of a penalty term; SIPG and NIPG only differ by a sign. The objective of this work is to investigate adaptive simulations in time and space on unstructured meshes. We formulate error indicators for the spatial refinement and derefinement techniques. We also present an algorithm that allows the time step to vary during the simulation. One 0045-7825/$ - see front matter Ó 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.cma.2006.05.007 * Corresponding author. Tel.: +1 412 6248315; fax: +1 412 6248397. E-mail address: [email protected] (B. Rivie `re). www.elsevier.com/locate/cma Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

Adaptive simulations of two-phase flow by discontinuous

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Adaptive simulations of two-phase flow by discontinuous

www.elsevier.com/locate/cma

Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

Adaptive simulations of two-phase flow by discontinuousGalerkin methods

W. Klieber, B. Riviere *

Department of Mathematics, University of Pittsburgh, 301 Thackeray, Pittsburgh, PA 15260, USA

Received 4 October 2005; received in revised form 12 April 2006; accepted 3 May 2006

Abstract

In this paper we present and compare primal discontinuous Galerkin formulations of the two-phase flow equations. The wettingphase pressure and saturation equations are decoupled and solved sequentially. Proposed adaptivity in space and time techniques yieldaccurate and efficient solutions. Slope limiters valid on non-conforming meshes are also presented. Numerical examples of homogeneousand heterogeneous media are considered.� 2006 Elsevier B.V. All rights reserved.

Keywords: Error indicators; Discontinuous Galerkin; Adaptive time stepping; Slope limiters; Five-spot; NIPG; SIPG; IIPG; OBB

1. Introduction

Accurate simulations of multiphase processes are essen-tial in problems related to the environment and the energy.There is a need for discretization methods that performwell on very general unstructured grids. Standard methodssuch as the finite difference methods, finite volumes andexpanded mixed finite element fail to capture the flow phe-nomena in the case of highly heterogeneous media withfull permeability tensors. Recently, discontinuous Galerkin(DG) methods have been applied to a variety of flow andtransport problem [21,22,2,25,24] and due to their flexibil-ity, they have been shown to be competitive to standardmethods. Furthermore, DG methods allow for unstruc-tured meshes and full tensor coefficients. Even though thediscontinuous finite element methods are more expensivethan the finite difference methods, oil engineers are willingto pay the price for accuracy and thus avoid costly mis-takes [20].

In this work, the pressure-saturation formulation (alsoknown as the sequential formulation) of the two-phase flow

0045-7825/$ - see front matter � 2006 Elsevier B.V. All rights reserved.

doi:10.1016/j.cma.2006.05.007

* Corresponding author. Tel.: +1 412 6248315; fax: +1 412 6248397.E-mail address: [email protected] (B. Riviere).

problem is discretized using several discontinuous Galerkinmethods. Description of the sequential model and otherformulations for two-phase flow can be found in [14,6].The unknowns are the wetting phase pressure and satura-tion and the equations are solved successively. One imme-diate advantage is the fact that the difficulty arising fromthe non-linearity is removed by time-lagging the co-efficients. The pressure equation is solved by the Oden–Baumann–Babuska (OBB) method [18] whereas thesaturation equation is solved by either the OBB, the non-symmetric interior penalty Galerkin method (NIPG) [23],the symmetric interior penalty Galerkin method (SIPG)[27,1] or the incomplete interior penalty Galerkin method(IIPG) [9,26]. One can note that all four methods OBB,NIPG, SIPG and IIPG are very similar to each other,and can be described by the same variational formulationwith a bilinear form involving constant parameters. Forinstance, OBB and NIPG only differ by the addition of apenalty term; SIPG and NIPG only differ by a sign.

The objective of this work is to investigate adaptivesimulations in time and space on unstructured meshes.We formulate error indicators for the spatial refinementand derefinement techniques. We also present an algorithmthat allows the time step to vary during the simulation. One

Page 2: Adaptive simulations of two-phase flow by discontinuous

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 405

of the main difficulties is the development of slope limitersthat would handle meshes with hanging nodes. We proposea limiting technique based on the one introduced byDurlofsky et al. [10] for conforming meshes. By the useof adaptivity, we significantly reduce the computationalcost while keeping the accuracy. To our knowledge, thereis little work in the literature on applications of DG meth-ods to two-phase flow. In [19,4], simulations were per-formed on uniformly refined meshes and with a constanttime step. In [3], DG is applied to a total pressure-satura-tion formulation. In [17], DG and mixed finite elementsare coupled. More recently, in [13], a compressible air–water two-phase flow problem is numerically solved onuniform meshes using the NIPG/OBB/SIPG method anda local discontinuous Galerkin (LDG) [8] discretizationfor the saturation equation. In this case, a Kirchoff trans-formation is required to obtain a diffusive flux from theprevious time step. The saturation equation is solvedexplicitly in time, which is computationally appealing;however this reduced cost is compensated by the introduc-tion of an additional unknown, intrinsic to the LDG for-mulation. Finally, in [11], fully coupled DG formulationsare considered and in this case slope limiters are not neededeven for high order of approximation. However, the solu-tion of the fully coupled DG formulations require the con-struction of a Jacobian matrix at each time step for theNewton–Raphson method.

The plan of the paper is as follows. In the next section,we present the equations describing the two-phase flowproblem. Section 3 contains the discrete schemes and nota-tion. The adaptive strategy in space and time, as well asthe slope limiting technique, are described in Section 4.Numerical examples are given in Section 5. Some conclu-sions follow.

2. Model problem

The mathematical formulation of two-phase flow ina porous medium X in R2 consists of a coupled systemof non-linear partial differential equations. The phases con-sidered here are a wetting phase (such as water) and anon-wetting phase (such as oil). For each phase, the conser-vation of mass and a generalized Darcy’s law are obtained.Under the assumption of incompressibility, a pressure-saturation formulation is derived, for which the primaryvariables are the pressure and the saturation of the wettingphase denoted by pw and sw:

�r � ðktKrpwÞ ¼ r � ðkoKrpcÞ; ð1Þoð/swÞ

otþr � kokw

kt

Krpc

� �¼ �r � kw

kt

ut

� �: ð2Þ

The coefficients in Eqs. (1) and (2) are defined below:

• K is the permeability tensor and is spatially dependent;for heterogeneous media, K is discontinuous.

• The coefficient / denotes the porosity of the medium.

• kt = ko + kw is the total mobility, that is, the sum of themobility of the non-wetting phase and the mobility ofthe wetting phase. Mobilities are functions that dependon the fluid viscosities lw and lo and on the effectivewetting phase saturation se. The effective saturationdepends on the residual wetting phase and non-wettingphase saturations srw and sro as follows:

se ¼sw � srw

1:0� srw � sro

:

The mobilities are then given by the Brooks–Coreymodel [5]:

kwðswÞ ¼1

lw

s4e ; koðswÞ ¼

1

lo

ð1� seÞ2ð1� s2eÞ:

• The difference of the pressures of the two phasespc = pn � pw is the capillary pressure. From theBrooks–Corey model, it depends on the effective satura-tion and a constant entry pressure pd:

pcðswÞ ¼pdffiffiffiffi

sep :

From this equation, we see that p0cðswÞ < 0 and we willwrite: rpc ¼ �jp0cjrsw.

• ut = uo + uw is the total velocity, that is the sum of thetwo phases velocities. Each phase velocity is given as

ud ¼ �Kkdrpd; d ¼ o;w:

Let n denote the outward normal to oX. We associate toEqs. (1) and (2) several boundary conditions, by firstdecomposing the boundary of the porous medium oXinto disjoint parts:

oX ¼ Cp1 [ Cp2 ¼ Cs1 [ Cs2; Cp1 \ Cp2 ¼ Cs1 \ Cs2 ¼ ;:

The boundary conditions for (1) are of Dirichlet andNeumann type:

pw ¼ pdir; on Cp1; ð3ÞKktrpw � n ¼ 0; on Cp2: ð4Þ

The boundary conditions for (2) are of Robin andNeumann type:

swut þ Kkokw

kt

p0crsw

� �� n ¼ sinut � n; on Cs1; ð5Þ

�Kkokw

kt

p0crsw

� �� n ¼ 0; on Cs2: ð6Þ

3. Scheme

In this section, we first establish some notation for thetemporal and spatial discretization and we present ournumerical scheme. Let 0 = t0 < t1 < � � � < tN = T be a sub-division of the time interval (0, T). For any function v thatdepends on time and space, we introduce the notationvi = v(ti, Æ) for i = 0, . . . ,N. We also define the time stepDti = ti+1 � ti.

Page 3: Adaptive simulations of two-phase flow by discontinuous

b1

bb

E2

23

E1

E3

E4E0

Fig. 1. Slope limiting on non-conforming meshes.

Fig. 2. Refinement of a triangular element.

406 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

The domain X is subdivided into triangular elementsthat form a mesh. Because of the refinements and derefine-ments, the mesh changes at every time step. Let us denoteby Ei

h ¼ fEgE the mesh at time ti+1. Let hi be the maximumdiameter of the elements. Let Chi be the union of the opensets that coincide with interior edges of elements of Ei

h. Lete denote a segment of Chi shared by two triangles Ek and El

of Eih (k > l); we associate with e, once and for all, a unit

normal vector ne directed from Ek to El and we define for-mally the jump and average of a function w on e by

½w� ¼ ðwjEk Þje � ðwjElÞje; fwg ¼ 1

2ðwjEk Þje þ

1

2ðwjElÞje:

If e is adjacent to oX, then the jump and the average of won e coincide with the trace of w on e and the normal vectorne coincides with the outward normal n. The quantity jejdenotes the length of e.

For each integer r, we define a finite element subspace ofdiscontinuous piecewise polynomials:

DrðEihÞ ¼ fv : vjE 2 P rðEÞ 8E 2 Ei

hg;where Pr(E) is a discrete space containing the set of poly-nomials of total degree less than or equal to r on E. We willapproximate the wetting phase pressure and saturation bydiscontinuous polynomials of order rp and rs, respectively.

We now derive the variational formulation for the two-phase flow problem, by considering the pressure Eq. (1)and the saturation Eq. (2) separately.

Fig. 3. Five-well example: coarse mesh at initial time

3.1. The pressure equation

We rewrite (1) by defining v ¼ �Kkorpc ¼ Kkojp0cjrsw:

�r � ðKktrpwÞ ¼ �r � v: ð7ÞMultiplying (7) by a test function v 2 Drp , and usingGreen’s formula on one element E yields:

and adaptive meshes obtained at 15 and 45 days.

Page 4: Adaptive simulations of two-phase flow by discontinuous

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 407

ZE

Kktrpw � rv�Z

oEðKktrpw � nEÞv

¼Z

Ev � rv�

ZoEðv � nEÞv;

where nE is the outward normal to E. Summing over all theelements in Ei

h and using the fact that pw and v are smoothenough, namely [pw] = 0, [Kkt$pw Æ ne] = 0 and [v Æ ne] = 0,we haveXE2Ei

h

ZE

Kktrpw � rv�X

e2Cih[oX

ZefKktrpw � neg½v�

þXe2Ci

h

ZefKktrv � neg½pw�

¼XE2Ei

h

ZE

v � rv�X

e2Ch[oX

Ze

v � ne½v�:

Making use of the boundary conditions (3) and (4), weobtain

Fig. 4. Five-well example: three-dimensional pr

XE2Ei

h

ZE

Kktrpw � rv�X

e2Cih[Cp1

ZefKktrpw � neg½v�

þX

e2Cih[Cp1

ZefKktrv � neg½pw�

¼XE2Ei

h

ZE

v � rv�X

e2Cih[oX

Ze

v � ne½v�

þXe2Cp1

ZeðKktrv � nÞpdir: ð8Þ

3.2. The saturation equation

Similarly, we define the auxiliary vector f ¼ kw

ktut. Then,

(2) can be rewritten as

oð/swÞot

�r � Kkokw

kt

jp0cj����rsw

� �¼ �r � f: ð9Þ

As for the pressure equation, we multiply by a test functionz 2 Drs over one element in Ei

h, sum over all elements, and

essure contours at 15, 30, 45 and 52.5 days.

Page 5: Adaptive simulations of two-phase flow by discontinuous

408 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

use the regularity of sw and f. We finally obtain after somealgebraic manipulation:Z

X

oð/swÞot

zþXE2Ei

h

ZE

Kkokw

kt

jp0cjrsw � rz

�X

e2Cih[oX

Ze

Kkokw

kt

j p0cjrsw � ne

� �½z�

þ �Xe2Ci

h

Ze

Kkokw

kt

jp0cjrz � ne

� �½sw�

¼XE2Ei

h

ZE

f � rz�X

e2Cih[oX

Ze

f � ne½z�:

Making use of the boundary conditions (5), (6) and thecontinuity of pressure, we have:Z

X

oð/swÞot

zþXE2Ei

h

ZE

Kkokw

kt

jp0cjrsw � rz

�Xe2Cs1

Ze

swut � nez�Xe2Ci

h

Ze

Kkokw

kt

jp0cjrsw � ne

� �½z�

þ �Xe2Ci

h

Ze

Kkokw

kt

jp0cjrz � ne

� �½sw� þ

Xe2Ci

h

rjej

Ze½sw�½z�

Fig. 5. Five-well example: three-dimensional satu

¼XE2Ei

h

ZE

f � rz�X

e2Cih[oX

Ze

f � ne½z� �Xe2Cs1

Ze

sinut � nez

�Xe2Ci

h

Ze

kw

kt

fKktrz � neg½pw�

�XCp1

Ze

Kkwrz � neðpw � pdirÞ: ð10Þ

The equation above is parametrized by the coefficients� 2 {�1,0,1} and r P 0. For a positive penalty value r,the choice � = �1 yields the SIPG method, the choice� = 0 yields the IIPG method and the choice � = 1 theNIPG method. If r = 0 and � = 1, we obtain the OBBmethod.

3.3. The discrete scheme

We discretize the time derivative by finite difference,which yields the backward Euler scheme. The initialapproximations P 0

w, S0w are simply obtained by a L2 projec-

tion of the initial data pw(t = 0) and sw(t = 0). Based on (8)and (10), we formulate the following numerical method:

given ðP iw; S

iwÞ 2 Drp �Drs , find ðP iþ1

w ; Siþ1w Þ 2 Drp �Drs

such that for all ðv; zÞ 2 Drp �Drs :

ration contours at 15, 30, 45 and 52.5 days.

Page 6: Adaptive simulations of two-phase flow by discontinuous

INJECTION

PRODUCTION

Fig. 6. Domain and coarse mesh for quarter-five spot.

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 409

XE2Ei

h

ZE

KktðSiwÞrP iþ1

w � rv�X

e2Cih[Cp1

ZefKktðSi

wÞrP iþ1w � neg½v�

þX

e2Cih[Cp1

ZefKktðSi

wÞrv � neg½P iþ1w �

Fig. 7. Two-dimensional pressure con

¼XE2Ei

h

ZE

vih � rv�

Xe2Ci

h[oX

Ze

vi"h � ne½v�

þXe2Cp1

ZeðKktðSi

wÞrv � nÞpdir ð11Þ

andZX

/Dti

Siþ1w zþ

XE2Ei

h

ZE

KkoðSi

wÞkwðSiwÞ

ktðSiwÞ

jp0cðSiwÞjrSiþ1

w � rz

�Xe2Cs1

Ze

Siþ1w U i

t � nez

�Xe2Ci

h

Ze

KkoðSi

wÞkwðSiwÞ

ktðSiwÞ

jp0cðSiwÞjrSiþ1

w � ne

� �½z�

þ �Xe2Ci

h

Ze

KkoðSi

wÞkwðSiwÞ

ktðSiwÞ

jp0cðSiwÞjrz � ne

� �½Siþ1

w �

þXe2Ci

h

rjej

Ze½Si

w�½z�

¼Z

X

/Dti

Siwzþ

XE2Ei

h

ZE

fih � rz

�X

e2Cih[Cp1

Ze

fi"h � ne½z� �

Xe2Cs1

Ze

sinU it � ne

tours at 7.5, 15, 22.5 and 30 days.

Page 7: Adaptive simulations of two-phase flow by discontinuous

410 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

�Xe2Ci

h

Ze

kwðSiwÞ

ktðSiwÞfKktðSi

wÞrz � neg½P iw�

�Xe2Cp1

Ze

KkwðSiwÞrz � neðP i

w � pdirÞ; ð12Þ

where U it, fi

h and vih are the approximates of ui

t; fi and vi.

U it ¼ �KkwðSi

wÞrP iw � KkoðSi

wÞðp0cðSiwÞrSi

w þrP iwÞ;

vih ¼ KkoðSi

wÞjp0cðSiwÞjrSi

w;

fih ¼

kwðSiwÞ

ktðSiwÞfU i

tg:

Because of the discontinuous approximations, there aretwo values for the functions vi and fi on an interior edge.These quantities are then replaced by the upwind numericalfluxes v

i"h and f

i"h . Upwinding is done with respect to the

normal component of the average of the total velocity Ut

8e ¼ oEk \ oEl; ðk > lÞ; 8w; w" ¼wjEk if fU i

tg � ne P 0;

wjEl if fU itg � ne < 0:

(

From the derivations in Sections 3.1 and 3.2, we obtain theconsistency of the scheme (11) and (12).

Lemma 1. If (pw, sw) is a solution of (1), (2), then (pw, sw) is

also a solution of (11) and (12).

Fig. 8. Two-dimensional saturation con

3.4. Local mass balance

Let us fix an element E and a test function v 2 Drp thatvanishes outside of E. For simplicity, we assume that E isan interior element in X. The pressure equation (11)becomes:Z

EKktðSi

wÞrP iþ1w � rv�

ZoEfKktðSi

wÞrP iþ1w � nEgv

þZ

oE

1

2KktðSi

wÞrv � nE½P iþ1w �

¼Z

Evi

h � rv�Z

oEv

i"h � nEv:

If in addition, we let v to be equal to one over E, we obtainthe local mass property satisfied by the approximations:

�Z

oEfKktðSi

wÞrP iþ1w � nEgv�

ZoE

vi"h � nEv ¼ 0:

3.5. Slope limiting

Approximations of high order yield overshoot andundershoot in the neighborhood of the front of the injectedphase. Slope limiters are the appropriate tools for decreas-ing the local oscillations [7,15]. To our knowledge there is

tours at 7.5, 15, 22.5 and 30 days.

Page 8: Adaptive simulations of two-phase flow by discontinuous

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 411

no analysis available for slope limiters in 2D and 3D, evenon a conforming mesh. We are also not aware of limitersthat would handle non-conforming meshes. In this section,we propose a limiting technique that can handle mesheswith hanging nodes. This procedure is successfully testedfor our two-phase flow problem. We apply the limitingtechnique to the approximations P iþ1

w and Siþ1w after each

time step ti+1.In what follows, we say that one element E is active if it

belongs to the mesh Eih, i.e., if it is used in the computation

of (11) and (12). The element can become inactive if it isrefined and thus its children are created and activated.The limiting process consists of two steps.

First, we loop through all the active elements startingfrom the oldest generation to the youngest (in general thiswould mean that the order is in decreasing size). For exam-ple, Fig. 1 shows an example of five elements of differentgeneration: if G denotes the generation of the elements E0

and E1, then elements E3 and E4 are of younger generationG + 1 and element E2 is of older generation G � 1. Thus, itis assumed that the limiting process has been alreadyapplied to E2.

(1) Neighbor averages: We first compute the average sat-uration for the element to be limited and all neighboringelements as follows. Let S0 denote the average saturation

Fig. 9. Two-dimensional pressure contours at 7.5, 15, 22.

over E0 and let Sj denote a function associated to each sidej 2 {1,2,3} of E0. For E0 and the neighbors of the samegeneration, we have the usual averaging operator:

S0 ¼AðE0Þ; S1 ¼AðE1Þ; where AðEÞ ¼ 1

jEj

ZE

Siþ1w :

To compute S2 corresponding to the side 2 of E0 and theelement E2 that is of older generation, we first locate thebarycenter b2 of an imaginary child eC2 of the same gener-ation of E0 (see dashed lines in Fig. 1). We then set

S2 ¼ Siþ1w jE2

ðb2Þ:We note that S2 ¼AðeC2Þ. The smaller elements E3 and E4

belong to a parent eE (see dotted lines in Fig. 1). If we de-note by F ~E

1 ; . . . ; F ~E4 the children of eE, we can write

S3 ¼1

4

X4

l¼1

BðF ~El Þ;

where the function B is defined recursively as (using thenotation F E

l for the lth child of E):

BðEÞ ¼

1

jEj

ZE

Siw; if E active;

1

4

X4

l¼1

BðF El Þ; otherwise:

8>>><>>>:

5 and 30 days obtained on uniformly refined meshes.

Page 9: Adaptive simulations of two-phase flow by discontinuous

412 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

If the edge j is a boundary edge, then Sj is defined accord-ing to the boundary conditions.

Sj ¼ sin on Cs1; Sj ¼ S0 on Cs2:

(2) Test: We then compute the saturation Siþ1w jE0

ðmjÞevaluated at the midpoint mj of each edge j and we checkthat this value is between Sj and S0. We stop here if the testis successful, otherwise we continue to step 3.

(3) Construction of three linears: Based on the techniqueby Durlofsky et al. [10], we construct three linears using thepoints bj and the averages Sj. For instance, if we write thelinears as Ljðx; yÞ ¼ aj

0 þ aj1xþ aj

2y, for j 2 {1,2,3}, theyare uniquely determined by

Ljðb0Þ ¼ S0 and LjðblÞ ¼ Sl; for l 6¼ j:

We then rank the linears by decreasingffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiðaj

1Þ2 þ ðaj

2Þ2

qand

check that for the values of the linears evaluated at themidpoint ml, LjðmlÞ, is between Sl and S0 for 1 P l P 3.If none of the constructed linears satisfy the test then theslope is reduced to 0.

Second, we loop through all elements and check thattheir slopes are not too large in the euclidean norm. If itis larger than a cut-off value (set up by user), we scale itby the ratio cut-off/norm.

Fig. 10. Two-dimensional saturation contours at 7.5, 15, 2

4. Adaptivity strategy

In this section, we define the error indicators and presentthe adaptivity in space and time techniques. They are basedon the a posteriori error estimates obtained for a linearconvection–diffusion time-dependent problem [12], thathas some similarity with the saturation equation. However,there is no rigorous mathematical proof for our coupledsystem of equations and the error estimators of [12] areused here as error indicators in the adaptivity algorithm.

4.1. Error indicators

We define the following quantities:

Rvol¼�/DtiðSiþ1

w �SiwÞþr� K

knðSiwÞkwðSi

wÞktðSi

wÞjp0cðSi

wÞjrSiw

� ��r� kwðSi

wÞktðSi

wÞU i

t

� �;

Re1¼ ½Siþ1w �;

Re2¼ KkwðSi

wÞknðSiwÞ

ktðSiwÞ

jp0cðSiwÞjrSiþ1

w �n�

þfU itg �n½Siþ1

w �;

2.5 and 30 days obtained on uniformly refined meshes.

Page 10: Adaptive simulations of two-phase flow by discontinuous

X

Sw

0 100 200 300 4000

0.2

0.4

0.6

0.8

1

X

Pw

0 100 200 300 4002.4E+06

2.6E+06

2.8E+06

3E+06

3.2E+06

3.4E+06

Fig. 11. Saturation (left) and pressure (right) fronts along the diagonal line x = y at 7.5, 15, 22.5 and 30 days. The solid line corresponds to a uniformmesh refinement (h3) and the dashed line to an adaptively refined mesh.

Table 1Number of degrees of freedom for adaptive and non-adaptive simulationsin the case (�,r) = (1,0)

t (days) DOFS press DOFS sat

AMR UNI AMR UNI

7.5 2538 25,344 1269 12,67215 2412 25,344 1206 12,67222.5 2142 25,344 1071 12,67230 2466 25,344 1233 12,672 Table 2

Total number of degrees of freedom for adaptive simulations for allmethods

t (days) OBB NIPG NIPG SIPG SIPG IIPG IIPGr = 0 r = 1 r = 10�5 r = 1 r = 10�5 r = 1 r = 10�5

7.5 3807 3348 3159 3294 3294 3348 402315 3618 3105 2970 3132 2997 3105 359122.5 3213 3348 3213 3483 3267 3375 337530 3699 2538 3780 2484 3834 2997 3915

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 413

Res1¼ sinU it �n�Siþ1

w U it �nþK

knðSiwÞkwðSi

wÞktðSi

wÞjp0cðSi

wÞjrSiþ1w �n;

Res2¼KknðSi

wÞkwðSiwÞ

ktðSiwÞ

jp0cðSiwÞjrSiþ1

w �n:

Then the error indicator gE computed on each element E is

X

Sw

0 100 200 300 4000

0.2

0.4

0.6

0.8

1

Pw

Fig. 12. Saturation (left) and pressure (right) fronts along the diagonal line x =with r = 10�5 and OBB. Dashed lines correspond to methods NIPG, SIPG a

gE ¼ h4EkRvolk2

0;E þX

e2oEnoXðh3

ekRe2k20;e þ ðhe þ 1ÞkRe1k2

0;eÞ

þX

e2oE\Cs1

h3ekR es1k2

0;e þX

e2oE\Cs2

h3ekR es2k2

0;e

!1=2

;

X0 100 200 300 400

2.4E+06

2.6E+06

2.8E+06

3E+06

3.2E+06

3.4E+06

y at 15 and 30 days. Solid lines correspond to methods NIPG, SIPG, IIPGnd IIPG with r = 1.

Page 11: Adaptive simulations of two-phase flow by discontinuous

414 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

where hE is the diameter of the element E and he ¼maxðhEk ; hElÞ if the edge e is shared by elements Ek andEl. Note that the notation oEnoX means that the edgesare interior edges only.

4.2. Adaptive mesh refinement technique

Let us assume that the solution P iw and Si

w have beenobtained at the ith time step. We compute the error indica-tor gE for each active element E. Then, we first refine theappropriate elements and second apply the derefinementtechnique.

Refinement: We refine each element whose error indica-tor is greater than a threshold value gR. Note that thisthreshold value can be a percentage of the maximum ofthe error indicators. Fig. 2 shows how one element (alsocalled parent) is refined into four smaller elements (alsocalled children).

Derefinement: We consider a parent element for dere-finement if (A) all of its children are active, (B) the errorindicator of each of its children is less than a thresholdvalue gD, and (C) the element was not refined during thecurrent time step. For each parent element meeting theserequirements, an L2 projection is performed to retrieve

Fig. 13. Two-dimensional pressure contours at 7.5, 15

the degrees of freedom of the parent. Before actually doingthe derefinement, we check that the parent error indicatoris less than gR. If it is, we then derefine. If it is not, wedo not derefine.

4.3. Adaptive time stepping technique

For time strategy, we allow the time step to vary duringthe simulation. We uniformly divide the simulation interval(0,T) into whole steps of length Dti. At the start of eachwhole step, we try to compute the saturation for timeti + Dti, where ti is the current time. If the resulting satura-tion function is satisfactory, then we record it, calculate thenew pressure function, and proceed to the next whole step.

On the other hand, if the resulting saturation function isunsatisfactory, then we discard it and subdivide the wholestep into two half steps. We then compute the saturationfor the time at which the first half step ends. If the resultis acceptable, we proceed to the second half step, and ifits result is also acceptable, then we continue on to the nextwhole step. If one of the half steps does not yield satisfac-tory results, then we divide it into quarter steps, proceedingin the same manner as before, with the exception that weaccept the results of the quarter steps regardless of how

, 22.5 and 30 days on an inhomogeneous medium.

Page 12: Adaptive simulations of two-phase flow by discontinuous

Fig. 15. Permeability field and coarse mesh: permeability is 10�11 in whiteregions and 10�16 elsewhere.

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 415

satisfactory they are. For the numerical simulations in thispaper, a resulting saturation function was deemed unsatis-factory if the average saturation in any element exceededthe physically permissible range by more than 0.01; other-wise, it was considered satisfactory.

The main purpose of this time stepping technique is tospeed up computation without losing accuracy, thus toincrease the efficiency of the method.

5. Numerical examples

In the following simulations, we assume that the fluidand medium properties are

lo ¼ 0:002 kg=ðmsÞ; lw ¼ 0:0005 kg=ðmsÞ; / ¼ 0:2;

swðt ¼ 0Þ ¼ 0:2; pwðt ¼ 0Þ ¼ 3:45� 10�6 Pa;

sin ¼ 0:95; srw ¼ 0:15; sro ¼ 0;

pd ¼ 5� 103 Pa:

The orders of approximation are discontinuous piecewiselinears for the saturation and discontinuous piecewise qua-dratics for the pressure. For the adaptive refinements andderefinements, we chose gR = 1 · 10�1 and gD = (1/3)gR.The well-known five-spot problem on homogeneous andheterogeneous media is first considered, then simulationswith highly varying permeability are presented.

Fig. 14. Two-dimensional saturation contours at 7.5, 1

5.1. Five-spot on homogeneous medium

The permeability tensor is K = 10�11 dm2, where d is theKronecker delta tensor. Fig. 3 shows the coarse mesh and

5, 22.5 and 30 days on an inhomogeneous medium.

Page 13: Adaptive simulations of two-phase flow by discontinuous

416 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

the domain X embedded into the square (�300,300)2. Fourproduction wells are located at each corner of the domain;the well bore corresponds to part of Cp1, where we assumethat pdir = 2.41 · 106 Pa. An injection well is located in theinterior of the domain; the well bore corresponds to theboundary Cs1 and the remainder of Cp1 and the pressureis set pdir = 3.45 · 106 Pa. The flow of the phases is thusdriven by the gradient of pressure from the injection wellto the production wells.

The simulation is run for 52.5 days with a time stepvarying between 0.001875 days and 0.0075 days. Theparameters in (12) are r = 0 and � = 1. Three dimensionalviews of contours of wetting phase pressure and saturationat selected times are shown in Figs. 4 and 5. In order to bet-ter analyze this example and because of the symmetry ofthe problem, we re-run the simulations on one quarter ofthe domain; this yields the quarter-five spot problem shownin Fig. 6. The injection well is at the left bottom cornerwhereas the production well is at the right top corner.The domain is now embedded into (0, 300)2.

The contours of wetting phase pressure and saturationat selected times are shown in Figs. 7 and 8. The locallyrefined and derefined meshes are also given on these fig-ures. One can conclude that the proposed error indicators

Fig. 16. Two-dimensional saturation contours a

capture well the location of the front. As expected, themesh is more refined in the neighborhood of the saturationfront. It also appears that the mesh stays refined at theneighborhood of the injection well bore.

We compare the adaptive results with those obtained onthe coarse mesh refined uniformly three times. The pressureand saturation contours are given in Figs. 9 and 10. Here,the time step varies between 0.015 days and 0.00375 days.The contours are similar to the adaptive ones. For bettercomparison, we show the pressure and saturation profilesalong the diagonal {(x,y): x = y} (see Fig. 11). Using adap-tive refinement and derefinement decreases significantly thecost of the computation, as shown in Table 1. The columnsfor AMR correspond to adaptively refined meshes, and thecolumns for UNI correspond to uniformly refined meshes.

We now compare the saturation and pressure profilesobtained by varying the parameters r and �. In particular,we consider the cases (�,r) 2 {(1, 1), (1,10�5)}, which yieldthe NIPG method with small and large penalty values;the cases (�,r) 2 {(�1,1), (�1,10�5)}, which yield the SIPGmethod with small and large penalty values; the cases(�,r) 2 {(0, 1), (0, 10�5)}, which yield the IIPG method withsmall and large penalty values and the OBB method usedabove. If the penalty value is small enough, i.e., r = 10�5,

t 17.5, 35, 52.5 and 70 days: (� = 1, r = 0).

Page 14: Adaptive simulations of two-phase flow by discontinuous

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 417

all methods produce identical solutions for both pressureand saturation. Fig. 12 shows the profiles obtained at 15and 30 days: solid lines correspond to small penalty valuesor the OBB method whereas dashed lines correspond tolarge penalty values. As expected, if the penalty valueincreases, numerical diffusion added by the jump termappears in the solutions. The saturation fronts are slightlysmeared. It is also interesting to note that for a fixed pen-alty value, all three penalty methods produce the samesolutions.

Finally, we give in Table 2 the total number of degrees offreedom for pressure and saturation equations and we showthat the numerical cost is comparable for all methods.

5.2. Five spot on heterogeneous medium

This simulation is identical to the one above except forthe permeability tensor. Here, K is discontinuous and isequal to 10�15 dm2 in a small subdomain. In the rest ofdomain, K = 10�11 dm2. We present the contours of thepressure and saturation at different times in Figs. 13 and14 in the case (�,r) = (1, 0). Clearly, the region of low per-meability is not invaded by the injected wetting phase. Thisshows that the scheme has very little numerical diffusion. Itis also interesting to note that the proposed method allows

Fig. 17. Two-dimensional saturation contours at 17.5, 35

for an arbitrary number of hanging nodes, without anyspecial care.

5.3. Highly varying permeability field

We consider a square domain (0,400)2 with varyingpermeability as shown in Fig. 15. The permeability is10�11 Im2 except in several small regions where it is 105

times smaller (see [16]). The simulation is run for 70 days.The time step varies between 2.1875 · 10�3 days and8.75 · 10�3 days. The vertical boundaries correspond toCp1 where the same pressure pdir as in the previous exam-ples is imposed. The left vertical boundary correspondsto Cs1. We first consider the OBB method (� = 1,r = 0).Saturation contours on adaptively refined meshes areshown in Fig. 16. The degrees of freedom are 8232,13,281, 17,070 and 19,131 for the respective times 17.5,35, 52.5 and 70 days. The figures show clearly that thereis very little numerical diffusion. For comparison, we showthe contours obtained on a uniform mesh, which corre-sponds to 38,400 degrees of freedom (see Fig. 17). Thecoarse mesh has been refined twice, and this produces acomputational time of 24 h on a single processor. Foranother level of refinement, the simulation would run for1 week.

, 52.5 and 70 days on uniform meshes: (� = 1, r = 0).

Page 15: Adaptive simulations of two-phase flow by discontinuous

Fig. 18. NIPG Two-dimensional saturation contours at 35 days: r = 10�6, r = 10�5 and r = 1.

418 W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419

We repeat the experiment for the NIPG method withthree choices of penalty r 2 {10�6,10�5,1}. The saturationcontours at 35 days are shown in Fig. 18. Because of thehighly varying permeability field, the method is more sensi-tive to the choice of the penalty. The value r = 10�6 yieldsa comparable solution to the OBB method; there is very lit-

Fig. 19. Two-dimensional saturation contours at 35

tle numerical diffusion. However, for r = 10�5, the wettingphase floods the region of lower permeability and forr = 1, the method is too diffusive to capture the barrierzones. Similar conclusions can be made with the othertwo methods. We show the saturation contours forr = 10�6 for IIPG and SIPG in Fig. 19.

days for r = 10�6: IIPG (left) and SIPG (right).

Page 16: Adaptive simulations of two-phase flow by discontinuous

W. Klieber, B. Riviere / Comput. Methods Appl. Mech. Engrg. 196 (2006) 404–419 419

6. Conclusions

This paper present adaptivity techniques in space andtime. We show that the adaptive simulations are more effi-cient than the simulations obtained on uniform meshes andwith constant time step. A slope limiting technique formeshes with several hanging nodes per face is defined.Numerical experiments show robustness of the proposedDG schemes on heterogeneous media. Comparisonsbetween SIPG, NIPG, IIPG and OBB methods are per-formed: if the penalty value is small enough, the resultingnumerical solutions are very similar. Increasing the penaltyvalue introduces numerical diffusion in the approxima-tions, in particular if the permeability field highly variesin space. Several future extensions are currently underinvestigation: for instance, we plan to extend our computa-tional results to three-dimensional problems using unstruc-tured tetrahedral meshes. We are also investigating theeffects of p-adaptivity on the accuracy and the computa-tional efficiency of the scheme.

Acknowledgement

The first author is partially supported by a CRDF grantfrom the University of Pittsburgh and by a Brackenridgefellowship. The second author is supported by a NationalScience Foundation grant DMS-0506039.

References

[1] D.N. Arnold, An interior penalty finite element method withdiscontinuous elements, SIAM J. Numer. Anal. 19 (1982) 742–760.

[2] P. Bastian, High order discontinuous Galerkin methods for flow andtransport in porous media, Challenges in Scientific Computing CISC2002, vol. 35, 2003.

[3] P. Bastian, Discontinuous Galerkin methods for two-phase flow inporous media, Also technical report, 2004-28, IWR (SFB 359),Heidelberg University, submitted for publication.

[4] B. Riviere, Numerical study of a discontinuous Galerkin method forincompressible two-phase flow, in: Proceedings of ECCOMAS, 2004.

[5] R.H. Brooks, A.T. Corey, Hydraulic properties of porous media,Hydrol. Pap. 3 (1964).

[6] G. Chavent, J. Jaffre, Mathematical Models and Finite Elements forReservoir Simulation, North-Holland, 1986.

[7] B. Cockburn, C.-W. Shu, TVB Runge–Kutta local projectiondiscontinuous Galerkin finite element method for conservative lawsII: general framework, Math. Comput. 52 (1989) 411–435.

[8] B. Cockburn, C.-W. Shu, The local discontinuous Galerkin methodfor time-dependent convection–diffusion systems, SIAM J. Numer.Anal. 35 (1998) 2440–2463.

[9] C. Dawson, S. Sun, M.F. Wheeler, Compatible algorithms forcoupled flow and transport, Comput. Meth. Appl. Mech. Engrg. 193(2004) 2565–2580.

[10] L.J. Durlofsky, B. Engquist, S. Osher, Triangle based adaptivestencils for the solution of hyperbolic conservation laws, J. Comput.Phys. 98 (1992) 64–73.

[11] Y. Epshteyn, B. Riviere, Fully implicit discontinuous Galerkinschemes for multiphase flow, Appl. Numer. Math., in press.

[12] A. Ern, J. Proft, A posteriori discontinuous Galerkin error estimatesfor transient convection–diffusion equations, Appl. Math. Lett. 18 (7)(2005) 833–841.

[13] O. Eslinger, Discontinuous Galerkin finite element methods appliedto two-phase, air-water flow problems, Ph.D. thesis, The Universityof Texas at Austin, 2005.

[14] R. Helmig, Multiphase Flow and Transport Processes in theSubsurface, Springer, 1997.

[15] H. Hoteit, Ph. Ackerer, R. Mose, J. Erhel, B. Philippe, New two-dimensional slope limiters for discontinuous Galerkin methods onarbitrary meshes, Int. J. Numer. Meth. Engrg. 61 (2004) 2566–2593.

[16] L.J. Durlofsky, Accuracy of mixed and control volume finite elementapproximations to Darcy velocity and related quantities, WaterResour. Res. 30 (4) (1994) 965–973.

[17] D. Nayagum, G. Schafer, R. Mose, Modelling two-phase incom-pressible flow in porous media using mixed hybrid and discontinuousfinite elements, Comput. Geosci. 8 (1) (2004) 49–73.

[18] J.T. Oden, I. Babuska, C.E. Baumann, A discontinuous hp finiteelement method for diffusion problems, J. Comput. Phys. 146 (1998)491–519.

[19] B. Riviere, The dgimpes model in ipars: Discontinuous Galerkin fortwo-phase flow integrated in a reservoir simulator framework,Technical Report 02-29, Texas Institute for Computational andApplied Mathematics, 2002.

[20] B. Riviere, E. Jenkins, In pursuit of better models and simulations, oilindustry looks to the math sciences, SIAM News (January/February)(2002).

[21] B. Riviere, M.F. Wheeler, Discontinuous Galerkin methods for flowand transport problems in porous media, Commun. Numer. Meth.Engrg. 18 (2002) 63–68.

[22] B. Riviere, M.F. Wheeler, Non conforming methods for transportwith nonlinear reaction, in: Proceedings of an AMS-IMS-SIAM JointSummer Research Conference on Fluid Flow and Transport inPorous Media: Mathematical and Numerical Treatment, 2002.

[23] B. Riviere, M.F. Wheeler, V. Girault, Improved energy estimates forinterior penalty, constrained and discontinuous Galerkin methods forelliptic problems. Part I, Comput. Geosci. 3 (1999) 337–360.

[24] S. Sun, B. Riviere, M.F. Wheeler, A combined mixed finite elementand discontinuous Galerkin method for miscible displacement prob-lems porous media, in: Proceedings of International Symposium onComputational and Applied PDEs, 2002, pp. 321–348.

[25] S. Sun, M.F. Wheeler, Symmetric and non-symmetric discontinuousGalerkin methods for reactive transport in porous media, SIAM J.Numer. Anal. 43 (1) (2005) 195–219.

[26] S. Sun, M.F. Wheeler, Symmetric and nonsymmetric discontinuousGalerkin methods for reactive transport in porous media, SIAM J.Numer. Anal. 43 (1) (2005) 195–219.

[27] M.F. Wheeler, An elliptic collocation-finite element method withinterior penalties, SIAM J. Numer. Anal. 15 (1) (1978) 152–161.