Next: Consistency of upwind finite
Up: Brief notes on CFD,
Previous: A conservative scheme gives
Consider a linear system of equations
 |
(1) |
where A is a square matrix. Here we look at the stability of solutions of
this equation, and we will see that in some cases it is very important to be
aware of how things can go wrong. By stability, we are interested in how the
solution x changes when a small change or error is made in A or
b (data). We say that the solution is stable if a small error in the
data leads to a small error in the solution. The following example
illustrates the point:
The exact solution of this equation is
Now consider the perturbed system
where the right handside has been perturbed by an order of 0.0005%, and the
exact solution to this equation is
By any reckoning the perturbation in the solution cannot be considered to be
small (It is of the order of 2000%). So what went wrong ?
Let us first derive some relationship between the perturbation of the data
and resulting change in the solution. As in the example above, consider a
perturbation of the RHS, ie., we now consider the equation
 |
(2) |
and using some suitable norms we get
 |
(3) |
Also since
Multiplying the previous two equations we get
 |
(4) |
This equation gives an upper limit to the error in the solution in
terms of the error/perturbation in the data. What makes this important is
that the inequality is strict, i.e., there exist b and
for which equality holds. The quantity
 |
(5) |
is called the condition number of matrix A. If a matrix has a
large condition number then there is a possibility that even a small error
in the data can lead to a large error in the solution (Can this be called
chaos ? sensitive dependence on data). For the example considered we
calculate the condition number in two different vector norms: Since
thus giving
According to the condition number the maximum error that can be expected is
which agrees with what we have got.
The inaccuracies in the data will always be present because all measurements
are finite and because all computers have a finite precision. Hence it is
important to be on guard whenever solving ill-conditioned equations.
Geometric picture of ill-conditioning
We again write the numeral example as a set of two equations
These two equations represent straight lines in 2-D and the solution is the
point where they intersect. The slopes of the equations are
which indicates that the two lines are close to being parallel as shown in
figure.
Now for some value of the RHS the lines intersect at P as shown in
figure. If one of the RHS values is perturbed slightly, which just causes
that
particular line to be shifted parallel to itself (dashed line in figure) the
new intersection point Q is seen to be shifted considerably wrt the
original solution. Thus ill-conditioning is a result of the fact that the
equations are nearly linearly dependent.
Ill conditioning by poor scaling
Consider the system of equations
where
and has condition numbers
making the above equation ill-conditioned.
If we divide the second equation throughout by
then we get
which is clearly well conditioned. Thus ill-conditioning can arise due to
bad scaling.
For further discussions on this topic I recommend the following reference,
Fundamentals of Matrix Computations, by David S Watkins, section 2.3,
John Wiley and Sons, 1991.
Next: Consistency of upwind finite
Up: Brief notes on CFD,
Previous: A conservative scheme gives
Praveen. C, last updated on 18-February-2005