You are on page 1of 13

Reservoir Simulation 

PTE 4370

Hiwa Sidiq
Reservoir Simulation

Tutorial ‐ 1
- Iterative method example
- Newton Raphson example
- Jacobi method
- FD example
- Taylor series
Tutorial

Example 1:
Solution to an equation “f(x) = 0” using iterative method.
**For most equation there is no direction solution

Lets X2 – 2 = 0 
For above case there is direct solution which is  ∗ ∓ 2 but it is not 
numerical. For most engineering application numerical value requires.

To find the numerical value of  ∗ iterative method is used, the guess value 


for ∓ 2 1.5. In this example we look at the solution.
Let the iterative fuction be

**the soution of iterative functions need converge and get closer to the 
real volue of X.
Tutorial

Example 1:
The exact solution is when  ∗ ∗
To find the solution of X2 – 2 = 0 numerically we test three methods,

1) As stated  ∗ ∗ we add  ∗ to each side of the equation


2
∗ + X – 2 =  ∗

→ ∗ = X2 +  ∗ – 2 lets test the first guess which was  1.5
∴ 1.75
2.8125
8.72

**A close look into the solution confirms that the iterative function is 
diverging. 
Tutorial

 Example 1:
2 ∗ ∗ to find other soluton ∗ , lets divide each side of the 
equation by ∗

X2 – 2 = 0 → X2 = 2 → → ∗
∗ ∗ ∗

→ ∗ = lets test the first guess which was  1.5

∴ 1.3
1.5
1.3

**A close look into the iterative solution shows it is ended up in the 
closed loop.
Tutorial

 Example 1:
3 ∗ ∗ to find other soluton of ∗ , lets add each side of the 
equation ∗
∗ ∗
X2 – 2 = 0 → ∗ = 2 ∗ → ∗ → ∗ +
∗ ∗


→ ∗ =  + lets test the first guess which was  1.5
∴ 1.416
1.41421568
1.41421356

**A close look into the iterative solution shows X closes to  2
Tutorial
 Example 2:
 
3 x for the given equation X3 − 3X + 1 = 0
 
Step 1:  plot X3 − 3X + 1

Step 2: Get Approximate value of X from the graph at X 0


X ‐1.8 , 0.4 and 1.5
Step3: lets the solution be  ∗ ∗ add 3X to each side of the equation

→ 3 + 1 = 3 → 3 + 1)
∗ ∗ ∗ =  ( ∗

=  ( 3 + 1)
∗ ∗

lets test the first guess which was  0.4 
∴ 0.354663
0.3482
0.347402
Tutorial
 Example 3: This example shows why in example 1 the first two methods 
didn’t work
Approach 1:  2
∗ = X +  ∗ – 2
Tutorial

Approach 3:  ∗ =  +
Tutorial
 To find whether your method works or not, the slop  ′ ∗ is an
indication.
If ′ ∗ 1 the iteration is diverge
 If ′ ∗ 1 the iteration is converge and there will be a solution.

Newton – Raphson iterative method,


 =   − 

Lets see if ∗ ∗ is the solution for above equation then


∗ =   
∗ −  ∗ 0→ ∗ =  ∗

Tutorial

Newton – Raphson iterative method,


Why this method works?
Lets take the first derivative of their method

∗ ∗ ∗
′ ∗ = 1 −  →
∗ ∗

It is shown f x 0 → ′ ∗ 0 “no slop”

Lets test X2 – 2 to find solution using this method

X2 – 2 X 1
=  −  → X − 


→ +
Tutorial

Jacobi Method,
Example 4:
Lets the series number of X1, X2 and X3 in the following equations are to
be found.

Solution for X1, X2 and X3


Tutorial

Jacobi Method,
Start with zero as the first iteration value of guess

You might also like