zr..
(a)
I
x
o
/
/'
//
/
,,'" '',, ''' ''
x
.,/' 'I
1
I'
'I
I
i'
i
i
i
0.5
4.3 The Pseudospectral Method
1
••...... ..
(b)
/
, /
193
- ;
", I
FIGURE 4.3. Spectral (solid) and pseudospectral (dot-dashed) solutions to the viscous
Burgers's equation at t = 0.4: (a) truncation at wave number 64Jl', (b) truncation at wave
number I28Jl'. Only the left half of the domain is shown in (b).
Using the definition of x j (4.36) and the discrete-rnesh orthogonality condition
(4.18), the preceding reduces to
m+n=k - M
Inrl.lnl:: K
m+n::::;k +M
Inrl. lnl:: K
m+,,=k
Inrl.l nl:: K
L incman + L incman + L incman = 0,
dak
- +
dt
where M = 2K + I. As when spectral computations are performed using the
transform technique, the last two terms represent aliasing error, only one of which
can be nonzero for a given value of k. In contrast to the spectral method, however,
these aliasing terms do not disappear, because in the pseudospectral method the
number of grid points on the physical mesh is identical to the number of Fourier
wave numbers, and therefore none of the C m and an need be zero.
One might suppose that aliasing error always decreases the accuracy of the solution, but the impact of aliasing error on accuracy depends on the problem. As an
example, suppose that spectral and pseudospectral approximations are computed
to the solution of the viscous Burgers 's equation
(4.39)
on the periodic domain 0 :::: x :::: I subject to the initial condition 1/!(x,O) =
sin(2rrx). Spectral and pseudospectral solutions to this problem are shown in
Fig. 4.3 at t = 0.4 for the case v = 0.002. In these computations the timedifferencing for the nonlinear advection term was leapfrog, and the diffusion term
was integrated using a forward difference over an interval of 2l!.t. The time step
Précédent

- 207/476

Suivant