# Chapter 02:One dimensional steady-state heat conduction¶

## Ex2.1:pg-33¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 1"
#The length of steel sheet (Ls)=1.5 mm and thermal conductivity (ks)=25 W/(mK) at the outer surface.
Ls=1.5;
ks=25;
#The length of plywood (Lp)=10 mm and thermal conductivity (kp)= .05 W/(mK) at the inner surface.
Lp=10;
kp=.05;
#The length of glass wool (Lg)=20 mm and thermal conductivity (kg)= .01W/(mK) in between steel sheet and plywood.
Lg=20;
kg=.01;
#The temprature of van inside cold Enviroment is (Ti)= -15Â°C  while the outside surface is exposed to a surrounding ambient temprature (To)=24Â°C
To=24;
Ti=-15;
#The average value of heat transfer coefficients at the inner and outside surfaces of the wall are hi=12 W/(m**2*K) and ho= 20 W/(m**2*K)
hi=12;
ho=20;
#The surface area of wall (A)= .75 m**2
A=.75;
#The convective resistance is Ro= 1/(ho*A) at the outer surface
print"The convective resistance Ro= 1/(ho*A) at the outer surface in KW**-1 is"
Ro=1/(ho*A)
print"Ro=",Ro
#The conduction resistance is Rs= Ls/(ks*A) of steel sheet
print"The conduction resistance Rs= Ls/(ks*A) of steel sheet in KW**-1 is"
Rs=Ls*10**-3/(ks*A)
print"Rs=",Rs
#The conduction resistance is Rg= Lg/(kg*A) of glass wool
print"The conduction resistance Rg= Lg/(kg*A) of glass wool in KW**-1 is"
Rg= Lg*10**-3/(kg*A)
print"Rg=",Rg
#The conduction resistance is Rp= Lp/(kp*A) of plywood
print"The conduction resistance Rp= Lp/(kp*A) of plywood in KW**-1 is"
Rp= Lp*10**-3/(kp*A)
print"Rp=",Rp
#The convective resistance is Ri= 1/(hi*A) at the outer surface
print"The convective resistance Ri= 1/(hi*A) at the outer surface in KW**-1 is"
Ri= 1/(hi*A)
print"Ri=",Ri
#The rate of heat flow is Q=(To-Ti)/(Ro+Rs+Rg+Rp+Ri)
print"The rate of heat flow Q=(To-Ti)/(Ro+Rs+Rg+Rp+Ri) in W is"
Q=(To-Ti)/(Ro+Rs+Rg+Rp+Ri)
print"Q=",Q
#The tempraure at the outer surface of wall is T1.
#The temprature at the interface b/w steel sheet and glass wool is T2.
#The temprature at the interface b/w glass wool and plywood is T3.
#The tempraure at the inner surface of wall is T4.
print"The temprature at the outer surface of wall is T1=To-(Q*Ro) in Â°C"
T1=To-(Q*Ro)
print"T1=",T1
print"The temprature at the interface b/w steel sheet and glass wool is T2=T1-(Q*Rs) inÂ°C"
T2=T1-(Q*Rs)
print"T2=",T2
print"The temprature at the interface b/w glass wool and plywood is T3=T2-(Q*Rg) inÂ°C"
T3=T2-(Q*Rg)
print"T3=",T3
print"The temprature at the inner surface of wall is T4=T3-(Q*Rp)in Â°C"
T4=T3-(Q*Rp)
print"T4=",T4
#Check for Ti(Temprature inside the van)
print"Check for Ti(in Â°C)"
Ti=T4-(Q*Ri)
print"The value is same as given in the problem"
print"Ti=",Ti

Introduction to heat transfer by S.K.Som, Chapter 2, Example 1
The convective resistance Ro= 1/(ho*A) at the outer surface in KW**-1 is
Ro= 0.0666666666667
The conduction resistance Rs= Ls/(ks*A) of steel sheet in KW**-1 is
Rs= 8e-05
The conduction resistance Rg= Lg/(kg*A) of glass wool in KW**-1 is
Rg= 2.66666666667
The conduction resistance Rp= Lp/(kp*A) of plywood in KW**-1 is
Rp= 0.266666666667
The convective resistance Ri= 1/(hi*A) at the outer surface in KW**-1 is
Ri= 0.111111111111
The rate of heat flow Q=(To-Ti)/(Ro+Rs+Rg+Rp+Ri) in W is
Q= 12.5353919471
The temprature at the outer surface of wall is T1=To-(Q*Ro) in Â°C
T1= 23.1643072035
The temprature at the interface b/w steel sheet and glass wool is T2=T1-(Q*Rs) inÂ°C
T2= 23.1633043722
The temprature at the interface b/w glass wool and plywood is T3=T2-(Q*Rg) inÂ°C
T3= -10.2644074867
The temprature at the inner surface of wall is T4=T3-(Q*Rp)in Â°C
T4= -13.6071786725
Check for Ti(in Â°C)
The value is same as given in the problem
Ti= -15.0


## Ex2.2:pg-36¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 2"
#The Thickness of fire clay bricks (Lb)=.2 m
Lb=0.2;
#The thermal conductivity of fire clay bricks(kb)=1.0 W/(m*K)
kb=1;
#the Thicknes of insulating material is L
#The thermal conductivity of insulating material(ki)=.07 W/(m*K)
ki=.07;
#The furnace inner brick surface is at temprature Ti=1250 K
Ti=1250;
#The furnace outer brick surface is at temprature To=310 K
To=310;
#The maximum allowable heat transfer rate(Q) from wall = 900 W/m**2
Q=900;
#Q=(Ti-To)/((Lb/kb)+(L/ki)) so L=ki*(((Ti-To)/Q)-(Lb/kb))
print"The thickness of insulating material L=ki*(((Ti-To)/Q)-(Lb/kb)) in m"
L=ki*(((Ti-To)/Q)-(Lb/kb))
print"L=",L

Introduction to heat transfer by S.K.Som, Chapter 2, Example 2
The thickness of insulating material L=ki*(((Ti-To)/Q)-(Lb/kb)) in m
L= 0.056


## Ex2.4:pg-36¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 4"
#To cure the bond at a temprature(To),a radiant source used to provide a heat flux qo W/m**2
#The back of the substrate is maintained at a temprature T1
#The film is exposed to air at a temprature (Tinf)
#the convective heat transfer coefficient is h.
#Given To=60Â°C,Tinf=20Â°C,h=25 W/(m**K)and T1=30Â°C
To=60;
Tinf=20;
h=25;
T1=30;
#Ls is the thickness of substrate and Lf is thickness of film in mm.
Ls=1.5;
Lf=.25;
#kf and ks are thermal conductivity of film and substrate respectively in W/(m*K)
kf=.025;
ks=.05;
#qo is Heat flux.
#qo=qf+qs where qf and qs are rate of heat transfer per unit surface area through the film and the substrate respectively.
print"Heat transfer per unit surface area through film qf=(To-Tinf)/((1/h)+(Lf/kf))in W/(m**2)"
qf=(To-Tinf)/((1/h)+(Lf*10**-3/kf))
print"qf=",qf
print"Heat transfer per unit surface area through substrate qs=(To-T1/(Ls/ks)in W/(m**2)"
qs=(To-T1)/(Ls*10**-3/ks)
print"qs=",qs
print"Heat flux qo=qs+qf in W/(m**2)"
qo=qs+qf
print"qo=",qo
#If the film is not transparent and all of the radiant heat flux is absorbed at its upper surface then qo=q1+q2
#q1 is rate of heat conduction through the film and substrate
#q2 is rate of convective heat transfer from the upper surface of film to air
print"If the film is not transparent and all of the radiant heat flux is absorbed at its upper surface then"
print"Rate of heat conduction through the film and substrate q1=(To-T1)/(Ls/ks) in W/m**2"
q1=(To-T1)/(Ls*10**-3/ks)
print"q1=",q1
#To determine q2 we need to find the temprature(T2) of the top surface
print"The temprature of the top surface of the film T2=(q1*(Lf*10**-3/kf))+To in Â°C"
T2=(q1*(Lf*10**-3/kf))+To
print"T2=",T2
print"Rate of convective heat transfer from the upper surface of film to air q2=h*(T2-Tinf)in W/m**2"
q2=h*(T2-Tinf)
print"q2=",q2
print"Heat flux qo=q1+q2 in W/m**2 "
qo=q1+q2
print"qo=",qo

Introduction to heat transfer by S.K.Som, Chapter 2, Example 4
Heat transfer per unit surface area through film qf=(To-Tinf)/((1/h)+(Lf/kf))in W/(m**2)
qf= 4000.0
Heat transfer per unit surface area through substrate qs=(To-T1/(Ls/ks)in W/(m**2)
qs= 1000.0
Heat flux qo=qs+qf in W/(m**2)
qo= 5000.0
If the film is not transparent and all of the radiant heat flux is absorbed at its upper surface then
Rate of heat conduction through the film and substrate q1=(To-T1)/(Ls/ks) in W/m**2
q1= 1000.0
The temprature of the top surface of the film T2=(q1*(Lf*10**-3/kf))+To in Â°C
T2= 70.0
Rate of convective heat transfer from the upper surface of film to air q2=h*(T2-Tinf)in W/m**2
q2= 1250.0
Heat flux qo=q1+q2 in W/m**2
qo= 2250.0


## Ex2.6:pg-38¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 6"
#The thickness of plate 20mm or .02m with uniform heat generation qg=80MW/m**3
#The thermal conductivity of wall(k)is 200W/m*K.
k=200;
#The left and right faces are kept at tempratures T=160Â°C and T=120Â°C respectively
#With qg=80*10**6W/m**3 and k=200W/(m*K)
#Applying boundary condition at x=0,T=160Â°C and x=0.02,T=120Â°C we get constant c2=160Â°C and c2=2000m**-1
#Hence T=160+2*10**3*(x-100*x**2)----->eq.1
print"(a)The expression for the temprature distribution in the plate T=160+2*10**3*(x-100*x**2)"
#For maximum temprature differentiating eq.1 with respect to x and equating it to zero...we get dT/dx=(2*10**3)-(4*10**5*x)=0,which gives x=0.005m=5mm
print"(b)The maximum temprature occurs at x=5mm or 0.005m away from the left surface towards the right"
x=0.005;
#The maximum temprature is Tmax
print"The maximum temprature(Tmax) in Â°C is"
Tmax=160+2*10**3*(x-100*x**2)
print"Tmax=",Tmax
#The rate of heat transfer(q/A) is given by -k*(dT/dx)
#Let dT/dx=X and (q/A)=Q
print"(c(i))The rate of heat transfer at the left face in MW/m**2 is"
#For left face x=0
x=0;
X=(2*10**3)-(4*10**5*x);
Q=-k*X/10**6
print"Q=",Q
print"The minus sign indicates that the heat flow in the negative direction"
print"(c(ii))The rate of heat transfer at the right face in MW/m**2 is"
#For right face x=0.02
x=0.02;
X=(2*10**3)-(4*10**5*x);
Q=-k*X/10**6
print"Q=",Q
#(q/A)@x=0 implies rate of heat transfer at the position where x=0.
print"The minus sign for (q/A)@x=0 and the plus sign for (q/A)@x=0.02 indicates that heat is lost from both the surfaces to surroundings"
print"(c(iii))The rate of heat transfer at the centre in MW/m**2 is"
#For centre x=0.01
x=0.01;
X=(2*10**3)-(4*10**5*x);
Q=-k*X/10**6
#A check for the above results can be made from an energy balance of the plate as |(q/A)|@x=0+|(q/A)|@x=0.02=qG*0.02
print"Q=",Q

 Introduction to heat transfer by S.K.Som, Chapter 2, Example 6
(a)The expression for the temprature distribution in the plate T=160+2*10**3*(x-100*x**2)
(b)The maximum temprature occurs at x=5mm or 0.005m away from the left surface towards the right
The maximum temprature(Tmax) in Â°C is
Tmax= 165.0
(c(i))The rate of heat transfer at the left face in MW/m**2 is
Q= -1
The minus sign indicates that the heat flow in the negative direction
(c(ii))The rate of heat transfer at the right face in MW/m**2 is
Q= 1.2
The minus sign for (q/A)@x=0 and the plus sign for (q/A)@x=0.02 indicates that heat is lost from both the surfaces to surroundings
(c(iii))The rate of heat transfer at the centre in MW/m**2 is
Q= 0.4


## Ex2.9:pg- 48¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 9"
#A thin walled copper tube of outside metal radius r=0.01m carries steam at temprature, T1=400K.It is inside a room where the surrounding air temprature is Tinf=300K.
T1=400;
Tinf=300;
r=0.01;
#The tube is insulated with magnesia insulation of an approximate thermal conductivity of k=0.07W/(m*K)
k=0.07;
#External convective Coefficient h=4W/(m**2*K)
h=4;
#Critical thickness(rc) is given by k/h
print"The critical thickness of insulation in metre is"
rc=k/h
#We use the rate of heat transfer per metre of tube length as Q=(Ti-Tinf)/((ln(r2/r1)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L))) where length,L=1m
L=1;
#When 0.002m thick layer of insulation r1=0.01m,r2=0.01+0.002=0.012m
#Let ln(r2/r1)=X
X=math.log(r2/r1)/math.log(2.718);
print"X=",X
#The heat transfer rate per metre of tube length is Q
print"The heat transfer rate Q per metre of tube length in W/m is "
Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))
print"Q=",Q
#When critical thickness of insulation r1=0.01m,r2=0.0175m
#Let ln(r2/r1)=X
X=math.log(r2/r1)/math.log(2.718);
print"X=",X
#The heat transfer rate per metre of tube length is Q
print"The heat transfer rate per metre of tube length Q in W/m is "
Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))
print"Q=",Q
#When there is a 0.05 m thick layer of insulation r1=0.01m,r2=.01+0.05=0.06m
#Let ln(r2/r1)=X
X=math.log(r2/r1)/math.log(2.718);
print"X=",X
#The heat transfer rate per metre of tube length is Q
print"The heat transfer rate per metre of tube length Q in W/m is "
Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))
#It is important to note that Q increases by 5.2% when the insulation thickness increases from 0.002m to critical thickness.
#Addition of insulation beyond the critical thickness decreases the value of Q (The heat loss).
print"Q=",Q

Introduction to heat transfer by S.K.Som, Chapter 2, Example 9
The critical thickness of insulation in metre is
X= 0.182340462632
The heat transfer rate Q per metre of tube length in W/m is
Q= 26.807459995
X= 0.559673817307
The heat transfer rate per metre of tube length Q in W/m is
Q= 28.1996765363
X= 1.79194526577
The heat transfer rate per metre of tube length Q in W/m is
Q= 21.1086798197


## Ex2.10:pg-49¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 10"
#A copper pipe having 35mm outer diameter(Do) and 30mm inner diameter(Di) carries liquid oxygen to the storage site of a space shuttle at temprature,T1=-182Â°C
#mass flow rate is ,mdot=0.06m**3/min.
Di=0.03;#in metre
Do=0.035;# in metre
T1=-182;
mdot=0.06;
#The ambient air is at temprature(Ta)=20Â°C and has a dew point(T3)=10Â°C.
Ta=20;
T3=10;
#The thermal conductivity(k) of insulating material is 0.02W/(m*k)
k=0.02;
#The convective heat transfer coefficient on the outside is h=17W/(m**2*K)
h=17;
#The thermal conductivity of copper kcu=400W/(m*K)
kcu=400;
#We can write Q=((Ta-T1)/(R1+R2+R3))=((Ta-T3)/(R3)),Rearranging we get ((R1+R2+R3)/(R3))=((Ta-T1)/(Ta-T3))--------eq.1
#The conduction Resistance of copper pipe(R1)=ln(0.035/0.03)/(2*math.pi*L*kcu)=3.85*10**-4/(2*math.pi*L)K/W
#The conduction resistance of insulating material (R2)=ln(r3/0.035)/(2*math.pi*L*k)=(1/(2*math.pi*L))((50*ln(r3/0.035)))K/W where r3 is the outer radius of insulation in metres.
#The convective resistance at the outer surface(R3)=1/(2*math.pi*L*h*r3)=(1/2*math.pi*L)*(mdot/r3)K/W
#Substituting the values in eq.1 we have 1+((50*ln(r3/0.035)+(3.85*10**-4))/(mdot/r3))=20-(-182)/(20-10)
#A rearrangement of the above equation gives r3*ln(r3)+3.35*r3=0.023
#The equation is solved by trial and error method which finally gives r3=0.054m
#Therefore the thickness of insulation is given by t=r3-Do
print"the thickness of insulation in metre is"
t=r3-Do
print"t=",t

Introduction to heat transfer by S.K.Som, Chapter 2, Example 10
the thickness of insulation in metre is
t= 0.019


## Ex2.11:pg-52¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 11"
#An electrical resistance wire 2.5mm or 2.5*10**-3m in diameter(D) and L=0.5m long has a measured voltage drop of E=25V for a current flow of I=40A.
D=2.5*10**-3;
I=40;
E=25;
L=0.5;
#The thermal conductivity(k) of wire material is 24W/(m*K)
k=24;
#The rate of generation of thermal energy per unit volume is given by qG=(E*I)/(L*math.pi*D**2/4)
print"The rate of heat generation of thermal energy in W/m**3 is"
qG=(E*I)/(L*math.pi*D**2/4)
print"qG=",qG
#The temprature at the centre is given by To=Tw+((qG*ro**2)/(4*k)) where Tw=650K is surface temprature
Tw=650;
print"The temprature of wire at the centre in K is "
To=Tw+((qG*ro**2)/(4*k))
#Note:The answer in the book is incorrect(value of D has been put instead of ro)
print"To=",To

Introduction to heat transfer by S.K.Som, Chapter 2, Example 11
The rate of heat generation of thermal energy in W/m**3 is
qG= 407436654.315
The temprature of wire at the centre in K is
To= 656.631455962


## Ex2.12:pg-56¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 12"
#A spherical tank of internal diameter, Di=5m ,made of t=25mm thick stainless steel(thermal conductivity,k=15W/(m*K)),is used to store water at temprature(Ti)=0Â°C.Do is outer diameter
Di=5;
t=25;
Do=5+2*(t/1000);#in metre
k=15;
Ti=0;
#The tank is located in a room whose temprature is (To)=20Â°C.
To=20;
#Emmisivity is 1.
#The convection heat transfer coefficients at the inner and outer surfaces of the tank are hi=80W/(m**2*K) and ho=10W/(m**2*K)
hi=80;
ho=10;
#The heat of fusion of ice at atmospheric pressure is deltahf=334kJ/kg.The stefan-boltzman constant(sigma) is 5.67*10**-8W/m**2.
sigma=5.67*10**-8;
deltahf=334;
#The inner surface area is (A1) and outer surface area is (A2)of the tank
print"The inner(A1) and outer surfaces(A2) areas of the tank in m**2 are"
A1=math.pi*Di**2
A2=math.pi*Do**2
#The individual thermal resistances can be determined as
#The convective resistance is (Ri)
print"The convective resistance(Ri) at the inner surface in K/W is "
Ri=1/(hi*A1)
print"Ri=",Ri
#The conduction resistance is(Rs)
print"The conduction resistance(Rs)of the tank in K/W is"
Rs=(Do-Di)/(2*k*math.pi*Di*Do)
print"Rs=",Rs
#The convective resistance is(Roc)
print"The convective resistance(Roc) at the outer surface in K/W is"
Roc=1/(ho*A2)
print"Roc=",Roc
#The radiative resistance(Ror) at the outer surface is Ror=1/(A2*hr)
#The radiative heat transfer coefficient hr is determined by hr=sigma*(T2**2+293.15**2)*(T2+293.15)
#But we do not know the outer surface temprature T2 of the tank and hence we cannot determine the value of hr.
#Therfore we adopt an iterative procedure.We assume T2=4Â°C=277.15K.Putting the value in hr=sigma*(T2**2+293.15**2)*(T2+293.15) we get
T2=277.15;
print"The radiative heat transfer coefficient hr in W/(m**2*K) is"
hr=sigma*(T2**2+293.15**2)*(T2+293.15)
print"hr=",hr
print"Therefore the radiative resistance(Ror) at the outer surface in K/W is"
Ror=1/(A2*hr)
print"Ror=",Ror
#The two parallel resistances Roc and Ror can be replaced by an equivalent resistance Ro as X=(1/Ro)=(1/Roc)+(1/Ror)
print"The equivalent resistance in K/W is"
X=(1/Roc)+(1/Ror);
Ro=1/X
print"Ro=",Ro
#Now the resistance Ri,Rs and Ro are in series an hence the total resistance becomes Rtotal=Ri+Rs+Ro
print"The total resistance in K/W is"
Rtotal=Ri+Rs+Ro
print"Rtotal=",Rtotal
#The rate of heat transfer is given by Q=(To-Ti)/Rtotal
print"The rate of heat transfer,Q in W is"
Q=(To-Ti)/Rtotal
print"Q=",Q
#The outer surface(T2) is calculated as T2=To-Q*Ro
print"The outer surface temprature in Â°C is"
T2=To-Q*Ro
print"T2=",T2
print"which is sufficiently close to the assumption.So there is no need of further iteration"
#The total heat transfer is (Qt),during a 24-hour period
print"The total heat transfer(Qt) during a 24-hour period in KJ is"
Qt=Q*24*3600/1000
print"Qt=",Qt
#the amount of ice in kG which melts during a 24 hour period is (mice)
print"Therefore,the amount of ice(mice)in kG which melts during a 24 hour period is"
mice=Qt/deltahf
print"mice=",mice

Introduction to heat transfer by S.K.Som, Chapter 2, Example 12
The inner(A1) and outer surfaces(A2) areas of the tank in m**2 are
The convective resistance(Ri) at the inner surface in K/W is
Ri= 0.000159154943092
The conduction resistance(Rs)of the tank in K/W is
Rs= 0.0
The convective resistance(Roc) at the outer surface in K/W is
Roc= 0.00127323954474
The radiative heat transfer coefficient hr in W/(m**2*K) is
hr= 5.26265474661
Therefore the radiative resistance(Ror) at the outer surface in K/W is
Ror= 0.00241938642385
The equivalent resistance in K/W is
Ro= 0.000834218925785
The total resistance in K/W is
Rtotal= 0.000993373868877
The rate of heat transfer,Q in W is
Q= 20133.406592
The outer surface temprature in Â°C is
T2= 3.2043311804
which is sufficiently close to the assumption.So there is no need of further iteration
The total heat transfer(Qt) during a 24-hour period in KJ is
Qt= 1739526.32955
Therefore,the amount of ice(mice)in kG which melts during a 24 hour period is
mice= 5208.16266333


## Ex2.13:pg-68¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 13"
#A very long,10mm diameter(D) copper rod(thermal conductivity,k=370W/(m*K))is exposed to an enviroment at temprature,Tinf=20Â°C.
D=0.01;
k=370;
Tinf=20;
#The base temprature of the radius maintained at Tb=120Â°C.
Tb=120;
#The heat transfer coefficient between the rod and the surrounding air is h=10W/(m*K**2)
h=10;
#The rate of heat transfer for all finite lengths will be given by P/A=(4*pi*D)/(pi*D**2)
#Let P/A=X
print"P/A in m**-1 is"
X=(4*math.pi*D)/(math.pi*D**2)
print"X=",X
#m is defined as ((h*p)/(k*A)]**0.5
print"m in m**-1 is"
m=(h*X/k)**0.5
print"m=",m
#Let Y=h/(m*k)
Y=h/(m*k)
#Let M=(h*P*k*A)**0.5
P=(math.pi*D);#perimeter of the rod
A=(math.pi*D**2)/4;#Area of the rod
print"M in W/K is"
M=(h*P*k*A)**0.5
print"M=",M
#thetab is the parameter that defines the base temprature
print"thetab in Â°C is "
thetab=Tb-Tinf
print"thetab=",thetab
#Heat loss from the rod is defined as Q=(h*P*k*A)*thetab*(((h/m*k)+math.tanh(m*L)]/(1+(h/m*k)*math.tanh(m*L)]}
print"Heat loss from rod in Watt, for different value of length(in m) is "
L=0.02#Length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=0.04#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=0.08#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=0.20#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=0.40#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=0.80#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=1.00#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
L=10.00#length of rod
Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))
print"Q=",Q
#For an infinitely long rod we use heat loss as ,Qinf=(h*P*k*A)**0.5*thetab
print"For an infintely long rod heat loss in W is"
Qinf=(h*P*k*A)**0.5*thetab
print"We see that since k is large there is significant difference  between the finite length and the infinte length cases"
print"However when the length of the rod approaches 1m,the result become almost same."
print"Qinf=",Qinf

Introduction to heat transfer by S.K.Som, Chapter 2, Example 13
P/A in m**-1 is
X= 400.0
m in m**-1 is
m= 3.28797974611
M in W/K is
M= 0.0955478103936
thetab in Â°C is
thetab= 100
Heat loss from rod in Watt, for different value of length(in m) is
Q= 0.705573384326
Q= 1.32655528327
Q= 2.53006298798
Q= 5.56299390901
Q= 8.29001416681
Q= 9.45769063154
Q= 9.52862252977
Q= 9.55478103936
For an infintely long rod heat loss in W is
We see that since k is large there is significant difference  between the finite length and the infinte length cases
However when the length of the rod approaches 1m,the result become almost same.
Qinf= 9.55478103936


## Ex2.14:pg-81¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 14"
#Considering two very long slender rods of the same diameter but of different materials.
#The base of each rod is maintained at 100Â°C while the surfaces of the rod are exposed to 20Â°C
#By traversing length of each rod with a thermocouple it was observed that tempratures of rod were equal at the position xA=0.15m and xB=0.075 from base.
xA=0.15;
xB=0.075;
#Thermal conductivity of rod A is known to be kA=72 W/(m*K)
kA=72;
#In case of a very long slender rod we use the tip boundary condition thetaL=0 as L--->infinity
#Therfore we can write for the locations where the tempratures are equal thetab*e**(-mA*xA)=thetab*e**(-mB*xB) or xA/xB=mB/mA,Again mB/mA=(kA/kB)**0.5
#So kB=kA*(xB/xA)**2
#The thermal conductivity of Rod B iskB
print"The thermal conductivity of Rod B kB in W/(m*K) is "
kB=kA*(xB/xA)**2
print"kB=",kB

Introduction to heat transfer by S.K.Som, Chapter 2, Example 14
The thermal conductivity of Rod B kB in W/(m*K) is
kB= 18.0


## Ex2.15:pg-83¶

In :
import math

print"Introduction to heat transfer by S.K.Som, Chapter 2, Example 15"
#A stack that is b=300mm wide and l=100mm deep contains N=60 fins each of length L=12mm.
L=0.012;#in metre
b=0.3;#in metre
l=0.1;#in metre
N=60;
#The entire stack is made of aluminum which is everywhere t=1.0 mm thick.
t=0.001;#in metre
#The temprature limitations associated with electrical components are  Tb=400K and TL=350K.
#Tb is base temprature and TL is end temprature
Tb=400;
TL=350;
#Given convection heat transfer coefficient(h=150W/(m**2*K)),Surrounding Temprature(Tinf=300K),thermal conductivity of aluminium(kaluminium=230W/(m*K))
h=150;
Tinf=300;
kal=230;
#Here both the ends of the fins are at fixed tempratures .Therefore we use M=(h*P*k*A)**0.5 and m=((h*P)/(k*A))**0.5,thetab=Tb-Tinf,thetaL=TL-Tinf
#from the given data perimeter of each fin is given by P= 2*(l+t)in m and area of each fin is A=t*l
print" perimeter of each fin in m is"
P= 2*(l+t)
print"P=",P
print"Cross sectional area of fin in m**2 is"
A=t*l
print"A=",A
#M is defined as (h*P*kal*A)**0.5 and m is defined as ((h*P)/(kal*A))**0.5
M=(h*P*kal*A)**0.5
m=((h*P)/(kal*A))**0.5
print"M=",M
print"m=",m
#thetab and thetaL are the parameters that define the fin tempratures at base and tip respectively.
print"Temprature parameter at fin base in K is"
thetab=Tb-Tinf
print"thetab=",thetab
print"Fixed temprature at fin tip in K is"
thetaL=TL-Tinf
print"thetaL=",thetaL
#Heat loss from the plate is Qb
print"Heat loss from the plate at 400K in W is"
Qb=(N*(h*P*kal*A)**0.5*thetab*((math.cosh(m*L)-(thetaL/thetab))/(math.sinh(m*L))))+(((l*b)-(N*A))*h*thetab)+(l*b*h*thetab)
print"Qb=",Qb

Introduction to heat transfer by S.K.Som, Chapter 2, Example 15
perimeter of each fin in m is
P= 0.202
Cross sectional area of fin in m**2 is
A= 0.0001
M= 0.834805366538
m= 36.2958855016
Temprature parameter at fin base in K is
thetab= 100
Fixed temprature at fin tip in K is
thetaL= 50
Heat loss from the plate at 400K in W is
Qb= 13028.1662009