Review
Revisiting Stability
Discretising PDEs
Summary
F INITE D IFFERENCE FOR PDE S
Dr. Johnson
School of Mathematics
Semester 1 2008
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Discretising PDEs
Summary
O UTLINE
1 R EVIEW
2 R EVISITING S TABILITY
Consistency, Stability and Convergence
3 D ISCRETISING PDE S
Difference Formula
Centering of Approximations
4 S UMMARY
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Discretising PDEs
Summary
C LASSIFICATION
PDEs may be classified by their characteristic equation
Elliptic equations tend to have smooth solutions
Parabolic equations tend to smooth out solutions over time
Hyperbolic equations may retain discontinuity by propagating
it through the solution
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Consistency, Stability and Convergence
Discretising PDEs
Summary
C ONSISTENCY
D EFINITION
A discrete approximation to a partial differential equation is said to
be consistent if in the limit of the stepsize(s) going to zero, the
original pde system is recovered, i.e. the truncation error
approaches zero.
Consistency is not as straightforward in PDEs as it is in ODEs
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Consistency, Stability and Convergence
Discretising PDEs
Summary
S TABILITY
D EFINITION
If we define the error to be the difference between the computed
solutions and the exact solution of the discrete approximation,
then the scheme is stable if the error remains uniformly bounded
for successive iterations.
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Consistency, Stability and Convergence
Discretising PDEs
Summary
C ONVERGENCE
D EFINITION
A scheme is stable if the solution of the discrete equations
approaches the solution of the pde in the limit that the step-sizes
approach zero.
L AX ’ S E QUIVALENCE T HEOREM
For a well posed initial-value problem and a consistent
discretization, stability is the necessary and sufficient condition for
convergence.
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
T HE G RID
Consider a PDE with the state variables x and y .
Form a grid of points:
with equal mesh spacing ∆x in the x-direction
and equal spacing ∆y in the y -direction.
y (i + 1, j + 1)
∆y
(i, j )
(i − 1, j − 1)
∆x
university-logo
x
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
D ERIVATIVES ON THE GRID
Let the function φ(x, y ) be approximated by wi,j
Then we can approximate the second derivatives as
∂2 φ wi −1,j − 2wi,j + wi +1,j
2
= + O (∆x 2 )
∂x ∆x 2
(i − 1, j ) (i, j ) (i + 1, j )
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
D ERIVATIVES ON THE GRID
Let the function φ(x, y ) be approximated by wi,j
Then we can approximate the second derivatives as
∂2 φ wi,j −1 − 2wi,j + wi,j +1
2
= + O (∆y 2 )
∂y ∆y 2
(i, j + 1)
(i, j )
(i, j − 1)
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
D ERIVATIVES ON THE GRID
Let the function φ(x, y ) be approximated by wi,j
Then we can approximate the first derivatives as
∂φ wi +1,j − wi −1,j
= + O (∆x 2 )
∂x 2∆x
∂φ wi,j +1 − wi,j −1
= + O (∆y 2 )
∂y 2∆y
These approximations are centered at the node (i, j ).
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
M IXED D ERIVATIVES
For finding suitable discrete approximations for mixed
derivatives use a multidimensional Taylor expansion.
Thus for example second order approximations to ∂2 φ/∂x ∂y
at the point (i, j ) are given
∂2 φ wi +1,j +1 − wi −1,j +1 + wi −1,j −1 − wi +1,j −1
= + O (∆x 2 , ∆y 2 )
∂x ∂y 4∆x ∆y
or in stencil form
−1 0 1
1 0 0 0
4∆x ∆y
1 0 −1 university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
M IXED D ERIVATIVES
An alternate stencil for the mixed derivative is
0 −1 1
1 −1 2 −1
4∆x ∆y
1 −1 0
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
F IRST D ERIVATIVES
We can also construct one-sided approximations to derivatives
Thus for example a second-order forward approximation to
∂φ/∂x at the node (i, j ) is given by
∂φ −3wi,j + 4wi +1,j − wi +2,j
= + O (∆x 2 )
∂x 2∆x
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
F IRST D ERIVATIVES
A first order forward approximation to ∂φ/∂x at the node
(i, j ) is given by
¯
∂φ ¯¯ wi +1,j − wi,j
= + O (∆x )
∂x ¯i,j ∆x
However, if we take it as approximation at (xi + 1/2∆x, yj )
then it becomes second order
¯
∂φ ¯¯ wi +1,j − wi,j
= + O (∆x 2 )
∂x i +1/2,j
¯ ∆x
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability Difference Formula
Discretising PDEs Centering of Approximations
Summary
W HERE TO CENTER APPROXIMATIONS
Where you center approximations can have a big effect on the
errors
Changing the center of the approximation gives rise to
different schemes
It can change the stability of the scheme
Be careful to approximate all terms at the same position!
university-logo
Dr. Johnson MATH65241
Review
Revisiting Stability
Discretising PDEs
Summary
D IFFERENCING
We need to know that a scheme is stable for it to be
convergent
Use stencils to generate difference formula for derivatives
Change the centering of the approximation:
to increase stability
or the order of the scheme
See notes for more differencing formulas
university-logo
Dr. Johnson MATH65241