18.303 Problem Set Due Wednesday, 10 November 2010. Problem 1: Stability (a) For the 1d diffusion equation the following discretization: ∂2u ∂x2 = ∂u ∂t on x ∈ [−∞, ∞], use Von Neumann analysis to analyze the stability of un+1 − 12 (unm+1 + unm−1 ) un − 2un+1 + unm−1 m m . = m+1 ∆t ∆x2 That is, assume that the solution on the n-th timestep is un = g n u for an eigenvalue (“growth factor”) g and eigenvector u, and solve for g under the assumption that um = eikx . Then find conditions on ∆t (if any) such that it is stable (no exponential growth, i.e. |g| ≤ 1). What is the order of accuracy, in time and space, of this discretization? If you get |g| = 1 anywhere, what does this mean about the solutions (especially as ∆x and ∆t → 0)? ∗ (b) Suppose we are discretizing a wave equation ∂w ∂t = D̂w for some D̂ = −D̂. First, we discretize D̂ in space, T replacing it by some matrix D to obtain an ODE du dt = Du; assume D is real and D = −D (i.e, we have chosen the discretization to mimic the properties of D̂), and thus D has purely imaginary eigenvalues λ = iω. Now consider the Crank–Nicolson discretization: un+1 − un un+1 + un =D . ∆t 2 (As shown in class, this is 2nd-order accurate in time and space.) Show that this is unconditionally stable (different from the proof in class: in class, we did it for a matrix A that was negative-definite). Do the solutions of this discretized equation grow, decay, or...? How does this compare to the exact equation ∂w ∂t = D̂w? Problem 2: Waves, boundary conditions, and conservation laws 2 In class (and notes), we showed that we can turn the scalar wave equation b∇ · (a∇u) = ∂∂t2u (a > 0 and b > 0) into ∂v two coupled first-derivative equations: ∂u ∂t = b∇ · v, ∂t = a∇u by introducing a new (vector) unknown v(x, t). By T defining w = (u, v) , we obtained the form ∂w b∇· = w = D̂w, a∇ ∂t where D̂ was anti-Hermitian under the inner product hw, w0 i = tions (e.g. u|dΩ = 0). R Ω 1 0 b ūu + a1 v̄ · v0 , for appropriate boundary condi- (a) Suppose u|dΩ = 0. What boundary condition does this imply for v? (b) Suppose v · n̂|dΩ = 0, where n̂ is a unit vector perpendicular to the dΩ boundary. What boundary conditions does this imply for u? (c) In class, we showed that D̂∗ = −D̂ implies “conservation of energy:” hw, wi must be constant in time if ∂w ∂t = D̂w. Here, you will give a different conservation law: just as we saw in class for the in the diffusion equation, for any function n(x) in the left nullspace D̂∗ n = 0 = −D̂n, show that hn, wi is constant in time if ∂w ∂t = D̂w. Describe the left nullspace of the operator D̂ above, for the boundary conditions in part (b), and give the resulting conservation law(s). [Tip 1: the nullspace of ∇· in 3d is the curl of any vector field. Tip 2: for any vector fields F and G, ∇ · (F × G) = G · (∇ × F) − F · (∇ × G), which allows you to “integrate by parts” on F · (∇ × G).] 1