4.2 The Spectral Method
189
speed advection equation is sought on the periodic domain 0 ::: x ::: 2Jr and
that c(x, 1) is being simultaneously predicted by integrating a second unspecified
equation. Let both ,p and c be approximated by Fourier series expansions of the
form (4.14) and (4.25) with cutoff wave numbers N = K .
1. Pad the coefficients in the Fourier expansions of c and r/J with zeros by
defining ak = Ck = 0, for K < Ikl ::: 3K 12.
2. Multiply each ak by ik to compute the derivative of r/J in wave-number
space.
3. Perform two inverse FFfs to obtain c(Xj) and a,p(xj)/ax on the physicalspace grid, whose nodal points are located at xj = 2Jrj I (3K + 1).
4. Compute the product c(xj )ar/J(x j)lax on the physical-space grid.
5. (If terms representing additional forcing are present in the goveming equation, and if those terms are more easily evaluated on the physical mesh than
in wave-number space, evaluate those terms now and add the result to to
c(xj)ar/J(x j)/ax.)
6. Fast-Fourier transform c(xj )a,p (x j) lax to obtain the total forcing at each
wave number, i.e., to get the right-hand -side of (4.26). Discard the forcing
at wave numbers for which Ikl > K.
7. Step the Fourier coefficients forward to the next time level using an appropriate time-differencing scheme.
Note that the transform method allows processes that are difficult to describe
mathematically in wave-number space to be conveniently evaluated during the
portion of the integration cycle when the solution is available on the physical
mesh. For example , if r/J represents the concentration of water vapor, any change
in r/J produced by the condensation or evaporation of water depends on the degree
to which the vapor pressure at a given grid point exceeds the saturation vapor
pressure. The degree of supersaturation is easy to determine in physical space but
very difficult to assess in wave-nurnber space.
4.2.3 Conservation and the Galerkin Approximation
The mathematical equations describing non-dissipative physical systems often
conserve domain averages of quantities like energy or momentum. When spectral
methods are used to approximate such systems, the numerical solution replicates
some of the important conservation properties of the true solution. In order to examine the conservation properties of the spectral method for a relatively general
dass of problems consider those partial differential equations of the form (4.1)
189
speed advection equation is sought on the periodic domain 0 ::: x ::: 2Jr and
that c(x, 1) is being simultaneously predicted by integrating a second unspecified
equation. Let both ,p and c be approximated by Fourier series expansions of the
form (4.14) and (4.25) with cutoff wave numbers N = K .
1. Pad the coefficients in the Fourier expansions of c and r/J with zeros by
defining ak = Ck = 0, for K < Ikl ::: 3K 12.
2. Multiply each ak by ik to compute the derivative of r/J in wave-number
space.
3. Perform two inverse FFfs to obtain c(Xj) and a,p(xj)/ax on the physicalspace grid, whose nodal points are located at xj = 2Jrj I (3K + 1).
4. Compute the product c(xj )ar/J(x j)lax on the physical-space grid.
5. (If terms representing additional forcing are present in the goveming equation, and if those terms are more easily evaluated on the physical mesh than
in wave-number space, evaluate those terms now and add the result to to
c(xj)ar/J(x j)/ax.)
6. Fast-Fourier transform c(xj )a,p (x j) lax to obtain the total forcing at each
wave number, i.e., to get the right-hand -side of (4.26). Discard the forcing
at wave numbers for which Ikl > K.
7. Step the Fourier coefficients forward to the next time level using an appropriate time-differencing scheme.
Note that the transform method allows processes that are difficult to describe
mathematically in wave-number space to be conveniently evaluated during the
portion of the integration cycle when the solution is available on the physical
mesh. For example , if r/J represents the concentration of water vapor, any change
in r/J produced by the condensation or evaporation of water depends on the degree
to which the vapor pressure at a given grid point exceeds the saturation vapor
pressure. The degree of supersaturation is easy to determine in physical space but
very difficult to assess in wave-nurnber space.
4.2.3 Conservation and the Galerkin Approximation
The mathematical equations describing non-dissipative physical systems often
conserve domain averages of quantities like energy or momentum. When spectral
methods are used to approximate such systems, the numerical solution replicates
some of the important conservation properties of the true solution. In order to examine the conservation properties of the spectral method for a relatively general
dass of problems consider those partial differential equations of the form (4.1)
