Question: Modelling the heat equation

I would like if someone could help me with an example of the heat equation, this is lengthy so please bare with me.  When trying to recall your studies it is quite difficult to re-absorb all the different nomenclatures used by different people and put them into something you understand.  Some people use "c" for specific heat, some people use "s", some people use "a" for thermal diffusivity and some people use "k" which is also used for thermal conductivity.  Not to mention the myriad of different approaches to a problem. 

Samir's heat exchanger problem provided some excellent insight.  However I am having trouble extrapolating that problem to a simpler one.  Here is an example I wish to create a temperature profile from using maple.

For my example (excuse any initial values I may have left out as I am making this up as I go) an Aluminum bar length 2m long with radius of 5cm is held heated at one end to 200 degrees C (actually let's let the whole bar start out at 200 degrees C).  The other end is open where the remaining length of the bar is subjected to the natural convection of air (say thermal convection coefficient of h=10) at an ambient temperature of 15 degrees C.

Using these values for aluminum
density = 2700 kg/m3
specific heat = 900 
Thermal conductivity = 200

I want to find the temperature profile of this rod.  At first I thought it would be simple, find a pde, set initial conditions plug in the values and solve numerically as Samir did to create a profile.
                                                                                                                                                                                                          I dug up a heat equation to start from                                                                                                                                             
rho*A*dx*c*diff(T(x,t),t) = k*(A+dA)*diff(T(x,t),x) + k*(A+dA)*diff(T(x,t),x,x)*dx - k*A*diff(T(x,t),x) + h*rho*dx*(T[infinity]-T) + epsilon*sigma*dx*(T[infinity]^4 - T^4) + phi*A*dx

I think we can drop the last two terms, the ones containing epsilon and phi.  We can divide through by kA after which the dx's divide out and we're left with.

(rho*c/k) * diff(T(x,t),t) = diff(T(x,t),x,x) - (h*p/(k*A) ) * (T - T[infinity] )     # I shouldn't use T[infinity] as a variable in Maple so I'll call it T2.

and p is the cross section perimeter of the rod so p:= 2*Pi*r and I wasn't sure if T in the (h*p/(k*A)) term was T(x,t) but I think it is. 

I think that's what I can start from, if I'm missing anything please feel free to include or remove anything that may be too complex for my simple example.  The problem lies in converting this into maple.  So if I'm understanding right I should have a pde (as created above) and a set of initial conditions.

with(plots):
# set the differential equation
pde:=(rho*c/k) * diff(T(x,t),t) = diff(T(x,t),x,x) - (h*p/(k*A) ) * (T(x,t) - T2 ) :
A:=Pi*r^2: p:=2*Pi*r:

# set the constants
rho:=2700: h:=10: k:=200: c:=900: T2:=15+273.15: r:=0.05:

# set the initial boundary conditions
ibc:=T(0,t)=200+273.15 , T(x,0)=200+273.15 , D[1](T)(2,t)=T2 :

sol:=pdsolve({pde},{ibc},numeric):

p1:=sol:-plot3d(T,x=0..2,t=0..1,axes=boxed):

display(p1);

Whoa, something happens!  I expected errors, for the last few days I've been pulling my hair out to try to get it to work. 

Never-the-less it doesn't appear right.  Can someone point out the problems?  Was I right with the starting pde?  Maybe I need another pde?  Did I set the initial conditions right?

Please Wait...