Numerical Solutions Applied To Heat Transfer And Fluid Mechanics Problems
We are going to study a very simple form of the advection diffusion equation with the assumption that the velocity of advection is constant and positive.
We've constructed a second order approximation to the simple diffusion equation. Following the same strategy yields an explicit difference equation for advection and diffusion in the form:
This can be very restrictive, and demonstrates that the pure advection form of the equation (k=0) is always unstable.
At this point we've got to go looking for other ways to obtain higher order approximations to the advection term. I've provided a derivation of a better approach as both MathCad and PDF files. The first approach to improved spatial accuracy is based on finite volume equations. The aim is to increase the accuracy of the density used in mass flux terms at the surface of each volume. To simplify notation the surface to the right of volume i is denoted by a subscript "r" and the face to the left by "l".
If I assume that all cell volumes are the same and all surface areas between the volumes match then I can write the finite volume equation in the form:
A error analysis gives accuracy for this finite volume equation gives O(Dx2,Dt). Application of a standard finite difference approach using values at the same 4 points can give a mass flux term that is third order accurate. The resulting finite difference formula can be translated to a finite volume form by setting:
Although these only give a first order approximation to the edge density, the x derivative is third order accurate in space.
For explicit methods it is possible to construct methods, which cancel errors in the time derivative with errors in the spatial derivative. These rely on the original conservation equation to establish the relationship between time and space derivatives. Rearranging the advection diffusion equation, we have:
Taking the derivative of both sides of this equation with respect to time we a have:
For a moment, focus on a pure advection equation. When the standard finite difference operator is inserted for the time derivative, the equation becomes:
The next job is to find coefficients A, B, and C such that the density at the right edge of volume "i" is:
the density at the left edge of volume "i" is
and the finite difference for that volume satisfies the following relation
Now back to the full advection-diffusion equation
A quick examination of equations 1) and 2) for conversion of time to spatial derivatives shows that we are in trouble when k is not zero. Full cancellation of the first order time error now requires a fourth order spatial derivative. The difference method as written does not include enough spatial points to evaluate a fourth derivative. Formally, there is no way to create a method better than first order accurate in time without doing something special with the evaluation of the time derivative, or adding another spatial point (i-3 or i+2) . However, for problems where advection clearly dominates over diffusion, the fourth order term should be much smaller than the third order term, and we can write:
Now the approximation can be improved by selecting A, B, and C such that:
where the same definitions of left and right face densities are used.
Note that when the Courant number is one:
which is direct transport of the upstream density, modified by diffusion centered on the upstream volume.