# Variables
l = 0.05 #m,thickness of margarine slab
ro = 990. #Kg/m**3, density of margarine slab
cp = 0.55 #Kcal/kg C, ddpecific heat of slab
k = 0.143 #kcal/h mC, thermal conductivity of slab
Ti = 4. #C, initial temp
To = 25. #C, ambient temp.
t = 4. #hours, time
h = 8. #kcal/h m**2 C
#calculation
Fo = k*t/(ro*cp*l**2) #, fourier no.
Bi = h*l/k #Biot no.
#from fig. 10.6 a
Tcbar = 0.7 #Tcbar = (Tc-To)/(Ti-To)
Tc = To+Tcbar*(Ti-To) #C, centre temp.
#from fig 10.6 b
#(T-To)/(Tc-To) = 0.382
T = 0.382*(Tc-To)+To #c,top surface temp.
#again from fig. 10.6 b
Tm = 0.842*(Tc-To)+To #, mid plane temp.
# Results
print "The bottom surface temperature of given slab is %.1f C"%(Tc);
print "The top surface temperature of given slab is %.1f C"%(T);
print "The mid plane temperature of given slab is %.1f C"%(Tm);
import math
# Variables
Ti = 870. #C, initial temp.
To = 30. #C, ambient temp.
Tc = 200. #C, centre line temp.
h = 2000. #W/m**2 C, surface heat transfer coefficient
a = 0.05 #m, radius of cylinder
k = 20. #W/m C, thermal conductivity
ro = 7800. #kg/m**3, density
cp = 0.46*10**3 #j/kg C, specific heat
#calculation
#i
Bi = h*a/k #Biot no.
alpha = k/(ro*cp) #m**2/C, thermal diffusivity
Tcbar = (Tc-To)/(Ti-To) # dimensionless centre line temp.
#from fig 10.7 a
fo = 0.51 #fourier no. fo = alpha*t/a**2
t = fo*a**2/alpha #s, time
#ii
#at the half radius, r/a = 0.5 & Bi = 5
T = To+0.77*(Tc-To) #from fig. 10.7 b
#iii
x = Bi**2*fo
#for x = 12.75 & Bi = 5.0. fig.10.9 b gives
#q/qi = 0.83
qi = math.pi*a**2*(1)*ro*cp*(Ti-To) #kj, initial amount of heat energy
#present in 1 m length of shaft
q = 0.83*qi #j, amount of heat transfered
# Results
print "i) time required for the cantre-line temp.to drop down to 200 C is %.0f s"%(t);
print "ii)the temp. at half radius at that moment is %.0f C "%(T);
print "iii)the amount of heat that has been transfered to the liquid is %d Kj"%(q*10**-3)