Time-dependent heat equation - Implicit scheme

Time-dependent heat equation - Implicit scheme#

A rod of length \(L = 1\), whose initial temperature profile is \(u(x,0) = 100 \sin (\pi x)\), becomes attached on one end to a cooling reservoir, maintained at \(0\) °C while the other end is insulated, which gives the following boundary condition: \( \dfrac{dT}{dx} \bigg|_{x=L} = 0\).

For the time-dependent heat equation, \(\lambda^2 \dfrac{\partial^2 u}{\partial x^2} + q = \dfrac{\partial u}{\partial t}\), for the rod using \(30\) nodes with \(q=1\) and \(\lambda = 1\), use the fully implicit iteration scheme to plot the temperature profile of the rod at \(t = \begin{bmatrix} 0 & 0.01 & 0.05 & 0.2 & 0.5 \end{bmatrix}\). Take \(dt = 0.01\).

# TODO: Write your solution below

Exporting your work#

When you’re ready, the easiest way to export the notebook is to File > Print it and save it as a PDF. Remove any excessively long, unrelated outputs first by clicking the arrow → next to the output box and then Show/hide output. Obviously don’t obscure any necessary output or graphs!