Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Math 104C Homework #4 *

1.  Consider the Heat Equation in the unit square [0,1] × [0,1] with initial condition

                                             

and the homogeneous Dirichlet boundary condition u = 0.

(a) Implement the Peaceman-Rachford ADI method to find an approximation to this initial-

boundary value problem.

(b)  Accuracy  check.   To verify the accuracy of a scheme and as a check for possible

bugs one should always do a resolution study.   Suppose that v(k) is your numerical approximation at fixed time computed using time-step size k, then second order in time accuracy means that

v(k) = u + c2 k2 + c3 k3 + . . . ,

where u is the exact value.  Keeping the spatial resultion fixed (hx  = hy  = h, uniform grid) now compute using k/2 then your approximation satisfies:

v(k/2) = u + c2 k2 + c3 k3 + . . . ,

then for v(k/4), etc. Then the ratios:

v(k) _ v(k/2) 

R(k) =

(c)  Compute solution for D = 1  and plot it for at three different times.

* All course materials (class lectures and discussions, handouts, homework assignments, examinations, web ma- terials) and the intellectual content of the course itself are protected by United States Federal Copyright Law, the California Civil Code.  The UC Policy 102.23 expressly prohibits students  (and all other persons) from recording lectures or discussions and from distributing or selling lectures notes and all other course materials without the prior written permission of the instructor.

2.  Consider the one-way wave equation ut + ux  = 0 on the interval [_1, 3] and for t 2 0 with the following two sets of initial conditions:

u(x, 0) = 

and

u(x, 0) = e 5x2 .

(a) Use the forward-time forward-space scheme:

 +  = 0,

with right-point boundary condition uM(n+1) = u1 where xM  = 3 to compute an approx- imation to the solution at several (up to 40) time steps. Use h = 0.02 and λ = k/h = 0.8. Demonstrate numerically (plot the solution) the instability of the scheme and show that the instability appears sooner with the less smooth initial data.

(b)  Comment on the localization of the onset of instability for initial data (5) and give an

estimate of the expected growth rate of the instability per time step.

(c) Using the left boundary condition u(_1) = 0, write a stable scheme and compute the corresponding approximation for data sets  (5) and  (6).   Plot the approximations at representative time steps. Use again h = 0.02 and λ = k/h = 0.8.