
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!

AMSC 612 Fall 2008 NUMERICAL METHODS FOR PDE
HOMEWORK # 5 due Fr 12/
1 (25 pts). FEM for the Heat Equation: (a) Modify the MATLAB code fem of HW#4- Pb1 by adding a loop 1 ≤ n ≤ N to account for a backward Euler discretization of the time variable. (b) Let Ω = (0, 1)^2 and T = 1. Let a Neumann condition gN be imposed on the side x = 1, and a Dirichlet condition gD on the rest of the boundary ∂Ω. Let
u(x, y, t) = sin(3πx)e−y−^2 t.
be the exact solution. Find gD and the forcing f = ∂t − ∆u. (c) Compute the discrete solution U at T = 1, along with the L^2 , H^1 , and L∞^ errors. To this end, use the relation k = h^2 between time-step and meshsize, and find the discrete solution for meshsizes h = 2−j^ with j = 3, 4 , 5 , 6. Plot the discrete solution at T = 1 for h = 2−^4 and plot the three errors in terms of h in a log-log scale. Verify the decay ‖u(T ) − U (T )‖ ≈ hs^ and relate s to theory.
2 (25 pts). Lax-Wendroff Scheme: (a) Problem 12.2 of Larsson and Thom´ee. (b) Show that the scheme in p.191 of Larsson and Thom´ee can be written as
U (^) jn +1− U (^) jn k
− a
U (^) jn+1 − U (^) jn− 1 2 h
ka^2 2
U (^) jn+1 − 2 U (^) jn + U (^) jn− 1 h^2
(c) Prove that the method is of second order by direct use of Taylor expansion.
3 (25 pts). (a) Consider the linear 1st order hyperbolic PDE ut + ux = 0. in the space interval Ω = (− 1 , 1) and time interval (0, 0 .5). Let the initial conditions be either
v(x) = max(1 − 4 |x + 0. 25 |, 0), v(x) =
1 x ≤ − 0. 25 0 x > − 0. 25
and boundary conditions U 0 = v(−1) at x 0 = −1 (inflow) and U (^) Jn = U (^) Jn− 1 at xJ = 1 (outflow). Implement the following schemes for arbitrary k, h: (i) Upwind, (ii) Lax- Friedrichs, (iii) Lax-Wendroff. (b) Run the programs with (^) hk = 0.8 and h = 0. 01 , 0. 005 , 0 .0025, and plot both the computed and true solutions at t = 0.5. (c) Compare the methods in terms of the smearing effect around corners and jumps and the presence of oscillations.
4 (25 pts). Problem 13.3 of Larsson and Thom´ee. To compare with the method (13.5) in Larsson and Thom´ee, consider the time-discrete scheme only (i.e. without space dis- cretization).