Questions:
1. Solve the linear advection equation on [-1, 1] with the periodic boundary conditions using Lax-Friedrichs, Law-Wendroff, and the upwind methods with the initial conditions u(x, 0) = sinΠx and the CFL number about 0.9 on a sequence of meshes with J = 16, 32, 64, 128, 256 elements. Tabulate the errors at T = 2. Plot solutions with all three methods on one of the meshes. Comment on accuracy of the schemes, i.e. which method gives the best/worst results, relate that to the theoretical results, i.e. the orders of truncation errors.
2. Integrate the problem for a longer time to, say, T = 10 on one of the meshes. Plot solutions, visually compare numerical diffusivity of the schemes, relate your observations to the theoretical discussion that was given in class. You do not need to be precise here, simply note which scheme is more diffusive.
3. Compare solutions on the J = 16 and J = 256 meshes at T = 10 and comment how tlx influences numerical diffusion. Relate you observations to the theoretical prediction. Again, you do not need to measure precisely how diffusive your solutions are.
4. Numerical dispersion is visually less pronounced that numerical dissipation. You might need to solve the problem for larger t final to see an accumulation of the phase error. Experiment with the final time and mesh sizes to see for yourself that the numerical wave speed is slightly faster or slower than the exact wave speed. Relate your observations to the theoretical result. Recall that ak ≈ a(1 - 2/3θ2(1 + 2α2 -3β)). You don't need to estimate the numerical wave speed, only to show on a plot a shift in the sine wave.
5. Pick your favorite scheme and try a couple of values for α, one close to 1 and the other not. Convince yourself that a smaller Δt is not necessarily a better choice. Explain why.
6. Include a print out of your code.