MTH3007B Weekly Problems 6

Vibes: …

Used Techniques:


6.1. Explicit Scheme for 1D Heat Equation

Question

Consider a rod of length with heat diffusion coefficient . Assume boundary conditions and for all . The initial condition at is for , with the boundaries fixed at the given temperatures. Take spatial step and time step and solve the one-dimensional heat equation

using the explicit (forward Euler in time, central difference in space) finite-difference scheme.

  1. Implement the explicit scheme with the given parameters, enforcing the boundary conditions at each time step and using the recurrence

for interior grid points . 2. Plot as a function of at , , and on a single graph, and include this plot together with your code in the extra material. 3. Determine the temperature of the rod at time and position , i.e. compute , from your numerical solution.