

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


ATMS 581 / AMATH 586 — Spring 06 Homework 5
xj = 2 π M
j, where j = 1,... , M.
In order to be efficient, the FFT algorithm requires that M be the product of small prime numbers. Maximum efficiency is obtained when M is a power of 2. Thus, most FFT codes assume that M is an even number. When the total number of grid points on the physical mesh is even, the finite Fourier transform and inverse transform are given by the relations
an(t) =
∑^2 N
j=
φ(xj , t)e−inxj
and
φ(xj , t) =
∑^ N
k=−N +
ak(t)eikxj^.
The 2N data points in physical space uniquely define 2N Fourier coefficients. How- ever, in contrast to (eqn. 4.14, p. 179), the wave number k = −N does not appear in the expansion. Explain why the −N wave number is retained in finite Fourier transforms when there is an odd number of points on the physical mesh and dropped when the total number of points is even.
∂ψ ∂t
on the periodic domain [0, 1] subject to the initial condition
ψ(x, 0) = sin(2πx).
The exact solution can be expressed parametrically as ψ(x, t) = sin(2πξ), where ξ satisfies ξ = x − sin(2πξ)t. This solution develops a sharp gradient by t = 0.15 and a discontinuity at t = 1/(2π) ∼ 0 .16. (Also see the discussion of Burger’s equation on pp. 159–160.) Download the Matlab program (two files) which computes the exact solution and an approximate spectral solution using the spectral transform method. Extend this program to compute a pseudo-spectral solution using leapfrog time differencing. As is the case for the spectral solver, use a total of M = 64 modes and let ∆t = 0.005. You may find it helpful to refer to the pdf file describing the relation between discrete
Fourier transforms and the less intuitive way that the vector of Fourier coefficients is ordered in fast-Fourier transforms.
(a) Submit a plot showing the exact and both approximate solutions (spectral and pseudo-spectral) in the half domain 0 ≤ x ≤ 0 .5 at t = 0.15. Also show a plot comparing the 2 -norm of the error on the mesh points xj = (j − 1)/M for j = 1, 2 ,... , M. as a function of time. Compare the accuracy of the two numerical schemes. (b) Show that neglecting any influences from the discretization of the time derivative, the 2 -norm of the spectral-method solution ∫ (^1)
0
φ^2 (x, t) dx
will be independent of time, provided the solution remains smooth (in partic- ular, it needs to have a continuous derivative). (c) Push the solutions past the point at which the correct solution develops a discontinuity by integrating over the interval 0 ≤ t ≤ 0 .38. Plot the ` 2 -norm of each numerical solution as a function of time over the interval 0 ≤ t ≤ 0 .36. Also show a plot of both solutions on the half domain 0 ≤ x ≤ 0 .5 at t = 0 .20. Comment on the errors that develop in the spectral and pseudo-spectral solutions.
Due Friday June 2nd