
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!

MATH 572 Numerical Methods for Scientific Computing II Winter 2005
Assignment #6 due : Thursday, April 7
Dy +Dy −)unj,l. Take h = 0.1 and k = 0.0025. Make a contour plot and a surface plot of the numerical solution at time t = 2 (including the boundary values). The relevant commands in Matlab are contour and mesh (or surf).
a) Consider the wave equation vt + cvx = 0, v(x, 0) = f (x), c > 0. Show that the numerical solution determined by the upwind scheme can be expressed as
unj = ((1 − cλ)I + cλS−)nfj =
∑^ n
l=
n l
(1 − cλ)n−l(cλ)lfj−l,
and the numerical solution determined by the downwind scheme can be expressed as
wjn = ((1 + cλ)I − cλS+)nfj =
∑^ n
l=
n l
(1 + cλ)n−l(−cλ)lfj+l.
b) Let f (x) = eαx^ and take t = tn = nk, x = xj = jh with λ = kh fixed. Using the formulas derived above, show that the numerical solutions vjn , wjn converge to the correct
value v(x, t) = eα(x−ct)^ as n → ∞ for any value of λ.
In other words, the numerical solution converges even when the scheme is unstable. Fritz John noted that despite appearances, this result is in fact consistent with the CFL condition since an analytic function (such as f (x) = eαx) is determined by its values in any interval. It should further be noted that in computing the solution of a problem that is physically unstable (e.g. Kelvin-Helmholtz instability of a shear layer), it is necessary to use an unstable scheme (to ensure consistency).
f 1 (x) =
{ (^1) , x < 0 0 , x = 0 − 1 , x > 0
, f 2 (x) =
{ (^) − 1 , x < 0 1 − 2 |x − 1 | , 0 ≤ x ≤ 2 − 1 , x > 2
Compute the solution for − 1 ≤ x ≤ 5 , 0 ≤ t ≤ 2 using the upwind scheme and the downwind scheme, with h = 0.05 and k = 0. 04 , 0 .06. For each scheme, plot the numerical solution and the exact solution (on the same plot) at t = 0 and t = 2. Discuss the results.