Exercise 10: Plotting

Plot the temperature of the rod versus position, T(x), for a few different values of time, t. Make sure that your results seem reasonable. Discuss if/why the results seem reasonable.

Note: It is likely that your program won’t work right away! If your code generates errors, or if the results just don’t seem physically reasonable, you will need to debug your code.

Exercise 11: Convergence

Decrease the values of Δx and Δt, and re-run the simulation to check for convergence. If the temperature results change when you change the discretization, that means that Δx and/or Δt are too big, and you need to make them smaller. (But make sure that r<0.5.)

Exercise 12: Animating

Create an animation showing temperature versus position at many different moments in time. Again, make sure that the results seem reasonable, and check for convergence. Discuss.