1. The 2D diffusion equation ut = D∇2u is discretized using the Finite Difference method as
(ui,jn+1- ui,jn)/DΔt = γ[(ui+1n+1,j - 2ui,jn+1 + ui-1n+1,j)/Δx2 + ui,j+1n+1,j - 2ui,jn+1 + ui-1n+1/Δy2] + (1-γ)[(ui+1n,j - 2ui,jn + ui-1n,j)/Δx2 + ui,j+1n - 2ui,jn + ui,j-1n/Δy2]
where γ is a parameter between 0 and 1 which determines the method of time discretization. Specifically, we have
γ = 0 : explicit method
γ = 1 : implicit method
γ = 1/2 : Crank-Nicholson method
Derive the stability condition for each of the above time discretization methods.
2. The propagation of electromagnetic waves in 2D is governed by the wave equation
n2/c2.∂2u/∂2t = ∂2u/∂x2 + ∂u/∂y2,
where n(x, y) is the refractive index of the medium and c = 3 × 108 m/s is the speed of light in vacuum. We would like to solve the above equation using the Finite Difference Time Domain (FDTD) method. The computation domain is restricted to a rectangular region of size a × b and Radiating Boundary Conditions based on the one-way wave equation are applied to all four boundaries.
(a) Give a FD discretization of the wave equation for an interior node (i, j).
(b) Derive the FD equations for nodes on the left, right, top and bottom boundaries.
(c) Implement the FDTD method in a MATLAB program to solve the above wave equation. An outline of the program is given at the end of the assignment for your reference.
(d) Use your program to run the following simulations