Next: Exact or empirical solutions
Up: Brief notes on CFD,
Previous: Convergence of conservative schemes
Consider the scalar advection equation
 |
(1) |
with initial condition
. The upwind scheme for this pde is
obtained by using backward difference formula for the spatial derivative and
is given by
 |
(2) |
We are interested in studying the accuracy of this method for discontinuous
solutions by studying the solution of the modified partial differential
equation (MPDE). Let us first consider the case of smooth solution and assume
that there is a function
which agrees exactly with the numerical
solution at the grid points,
We want to find the pde satisfied by
. Expanding the terms in the
above equation in Taylors series about
and simplifying we get
 |
(3) |
This is the pde satisfied by the function
. If we take
to be
fixed (cfl condition), then the terms in the right hand side are
, etc. so that for small
we can truncate this series to get a
pde that is quite well satisfied by the
.
If we drop all the terms on the right-hand side, we just recover the
original advection equation. Since we have then dropped terms of
,
we expect the
to be first order accurate.
Let us retain the
terms. Then we get
 |
(4) |
This involves second derivatives in both
and
, but we can derive a
slightly different modified equation with the same accuracy by
differentiating equation (4) with respect to
to obtain
and with respect to
to obtain
Combining these gives
Inserting this in (4) gives
Since we have already dropped terms of
, we can drop these terms
here also to obtain
 |
(5) |
where
is the Courant number. This is the MPDE for the
upwind scheme and is an advection-diffusion equation with diffusion
coefficient or viscosity given by
 |
(6) |
- The grid values
can be viewed as giving a second-order
accurate approximation to the above pde, whereas they only give first-order
accurate approximations to the advection equation (1).
- The fact that the modified equation for the upwind method is an
advection-diffusion equation tells us a great deal about how the numerical
solution behaves. Solutions to the advection-diffusion equation translate at
the proper speed
but also diffuse and are smeared out. This is also
observed for the upwind scheme.
- The diffusion coefficient in equation (4) vanishes when
. In this case we already know that the exact solution the advection
equation is recovered by the upwind scheme.
- The diffusion coefficient is positive only if
. This
is precisely the stability limit of the upwind method. If it is violated,
then the diffusion coefficient in the modified equation is negative, giving
an ill-posed backward heat equation with exponentially growing
solutions. Hence we see that some information about stability can also be
obtained from MPDE.
Discontinuous solutions
The MPDE was derived on the assumption that the solution is smooth. When the
exact solution is discontinuous, the numerical solution is still smooth
because it is governed by the advection-diffusion equation.
Consider an initial condition with a jump discontinuity,
where
is the usual Heaviside function. The exact solution is
 |
(7) |
that is the initial profile is advected with speed
in the positive
direction without change of shape. The exact solution of the
advection-diffusion equation is given by
 |
(8) |
In figure the dashed line is the exact solution to the advection equation,
the solid line is the solution (8) while the symbols are the
upwind numerical solution. We see that the numerical solution gives a very good
approximation to the MPDE. Hence the difference between
equation (7) and (8) will give us an estimate of
the error in the numerical solution. We will evaluate this error in the
1-norm,
Now the solution
is such that the part for
can be obtained from
the part
by first reflecting it about
and then about
.
So that the two integrals in the previous equation are equal because they
are just the two areas indicated in figure 2.
Figure 2
Hence the 1-norm error is
for some constant
independent of
,
and
. Using the
expression for
we get the following estimate for the error
 |
(9) |
as
with
fixed. This indicates that the 1-norm of the
error decays only like
even though the method is formally
first order accurate based on the local truncation error, which is
valid for smooth solutions only. We also see that the thickness of the
transition zone (shock structure) increases with time like
.
Source
RJ LeVeque, Finite volume methods for hyperbolic problems, Cambridge Univ
Press, 2002.
Next: Exact or empirical solutions
Up: Brief notes on CFD,
Previous: Convergence of conservative schemes
Praveen. C, last updated on 18-February-2005