solution methods - cairo university · 2020-03-11 · 12/26/2017 dr.helmy sayyouh 2 one-dimensional...

38
12/26/2017 1 Solution Methods Dr. Helmy Sayyouh Petroleum Engineering Cairo University

Upload: others

Post on 05-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 1

Solution Methods

Dr. Helmy Sayyouh

Petroleum Engineering

Cairo University

Page 2: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 2

One-dimensional flow system

One-dimensional system composed of five blocks.

A no-flow boundary condition is imposed on the left end, while a non-zero pressure gradient is specified on the right.

A well with a flow rate qs is located in block #2. We assume that the flowing fluid is slightly compressible.

Page 3: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 3

The characteristic equation for any block

Pressure is not known in any of these five blocks, and so we must write

Equation for each of them (i.e., i = 1,..., 5):

D P E P F P Qi

n

i

n n

i

n

i

n

i

n

i

1

1

1

1

1

1

i P E P F P Q

i P E P F P Q

i P E P F P Q

i P E P F P Q

i P E P F P Q

n n n n n n

n n n n n n

n n n n n n

n n n n n n

n n n n n n

1

2

3

4

5

1 0

1

1 1

1

1 2

1

1

2 1

1

2 2

1

2 3

1

2

3 2

1

3 3

1

3 4

1

3

4 3

1

4 4

1

4 5

1

4

5 4

1

5 5

1

5 6

1

5

:

:

:

:

:

D

D

D

D

D

Page 4: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 4

Moving to block #5, the imposed constant pressure gradient

implies that

or

P P

xC

n n

6

1

5

1

1

P P C xn n

6

1

5

11

Page 5: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 5

In implementing the flow rate specified at the well block, we invoke the following definition of Q2:

Q qV c

tPs

b n

2

2

25615

.

Page 6: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 6

Page 7: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 7

The 5x5 coefficient matrix is a tri-diagonal coefficient matrix, which is normally written in a more compact form as follows:

O O

O

O O

O

O O

0

0

F

E

D

i

i

i

Page 8: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 8

Two-dimensional flow system

The reservoir under consideration has three no-flow boundaries and one constant-pressure boundary.

A well is located in block (2,2), at which sand face pressure is specified as Psf.

Although there are nine blocks in the system, the constant pressure specification on the boundary blocks (1,1), (2,1), and (3,1) means that only six blocks have unknown pressures.

Page 9: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 9

We need to write Equation for just these six

blocks:

i = 1, j = 2: B1,2

n

i = 2, j = 2: B2,2

n

2,2

i = 3, j = 2: B3,2

n

3,2

Pn

Dn

Pn

En

Pn

Fn

Pn

Hn

Pn

Q

Pn

Dn

Pn

En

Pn

Fn

Pn

Hn

Pn

Q

Pn

Dn

Pn

En

P

1 1

1

1 2 0 2

1

1 2 1 2

1

1 2 2 2

1

1 2 1 3

1

1 2

2 1

1

2 2 1 2

1

2 2

1

2 2 3 2

1

2 2 2 3

1

2 2

3 1

1

3 2 2 2

1

3

, , , , , , , , , ,

, , , , , , , , ,

, , ,

, , , , , ,

, , , , , , , , , ,

, , , , , , , , ,

2

1

3 2 4 2

1

3 2 3 3

1

3 2

1 2

1

1 3 0 3

1

1 3 1 3

1

1 3 2 3

1

1 3 1 4

1

1 3

2 2

1

2 3 1 3

1

2 3 2 3

1

2 3 3 3

1

2 3 2 4

1

2

nF

nP

nH

nP

nQ

Pn

Dn

Pn

En

Pn

Fn

Pn

Hn

Pn

Q

Pn

Dn

Pn

En

Pn

Fn

Pn

Hn

Pn

Q

i = 1, j = 3: B1,3

n

i = 2, j = 3: B2,3

n

,

, , , , , , , , , ,

3

3 2

1

3 3 2 3

1

3 3 3 3

1

3 3 4 3

1

3 3 3 4

1

2 3i = 3, j = 3: B3,3

nP

nD

nP

nE

nP

nF

nP

nH

nP

nQ

Page 10: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 10

Page 11: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 11

The matrix in this case is a penta-diagonal coefficient matrix, and it is

normally written in the more compact form shown below:

O O O

O O

O O O

O O

O O O

O O

O O O

0

0

0

0

Hi j

Fi j

Ei j

Di j

Bi j

,

,

,

,

,

Page 12: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 12

Three-dimensional flow system

We start with the flow equation in its finite difference

form:

Z P B P D P E P F P

H P S P Q

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

n

i j k

, , , , , , , , , , , , , , , , , , , ,

, , , , , , , , , ,

1

1

1

1

1

1 1

1

1

1

1

1

1

Page 13: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 13

Page 14: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 14

A three-dimensional single-phase problem leads to

a hepta-diagonal coefficient matrix whose general form is as follows:

O O O O

O O O

O O O O O

O O O

O O O O

O O O

O O O O

O O O

O O O O

O O O

O O O O O

O O O

O O O O

0

0

0

0

0

0

Si j k

Hi j k

Fi j k

Ei j k

Di j k

Bi j k

Zi j k

, ,

, ,

, ,

, ,

, ,

, ,

, ,

Page 15: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 15

Irregularly bounded reservoirs

The tri-, penta-, and hepta-diagonal matrix structures

obtained for the three previous examples are quite

standard. However, discretization of irregularly-

bounded reservoirs may yield other matrix structures.

Page 16: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 16

E1 P1 + F1 P2 + H1 P5 = Q1 D2P1 + E2P2 = Q2

E3P3 + F3P4 + H3P6 = Q3

D4P3 + E4P4 + F4P5 + H4P7 = Q4

B5P1 + D5P4 + E5P5 + H5P8 = Q5

B6P3 + E6P6 + F6P7 = Q6

B7P4 + D7P6 + E7P7 + F7P8 + H7P10 = Q7

Page 17: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 17

Multi-Phase Flow Equations: Solution Methods

Simulating multiphase fluid flow in porous media involves solving a system of coupled non-linear partial differential equations.

The various solution techniques differ with respect to how we manipulate the governing partial differential equations.

Page 18: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 18

IMPES method

Obtain a single equation in which the sole unknown is the pressure of one of the phases.

We achieve this by combining the partial differential equations for each phase in such a way as to eliminate the saturation derivatives.

Assume capillary pressure to be constant during any time step.

Obtain just one partial differential equation, with a phase pressure as the only unknown (this is usually the water-phase pressure).

Page 19: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 19

Obtain the appropriate characteristic equation.

Generate a system of linear algebraic equations.

The coefficients appearing in this system of equations are functions of the pressures and saturations; therefore, they are estimated using the information available at the previous iteration level.

When the solution for the phase pressure (e.g., Pw) distribution is obtained, the next step is to solve explicitly for that phase saturation distribution, Sw from the partial differential equation describing the flow of that phase.

Page 20: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 20

At this stage, we know the Pw and Sw distributions.

This enables us to determine the oil phase pressure

distribution using the capillary pressure relationship

between the oil and water phases.

Similar to the determination of Sw, after obtaining

the Pw distribution, we explicitly solve the oil-phase

partial differential equation for the oil-phase

saturation, So.

Page 21: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 21

With the values of So and Sw calculated, we can

easily determine Sg (Sg = 1 - So - Sw).

Finally, using the capillary pressure relationship

between the oil and gas phases, we obtain the gas

phase pressure (Pg) distribution.

This completes one iteration; we then repeat the

whole procedure until we achieve convergence.

At the beginning of each iteration, all the pressure

and saturation dependent terms are updated using

the most recent information available.

Page 22: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 22

Flow chart highlighting the major steps involved in the

IMPES method

Page 23: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 23

Solution of Matrix Equations

In setting the computer model, we face the problem of

solving a set of n equations relating n unknowns,

which are expressed in the form of

A11 x1 + a12 x2 + a13 x3 + ... +a1n xn = C1

A21 x1 + a22 x2 + a23 x3 + ... +a2n xn = C1

....................................................

An1 x1 + an2 x2 + an3 x3 + ... +ann xn = Cn

Page 24: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 24

We can put the left-hand members of the previous equation into a square array of the coefficients, known as the coefficient matrix,

and the unknown vector,

a a a

a a a

a a a

n

n

n n nn

11 12 1

21 22 2

1 2

X

x

x

x n

1

2

....

Page 25: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 25

Standard ordering by rows

Ordering by rows for grid blocks in a 5x2 model, and the resulting coefficient matrix.

The non-zero elements of the coefficient matrix are indicated by x; positions, while zero elements are left blank.

Page 26: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 26

Standard ordering by columns

The band width for

the coefficient

matrix is five

(2x2+1=5).

This ordering

scheme will

significantly reduce

computational

requirements.

Figure shows the standard ordering by columns of the same reservoir.

Page 27: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 27

Checkerboard (Cyclic-2) Ordering In ordering the grid

blocks, we number

the shaded blocks

first and then the

unshaded blocks.

The resulting

coefficient matrix

offers the advantage

that, during the

forward solution

stage of Gaussian

elimination, only a

small portion of the

matrix needs to be

worked for

triangularization

Consider a reservoir model numbered in a

checkerboard fashion.

Page 28: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 28

Checkerboard (D-4) Ordering

In checkerboard D-4 ordering, we number grid blocks along alternate diagonals.

This alternate diagonal ordering leads to substantial savings in computational overhead (CPU time and storage).

Typical coefficient matrix generated

from D-4 ordering of a 4x5 matrix.

Page 29: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 29

(D-2) Ordering

The D-2 ordering scheme is

also known as diagonal

ordering.

The resulting coefficient

matrix has a relatively small

bandwidth

Page 30: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 30

System of linear equations solution methods

Our goal is always to end up with a system of linear

equations, regardless of whether the original equations

are linear or non-linear.

Two main categories of solution methods for the

resulting system of linear algebraic equations: direct

and iterative.

Page 31: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 31

Direct solution methods

For a direct solution, we assume that the machine

performing the computations is capable of carrying an

infinite number of digits (i.e., there is no round-off

error).

A direct solution method will yield an exact solution

after a finite number of elementary arithmetical

operations.

Page 32: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 32

The Gaussian elimination technique

Is the fundamental algorithm used by direct

solvers.

Page 33: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 33

Thomas’ Algorithm

Is designed for tri-diagonal coefficient

matrices.

Simply avoid performing any arithmetic

operations on the zero elements of the

coefficient matrix, thereby saving a

significant amount of time.

Page 34: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 34

Iterative methods

Iterative solution methods involve making an initial

guess, or approximation of the solution vector, and

then improving on this guess by successfully

implementing the algorithm.

Page 35: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 35

Iterative methods offer two important

advantages: less storage requirements and

less computational work.

The simplest and best-known iterative

methods for solving systems of linear

algebraic equations are grouped under the

name fixed point iterative methods.

Page 36: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 36

Use a common multiplier, ωopt (the optimum acceleration parameter), whose value is always lies between 1 and 2.

Page 37: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 37

Comparison of convergence paths for the three

algorithms.

Page 38: Solution Methods - Cairo University · 2020-03-11 · 12/26/2017 Dr.Helmy Sayyouh 2 One-dimensional flow system One-dimensional system composed of five blocks. A no-flow boundary

12/26/2017 Dr.Helmy Sayyouh 38

Comparison of direct and iterative

methods