Title: Analysis of Discritization Error for Finite Differences
1Analysis of Discritization Error for Finite
Differences
2Contents
- Numerical Methods
- Computational Solution Procedures
- Discretization
- Finite Difference
- General form of PDE
- Solving Laplaces or Poissons
- Accuracy and Stability of FD Solutions
- Poisson Equation in 2D
- Error Analysis Truncation Error
- Discritization Error and Convergence
3Numerical Methods
- Objective
- Speed, Accuracy at minimum cost
- Numerical Accuracy (error analysis)
- Numerical Stability (stability analysis)
- Numerical Efficiency (minimize cost)
- Validation (model/prototype data, field data,
analytic solution, theory, asymptotic solution) - Reliability and Flexibility (reduce preparation
and debugging time) - Flow Visualization (graphics and animations)
4computational solution procedures
Governing Equations
System of Algebraic Equations
Equation (Matrix) Solver
ApproximateSolution
Discretization
Ui (x,y,z,t) p (x,y,z,t) T (x,y,z,t) or ?
(?,?,?,? )
Continuous Solutions
Finite-Difference Finite-Volume Finite-Element
Spectral Boundary Element Hybrid
Discrete Nodal Values
Tridiagonal ADI SOR Gauss-Seidel
Multigrid
5Discretization
- Spatial derivatives
- - Finite-difference Taylor-series
expansion - - Finite-element low-order shape function
and - interpolation function, continuous
within each - element
- - Finite-volume integral form of PDE in
each - control volume
- - There are also other methods, e.g.
collocation, - spectral method, spectral element, panel
- method, boundary element method
6Finite Difference
7Finite Difference
- Taylor series
- Truncation error
- How to reduce truncation errors?
- Reduce grid spacing, use smaller ?x x-xo
- Increase order of accuracy, use larger n
8General form of PDE
- General Equation is of form
- a ? 2? /? x2 b ? 2? /? x? y c ? 2? /? y2
f(x,y,t) - b2 gt 4ac Hyperbolic Equations
- b2 4ac Parabolic Equations
- b2 lt 4ac Elliptic Equations
- BoundaryEquation
Type Curve Conditions Example - Hyperbolic Open Cauchy Wave
Equation - Parabolic Open Dirichlet
Diffusion Equation - or
Neumann - Elliptic Closed Dirichlet
Poisson Equation - or Neumann
9Examples
- Elliptic equations
- Poisson equation,
- Parabolic equations
- Heat equations,
- Hyperbolic equations
- Conservation laws, .
10(No Transcript)
11Solving Laplaces or Poissons Equation
- As always, we must convert continuous equations
to a discrete form by setting up a mesh of points
this is finite difference method - h is step size in picture
- Nx grid points in x Ny in y direction
illustrated by Nx Ny 14
12Potential in a Vacuum Filled Rectangular Box
- So imagine the worlds simplest problem
- Find the electrostatic potential inside a box
whose sides are at a given potential - Set up a 16 by 16 Grid on which potential defined
and which must satisfy Laplaces Equation
? 2? /? x2 ? 2? /? y2 0
13Basic Numerical Algorithm
?Up
? middle
- Using standardcentral differencingtechniques,
one can approximate
? ight
?Left
?Down
? 2 ? (? Left ? Right ? Up ? Down 4 ?
Middle ) / h2
14Setup for simple 16 by 16 Grid
14 by 14InternalGrid with typical local
operator characteristic of differentials
15(No Transcript)
16(No Transcript)
17(No Transcript)
18Accuracy and Stability of FD Solutions
- The question of accuracy and stability of
numerical methods is extremely important if our
solution is to be reliable and useful. Accuracy
has to do with the closeness of the approximate
solution to exact solutions (assuming they
exist). Stability is the requirement that the
scheme does not increase the magnitude of the
solution with increase in time.
19Accuracy and Stability of FD Solutions
- There are three sources of errors that are
nearly unavoidable in numerical solution of
physical problems - modeling errors
- truncation (or discretization) errors, and
- round off errors.
- Each of these error types will affect accuracy
and therefore degrade the solution.
20Accuracy and Stability of FD Solutions
- Modelling Error
- The modeling errors are due to several
assumptions made in arriving at the mathematical
model. For example, a nonlinear system may be
represented by a linear PDE. - Truncation errors
- Truncation errors arise from the fact that in
numerical analysis, we can deal only with a
finite number of terms from processes which are
usually described by infinite series. For
example, in deriving finite difference schemes,
some higher-order terms in the Taylor series
expansion were neglected, thereby introducing
truncation error.
21Accuracy and Stability of FD Solutions
- Truncation errors may be reduced by using finer
meshes, that is, by reducing the mesh size h and
time increment ?t. Alternatively, truncation
errors may be reduced by using a large number of
terms in the series expansion of derivatives,
that is, by using higher-order approximations.
However, care must be exercised in applying
higher order approximations. Instability may
result if we apply a difference equation of an
order higher than the PDE being examined.
22Accuracy and Stability of FD Solutions
- Round off errors reflect the fact that
computations can be done only with a finite
precision on a computer. This unavoidable source
of errors is due to the limited size of registers
in the arithmetic unit of the computer. Round off
errors can be minimized by the use of
double-precision arithmetic. The only way to
avoid round off errors completely it to code all
operations using integer arithmetic. This is
hardly possible in most practical situations.
23Accuracy and Stability of FD Solutions
- Although it has been noted that reducing the mesh
size h will increase accuracy, it is not possible
to indefinitely reduce h. Decreasing the
truncation error by using a finer mesh - may result in increasing the round off error
due to the increased number of - arithmetic operations.
24Error as a function of the mesh size.
25Accuracy and Stability of FD Solutions
The concern about accuracy leads us to question
whether the finite difference solution can grow
unbounded, a property termed the instability of
the difference scheme. A numerical algorithm is
said to be stable if a small error at any stage
produces a smaller cumulative error. It is
unstable otherwise. To determine whether a finite
difference scheme is stable, we define an error,
?n, which occurs at time step n, assuming that
there is one independent variable.
26- We define the amplification of this error at time
step ?n1 as
where g is known as the amplification factor. In
more complex situations, we have two or more
independent variables,
where G is the amplification matrix. For the
stability of the difference scheme, it is
required that
or
27Poisson Equation in 2D Approximation
For example
for
small
28Poisson Equation in 2D Error Analysis Truncation
Error
For
for all
29Poisson Equation in 2D Error Analysis
Stability
Error equation
If
30Poisson Equation in 2D Error Analysis
Stability
It can be shown that
Ingredients
- Positivity of the coeffiicients of
- Bound on the maximum row sum
31Discritization Error and Convergence
Job is submitted for 4 hours with some boundry
conditions
32Discritization Error and Convergence
Job is submitted for 2 hours only
33References
- Computing for Numerical Methods using Visual C
by Shaharuddin Salleh, Albert Y.Zomaya - Computational Methods for Fluid Dyanamics by Joel
H. Ferziger. Milovan Peric - J. J. MOR, A collection of nonlinear model
problems, in Computational Solutions of Nonlinear - Systems of Equations, E. L. Allgower and K.
Georg, eds., Lectures in Applied Mathematics, - American Mathematical Society, Providence, RI
- Y. SAAD, Krylov subspace methods for solving
large unsymmetric linear systems, Math.
Computation
34QUESTIONS