Liebmanns method
Rearrange the approximation to give ui,j in terms of neighbouring values 1 1 k k+1 k k ui1,j + uk 1 4 1 ui,j ui,j = i+1,j + ui,j1 + ui,j+1 4 1 1 4 1 4 20 4 ui,j 1 4 1 1 = 20
k k k 4uk i1,j + 4ui+1,j + 4ui,j1 + 4ui,j+1 + k k k uk i1,j1 + ui1,j+1 + ui+1,j1 + ui+1,j+1
ui,j
Incorporate boundary conditions as before Creates iteration scheme
EMAT33040 ANA 2001-02
3.7
Department of Engineering Mathematics
Rening Liebmanns method
Compute uk+1 in sequence i,j Some terms on right hand side are known at k + 1 time step previously computed Improve speed of convergence by using them 1 1 k+1 k+1 k+1 k ui1,j + uk 1 4 1 ui,j ui,j = i+1,j + ui,j1 + ui,j+1 4 1 1 4 1 4 20 4 ui,j 1 4 1 1 = 20
k+1 k 4uk+1 + 4uk i+1,j + 4ui,j1 + 4ui,j+1 + i1,j k k k uk+1 i1,j1 + ui1,j+1 + ui+1,j1 + ui+1,j+1
ui,j
Disadvantage: slow convergence
EMAT33040 ANA 2001-02
3.8
Department of Engineering Mathematics
SOR method
SOR = Successive Over Relaxation Consider standard central difference based iteration uk+1 = i,j 1 k+1 k+1 k ui1,j + uk i+1,j + ui,j1 + ui,j+1 4 1 k+1 k+1 k k ui1,j + uk = uk + i,j i+1,j 4ui,j + ui,j1 + ui,j+1 4
Second term is residual; relaxes to zero at convergence Multiply residual term by factor to overrelax uk+1 = uk + i,j i,j k+1 k+1 k k ui1,j + uk i+1,j 4ui,j + ui,j1 + ui,j+1 4
EMAT33040 ANA 2001-02
3.9
Department of Engineering Mathematics
Using SOR
Solve Laplaces equation using SOR uxx + uyy = 0, 0 < x < 20, 0 < y < 10 u(x, 0) = 0 u(x, 10) = 0 u(0, y) = 0 u(20, y) = 100 Note that = 1 is Liebmanns method Stop when maximum change in u is < 103 Find an optimal value of increases with grid spacing
21 interior points (mx 105 interior points (mx
= 3, my = 7)
No. of iterations 20 15 13 12 15 18 23
= 15, my = 7)
No. of iterations 70 58 46 35 29 26 28 36
1.00 1.10 1.20 1.30 1.40 1.50 1.60
1.00 1.10 1.20 1.30 1.40 1.50 1.60 1.70
EMAT33040 ANA 2001-02
3.10
Department of Engineering Mathematics
Choosing for SOR
Consider a rectangular region with Dirichlet boundary conditions Optimal value of is the smaller root of cos Can solve to give opt = Previous example mx
7 15
2
mx + 1
+ cos
my + 1
2 16 + 16 = 0
4 , 2 2+ 4c
c = cos
mx + 1
+ cos
my + 1
my
3 7
opt
1.2668 1.5325
Non Dirichlet boundary conditions use results from rst few iterations see textbooks
EMAT33040 ANA 2001-02
3.11
Department of Engineering Mathematics
Neumann boundary conditions
Modication for Neumann boundary conditions follows parabolic case Consider only one edge u (0, y) = ln (x) x Boundary grid points included in numerical scheme On the boundary 1 1 2 u 2 1 4 1 u0,j 1
u1,j is included via approximation for derivative u u1,j u1,j (0, yj ) = = ln (yj ) x 2 Change of +1-diagonal entry, and extra components of right hand side vector
EMAT33040 ANA 2001-02
3.5
Department of Engineering Mathematics