Вы находитесь на странице: 1из 3

Solution of Discretised Equation

Modal form for elliptic PDE.


2D in Cartesian coordinates

2 u 2u

0
x 2 y 2
1. Five-point formula

1
1
u
2ui , j ui 1, j
ui , j 1 2ui , j ui , j 1 0
2 i 1, j
( x )
( y ) 2

2u 2u
1 4u
4u 2
2

x
)

(y )
4
2
2
y 4
x y i , j 12
x

FDE i , j

lim T .E. 0

x 0
y 0

L
i, j

, hence, FDE is consistent with PDE.

If a uniform grid used, i.e., x y


For a grid point (i,j), ui , j 1 ui 1, j 4ui , j ui 1, j ui , j 1 0

O O
1 L 1

O
4 1 L
O O O

1 L

M
ui , j 1
M

ui 1, j M
u i , j 0

ui 1, j M
M

ui , j 1
M

Very sparse matrix


The method for solving system of linear algebraic equations
(1) Direct methods
Cramers rule

the number of operations is proportional to ( N 1)! ,


N the number of unknowns

Gaussian elimination

N3

For a tridiagonal matrix, Thomas algorithm is used, the operations become the order of N.
Advanced direct method (like Fourier transform method)
be set for specific and simple geometries and boundary conditions.
(2) Iterative method (also known as relaxation method)
No accumulation of round-off error

Used for large system of equations


Point (or explicit) iterative the same simple algorithm is applied to each point.
Block (or implicit) iterative subgroups of points are solved
Jacobi method
Five-point formula is used to discretize the Laplaces equation.

uin, j 1

1 n
ui , j 1 uin1, j uin1, j uin, j 1
4

( i ,j+ 1 )
ite r ative le ve l n + 1
ite r ative le ve l n
( i - 1 ,j)

( i ,j)

( i + 1 ,j)

( i ,j- 1 )

uu
r r
uu
r n 1
uu
rn
r
AX b, A D L U , X D 1 ( L U ) X D 1 b
point Gauss-Seidel iterative

uin, j 1

1 n 1
ui , j 1 uin1,1 j uin1, j uin, j 1
4

( i ,j+ 1 )
ite r ative le ve l n + 1
ite r ative le ve l n
( i - 1 ,j)

( i ,j)

( i ,j- 1 )

( i + 1 ,j)

uu
r n 1
uu
r n1
uu
rn
r
X D 1 L X D 1U X D 1 b
Successive over-relaxation (SOR)---a technique enhance the rate of convergence.
n 1
. ui , j

1 n 1
ui, j 1 uin1,1 j uin1, j uin, j 1
4

n 1
n
n 1
n
. ui , j ui , j ui , j ui , j

2> >1

Extrapolation between two successive iterations. is a relaxation factor, usually found by trialand-error.
If <1, it is called under-relaxation, used when the convergence behavior is oscillating back
and forth between some value or tending to overshoot the apparent final solution.
line Gauss-Seidel iterative

ADI methods (alternate direction implicit)


A complete iteration cycle consists of a sweep over all rows followed by a sweep over the
columns.
.

uin, j 1/ 2

1 n 1/ 2
ui , j 1 uin1,1/j 2 uin1,1/j 2 uin, j 1

sweep by rows

(n+1/2 denotes the first sweep step)


.

uin, j 1

1 n 1
ui , j 1 uin1,1 j uin1,1/j 2 uin, j 11
4

sweep by columns

(n+1 denotes the second sweep step)


Comments: block iterative, fewer iterations but more computational work each iteration.
The efficiency sometimes is problem dependent.