Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Modified Equation

 In order to determine the dominant error term of a finite difference


equation, Taylor series expansions are substituted back into the
finite difference equation and, after some algebraic manipulation,
the so-called modified equation is obtained.
 To illustrate the procedure, the following FTCS-Explicit scheme is
considered as a numerical solution of the parabolic equation.

The following Taylor series expansions

are substituted back into the FTCS scheme to obtain the modified equation.
Dividing by Δt the following equation is obtained

This equation can be written as

Truncation error
To check the consistency of the scheme

lim 𝑇. 𝐸 = 0 the scheme is consistent


∆𝑡→0
∆𝑦→0
Elliptic partial differential equation
The governing equations in fluid mechanics and heat transfer can reduced to
elliptic form for particular applications. Such examples are the steady state heat
conduction equation, velocity potential equation for incompressible, inviscid
flow and the stream function equation.
𝛻 2 T = 0, 𝛻 2 ∅ = 0, 𝛻 2Ψ = 0

𝜕2 ∅ 𝜕2 ∅
+ =0
𝜕𝑥 2 𝜕𝑦 2

Using finite difference representation


∅𝑖+1,𝑗 −2∅𝑖,𝑗 +∅𝑖−1,𝑗
∆𝑥 2
∅𝑖,𝑗+1 −2∅𝑖,𝑗 +∅𝑖,𝑗−1
+ =0
∆𝑦 2
x
Let 
y
ij 
1

2 1  2
 
i 1 j  i 1 j   ij 1  ij 1 
2

Example
If exact   x2  y2
Assume Δx=Δy=1/4
Use the exact ϕ to get the
values of ϕ at the boundary
Solution
Lx Ly
imax   1  5 & jmax  1  5
x y

for   1 ij  1 i 1 j  i 1 j  ij 1  ij 1
4

exact  x 2  y 2 ij  1 i 1 j  i 1 j  ij 1  ij 1 
4
Exact i=1 i=2 i=3 i=4 i=5
J=5 -1 -15/16 -3/4 -7/16 0
J=4 -9/16 -1/2 -5/16 0 7/16
J=3 -1/4 -3/16 0 5/16 3/4
J=2 -1/16 0 3/16 1/2 15/16
J=1 0 1/16 1/4 9/16 1

1st Iteration i=1 i=2 i=3 i=4 i=5


J=5 -1 -15/16 -3/4 -7/16 0
J=4 -9/16 0 0 0 7/16
J=3 -1/4 0 0 0 3/4
J=2 -1/16 0 0 0 15/16
J=1 0 1/16 1/4 9/16 1
1st Iteration i=1 i=2 i=3 i=4 i=5
J=5 -1 -15/16 -3/4 -7/16 0
J=4 -9/16 0 0 0 7/16
J=3 -1/4 0 0 0 3/4
J=2 -1/16 0 0 0 15/16
J=1 0 1/16 1/4 9/16 1

1

ij  i 1 j  i 1 j  ij 1  ij 1
4

2nd Iteration i=1 i=2 i=3 i=4 i=5
J=5 -1 -15/16 -3/4 -7/16 0
J=4 -9/16 -0.375 -3/16 0 7/16
J=3 -1/4 -1/16 0 3/16 3/4
J=2 -1/16 0 1/16 0.375 15/16
J=1 0 1/16 1/4 9/16 1
Error Estimation
1- Discretization errors If the analytical or exact values are known

   
i max jmax

exact ij  n 2
ij
i 1 j1
Disc. error 
imax jmax
2- Root Mean Sqaure errors

   
i max jmax
n 1
ij n 2
ij
i 1 j1
RMS error 
imax jmax

You might also like