Time-dependent heat equation - Your turn#
A rod of length \(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\), the iteration scheme is:
and \(u_N^{n+1} = \dfrac{1}{3} \left( 4u_{N-1}^n - u_{N-2}^n \right)\) at the insulated end.
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.0005\) and \(\lambda = 1\).
# 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!