Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

RS - Lecture 6

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Reservoir Simulation

Lecture 6: Reservoir Simulator

Haval Hawez
Petroleum Engineering Department
Faculty of Engineering
Koya University

15.11.2018
Outline: Solution Methods

• Direct Method
 Simplifying a Linear Systems of Equations.
 Gaussian Elimination

• Iterative Method

2
Direct Method
We will consider direct methods for solving a linear
system of n equations in n variables. Such a system has
the form:

3
Direct Method

• Direct techniques are methods that theoretically give


the exact solution to the system in a finite number of
steps.

• In practice, of course, the solution obtained will be


contaminated by the round-off error that is involved
with the arithmetic being used.

4
Direct Method
An n × (n+1) matrix can be used to represent the linear
system:
a11x1 + a12x2 + ・・・+ a1nxn = b1,
a21x1 + a22x2 + ・・・+ a2nxn = b2,
an1x1 + an2x2 + ・・・+ annxn= bn,
• by first constructing

5
Direct Method

• And then forming the new array [A,b]:

6
Simplifying a Linear Systems of
Equations
•Returning to the linear system of n equations in
n variables:

7
Simplifying a Linear Systems of
Equations
We will use 3 operations to simplify the linear system:

• Equation Ei can be multiplied by any nonzero constant with


the resulting equation used in place of Ei. This operation is
denoted (λEi)→(Ei).

• Equation Ej can be multiplied by any constant and added to


equation Ei with the resulting equation used in place of Ei.
This operation is denoted (Ei+λEj)→(Ei).

• Equations Ei and Ej can be transposed in order. This


operation is denoted (Ei)↔(Ej).

8
Simplifying a Linear Systems of
Equations
We will solve for x1, x2, x3, and x4.

We first use equation E1 to eliminate the unknown x1 from


equations E2,E3, and E4 by performing:

9
Simplifying a Linear Systems of
Equations
• After obtain E2:

• E2 is used to eliminate the unknown x2 from E3 and E4


by performing (E3−4E2)→(E3) and (E4+3E2)→(E4) . This
results in

10
Simplifying a Linear Systems of
Equations
•The X values will be as follows:

11
Gaussian Elimination
• Constructing an Algorithm to Solve the Linear
System.

• Converting to Augmented Form

12
Gaussian Elimination Procedure

• Performing the operations to generate the


triangular form matrix using:

• We will get

13
Gaussian Elimination Procedure

Example
Represent the linear system as an augmented
matrix and use Gaussian Elimination to find its
solution.

14
Gaussian Elimination Procedure

Solution
The augmented matrix is

Performing the operations

15
Gaussian Elimination Procedure
• Perform the operation (E2)↔(E3) to obtain a
new matrix:

• The computations continue with the operation


(E4+2E3)→(E4)

16
Gaussian Elimination Procedure

The solution now will be found through backward


substitution:

17
Iterative Method
• The idea of this method is to make a first guess
at the solution and then refine it in a stepwise
using suitable algorithm.

• This procedure should gradually converge


towards the correct answer.

18
Iterative Method

• For this set of linear equations:

19
Iterative Method

• The above set could be arranged a follows:

• Then make an initial approximation of the


solution,
20
Iterative Method
Example
Use the Jacobi method to approximate the
solution of the following system of linear
equations.

21
Iterative Method
Solution
write the system in the form

Make an initial approximation of

22
Iterative Method

23

You might also like