6
Liebmann’s method Rearrange the approximation to give u i,j in terms of neighbouring values 1 1 4 1 1 u i,j u k+1 i,j = 1 4 u k i1,j + u k i+1,j + u k i,j1 + u k i,j+1 1 4 1 4 20 4 1 4 1 u i,j u i,j = 1 20 4u k i1,j + 4u k i+1,j + 4u k i,j1 + 4u k i,j+1 + u k i1,j1 + u k i1,j+1 + u k i+1,j1 + u k i+1,j+1 Incorporate boundary conditions as before Creates iteration scheme EMA T33040 ANA 2001-02 3.7 Department of Engineering Mathematics

Leibman Method

Embed Size (px)

Citation preview

Page 1: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 1/6

Liebmann’s method 

• Rearrange the approximation to give ui,j in terms of neighbouring values

1

1 −4 1

1

ui,j ⇒ uk+1i,j =

1

4 uki−1,j + uk

i+1,j + uki,j−1 + uk

i,j+1

1 4 1

4 −20 4

1 4 1

ui,j ⇒ ui,j =1

20

4uk

i−1,j + 4uki+1,j + 4uk

i,j−1 + 4uki,j+1+

uki−1,j−1 + uk

i−1,j+1 + uki+1,j−1 + uk

i+1,j+1

• Incorporate boundary conditions as before

• Creates iteration scheme

EMAT33040 ANA 2001-02 3.7 Department of Engineering Mathematics

Page 2: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 2/6

Refining Liebmann’s method 

•Compute uk+1

i,j in sequence

• Some terms on right hand side are known at k + 1 time step — previously computed

• Improve speed of convergence by using them

1

1 −4 1

1

ui,j ⇒ uk+1i,j = 1

4

uk+1i−1,j + uk

i+1,j + uk+1i,j−1 + uk

i,j+1

1 4 1

4 −20 4

1 4 1

ui,j ⇒ ui,j = 120

4u

k+1

i−1,j + 4u

k

i+1,j + 4u

k+1

i,j−1 + 4u

k

i,j+1+uk+1i−1,j−1 + uk

i−1,j+1 + uki+1,j−1 + uk

i+1,j+1

• Disadvantage: slow convergence

EMAT33040 ANA 2001-02 3.8 Department of Engineering Mathematics

Page 3: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 3/6

SOR method 

• SOR = Successive Over Relaxation

• Consider standard central difference based iteration

uk+1i,j =

1

4 uk+1i−1,j + uk

i+1,j + uk+1i,j−1 + uk

i,j+1= uk

i,j + 14

uk+1i−1,j + uk

i+1,j − 4uki,j + uk+1

i,j−1 + uki,j+1

• Second term is ‘residual’; relaxes to zero at convergence

•Multiply ‘residual’ term by factor ω to ‘overrelax’

uk+1i,j = uk

i,j +ω

4

uk+1i−1,j + uk

i+1,j − 4uki,j + uk+1

i,j−1 + uki,j+1

EMAT33040 ANA 2001-02 3.9 Department of Engineering Mathematics

Page 4: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 4/6

Using SOR 

•Solve Laplace’s 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 Liebmann’s method

• Stop when maximum change in u is < 10−3

21 interior points 105 interior points

(mx = 3,my = 7) (mx = 15,my = 7)

ω No. of iterations ω No. of iterations

1.00 20 1.00 70

1.10 15 1.10 58

1.20 13 1.20 46

1.30 12 1.30 35

1.40 15 1.40 29

1.50 18 1.50 26

1.60 23 1.60 28

1.70 36

• Find an optimal value of ω — increases with grid spacing

EMAT33040 ANA 2001-02 3.10 Department of Engineering Mathematics

Page 5: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 5/6

Choosing ω for SOR 

• Consider a rectangular region with Dirichlet boundary conditions

•Optimal value of ω is the smaller root of

cos

π

mx + 1

+ cos

π

my + 1

2ω2 − 16ω + 16 = 0

• Can solve to give

ωopt = 4

2 +√

4− c2, c = cos

π

mx + 1

+ cos

π

my + 1

• Previous example

mx my ωopt

7 3 1.2668

15 7 1.5325

• Non Dirichlet boundary conditions use results from first few iterations — see textbooks

EMAT33040 ANA 2001-02 3.11 Department of Engineering Mathematics

Page 6: Leibman Method

8/3/2019 Leibman Method

http://slidepdf.com/reader/full/leibman-method 6/6

Neumann boundary conditions 

• Modification for Neumann boundary conditions follows parabolic case

•Consider only one edge

∂u

∂x(0, y) = ln(x)

• Boundary grid points included in numerical scheme

•On the boundary

∇2u ∼ 1

∆2

1

1 −4 1

1

u0,j

• u−1,j is included via approximation for derivative

∂u

∂x(0, yj) =

u1,j − u−1,j

2∆= ln(yj)

•Change of +1-diagonal entry, and extra components of right hand side vector

EMAT33040 ANA 2001-02 3.5 Department of Engineering Mathematics