in the interval °: : : x ::: 2n . Nevertheless, one possible way to choose the coeffivalue ofthe Fourier series exactly matches the value of fex) at any specific point
1.3 Strategies for Numerical Approximation
29
Derivatives are computed analytically by differentiating the expansion functions.
When the expansion functions form an orthogonal set, the series expansion approach is a spectral method. If the preceding periodic function were to be approx -
imated by a spectral method using five pieces of data, a natural choice would be
the truncated Fourier series
at + a2 cosx + a3 sinx + a4 cos 2x + as sin2x.
(1.65)
The five Fourier coefficients (at, a2, . .. ,as) need not be chosen such that the
cients would be to require that (1.65) be identical to f (x) at each of the five points
used by the grid-point methods discussed previously. Another useful strategy is to
choose the coefficients to minimize the x-integral of the square of the difference
between the approximation expansion (1.65) and f (x).
If the expansion functions are nonzero in only a small part of the total domain,
the series expansion technique is a finite-element method. In the finite-elernent
approach the function fex) is again approximated by a finite series of functions
of the form boso(x) + btst (x) + ... + bsss(x), but the functions Sn differ from
the trigonometric functions in the spectral method because each individual function is zero throughout most of the domain. The simplest finite-element expansion
functions are piecewise linear functions defined with respect to some grid. Each
function is unity at one grid point, or node, and zero at all the other nodes. The
values of the expansion function between the nodes are determined by linear interpolation using the values at the two nearest nodes. Six linear finite-element
expansion functions suitable for approximating f (x) might appear as shown in
Fig. 1.3. Accounting for periodicity, the five pieces of information describing
fex) would be the coefficients (bI, b2, . . . ,bs). When finite elements are constructed with piecewise-linear functions, the resulting numerical expressions are
often similar to those obtained using grid-point methods. If finite elements are
constructed from piecewise quadratic or cubic funct ions, however, the resulting
formulae are quite different from those that arise naturally through finite differencing. Series expansion methods will be studied in Chapter 4.
The numerical solution is defined throughout the entire spatial domain at every
time step, but in time-dependent problems the approximate solution is typically
available at only a few time levels at any given step of the numerical simulation.
As a consequence, the use of series expansions is generally restricted to the repre -
sentation of functional variations along spatial coordinates. Time derivatives are
almost always approximated by finite differences.
1.3.2 Marehing Schemes
Suppose that numerical solutions are sought to the first-order linear system
8u 8v
-+- =0,
8y 8x
8v
8u
-+y-=O,
8y
8x
(1.66)
Précédent

- 44/476

Suivant