#THe inside surface of a plane wall is exposed to air at 76 F and the outside
#surface to air at 21 F. The inside surface conductance is 1.5., and the outside
#is 6.5. If a thermocouple indicates that the inside wall temperature is 67 F
#what is the outside wall temperature.?
#initialisation of variables
T= 76 #F
T1= 21 #F
Tw= 67 #W
h= 1.5 #Btu/hr ft^2 F
A= 1. #ft^2
h0= 6.5 #Btu/hr
#CALCULATIONS
q= h*A*(T-Tw) #Heat flow
t= (q/(h0*A))+T1 #Outside wall temperature
#results
print '%s %.2f' % ('Outside wall temperature (F) = ',t)
raw_input('press enter key to exit')
#The inside and outside surface conductances are 2.0 and 10.0 Btu/hr ft^2 F
#respectively and the thermal conductivity of the wall is 0.5 units. Determine
#(a)the thermal transmittance and (b) the hear transfer rate for 1 ft^2 of wall
#surfaces
#initialisation of variables
hi= 2. #Btu/hr ft^2 F
l= 6. #in
k= 0.5 #Btu/hr ft F
h0= 10. #Btu/hr ft^2 F
ti= 70. #F
t0= 20. #F
A= 1. #ft^2
#CALCULATIONS
U= 1/((1/hi)+((l*0.5)/(6*k))+(1/h0)) #Thermal transmittance
q= U*A*(ti-t0) #Heat transfer rate
#RESULTS
print '%s %.2f' % ('Thermal transmittance (Btu/hr ft^2 F) = ',U)
print '%s %.2f' % (' \n Heat transfer rate (Btu/hr) = ',q)
raw_input('press enter key to exit')
#A composite wall is made up of a 1/4 in. steel plate(k=31.4) and 3 in insulation
#(k=0.04). If the outside of the steel surface is 300 F, and the outside of the
#insulation is 100 F, determine (a) the heat loss and (b) the temperature at
#the interface of the steel amd the insulation
#initialisation of variables
Ti= 300. #F
T0= 100. #F
l= 0.25 #in
li= 3. #in
A= 12. #in/ft
ks= 31.4 #Btu/hr ft F
ki= 0.04 #Btu/hr ft F
#CALCULATIONS
q= (Ti-T0)/((l/(A*ks))+(li/(A*ki))) #Heat loss
t= Ti-((q*l/12.)/ks) #Temperature
#RESULTS
print '%s %.2f' % ('Heat loss (Btu/hr) = ',q)
print '%s %.2f' % (' \n Temperature at the interface of the steel and the insulation (F) = ',t)
raw_input('press enter key to exit')
#A steel pipe (k=6.4) has an OD of 8.89 cm and an ID of 7.8 cm, and is covered
#with 1.3 cm asbestos (k=0.19). The pipe transports a fluid at 149 C and has
#an inner surface conductance of 227. Outside temp=27. Outside conductance=23
#what os the heat loss of 1m of pipe?
import math
#initialisation of variables
ti= 149. #C
t0= 27. #C
D0= 0.1149 #m
l= 1. #m
h0= 23. #W/m^2 C
hi= 227. #W/m^2 C
k= 0.19 #W/m C
Di= 0.0889 #cm
#CALCULATIONS
D1= D0*100
D2= Di*100
R0=(1/(D0*math.pi*l*h0)) #Resistance
Rins=(math.log(D1/D2)/(2*math.pi*k*l)) #Resistance
Ri=1/(Di*math.pi*l*hi) #Resistance Inlet
q= (ti-t0)/(R0+Rins+Ri) #Total heat
#RESULTS
print '%s %.2f' % ('Heat loss (W) = ',q)
raw_input('press enter key to exit')
#The working chamber of an electrically heated furnace is a cube 0.2 m on each
#side and the walls are 0.1 m thick. Interior wall temperatures are to be
#maintained at 1100 c while the outside wall temperatures are at 150C. If the
#thermal conductivity of the furnace material is 0.35, estimate the power consumption.
import math
#initialisation of variables
l= 0.2 #m
l1= 0.5 #m
k= 0.35 #W/m C
t= 0.15 #m
T1= 1100 #C
T2= 150 #C
#CALCULATIONS
Ai= 6*l*l #Inner area
Ao= 6*l1*l1 #outer area
q= 0.73*k*math.sqrt(Ai*Ao)*(T1-T2)/t #Power consumption
#RESULTS
print '%s %.2f' % ('Power consumption (W) = ',q)
raw_input('press enter key to exit')
#A copper tube, 0.6 cm OD, carries hot water between two tanks, the outside
#surface conductance is 12. If it is important to minimize the heat loss
#should the tube be covered with an insulation whose k=0.19
#initialisation of variables
h= 12 #W/m^2 C
k= 0.19 #W/m C
d= 0.6 #m
#CALCULATIONS
r= k/h #Critical radius
d1=d/2. #Radius of tube
if (r<d1):
print('heat loss will increase if the insulation is added');
else:
print('heat loss will increase if the insulation is added');
raw_input('press enter key to exit')
#A small casting initially at 16C is placed in a furnace at 1200C
#The ratio of volume to surface area is 0.15 m and the outer k=85
#k for casting is 225 and the thermal diffusivity is 0.34. how much time is
#needed for the casting to be heated to 510C?
import math
#initialisation of variables
h= 85 #W/m^2 C
s= 0.15 #m
K= 225. #W/m C
t= 510. #C
t1= 1200. #C
t0= 16. #C
a= 0.34
#CALCULATIONS
Bi= h*s/K #Biot number
T= K*s*math.log((t0-t1)/(t-t1))/(h*a) #Time
#RESULTS
print '%s %.2f' % ('Time needed for the casting to be heated to 510 C (hr) = ',T)
raw_input('press enter key to exit')