To find the initial temperature of a wall as a function of position in Matlab, you would need to specify the initial conditions and the governing heat transfer equation for the wall.
Here is an example code using the one-dimensional heat transfer equation to find the initial temperature distribution along a wall with constant thermal conductivity, density and specific heat:
main.m866 chars33 lines
This code uses the pdepe
function in Matlab to solve the heat transfer equation for the wall, and then extracts the final temperature distribution at time t = 0
to get the initial temperature distribution.
Note: This code assumes that the wall is initially at a uniform temperature t0
, and that there is no heat flux across the wall at t = 0
. You may need to modify the code for different initial conditions or boundary conditions.
gistlibby LogSnag