CFD Part 5 - 2 FDM Elliptic PDE
CFD Part 5 - 2 FDM Elliptic PDE
Prof. A. A. Saati
Finite Difference Method
Ti 1, j Ti , j Ti 1, j
Ti , j 1
Finite Difference Formulations (Solution Technique)
2 T ( x, y ) Ti 1, j 2Ti , j Ti 1, j
,
x 2
x 2
2 T ( x, y ) Ti , j 1 2Ti , j Ti , j 1
y 2
y 2
2 T ( x, y ) 2 T ( x, y )
0
x 2
y 2
is approximated by :
Ti 1, j 2Ti , j Ti 1, j Ti , j 1 2Ti , j Ti , j 1
0
x 2
y 2
Finite Difference Formulations (Solution Technique)
Ti 1, j Ti , j Ti 1, j
Ti , j 1
The grid points involved in the equation are shown in the figure
Example
It is required to determine the steady state temperature at all points
of a heated sheet of metal. The edges of the sheet are kept at a
constant temperature: 100, 50, 0, and 75 degrees. 10
0
The sheet is divided to 5X5 grids.
75 50
T1, 2 T2, 2
T0, 2 75
4 1 0 1 T1,1 75
1 4 1 0 1 T2,1 0
0 1 4 0 0 1 T 50
3,1
1 0 0 4 1 0 1 T1,2 75
1 0 1 4 1 0 1 T 0
2, 2
1 0 1 4 0 0 1 T3,2 50
1 0 0 4 1 0 T 175
1,3
1 0 1 4 1 T2,3 100
1 0 1 4 3,3
T 150
Solution Algorithms
Solution Algorithms
Iterative methods
A point iterative method, ( if a formulations results in only
one unknown) the method is similar to the explicit
methods of parabolic equation
A line iterative method, (if a formulations results in more than
one unknown) the method is similar to the implicit
methods of parabolic equation.
Some of these iterative methods will now be discussed
The Jacobi Iteration Method
The dependent variable at each grid point is solved ( at the new
iteration k+1 level), using initial guessed values or previously
computed values (at the new iteration k level).
The computation is carried out until a specified convergence
criterion is met
2u 2u
2 0
x 2
y
2
x
ui 1, j 2ui , j ui 1, j ui , j 1 2ui , j ui , j 1 0
y
ui 1, j ui 1, j 2ui , j 1 2ui , j 1 2(1 2 )ui , j 0
u k 1
i, j
1
2(1 )
2
u k
i 1, j u k
i 1, j 2
u k
i , j 1 u k
i , j 1
The Jacobi Iteration Method
Now let x y , then 1
And the Jacobi equation reduce to
uk 1
i, j
1 k
ui 1, j uik1, j uik, j 1 uik, j 1
4
Before proceeding with other iterative methods, the analogy
between this iterative method and parabolic equation is
investigated
Consider the following parabolic equation:
u 2u 2u
2 2
t x y
The Jacobi Iteration Method
The explicit formulation of the finite difference equation (FTCS)
is: k 1 k
ui , j ui , j uik1, j 2uik, j uik1, j uik, j 1 2uik, j uik, j 1
t x 2
y 2
or
t t
uik, j 1 uik, j u k
2 u k
u k
u k
2 u k
ui , j 1
k
k 1
u
i, j
1
2(1 )
2
u k
i 1, j u k 1
i 1, j 2
u k
i , j 1 u k 1
i , j 1
Gauss-Seidel Iteration Method
For the computation of the first point, say (2,2)
u k 1
2, 2
1
2(1 )
2
u k
3, 2 u1, 2 2
u k
2 , 3 u2 ,1
(5-13)
Where u2,1 & u1, 2 are B.C
Gauss-Seidel Iteration Method
Now, for point (3,2)
uk 1
3, 2
1
2(1 )
2
u
4, 2 u2, 2 2
u3,3 u3,1
In this equation u3,1 is provided by the B.C
And u4 ,2 & u3,3 are taken from the previous computation;
But u2,2 is given by the previous equation (5-13)
Thus, ( see Figure )
k 1
u
3, 2
1
2(1 )
2
u k
4, 2 u k 1
2, 2 2
u3, 3 u3,1
k
Gauss-Seidel Iteration Method
Finally, the general formulation provides the equation
uk 1
i, j
1
2(1 )
2
u k
i 1, j u k 1
i 1, j 2
u k
i , j 1 u k 1
i , j 1
(5-15)
k 1
u
i, j
1
2(1 )
2
u k
i 1, j uk 1
i 1, j 2
u k
i , j 1 ui , j 1
k 1
Adding uik, j uik, j to the right-hand side and collecting terms,
uk 1
i, j u k 1
2(1 2 )
i, j u k
i 1, j
u k 1
i 1, j 2
u k
i , j 1 u k 1
i , j 1 2 (1 2
) u k
i, j
To accelerate the solution the bracket term is multiplied by ,
the relaxation parameter.
uk 1
i, j u k
i, j
2(1 2
)
u k
i 1, j uik11, j 2 uik, j 1 uik, j 11 2(1 2 )uik, j
Theorems can show that 0 < ω < 2 is a condition for a scheme to
converge.
If we choose 0 1 the solution called under-relaxation,
and the convergence will be slower
If 1 we just have the Gauss-Seidel iteration method.
If we choose 1 2 it is called successive over-relaxation
The formulation is rearranged as
uk 1
i, j (1 )u
k
i, j
2(1 2
)
k
u
i 1, j
uik11, j 2 uik, j 1 uik, j 11
a
1 2
2u 2u
2 0
x 2
y
The imposed boundary conditions are:
y0 T T1
x0 T T2
yH T T3
xL T T4
L IM
Convergence criterion:
H JM
ERRORMAX =
y
ERROR < ERRORMAX
x
j JMM1
i IMM1
T1 ERROR ABS(T
i 2
k 1
i, j Ti ,kj )
T2 j 2
T3
T4
Ti Initial guess
Summary
After studying the FDM Elliptic PDE, you should be able to
do the following:
Describe:
a) The five-point formula
b) The Jacobi iteration method
c) The point Gauss-Seidel iteration method
d) The line Gauss-Seidel iteration method
e) The point successive over-relaxation (PSOR) method
f) The line successive over-relaxation (PSOR) method
g) The ADI method
Solve the problems for Chapter Five
Home Work
Problems
END OF
Finite Difference Method