Here is how you can plot the temperature distribution for a plane wall initially at 20 degrees and cooled by liquid of 20 degrees on right side that is subjected to a large heat flux on the left side for 0.2 seconds every 1 second using Matlab:
main.m1354 chars47 lines
This code uses the Crank-Nicolson method to solve the heat equation for the plane wall and a heat flux boundary condition on the left side for 0.2 seconds every 1 second. The temperature distribution is then plotted as a function of time and distance using the pcolor
function.
gistlibby LogSnag