60
3. Finite Difference Methods
monotonic, accurate. When a number of solutions are available, the process
can be repeated to improve the accuracy further.
We have shown above that it is the rate a t which the error is reduced
when the grid is refined that matters, not the formal order of the scheme as
defined by the leading term in the truncation error. Equation (3.52) takes
this into account and returns the correct exponent p. This estimate of the
order of a scheme is also a useful tool in code validation. If a method should
be, say, second-order accurate but Eq. (3.52) finds that it is only first-order
accurate, there is probably an error in the code.
The order of convergence estimated using Eq. (3.52) is valid only when
the convergence is monotonic. Monotonic convergence can be expected only
on sufficiently fine grids. We shall show in the examples that the error dependence on grid size may be irregular when the grid is coarse. Therefore, care
should be taken when comparing solutions on two grids; when convergence is
not monotonic, solutions on two consecutive grids may not differ much even
though the errors are not small. A third grid is necessary to assure that the
solution is really converged. Also, when the solution is not smooth, the error
estimates obtained with Taylor series approximations may be misleading. For
example, in simulations of turbulent flows, the solution varies on a wide range
of scales and the order of the solution method may not be a good indicator of
solution quality. In Sect. 3.10 it will be shown that the error of a fourth-order
scheme may not be much smaller than of a second-order scheme for these
types of simulations.
3.10 An Introduction t o Spectral Methods
Spectral methods are a class of methods less suited for general purpose CFD
codes than FV and F E methods but, as they are important in some applications (e.g. simulation of turbulence), they are briefly described here. For a
more complete description of them, see the book by Canuto et al. (1987).
3.10.1 Basic Concept
In spectral methods, spatial derivatives are evaluated with the aid of Fourier
series or one of their generalizations. The simplest spectral method deals
with periodic functions specified by their values at a uniformly spaced set of
points. It is possible to represent such a function by a discrete Fourier series:
where xi = i Ax, i = 1 , 2 , . . . N and kq = 21~q/Ax N. Equation (3.54) can
be inverted in a surprisingly simple way:
Précédent

- 73/431

Suivant