Here's an example code in MATLAB to create a temperature distribution for a plane wall being cooled by a liquid on the right side and being heated by a heat flux for 0.2 seconds every 1 second on the left side:
main.m1243 chars45 lines
This code defines the thermal properties of the wall, the initial temperature distribution, and performs a simulation to calculate how the temperature distribution changes over time, given the boundary conditions. The temperature distribution is plotted at the end of the simulation.
gistlibby LogSnag