You are on page 1of 13

Convergence and stability analysis

 Convergence means that as ∆x and ∆t approach to As the numerical solution of a partial differential equation
zero, the result of the finite- difference technique is influenced by two sources of Error.
approach the true solution.
1.Discretization error
 Stability means that errors at any stage of the
computation are not amplified as the computation 2.Round-off error
progresses.
Discretization error : The difference between the exact
 Stability behavior of numerical solutions were raised analytical solution of the partial differential equation and
in Explicit method, as if the increment in the marching exact solution ( round-off free) of the corresponding
direction exceeded some prescribed value then this difference equation .
method becomes numerically unstable.
Discretization error = Truncation error + the error
 The maximum allowable value comes from a stability introduced at boundary condition.
analysis.So use approximate stability analysis as the
exact stability of nonlinear Euler and Navier stokes Discretization error = A – D
does not exit.
where A = exact analytical solution of the partial
differential equation
D= exact solution ( round-off free) of the
corresponding difference equation .
14-04-2022 1
Convergence and stability analysis
Round-off error : The Numerical error introduced after a  As the solution progress if the present error at some
repetitive number of calculation in which the computer is stage is grow then the solution will be Un-stable.
constantly rounding the numbers to significant figures.
 in1
Round-off error = ε = N – D 1
i n

Where N= Numerical solution from a real computer with


finite accuracy

We can write N= ε + D

As , N & D Satisfy the difference equation, ε must satisfy


the difference equation

14-04-2022 2
Convergence and stability analysis

Observe the variation of round-off error as a function of x 2


km 
 Where λ is a wavelength and m
is the number of waves that are
2 fitted inside the given interval
 km  m m = 1,2, 3------
L

Then at any given time the random variation of ε


with x can be expressed by Fourier series.

 ( x)   Ameik mx

m
Here Km is a wave number
14-04-2022 3
Convergence and stability analysis

N /2
 ( x)  
m 1
Am e jk mix

This represent the round off error with spatial


variation

λmin = 2∆x where ∆x = L / N Thus Assume Am is Exponential function of time

2 2 N
 km   . N /2
2L / N L 2   m ( x, t )  
m 1
e at e jk mix

Thus the highest order harmonic (m) allowable is N/2 .

14-04-2022 4
Convergence and stability analysis
Von Neumann stability analysis
We know numerical solution, N= ε + D
 u    2u 
1. Consider the diffusion equation given by     . 2  Where D is exact solution ( round-off free) of the
 t   x 
Use Von Neumann stability analysis to determine corresponding difference equation
the stability requirements if the Explicit scheme is
used to discretize the given diffusion equation. So N and D must satisfy the given equation 1.

 Din1   in1  2 Din  2 in  Din1   in1 


Din 1   in 1  Din   in   
 x 2 
t  
Give, the diffusion equation      Eqn.2
 Din1  2 Din  Din1 
 u   u 2 Din 1 Din   
      Eqn.3
    . 2 
 t  t

  x 2

 x 

Consider Explicit formulation From Eqn. 2 and 3

uin 1  uin  uin1  2uin  uin1   in 1   in   in1  2 in   in1 


        Eqn.1    
      Eqn.4
t 
 x 2 

t
 x  2

14-04-2022 5
Convergence and stability analysis
From equation 4 by dividing  i on both sides and 5
n
Using Fourier series expansion

N /2 G 1



e jK m x  2  e  jK m x 
  m ( x, t )  e at jk m ix t x 
2
e
m 1 Also we know that,

So at i location for time n and n+1 error can be given as 𝑒 𝑗∅ − 𝑒 −𝑗∅


𝑐𝑜𝑠∅ =
2
  in  e ant e jk mix      Eqn.5
jk m ix Therefore,
 in 1 e a ( n 1) t
e
𝐺 = 1 + 𝛼 ′ 2𝐶𝑜𝑠∅ − 2 𝛼∆𝑡
𝜀𝑖𝑛+1 𝑤ℎ𝑒𝑟𝑒 𝛼′ = 2
Error amplification factor G = ≤1      Eqn.6 ∆𝑥
𝜀𝑖𝑛
𝐺 = 1 − 2𝛼 ′ 1 − 𝐶𝑜𝑠∅
∴ G =𝑒 𝑎∆𝑡


If ‘a’ is positive error will increase. 𝐺 = 1 − 4 𝛼 ′ 𝑠𝑖𝑛2
2
The condition of stability will be 𝐺 ≤ 1
′ 2
∅ This always satisfies for all 𝛼 ′
1 − 4 𝛼 𝑠𝑖𝑛 ≤1
14-04-2022 2 6
Convergence and stability analysis
 u   u 
2. Consider the wave equation given by    B.   0
So this gives conditional stability  t   x 

Assume 0 ≤ 𝑥 ≤ 𝐿 with uniform ∆𝑥 𝑎𝑛𝑑 𝐷 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.


′ ∅
1] 4𝛼 𝑠𝑖𝑛2 2 ≥0
Use Von Neumann stability analysis to determine
∅ the stability requirements if the Implicit scheme is
2] 1 − 4 𝛼 ′ 𝑠𝑖𝑛2 ≥ −1 used to discretize the given wave equation.
2
∅ Give, the diffusion equation
4 𝛼 ′ 𝑠𝑖𝑛2 ≤2
2  u   u 
   B.   0
′ 2
∅  t   x 
4𝛼 𝑠𝑖𝑛 ≤2
2
Consider Implicit formulation
1 𝛼∆𝑡 1
α'≤ 2 𝑖. 𝑒. 𝛼′ = ∆𝑥 2 ≤ 2
uin 1  uin  uin11  uin11 
 B   0      Eqn.1
t  2x 
 
So if ∆𝑡 𝑖𝑠 𝑡𝑜𝑜 𝑙𝑎𝑟𝑔𝑒 𝑡ℎ𝑎𝑛 𝑤𝑒 𝑤𝑖𝑙𝑙 𝑛𝑜𝑡 ℎ𝑎𝑣𝑒 𝑠𝑡𝑎𝑏𝑖𝑙𝑖𝑡𝑦
We know that, 𝑁𝑖𝑛 = 𝐷𝑖𝑛 + 𝜀𝑖𝑛      Eqn..2

Where 𝑁𝑖𝑛 = Exact Solution at (x,t)


𝐷𝑖𝑛 = Numerically computed solution at (x,t)
𝜀𝑖𝑛 = 𝑒𝑟𝑟𝑜𝑟 𝑎𝑡 (𝑥, 𝑡)
14-04-2022 7
Convergence and stability analysis
From Fourier expansion
As 𝑁𝑖𝑛 and 𝐷𝑖𝑛 are the solution that must satisfy Eqn. 1.
𝜀 (x,t) =σ𝑀
𝑖 𝑏𝑒
𝑗𝐾𝑚 𝑖∆𝑥
Therefore from Eqn 1 and 2
So at particular instant n and node i
∴ Error will also satisfy Eqn. 1
𝑛 = 𝑏 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 = 𝑒 𝑎𝑛∆𝑡 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 -------------Eqn. 5
𝜀𝑚
 in 1   in   in11   in11  𝑖 𝑚
 B 0
t  2x 
  𝑛+1
𝜀𝑚 𝑖
= 𝑏𝑚 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 = 𝑒 𝑎(𝑛+1)∆𝑡 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 -------------Eqn. 6
Bt   in11   in11 
 in 1   in  0
𝜀𝑖𝑛+1
x  2 
 𝐺= 𝑛 ≤ 1 = 𝑒 𝑎∆𝑡 … … … … … … . … 𝐸𝑞𝑛. 7
𝜀𝑖
 in 1   in 
2

C n 1

 i 1   in11  0      Eqn.3
Therefore from Eqn. 3 , 5, & 6
Bt
Where C ...... Courant number
x 𝑒 𝑎(𝑛+1)∆𝑡 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 − 𝑒 𝑎𝑛∆𝑡 𝑒 𝑗𝐾𝑚 𝑖∆𝑥 +
𝐶 𝑎(𝑛+1)∆𝑡 𝑗𝐾𝑚 (𝑖+1)∆𝑥 𝑎(𝑛+1)∆𝑡 𝑒 𝑗𝐾𝑚 (𝑖−1)∆𝑥 = 0
2
𝑒 𝑒 - 𝑒
Also the amplification factor G for stability can be given as,
Divide by 𝑒 𝑎𝑛∆𝑡 𝑒 𝑗𝐾𝑚 𝑖∆𝑥
𝜀𝑖𝑛+1
𝐺= ≤1 … … 𝐸𝑞𝑛. 4
𝜀𝑖𝑛 𝐶
𝑒 𝑎∆𝑡 − 1 + 2 𝑒 𝑎∆𝑡 𝑒 𝑗𝐾𝑚 ∆𝑥 − 𝑒 𝑎(𝑛+1)∆𝑡 𝑒 −𝑗𝐾𝑚 ∆𝑥 = 0
… … … … … … . … 𝐸𝑞𝑛. 8
14-04-2022 8
Convergence and stability analysis
1
Therefore from Eqn 7 and 8 𝐺 2 = 1+𝐶2𝑠𝑖𝑛2∅ ≤ 1

𝐶 −𝑗∅
𝐺 − 1 + 2 𝐺 𝑒 𝑗∅ + 𝑒 −𝑒 =0 Eqn. 10 shows that G will be always less than 1 only at ∅ = 0
𝑖𝑡 𝑖𝑠 𝑒𝑞𝑢𝑎𝑙 𝑡𝑜 1.
Also 𝑒 𝑗∅ = Cos∅ + 𝑆𝑖𝑛∅
𝑒 −𝑗∅ =Cos∅ − 𝑆𝑖𝑛∅ So this formulation of wave number is always stable.
𝐶 −𝑗∅
𝐺 − 1 + 2 𝐺 𝑒 𝑗∅ + 𝑒 −𝑒 =0
3. Consider the wave equation given by
1
𝐺 = 1+𝑗𝐶𝑠𝑖𝑛∅ --------- Eqn. 9
Assume 0 ≤ 𝑥 ≤ 𝐿 with uniform ∆𝑥 𝑎𝑛𝑑 𝐷 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.
Do some Mathematical operations to simplify Eqn. 9 Use Von Neumann stability analysis to determine
1 1−𝑗𝐶𝑠𝑖𝑛∅ the stability requirements if the Explicit scheme is
𝐺 = 1+𝑗𝐶𝑠𝑖𝑛∅ 1−𝑗𝐶𝑠𝑖𝑛∅
used to discretize the given wave equation.
1−𝑗𝐶𝑠𝑖𝑛∅ ∗ 1+𝑗𝐶𝑠𝑖𝑛∅
uin 1  uin  uin1  uin1 
𝐺 = 1+𝐶2𝑠𝑖𝑛2∅ And its complex conjugate 𝐺 = 1+𝐶2𝑠𝑖𝑛2∅  B   0      Eqn.1
t  2x 
 
1−𝑗𝐶𝑠𝑖𝑛∅ 1+𝑗𝐶𝑠𝑖𝑛∅ 1+𝐶2𝑠𝑖𝑛2∅ 1
𝐺 =GX
2 G* == 𝑋
1+𝐶2𝑠𝑖𝑛2∅ 1+𝐶2𝑠𝑖𝑛2∅
= (1+𝐶2𝑠𝑖𝑛2∅)2
= 1+𝐶2𝑠𝑖𝑛2∅ Then we will get

𝐺 = 1 − 𝑗𝐶𝑠𝑖𝑛∅ 𝑎𝑛𝑑 𝐺 = 1 + 𝑗𝐶𝑠𝑖𝑛∅
15-04-2022 9
Convergence and stability analysis

𝐺 2 = G X G* = 1 + 𝐶2𝑠𝑖𝑛2∅ ≥ 1

So this formulation is always greater than 1 and


therefore always unstable.

 u    2u 
4. Consider the diffusion equation given by     . 2 
 t   x 
Use Von Neumann stability analysis to determine
the stability requirements if the Implicit scheme is
used to discretize the given diffusion equation.

15-04-2022 10
Convergence and stability analysis

14-04-2022 11
Convergence and stability analysis

14-04-2022 12
Convergence and stability analysis

14-04-2022 13

You might also like