You are on page 1of 1

CFD4 Spring 2009

Homework - 1 (Due in class on 10/02/2009) Spatial Discretization


Instructions: Neatness carries credit. Feel free to use the code provided on the web-page if required. A total of 5 graphs are required. If you are not sure, ask me. All graphs should have clearly labeled axes and when more than one curve is plotted in a graph, legends should be shown. -

Consider the following nite dierence numerical schemes I) uxx = k=2 ak uj+k (5 point central) k=2 k=1 II) k=1 bk (uxx )j+k = k=1 ak uj+k (3 point compact or 3 point PADE) k=1 1. For each of these schemes: a) Determine the constants ak and bk for maximum accuracy. What is the leading error term and what is the order of accuracy? b) Perform a Fourier analysis, and determine the modied wave number. c) Determine whether the phase error is leading or lagging, and whether or not there is diusion error. 2. For each of the above schemes: a) Plot the modied wave number vs. the actual wave number (one graph) b) Plot the % error vs. points per wavelength (one graph) 2 3. For the function u(x) = 3sin(x) + cos(6x) + 4e8(x2) , on a periodic domain [0, 4], plot the computed results from scheme I) using 48 and 96 points in the domain and compare it with the exact second derivative (two graphs). Once you do this, plot the L 2 norm of the error for a range of x (one graph).

You might also like