Introduction To Finite Dierence Methods: 2.1 Discretisation
Introduction To Finite Dierence Methods: 2.1 Discretisation
Introduction To Finite Dierence Methods: 2.1 Discretisation
SOE3213/4: FD Lecture 2
2.1 Discretisation
T1 T2 T3 T4 T5 T6 T7
T dT
dx x=p
p x
1
@T
= tangent
@x
Approximate this by dierences :
T dT
dx x=p Forward Difference
w p e x
δx
@T Te Tp
=
@x x
{ a forward dierence. Alternatively :
T Backward difference dT
dx x=p
w p e x
δx
@T Tp Tw
=
@x x
{ a backward dierence
Finally,
T dT
dx x=p Central difference
w p e x
2δx
@T Te Tw
=
@x 2x
{ central dierencing.
Note : there is no inherent reason to prefer one over the other { however each
will produce dierent errors. Dierent choices = dierent numerical schemes =
dierent errors.
2
2.2 Mathematical derivation
If we add (2) and (1), the @T terms will cancel. This gives
@x
@2T
Te + Tw = 2Tp + x2 2
@x p
so
@2T
@x2
' Te 2xTp2 + Tw
3
2.3 Time derivatives
t δt
4
2nd step :
0 0 0 0 0 0
T1 T2 T3 T4 T5 T6
t=0
δt
2.5 Summary