reservoir simulation

108
FUNDAMENTALS OF RESERVOIR SIMULATION Dr. Mai Cao Lan, GEOPET, HCMUT, Vietnam Jan, 2014

Upload: daonguyencm10

Post on 20-Dec-2015

206 views

Category:

Documents


29 download

DESCRIPTION

Reservoir Simulation

TRANSCRIPT

Page 1: Reservoir Simulation

FUNDAMENTALS OF RESERVOIR

SIMULATION

Dr. Mai Cao Lan,

GEOPET, HCMUT, Vietnam

Jan, 2014

Page 2: Reservoir Simulation

ABOUT THE COURSE

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 2

COURSE OBJECTIVE

COURSE OUTLINE

REFERENCES

Page 3: Reservoir Simulation

Course Objective

• To review the background of petroleum reservoir

simulation with an intensive focus on what and how

things are done in reservoir simulations

• To provide guidelines for hands-on practices with

Microsoft Excel

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 3

Page 4: Reservoir Simulation

INTRODUCTION

FLOW EQUATIONS FOR PETROLEUM RESERVOIRS

FINITE DIFFERENCE METHOD & NUMERICAL SOLUTION FOR

FLOW EQUATIONS

SINGLE-PHASE FLOW SIMULATION

MULTIPHASE FLOW SIMULATION

COURSE OUTLINE

Page 5: Reservoir Simulation

16-Jan-2014 5Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

T. Eterkin et al., 2001. Basic Applied Reservoir Simulation,

SPE, Texas

J.H. Abou-Kassem et al., 2005. Petroleum Reservoir

Simulation – A Basic Approach, Gulf Publishing Company,

Houston, Texas.

C.Mattax & R. Dalton, 1990. Reservoir Simulation, SPE,

Texas.

References

Page 6: Reservoir Simulation

INTRODUCTION

NUMERICAL SIMULATION – AN OVERVIEW

COMPONENTS OF A RESERVOIR SIMULATOR

RESERVOIR SIMULATION BASICS

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 6

Page 7: Reservoir Simulation

Numerical Simulation – An Overview

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 7

Page 8: Reservoir Simulation

Mathematical Formulation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 8

Page 9: Reservoir Simulation

Numerical Methods for PDEs

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 9

Page 10: Reservoir Simulation

Numerical Methods for Linear Equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 10

Page 11: Reservoir Simulation

Mathematical Model

Physical Model

Numerical Model

Computer Code

Reservoir Simulator

Components of a Reservoir Simulator

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 11

Page 12: Reservoir Simulation

• A powerful tool for evaluating reservoir performance

with the purpose of establishing a sound field

development plan

• A helpful tool for investigating problems associated with

the petroleum recovery process and searching for

appropriate solutions to the problems

What is Reservoir Simulation?

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 12

Page 13: Reservoir Simulation

Reservoir Simulation Basics

• The reservoir is divided into a number of cells

• Basic data is provided for each cell

• Wells are positioned within the cells

• The required well production rates are specified as a

function of time

• The equations are solved to give the pressure and

saturations for each block as well as the production of

each phase from each well.

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 13

Page 14: Reservoir Simulation

Simulating Flow in Reservoirs

• Flow from one grid block to the next

• Flow from a grid block to the well completion

• Flow within the wells (and surface networks)

Flow = Transmissibility * Mobility * Potential Difference

Geometry & Properties

Fluid Properties

Well Production

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 14

Page 15: Reservoir Simulation

SINGLE-PHASE FLOW

EQUATIONS

ESSENTIAL PHYSICS

CONTINUITY EQUATION

MOMENTUM EQUATION

CONSTITUTIVE EQUATION

GENERAL 3D SINGLE-PHASE FLOW EQUATION

BOUNDARY & INITIAL CONDITIONS

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 15

Page 16: Reservoir Simulation

Essential Physics

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 16

The basic differential equations are derived from the

following essential laws:

Mass conservation law

Momentum conservation law

Material behavior principles

Page 17: Reservoir Simulation

Conservation of Mass

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 17

Mass conservation may be formulated across a control element with one fluid

of density r, flowing through it at a velocity u:

Dx

ur

element theinside

mass of change of Rate

Dx+at xelement

theofout Mass

at xelement

theinto Mass

Page 18: Reservoir Simulation

Continuity Equation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 18

Based on the mass conservation law, the continuity equation can be

expressed as follow:

A u Ax t

r r

ux tr r

For constant cross section area, one has:

Page 19: Reservoir Simulation

Conservation of Momentum

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 19

Conservation of momentum for fluid flow in porous materials

is governed by the semi-empirical Darcy's equation, which for

one dimensional, horizontal flow is:

x

Pku

Page 20: Reservoir Simulation

Equation Governing Material Behaviors

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 20

The behaviors of rock and fluid during the production

phase of a reservoir are governed by the constitutive

equations or also known as the equations of state.

In general, these equations express the relationships

between rock & fluid properties with respect to the

reservoir pressure.

Page 21: Reservoir Simulation

Constitutive Equation of Rock

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 21

The behavior of reservoir rock corresponding to the

pressure declines can be expressed by the definition of the

formation compaction

1f

T

cP

For isothermal processes, the constitutive equation of rock becomes

f

dc

dP

Page 22: Reservoir Simulation

Constitutive Equation of Fluids

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 22

The behavior of reservoir fluids corresponding to the

pressure declines can be expressed by the definition of fluid

compressibility (for liquid)

1, , ,l

T

Vc l o w g

V P

For natural gas, the well-known equation of state is used:

PV nZRT

Page 23: Reservoir Simulation

Single-Phase Fluid System

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 23

Normally, in single-phase reservoir simulation, we would

deal with one of the following fluids:

One Phase Gas One Phase Water One Phase Oil

Fluid System

Page 24: Reservoir Simulation

Single-Phase Gas

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 24

The gas must be single phase in the reservoir, which means

that crossing of the dew point line is not permitted in order

to avoid condensate fall-out in the pores. Gas behavior is

governed by:

rg rgs

Bg

constant

Bg

Page 25: Reservoir Simulation

Single-Phase Water

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 25

One phase water, which strictly speaking means that the

reservoir pressure is higher than the saturation pressure of

the water in case gas is dissolved in it, has a density

described by:

rw rwsBw

constant

Bw

Page 26: Reservoir Simulation

Single-Phase Oil

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 26

In order for the oil to be single phase in the reservoir, it

must be undersaturated, which means that the reservoir

pressure is higher than the bubble point pressure. In the

Black Oil fluid model, oil density is described by:

ro roS rgSRso

Bo

Page 27: Reservoir Simulation

Single-Phase Fluid Model

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 27

For all three fluid systems, the one phase density or

constitutive equation can be expressed as:

r

constant

B

Page 28: Reservoir Simulation

Single-Phase Flow Equation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 28

The continuity equation for a one phase, one-dimensional system of

constant cross-sectional area is:

rrt

ux

The conservation ofmomentum for 1D,horizontal flow is: x

Pku

The fluid model:

r

constant

B

Substituting the momentum equation and the fluid model into the

continuity equation, and including a source/sink term, we obtain the

single phase flow in a 1D porous medium:

sc

b

qk P

x B x V t B

Page 29: Reservoir Simulation

(1/ ), , ,l

d Bc B l o g w

dP

sc tf l

b

q ck P P Pc c

x B x V B t B t

Based on the fluid model, compressibility can now be defined in terms of the formation volume factor as:

Then, an alternative form of the flow equation is:

(1/ )fsc

b

cqk P d B P

x B x V B dP t

Single-Phase Flow Equation for Slightly Compressible Fluids

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 29

Page 30: Reservoir Simulation

Single-Phase Flow Equation for Compressible Fluids

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 30

sc

b

qk P

x B x V t B

Page 31: Reservoir Simulation

Boundary Conditions (BCs)

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 31

Mathematically, there are two types of boundary conditions:

• Dirichlet BCs: Values of the unknown at the boundaries

are specified or given.

• Neumann BCs: The values of the first derivative of the

unknown are specified or given.

Page 32: Reservoir Simulation

Boundary Conditions (BCs)

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 32

From the reservoir engineering point of view:

Dirichlet BCs: Pressure values at the boundaries are

specified as known constraints.

Neumann BCs: The flow rates are specified as the known

constraints.

Page 33: Reservoir Simulation

Dirichlet Boundary Conditions

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 33

For the one-dimension single phase flow, the Dirichlet boundary

conditions are the pressure the pressures at the reservoir boundaries,

such as follows:

R

L

PtLxP

PtxP

0,

0,0

A pressure condition will normally be specified as a bottom-hole

pressure of a production or injection well, at some position of the

reservoir.

Page 34: Reservoir Simulation

Newmann Boundary Conditions

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 34

In Neumann boundary conditions, the flow rates at the end faces of the

system are specified. Using Darcy's equation, the conditions become:

For reservoir flow, a rate condition may be specified as a production or

injection rate of a well, at some position of the reservoir, or it is

specified as a zero-rate across a sealed boundary or fault, or between

non-communicating layers.

0

0x

kA PQ

x

Lx

Lx

PkAQ

Page 35: Reservoir Simulation

General 3D Single-Phase Flow Equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 35

The general equation for 3D single-phase flow in field units (customary

units) is as follows:

c

p Z

g

r

Z: Elevation, positive in downward direction

c, c, c: Unit conversion factors

y yx xc c

bz zc sc

c

A kA kx y

x B x y B y

VA kz q

z B z t B

D D

D

Page 36: Reservoir Simulation

3D Single-Phase Flow Equations for Horizontal Reservoirs

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 36

The equation for 3D single-phase flow in field units for horizontal

reservoir is as follow:

y yx xc c

bz zc sc

c

A kA k p px y

x B x y B y

VA k pz q

z B z t B

D D

D

Page 37: Reservoir Simulation

xx

Z

B

kA

x

Bt

Vqx

x

p

B

kA

x

xxc

c

bsc

xxc

D

D

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 37

1D Single-Phase Flow Equation with Depth Gradient

Page 38: Reservoir Simulation

Quantities in Flow Equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 38

Page 39: Reservoir Simulation

Quantities in Flow Equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 39

Page 40: Reservoir Simulation

FINITE DIFFERENCE METHOD & NUMERICAL SOLUTION OF SINGLE-PHASE

FLOW EQUATIONS

FUNDAMENTALS OF FINITE DIFFERENCE METHOD

FDM SOLUTION OF THE SINGLE-PHASE FLOW EQUATIONS

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 40

Page 41: Reservoir Simulation

Numerical Solution of Flow Equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 41

The equations describing flui flows in reservoirs are of

partial differential equations (PDEs)

Finite difference method (FDM) is traditionally used for

the numerical solution of the flow equations

Page 42: Reservoir Simulation

Fundamentals of FDM

In FDM, derivatives are replaced by a proper difference formula based on the Taylor series expansions of a function:

1 2 2 3 3 4 4

2 3 4

( ) ( ) ( ) ( )( ) ( )

1! 2! 3! 4!x x x x

x f x f x f x ff x x f x

x x x x

D D D D D

2 2 3

2 3

( ) ( ) ( )

2! 3!x x x

f f x x f x x f x f

x x x x

D D D

D

The first derivative can be written by re-arranging the terms:

( ) ( )( )

x

f f x x f xO x

x x

D D

D

Denoting all except the first terms by O (Dx) yields

The difference formula above is of order 1 with the truncation error being proportional to Dx

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 42

Page 43: Reservoir Simulation

Fundamentals of FDM (cont.)

To obtain higher order difference formula for the first derivative, Taylor series expansion of the function is used from both side of x

2 3

3

( ) ( ) ( )

2 3!x x

f f x x f x x x f

x x x

D D D

D

Subtracting the second from the first equation yields

2( ) ( )( )

2x

f f x x f x xO x

x x

D D D

D

The difference formula above is of order 2 with the truncation error being proportional to (Dx)2

1 2 2 3 3 4 4

2 3 4

( ) ( ) ( ) ( )( ) ( )

1! 2! 3! 4!x x x x

x f x f x f x ff x x f x

x x x x

D D D D D

1 2 2 3 3 4 4

2 3 4

( ) ( ) ( ) ( )( ) ( )

1! 2! 3! 4!x x x x

x f x f x f x ff x x f x

x x x x

D D D D D

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 43

Page 44: Reservoir Simulation

Typical Difference Formulas

Forward difference for first derivatives (1D)

( ) ( )( )

x

f f x x f xO x

x x

D D

D

1 ( )i i

i

f ffO x

x x

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 44

i-1 i i+1

Dx

Page 45: Reservoir Simulation

Typical Difference Formulas

Backward difference for first derivatives (1D)

( ) ( )( )

x

f f x f x xO x

x x

D D

D

1 ( )i i

i

f ffO x

x x

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 45

i-1 i i+1

Dx

Page 46: Reservoir Simulation

Typical Difference Formulas

Centered difference for first derivatives (1D)

2( ) ( )( )

2x

f f x x f x xO x

x x

D D D

D

21 1 ( )2

i i

i

f ffO x

x x

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 46

i-1 i i+1

Dx

Page 47: Reservoir Simulation

Typical Difference Formulas

Centered difference for second derivatives (1D)

22

2 2

( ) 2 ( ) ( )( )

x

f f x x f x f x xO x

x x

D D D

D

221 1

2 2

2( )i i i

i

f f ffO x

x x

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 47

i-1 i i+1

Dx

Page 48: Reservoir Simulation

Typical Difference Formulas

Forward difference for first derivatives (2D)

( , )

( , ) ( , )( )

x y

f f x y y f x yO y

y y

D D

D

, 1 ,

( , )

( )i j i j

i j

f ffO y

y y

D

D

or in space index form

i-1,j i,j i+1,j

i,j+1

i,j-1

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 48

Page 49: Reservoir Simulation

Typical Difference Formulas

Backward difference for first derivatives (2D)

( , )

( , ) ( , )( )

x y

f f x y f x y yO y

y y

D D

D

, , 1

( , )

( )i j i j

i j

f ffO y

y y

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 49

i-1,j i,j i+1,j

i,j+1

i,j-1

Page 50: Reservoir Simulation

Typical Difference Formulas

Centered difference for first derivatives (2D)

2

( , )

( , ) ( , )( )

2x y

f f x y y f x y yO y

y y

D D D

D

, 1 , 1 2

( , )

( )2

i j i j

i j

f ffO y

y y

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 50

i-1,j i,j i+1,j

i,j+1

i,j-1

Page 51: Reservoir Simulation

Typical Difference Formulas

Centered difference for second derivatives (2D)

22

2 2

( , )

( , ) 2 ( , ) ( , )( )

x y

f f x y y f x y f x y yO y

y y

D D D

D

2, 1 , , 1 2

2 2

( , )

2( )

i j i j i j

i j

f f ffO y

y y

D

D

or in space index form

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 51

i-1,j i,j i+1,j

i,j+1

i,j-1

Page 52: Reservoir Simulation

Solving time-independent PDEs

Divide the computational domain into subdomains

Derive the difference formulation for the given PDE by replacing all

derivatives with corresponding difference formulas

Apply boundary conditions to the points on the domain boundaries

Apply the difference formulation to every inner points of the

computational domain

Solve the resulting algebraic system of equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 52

Page 53: Reservoir Simulation

Exercise 1

Solve the following Poisson equation:

22

216 sin(4 )

px

x

subject to the boundary conditions:

p=2 at x=0 and x=1

10 x

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 53

Page 54: Reservoir Simulation

Exercise 2

Solve the following Poisson equation:

2 sin( )sin( )

0 1,0 1

u x y

x y

subject to the boundary conditions:

0 along the boundaries 0, 1, 0, 1u x x y y

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 54

Page 55: Reservoir Simulation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 55

Boundary Condition Implementation

b

pC

x

Newmann BCs:

1 0

1 1/2 1 0

0 1 1

p ppC

x x x

p p C x

D

1

1/2 1

1

x x

x x x

x x x

n n

n n n

n n n

p ppC

x x x

p p C x

D

Page 56: Reservoir Simulation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 56

Boundary Condition Implementation

Dirichlet BCs:

bp C

1 2

1

1 2

1 p p C

x

x x

D

D D

1

1

1x x

x

x x

n n

n

n n

p p C

x

x x

D

D D

Page 57: Reservoir Simulation

Exercise 3

Solve the following Poisson equation:

2 2 2( )exp( )

0 1,0 1, 2, 3

u x y

x y

subject to the boundary conditions:

exp( ); 0, 1u x y y y

exp( ); 0, 1u

x y x xx

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 57

Page 58: Reservoir Simulation

Solving time-dependent PDEs

Divide the computational domain into subdomains

Derive the difference formulation for the given PDE by replacing all

derivatives with corresponding difference formulas in both space

and time dimensions

Apply the initial condition

Apply boundary conditions to the points on the domain boundaries

Apply the difference formulation to every inner points of the

computational domain

Solve the resulting algebraic system of equations

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 58

Page 59: Reservoir Simulation

Exercise 4

Solve the following diffusion equation:

2

2,0 1.0, 0

u ux t

t x

subject to the following initial and boundary conditions:

( 0, ) ( 1, ) 0, 0u x t u x t t

( , 0) sin( ),0 1u x t x x

Hints: Use explicit scheme for time discretization

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 59

Page 60: Reservoir Simulation

Explicit Scheme

The difference formulation of the original PDE in Exercise 4 is:

1

1 1

2

2

( )

n n n n n

i i i i iu u u u u

t x

D D

where

n=0,NT: Time step

i =1,NX: Grid point index

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 60

Page 61: Reservoir Simulation

Implicit Scheme

The difference formulation for the original PDE in Exercise 4

1 1 1 1

1 1

2

2

( )

n n n n n

i i i i iu u u u u

t x

D D

where

n=0,NT: Time step

i =1,NX: Grid point index

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 61

Page 62: Reservoir Simulation

Semi-Implicit Scheme

Semi-Implicit Scheme for the Diffusion Equation in Exercise 4 is

1 1 1 1

1 1 1 1

2 2

2 2(1 )

( ) ( )

n n n n n n n n

i i i i i i i iu u u u u u u u

t x x

D D D

where

0 ≤ ≤ 1

n=0,NT: Time step

i =1,NX: Grid point index

When =0.5, we have Crank-Nicolson scheme

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 62

Page 63: Reservoir Simulation

Discretization in Conservative Form

21/2 1/2

( ) ( )

( ) i i

i i

P Pf x f x

P x xf x O x

x x x

D D

1

11/2 12

( )( )

i i

i i i

P PPO x

x x x

D

D D

1

11/2 12

( )( )

i i

i i i

P PPO x

x x x

D

D D

1 11/2 1/2

1 1

( ) ( )2 ( ) 2 ( )

( ) ( )( ) ( )

i i i ii i

i i i i

i i

P P P Pf x f x

x x x xPf x O x

x x x

D D D D D D

( )P

f xx x

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 64

i-1 i i+1

Dx

Page 64: Reservoir Simulation

FDM for Flow Equations

FD Spatial Discretization

FD Temporal Discretization

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 65

Page 65: Reservoir Simulation

16-Jan-2014 66Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

For slightly compressible fluids (Oil)

x x b tc sc

c

A k V cp px q

x B x B t

D

For compressible fluids (Gas)

x x bc sc

c

A k Vpx q

x B x t B

D

Single-Phase Flow Equations

Page 66: Reservoir Simulation

FDM for Slightly Compressible Fluid Flow Equations

FD Spatial Discretization

FD Temporal Discretization

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 67

Page 67: Reservoir Simulation

Discretization of the left side term

The discretization of the left side term is then

1 12 21 1

2 2

( ) ( )

( ) ( )

i i

i i

i i

P Pf x f x

x xPf x O x

x x x

D D

where ( ) x xc

A kf x

B

1

11

2

( )

( ) / 2

i i

i i i

P PP

x x x

D D

1

11

2

( )

( ) / 2

i i

i i i

P PP

x x x

D D

FD Spatial Discretization of the LHS

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 68

1 12 2

1 1( ) ( )x x x x x xc i c i i c i i

i i i

A k A k A kpx P P P P

x B x B x B x

D

D D

Page 68: Reservoir Simulation

Define transmissibility as the coefficient in front of thepressure difference:

2

1

2

1

1

21

D

ii

xxcx

Bx

kAT

i

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 69

Transmissibility

Page 69: Reservoir Simulation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 70

FD Spatial Discretization

The left side term of the 1D single-phase flow equation is now discritized as follow:

1 12 2

1 1( ) ( )x xc i i i i ii i

i

A k Px Tx P P Tx P P

x B x

D

Page 70: Reservoir Simulation

12 1 1

2 2

1

i

x xx c

i i

A kT

x B

D

Transmissibility

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 71

Page 71: Reservoir Simulation

16-Jan-2014 72Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

1

11 1

2

2x x x xx x i i

c c

i x x i x x ii i

A k A kA k

x A k x A k x

D D D

or

1 1 1

11

2

1

2

x x x x x xc c c

i i i

A k A k A k

x x x

D D D

Transmissibility (cont’d)

Page 72: Reservoir Simulation

ii

iiii

ixx

xx

DD

DD

1

11

21

ii

iiii

ixx

xx

DD

DD

1

11

21

B

1

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 73

Weighted Average of Mobility

Page 73: Reservoir Simulation

2

1

2

1

1

21

D

ii

xxcx

Bx

kAT

i

D

D

DD

DD

i

i

i

i

ii

iixxiixx

ixxixx

cx

Bx

Bx

xx

xkAxkA

kAkAT

i

111

2

1

1

1

11

1

2

1

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 74

Discretized Transmissibility

Page 74: Reservoir Simulation

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 75

FD Temporal Discretization

Explicit Method

1/2 1/2

1

1 1i i i

n n

i in n n n n n b tx i i x i i sc

c i

p pV cT p p T p p q

B t

D Implicit Method

1/2 1/2

1

1 1 1 1 1 1

1 1i i i

n n

i in n n n n n b tx i i x i i sc

c i

p pV cT p p T p p q

B t

D

Semi-implicit Method

1/2 1/2

1/2 1/2

1 1 1 1 1 1

1 1

1

1 11

i i i

i i

n n n n n n

sc x i i x i i

n n

i in n n n n n b tx i i x i i

c i

q T p p T p p

p pV cT p p T p p

B t

D

0 1

Page 75: Reservoir Simulation

For the 1D, block-centered grid shown on the screen,

determine the pressure distribution during the first year of

production. The initial reservoir pressure is 6000 psia. The

rock and fluid properties for this problem are:

6 -1

t

1000ft; 1000ft; 75ft

1RB/STB; =10cp;

k =15md; =0.18; c =3.5 10 psi ;

Use time step sizes of =10, 15, and 30 days.

Assume B is unchanged within the pressure range

of interest.

x

x y z

B

D D D

Exercise 5

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 76

Page 76: Reservoir Simulation

1 2 3 4 5

0p

x

0p

x

150 STB/Dscq

1000 ft

75 ft

1000 ft

Exercise 5 (cont’d)

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 77

Page 77: Reservoir Simulation

For the 1D, block-centered grid shown on the screen,

determine the pressure distribution during the first year of

production. The initial reservoir pressure is 6000 psia. The

rock and fluid properties for this problem are:

6 -1

t

1000ft; 1000ft; 75ft

1RB/STB; =10cp;

k =15md; =0.18; c =3.5 10 psi ;

Use time step sizes of =10, 15, and 30 days.

Assume B is unchanged within the pressure range

of interest.

x

x y z

B

D D D

Exercise 6

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 78

Page 78: Reservoir Simulation

1 2 3 4 5

0p

x

6000psiap

150 STB/Dscq

1000 ft

75 ft

1000 ft

Exercise 6 (cont’d)

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 79

Page 79: Reservoir Simulation

FDM for Slightly Compressible Fluid Flow Equations

FD Spatial Discretization

FD Temporal Discretization

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 80

Page 80: Reservoir Simulation

1 12 2

1 1( ) ( )x xc i i i i ii i

i

A k px Tx p p Tx p p

x B x

D

FD Spatial Discretization of the LHS for Compressible Fluids

Same as that for slightly compressible fluids

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 80

Page 81: Reservoir Simulation

2

1

2

1

1

21

D

ii

xxcx

Bx

kAT

i

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 82

Transmissibility

Page 82: Reservoir Simulation

12

1 1

1

if

if

i i i

i

i i i

p p

p p

1

B

Upstream Average of Mobility

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 82

Page 83: Reservoir Simulation

1n n

b b

c ci i

V V

t B t B B

D

1ref ref

fc p p

FD Spatial Discretization of the RHS for Compressible Fluids

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 83

Page 84: Reservoir Simulation

16-Jan-2014 85Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

For the 1D, block-centered grid shown on the screen,

determine the pressure distribution during the first year of

production. The initial reservoir pressure is 5000 psia. The

rock and fluid properties for this problem are:

6 -1

t

1000ft; 1000ft; 75ft

k =15md; =0.18; c =3.5 10 psi

Use time step sizes of =10 days.

x

x y z

D D D

Exercise 7

Page 85: Reservoir Simulation

16-Jan-2014 86Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

PVT data table:p (psia) (cp) B (bbl/STB)

5000 0.675 1.292

4500 0.656 1.299

4000 0.637 1.306

3500 0.619 1.313

3000 0.600 1.321

2500 0.581 1.330

2200 0.570 1.335

2100 0.567 1.337

2000 0.563 1.339

1900 0.560 1.341

1800 0.557 1.343

Exercise 7 (cont’d)

Page 86: Reservoir Simulation

16-Jan-2014 87Mai Cao Lân – Faculty of Geology & Petroleum Engineering - HCMUT

1 2 3 4 5

0p

x

0p

x

150 STB/Dscq

1000 ft

75 ft

1000 ft

Exercise 7 (cont’d)

Page 87: Reservoir Simulation

MULTIPHASE FLOW SIMULATION

MULTIPHASE FLOW EQUATIONS

FINITE DIFFERENCE APPROXIMATION TO MULTIPHASE FLOW EQUATIONS

NUMERICAL SOLUTION OF THE MULTIPHASE FLOW EQUATIONS

16-Jan-2014 Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam 88

Page 88: Reservoir Simulation

Continuity equation for each fluid flowing phase:

llll St

AuAx

rr

x

Pkku l

l

rll

gwol ,,

wocow PPP

ogcog PPP

Sll o,w, g

1gwol ,,

Momentum equation for each fluid flowing phase:

16-Jan-2014 89Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Multiphase Flow Equations

Page 89: Reservoir Simulation

• Considering the fluid phases of oil and water only, the flow equations for the two phases are as follows:

scw

w

w

c

bw

w

ww

rwxxc q

B

S

t

Vx

x

Z

x

P

B

kAk

x

D

sco

o

o

c

bo

o

oo

roxxc q

B

S

t

Vx

x

Z

x

P

B

kAk

x

D

cowow PPP 1 wo SS

16-Jan-2014 90Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Oil-Water Flow Equations

Page 90: Reservoir Simulation

scw

w

w

c

bw

cowo

ww

rwxxc q

B

S

t

Vx

x

Z

x

P

x

P

B

kAk

x

D

sco

o

w

c

bo

o

oo

roxxc q

B

S

t

Vx

x

Z

x

P

B

kAk

x

D

1

16-Jan-2014 91Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Oil-Water Flow Equations

Page 91: Reservoir Simulation

)()(11

21

21 ioioixoioioixo

i

i

oo

oo

roxxc

PPTPPT

xx

Z

x

P

B

kAk

x

D

)()(11

21

21 ioioixwioioixw

i

i

wcowo

ww

rwxxc

PPTPPT

xx

Z

x

P

x

P

B

kAk

x

D

Left side flow terms

16-Jan-2014 92Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of the Flow Equation

Page 92: Reservoir Simulation

o krooBo

ww

rww

B

k

16-Jan-2014 93Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Phase Mobility

Page 93: Reservoir Simulation

1 2

ii oo

21

1

11

21

DD

DD

ii

ioiioi

ioxx

xx

Upstream: weighted average:

x

Swir

Sw

1-Swir

Qw

average

upstream

exact

OIL

16-Jan-2014 94Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Averaging of Phase Mobility

Page 94: Reservoir Simulation

ioioio

ioioio

io

PPif

PPif

1

11

21

iwiwiw

iwiwiw

iw

PPif

PPif

1

11

21

16-Jan-2014 95Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Upstream Average of Mobility

Page 95: Reservoir Simulation

1 1 1 12 2

( ) ( )i i i ii i

ro oc x x o i

o o i

xo o o xo o o

k P Zk A x

x B x x

T P P T P P

D

1 1 1 12 2

( ) ( )i i i ii i

rw o cowc x x w i

w w i

xw o o xw o o

k P P Zk A x

x B x x x

T P P T P P

D

Left side flow terms

16-Jan-2014 96Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of Multiphase Flow Equation

Page 96: Reservoir Simulation

Right side flow terms

o

oo

oo

o

BtS

t

S

BB

S

t

)()/1( 1 n

ion

o

io

o

o

roi

io

o PPdP

Bd

B

c

t

S

BtS

i

D

The second term:

)( 1

1

n

iwn

w

iio

i

n

i

o

o

SStBt

S

B i

D

wo SS 1

The first term:

16-Jan-2014 97Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of the Oil-Phase Equation

Page 97: Reservoir Simulation

and

)()( 11 n

iwwiswon

ion

oipoo

io

o SSCPPCB

S

t

n

ii

io

o

o

riwiipoo

dP

Bd

B

c

t

SC

D

)/1()1(Where:

iio

iiswo

tBC

D

16-Jan-2014 98Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of Oil-phase RHS

Page 98: Reservoir Simulation

Right side flow terms

w

ww

ww

w

BtS

t

S

BB

S

t

t

P

t

P

BPt

P

BPBt

cowo

ww

w

www

t

w

w

cow

t

cow S

dS

dPP

16-Jan-2014 99Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of Water-Phase Equation

Page 99: Reservoir Simulation

and

Where:

)()( 11 n

iwwiswwn

ion

oipow

iw

w SSCPPCB

S

t

n

ii

iw

w

w

riwiipow

dP

Bd

B

c

t

SC

D

)/1(

ipow

iw

cow

iwi

iisww C

dS

dP

tBC

D

16-Jan-2014 100Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Discretization of Water-phase RHS

Page 100: Reservoir Simulation

Ni ,...,1

1 11 12 2

1 1 1

1

i i i i i

i i

n n n n n nxo xo poo oo o o o i o ii i

n nswo wi w i osc

T P P T P P C P P

C S S q

1 11 1 1 12 2

1 1

1 1

i i i i i i i i

i i i

n n n n n n n nxw xwo o cow cow o o cow cowi i

n n n no sww wpowi o i i w i wsc

T P P P P T P P P P

C P P C S S q

16-Jan-2014 101Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Fully Discrete Oil-Water Flow Equations

Page 101: Reservoir Simulation

n

iswo

n

isww

iC

C

iii

iiii

iiii

wsciosc

n

ion

o

n

iswoi

n

ipoo

n

cow

n

cow

n

ixwi

n

cow

n

cow

n

ixwi

n

o

n

o

n

ixwi

n

ixo

n

o

n

o

n

ixwi

n

ixo

qqPPCC

PPTPPT

PPTTPPTT

1

1111

121

121

121

21

121

21

First, the pressure is found by solving the following equation:

16-Jan-2014 102Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

IMPES Solution of Oil-Water Flow Equations

Page 102: Reservoir Simulation

11

1

1111

1

1

nn

i

nn

i

nn

i

n

iiiigPEPCPW ooo

16-Jan-2014 103Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

n

ixwi

n

ixo

n TTWi 2

121

1

)()(

)(

11

1

21

21

n

icown

icown

ixwi

n

icown

icown

ixwi

wsciosc

n

ion

ipowi

n

ipoon

PPTPPT

qqPCCgiii

n

iswo

n

isww

iC

C

n

ixwi

n

ixo

n TTEi 2

121

1

1 12 2

1 12 2

1

i

n n n nxo xo pooii i

n n nxw xw powi ii i

C T T C

T T C

IMPES Pressure Solution

Page 103: Reservoir Simulation

16-Jan-2014 104Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Once the oil pressures have been found, water saturationscan be obtained by either the oil-phase equation or thewater-phase equation.

n

ion

o

n

ipooosc

n

o

n

o

n

ixo

n

o

n

o

n

ixo

n

iswo

n

iwn

w

PPCq

PPTPPT

CSS

ii

iiii

i 1

1111

1 121

1211

Ni ,...,1

IMPES Water Saturation

Page 104: Reservoir Simulation

16-Jan-2014 105Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

A homogeneous, 1D horizontal oil reservoir is 1,000 ft long

with a cross-sectional area of 10,000 ft2. It is discretized into

four equal gridblocks. The initial water saturation is 0.160

and the initial reservoir pressure is 5,000 psi everywhere.

Water is injected at the center of cell 1 at a rate of 75 STB/d

and oil is produced at the center of cell 4 at the same rate.

Rock compressibility cr=3.5E-6 psi-1 . The viscosity and

formation volume factor of water are given as w=0.8cp and

Bw=1.02 bbl/STB.

Exercise 8

Page 105: Reservoir Simulation

16-Jan-2014 106Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

The gridblock dimensions and properties are: Dx=250ft,

Dy=250ft, Dz=40ft, kx=300md, =0.20. PVT data

including formation volume factor and viscosity of oil is

given as in Table 1 as the functions of pressure. The

saturation functions including relative permeabilities and

capillary pressure.

Using the IMPES solution method with Dt=1 day, find the

pressure and saturation distribution after 100 days of

production.

Exercise 8 (cont’d)

Page 106: Reservoir Simulation

1 2 3 4

0p

x

250 ft

Ax=10,000 ft2

0p

x

Qo=-75 STB/dQw=75 STB/d

Exercise 8 (cont’d)

16-Jan-2014 107Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

Page 107: Reservoir Simulation

16-Jan-2014 108Dr. Mai Cao Lan, Faculty of Geology & Petroleum Engineering, HCMUT, Vietnam

The relative permeability data:

Sw Krw Kro

0.16 0 1

0.2 0.01 0.7

0.3 0.035 0.325

0.4 0.06 0.15

0.5 0.11 0.045

0.6 0.16 0.031

0.7 0.24 0.015

0.8 0.42 0

Exercise 8 (cont’d)

Page 108: Reservoir Simulation

The End