Numerical simulation of two phase porous media flow models

Preview:

Citation preview

1

Numerical simulation of two phase porous media flow models with

application to oil recovery

Roland MassonIFP New energies

ENSG course 201118/04 - 19/04 -20/04 -21/04

2

Outline: 18-19/04

• Discretization of single phase flows

– Two Point Flux Finite Volume Approximation of Darcy Fluxes

• Homogeneous case• Heterogeneous case

– Exercise: single phase incompressible Darcy flow in 1D (using Scilab)

3

Outline: 19-20/04

• Discretization of two phase immiscible incompressible Darcy flows

– Hyperbolic scalar conservation laws– IMPES discretization of water oil two phase flow

– Exercise: Impes discretization of water oil twophase flow in 1D (using Scilab)

4

Outline: 20-21/04

• Discretization of wells• Exercise: Five spots water oil simulation

– Description of the Research Project

5

Examination: 15/06

• By binoms• Written report on the Project• Oral examination

– Presentation of the report– Run tests of the prototype code– Questions on numerical methods used in the

simulation

6

Finite Volume Discretization of single phase Darcy flows

• Darcy law and conservation equation

• Two Point Flux Discretization (TPFA) of diffusion fluxes on admissible meshes

• Exercice: single phase incompressible Darcy flow in 1D

7

Oil recovery by water injection

( )

( )

−∇+∇−=

−∇−=

gSPPKSk

V

gPKSk

V

owcwo

ooro

www

wwrw

ρµ

ρµ

)()(

)(

,

,

( ) ( )( ) ( )

=+∂

=+∂

0

0

oooo

wwww

VdivtS

VdivtS

ρφρρφρ

1=+ ow SS Capillary pressure PcRelative permeabilities kr,w and kr,o

8

1D test caseInjection of water in a reservoir

prodpp =inj

w

pp

S

==1

9

Water injection in a 1D reservoir

10

Five Spots simulation in 2D

1000 m

1000 m

Pressure

Water front

11

Heterogeneities

Water front Pressure

Permeability

12

Heterogeneities

13

Coning: aquifer and vertical well

PressureWater front

1000 m

100 m

50 m

Aquifer

14

Coning: stratified reservoir

Permeability

Water frontPressure

15

SINGLE PHASE DARCY FLOWSINGLE PHASE DARCY FLOW

( ) ( ) qVdivt

=+∂

∂ ρφρ

)( gPK

V

ρµ

−∇−=

φKρµ

16

Incompressible Darcy single phase flow

• Diffusion equation

Ω∂=∇−

Ω∂=

Ω=∇−

N

DD

ongnpK

onpp

onfpK

div

.

)(

µρ

µρ

!

"!#

!

17

Compressible Darcy single phase flow

• Parabolic equation(linearized)

Ω=

×Ω∂=∇−

×Ω∂=

×Ω=∇−+∂

= onpp

TongnpK

Tonpp

TonpK

divpdpd

t

N

DD

t

00

0

000

),0(.

),0(

),0(0)()1

(

µρ

µρρρ

ρ

$%

!

"!#

00 pp t ==

18

NOTATIONS

objectlgeometrica & "

σ

!'(!)(" !*κ

21xx

!)(" !*(*

" !*

19

Finite Volume Discretization• Finite volume mesh

– Cells– Cell centers– Faces

• Degrees of freedom:

• Discrete conservation law

=∇−=∆−= κκκσ σ

κκκ

fdxdsnudxu'

'.

'κκ κκσ ′=

κx 'κx

κu

'κκn

20

Two Point Flux Approximation (TPFA)

• TPFA

• Flux Conservativity

• Flux Consistency

),(. ''' κκκκσ

κκ uuFdsnu ≈∇−

0),(),( '''' =+ κκκκκκκκ uuFuuF

( ) +∇−=−=σ

κκκκκκ

κκκκ σσ

)(.),( '''

'' hOdsnuuuxx

uuF

''' κκκκ ⊥xx'κxκx

'κκn

21

Two Point Flux Approximation• Boundary faces

σσκ ⊥xx '

( ) +∇−=−=σ

σσκσκ

σκσ σσ

)(.),( hOdsnuuuxx

uuF

σx

κxσn

22

Two Point Flux Approximation• Finite Volume Scheme

''

'

κκκκ

κκxx

T =

( ) ( ) κκσ

σκσκκκκσ

κκκκ

κσσ

fguxx

uuxx

bord

=−+− Σ∩∂∈Σ∩∂∈= int'

''

Ω∂=Ω=∆−

surgu

surfu

σκκσ

σxx

T =

23

Exemples of admissible meshes

" " 2/π≤

+

24

Corner Point Geometries and TPFA

Assumption that the directions of the CPG are aligned with the principal directions of the permeability field

25

Corner Point GeometriesStratigraphic grids with erosions

Examples of degenerate cells(erosions)

• Hexahedra

• Topologicaly Cartesian

• Dead cells

• Erosions

• Local Grid Refinement (LGR)

26

CPG faults

27

Cell Centered FV: MultiPoint Flux Approximation (MPFA)

• Example of the "O" scheme– Exact on piecewise linear functions– Account for discontinuous diffusion tensors– Account for anisotropic diffusion tensors

LL

L uTF = '' κκκκκ

LL

L

L TTT κκκκκκ ''' ,0 −==

28

2D example

Ω∂=Ω=∆−

surgu

surfu

( )yxeu += sin

, "

-

29

Comparison of MPFA "O" scheme and TPFA

order 2

+ $

Non convergent

30

Cell-Face data structure

• List of cells: m=1,...,N– Volume(m)– Cell center X(m)

• List of interior faces: i=1,...,Nint– cellint(i,1) = m1, cellint(i,2)=m2– surfaceint(i)– Xint(i)

• List of boundary faces: i=1,...,Nbound– cellbound(i)– surfacebound(i)– Xbound(i)

'κκ σσx

σxσκ

κxκ

31

Computation of interior and boundary face transmissibilities

• Interior faces: i=1,...,Nint– m1 = cellint(i,1)– m2 = cellint(i,2) – Tint(i) = surfaceint(i)/|X(m2)-X(m1)|

• Boundary faces: i=1,...,Nbound– m = cellbound(i)– Tbound(i) = surfacebound(i)/|X(m)-Xbound(i)|

32

Computation of the Jacobian sparsematrix and the right hand side JU = B

( ) ( ) κκσ

σκκκκσ

κκκκ κσ

fguTuuTbound

=−+− Σ∩∂∈Σ∩∂∈= int'

''

( )( )

−−

=

=

κκκκσ

κκκκσ

κκ

uuTline

uuTline

''

''

:':

.

( )σκσκ guTline −:

.

'κuκu

σσ

κuκκκ fline :

.

33

Computation of the Jacobian sparsematrix and the right hand side: JU = B

( ) ( ) κκσ

σκκκκσ

κκκκ κσ

fguTuuTbound

=−+− Σ∩∂∈Σ∩∂∈= int'

''

• Cell loop: m=1,...,N– B(m) = Volume(m)*f(X(m))

• Interior face loop: i=1,...,Nint– m1 = cellint(i,1), m2 = cellint(i,2) – J(m1,m1) = J(m1,m1) +Tint(i) – J(m2,m2) = J(m2,m2) +Tint(i) – J(m1,m2) = J(m1,m2) -Tint(i) – J(m2,m1) = J(m2,m1) -Tint(i)

• Boundary face loop: i=1,...,Nbound– m = cellbound(i)– J(m,m) = J(m,m) +Tbound(i)– B(m) = B(m) + Tbound(i)*g(Xbound(i))

34

TPFAIsotropic Heterogeneous media

• FV scheme

)()('

)('

''''

'' κκκκκσσκ

κσκσκ

κκκκκκκ

uuTuuxx

Kuuxx

KF −=−=−=

Ω∂=Ω=∇−

surgu

surfuKdiv )(

'κxκxσx

κK'κK

κu

'κuσu

''1

'

'

' κκκκ κ

σκ

κ

σκ

κκ K

xx

K

xx

T+=

35

TPFAIsotropic heterogeneous permeability

κu

'κuσu

''1

'

'

' κκκκ κ

σκ

κ

σκ

κκ K

xx

K

xx

T+=

''

'

'

'

''

''

κκκκ

κκ

κ

σκ

κ

σκ

κκκκ

κκκκxx

Kxx

Kxx

Kxx

xxT =

+=

'κxκx σxκK'κK

36

Well discretization

• Radial stationary analytical solution for vertical wells in homogeneous porous media

• Numerical Peaceman well index for well discretization withimposed pressure

• Proof of Peaceman formula for uniform cartesian meshes

• Pressure drop for vertical single phase wells

37

Stationary radial analytical solution in homegeneous media

=∇−

==>=∆−

= wrr

ww

ww

w

qdsnpK

rrpp

rrpK

).(

0

)/ln(2

)( ww

w rrK

qprp

π=−

wp

wq

wrr =

wn

rq

nrpKrq wr π2

).()( =∇−=

)(rp

wrr /1 100

38

Numerical well index

• Cartesian mesh∆x,∆y >> rw

( ) ( ) 0int'

'' =+−+− =Σ∩∂∈Σ∩∂∈= κκκσ

σκσκκκσ

κκκκwbord w

wqppTppT

Well w

Well cell

)/ln(2 0 w

ww rr

Kq

ppw πκ =−

2/1220 )(14.0 yxr ∆+∆≈

y∆x∆

Pressure Numerical computation with specified well flow rate and pressure boundary condition given by the analytical solution

with

analytical solution

39

Well flow rate with specified pressure

( ) ( ) 0)(,

,'

''int

=−+− =Π∈Σ∩∂∈= κκ

κκκκσ

κκκκii

iwi ppWIppT

/ 0

)()/ln(

2

0w

ww pp

rrK

qw

−= κπ

)/ln(2

0 wrrK

WIπ= Well index

40

Computation of the Jacobian matrix and right hand side JU = B with wells

( ) ( ) 0)(,

,'

''int

=−+− =Π∈Σ∩∂∈= κκ

κκκκσ

κκκκii

iwi ppWIppT

• Loop on interior faces: i=1,...,Nint– m1 = cellint(i,1), m2 = cellint(i,2) – J(m1,m1) = J(m1,m1) +Tint(i) – J(m2,m2) = J(m2,m2) +Tint(i) – J(m1,m2) = J(m1,m2) -Tint(i) – J(m2,m1) = J(m2,m1) -Tint(i)

• Loop on wells: i=1,...,Nwell– m = cellwell(i)– J(m,m) = J(m,m) + WI(i)– B(m) = B(m) + WI(i)*pw(i)

41

Exercice: convergence of the schemeto an analytical well solution

≥+

≤≤=−

112

11

11

)/ln(2

)/ln(2

)/ln(2)(

rrifrrK

qrr

Kq

rrrifrrK

q

prpw

ww

www

w

ππ

π

rq

nrprKrq wr π2

).()()( =∇−=

)(rp

wrr /1 1000

)/ln(2

)( ww

w rrK

qprp

π=−

rq

nrpKrq wr π2

).()( =∇−=

)(rp

wrr /1 1000

wrr1

10/)( 12 KKrK ==

1)( KrK =

K

42

Proof of Peaceman well index: uniformcartesian mesh, well at the center of the cell

)(wprp=−pqr=npKrq)(∇−=

wrxy >>∆=∆

<=>−=

w

w

rru

rrppu

0

ruK ∀=∆− 0

κκp

=

∇−=wrr

ww dsnpKq .

wp

1

2

$

0.' '

' =+∇− =

wqdsnpKκ κκσ

κκ

κ

κ)/ln(

2)( w

ww rr

Kq

prpπ

=−

wp

wq

wrr =

wn

rq

nrpKrq wr π2

).()( =∇−=

κ 'κwp

43

Proof of Peaceman well index formula

===

−+∇−=∇−'

''

''

' .2

..κκσ

κκκκσ

κκκκσ

κκ πdsnn

rq

dsnuKdsnpK rw

κpκ κnnκ

4)(. '

'''

wquu

xxdsnpK +−≈∇−

=κκ

κκκκσκκ

σ

4))/ln(

2(0. '

'''

ww

ww

qrx

Kq

ppxx

dsnpK +

∆−−−≈∇−= π

σκ

κκκκσκκ

( )'''

'. κκκκκκσ

κκσ

ppxx

dsnpK −≈∇−=

" ( )ww

w rxK

qpp /)2/exp(ln

2∆−+= π

πκ

'κwp

'κκn

rnκ

44

Vertical well with hydrostatic pressure drop

( ))1()()1()( 2/1 −−−−= − iZiZgipip iww ρ

220

0

14.0),()/ln(

))((2)( yxriH

rr

imKiWI

w

∆+∆==π

!*(3334

• List of well perforations from bottom to top: i=1,...,Np– m(i) = cell of perforation i– WI(i) = Well index of perforation i– pw(i) = pressure of perforation i

BHPw pp =)1(1 5

6 !*

-

1

45

Analysis of TPFA discretization

– Discrete norms: on each cell

– Discrete Poincaré Inequality

κuu h =2/1

22

= Κ∈

κκ

κ uulh

2/1

2

)()(

2'

' ')(

int

10

+−=

Σ∈Σ∈=σκ

σ σσκκκ

κκσ κκ

σσu

xxuu

xxu

boundhThh

10

2 )(hhlh uDu Ω≤

'κxκx

46

Analysis of TPFA discretization

• A priori estimate:

210

)()( lhThh fDu

hΩ≤

( ) ( ) =

−+−

Σ∩∂∈= κκκ

κ κσκ

σκκκσκκ

κκκ κ

σσufu

xxuu

xxu

bound

0'

''

( )2/1

22/1

222

''

'

≤+− Σ∈=

κκ

κκσ

κσκκκσ

κκκκ

κκσσ

ufuxx

uuxx

bound

, (%(

Ω∂=Ω=∆−

suru

surfu

0

47

Analysis of TPFA discretization• Error estimate κκκ uxue −= )(

0')('

'''

'

=

+−

κκκκκ

κκ

κκκκ

Reexx

dsnuxx

xuxuR '

''

'' .

'1)()(

κκκκκκ

κκκκ κκ ∇−−−=

)(, ''' hORRR =−= κκκκκκ

( ) κκκσ

κκκκ

κσ

fuuxx

=−= '

''

κκκσ

κκκκ

κ fdsnu =∇− = '

''

.

48

Analysis of TPFA discretization• Error estimate κκκ uxue −= )(

0')('

'''

'

=

+−

κκκκκ

κκ

κκκκ

Reexx

)(, ''' hORRR =−= κκκκκκ

ChehThh ≤

)(10

( ) '''

'2

)(''1

0κκ

σκκ

κκκ

κκ κκκκ ReeRee

hThh −−=−=

hxxeCehh ThhThh

≤ ')(

2

)('1

010

κκσ

κκ

49

TPFA discretization

• Discrete linear system:

– Coercivity:

– Symmetry:

– Monotonicity: ( Ah=M-Matrice)

hhh FUA =

Thh AA =

01 ≥−hA

2

)(min 10

),(hThhhhh uKUUA ≥

50

M- Matrice monotonicity

01 ≥−A

>∃

≥≤> ≠

jji

jji

ijiii

Athatsuchi

A

AA

0

00,0

,

,

,,

0≥=+≠

iij

jijiii SUAUA

0min0

<= iii UUif

0

0

0000)( i

ijjijii

jji SUUAUA +−=

" " "" #

0>

jijA

( )

( ) κκσ

σσκσσκ

κκσκκ

κκ

κσ

σ

fguxx

uuxx

bord

=−

+−

Σ∩∂∈

=

)()(

''

'

7 8 " %

51

Finite volume schemes

• Parabolic Equations: time discretization– Implicit Euler integration in time– Stability analysis

52

Parabolic model

Ω=×Ω∂=∇−

×Ω=∇−+∂

= onuu

TonnuK

TonfuKdivu

t

t

00

),0(0.),0()(

53

Finite volume space and time discretizations

( )[ ] 0)(1

=−∇−∂ +n

n

t

t

t dxdtftuKdivuκ

0).()()()(1

''

1 =

∇−++−

+

=

+ dtdsntuKtfdxtudxtun

n

t

t

nn

κκσ σκκ

κ κ

)()( 1

1

+∆≈+

nt

t

ttYdttYn

n

/ $ "

)(tY

tttt nn ∆=−= +10 ,0

+ ∆

54

Finite volume space and time discretizations

( ) κκκσ

κκκκκκ κκ fuuT

tuu nn

nn

=−+∆

−=

+++

'

1'

1'

1

55

Stability analysis: discrete energyestimate

( ) ( )

=−+

∆−

=

+++

κκσκκκκ

κκ

κκ κκ fuuT

tuu

u nnnn

n

'

1'

1'

11

22

10

222

1

2121221

2

2

l

nhlh

h

nhl

nh

nhl

nhl

nh

uft

utuuuu

+

+++

≤∆+−+−

222 )()(2 bababaa −+−=−

56

Stability: discrete energy estimate

2212212222 lhl

nh

nhl

nhl

nh ftuuuu ∆≤−+− ++ γ

2202222 lh

N

lhl

Nh ftuu γ+≤

, L2

57

Stability analysis: discrete maximum principle(f=0, zero flux BC)

nnn uuTt

Tt

u κκκκσ

κκκκσ

κκκ κκ+∆=

∆+ +

==

+ 1'

''

''

1 1

κκ allforMum n ≤≤

Then κκ allforMum n ≤≤ +1

58

Stability analysis: discrete maximum principle(f=0, zero flux BC)

Muuif nn >= ++ 11 sup0 κ

κκProof:

lead to a contradiction

( ) ( )MuuuTt

Mu nnnn −+−∆=− ++

=

+ 00

0

00

11'

''

0

1κκκ

κκσκκκ κ

59

Exercize: well test withcompressible Darcy single phase flow

• Parabolic equation(linearized)

Ω=

×Ω∂=∇−

×Ω∂=

×Ω=∇−+∂

= onpp

TongnpK

Tonpp

TonpK

divpdpd

t

N

DD

t

00

0

000

),0(.

),0(

),0(0)()1

(

µρ

µρρρ

ρ

$%

!

"!#

00 pp t ==

Recommended