Docsity

ATMS 581 / AMATH 586 - Spring 2006: Fourier Transform & Solutions for Burger's Equation, Assignments of Mathematics

Toggle sidebar
bg1
ATMS 581 / AMATH 586 — Spring 06
Homework 5
1. In all practical applications, finite Fourier transforms are computed using the
fast Fourier transform (FFT) algorithm (Cooley and Tukey, 1965). Suppose that
the periodic spatial domain 0 ≤x≤2πis discretized so that
xj=2π
Mj, where j= 1, . . . , M.
In order to be efficient, the FFT algorithm requires that Mbe the product of small
prime numbers. Maximum efficiency is obtained when Mis a power of 2. Thus,
most FFT codes assume that Mis 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) = 1
2N
2N
X
j=1
φ(xj, t)e−inxj
and
φ(xj, t) =
N
X
k=−N+1
ak(t)eikxj.
The 2Ndata points in physical space uniquely define 2NFourier coefficients. How-
ever, in contrast to (eqn. 4.14, p. 179), the wave number k=−Ndoes not appear
in the expansion. Explain why the −Nwave 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.
2. Consider spectral and pseudo-spectral solutions to the inviscid Burger’s equation
∂ψ
∂t +ψ∂ψ
∂x = 0,
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
pf2

Partial preview of the text

Download ATMS 581 / AMATH 586 - Spring 2006: Fourier Transform & Solutions for Burger's Equation and more Assignments Mathematics in PDF only on Docsity!

ATMS 581 / AMATH 586 — Spring 06 Homework 5

  1. In all practical applications, finite Fourier transforms are computed using the fast Fourier transform (FFT) algorithm (Cooley and Tukey, 1965). Suppose that the periodic spatial domain 0 ≤ x ≤ 2 π is discretized so that

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

∑^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.

  1. Consider spectral and pseudo-spectral solutions to the inviscid Burger’s equation

∂ψ ∂t

  • ψ ∂ψ ∂x

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