In [2]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.1 ";
# ''Body temp in degree C''
Tb = 127;
#''Body temp in degree K''
TbK = Tb+273;
#''Ambient temp in degree C''
Ta = 27;
#''Ambient temp in degree K''
TaK = Ta+273;
#''Film temperature = (Body Temperature + Ambient Temperature)/2''
#''Film temp in degree K''
TfK = (TbK+TaK)/2;
#''Value of coefficient of math.expansion at this film temp in degree K inverse''
B = 1/TfK;
#''Value of Prandtl number at this film temp''
Pr = 0.71;
#''Value of kinematic vismath.cosity at this film temp in m2/s''
v = 0.0000212;
#''Value of thermal conductivity at this film temp in W/m-K''
k = 0.0291;
#''acceleration due to gravity in m/s2''
g = 9.81;
#''temperature diff. between body and ambient in degree K''
deltaT = TbK-TaK;
#''diameter of heater wire in m''
d = 0.001;
#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*d**3)/v**2)''
Ra = ((((Pr*g)*B)*deltaT)*(d**3))/(v**2);
#''From Fig. 5.3 on Page 303, we get''
#''log(Nu) = 0.12, where Nu is nusselt number, therefore''
Nu = 1.32;
#''Umath.sing Nu = hc*d/k, we get heat transfer coefficient in W/m2-K''
hc = (Nu*k)/d;
print "The rate of heat loss per meter length in air in W/m is given by hc*(A/l)*deltaT"
#heat loss per meter length in air in W/m
q = ((hc*deltaT)*math.pi)*d
print round(q,1)
#''For Co2, we evaluate the properties at film temperature''
#''Following are the values of dimensionless numbers so obtained''
#''Rayleigh number, Ra=16.90''
#''Nusselt number, Nu=1.62''
#''Umath.sing Nu = hc*d/k, we get''
#''hc = 33.2 W/m2-K''
print "The rate of heat loss per meter length in CO2 is given by hc*(A/l)*deltaT"
print "q = 10.4 W/m"
print " Discussion - For same area and temperature difference: "
print " Heat transfer by convection will be more, if heat transfer coeff. is high"
```

In [5]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.2 ";
#''Surface temp in degree C''
TsC = 130;
#''Body temp in degree K''
Ts = TsC+273;
#''Ambient temp in degree C''
TinfinityC = 20;
#''Ambient temp in degree K''
Tinfinity = TinfinityC+273;
#''Film temperature = (Surface Temperature + Ambient Temperature)/2''
#''Film temp in degree K''
Tf = (Ts+Tinfinity)/2;
#''Height of plate in cms''
L = 15;
#''Width of plate in cms''
b = 10.0;
#''Value of Grashof number at this film temp is given by
#65(L**3)(Ts-Tinfinity)''
#Grashof number
Gr = (65*(L**3))*(Ts-Tinfinity);
#''Since the grashof number is less than 10**9, therefore flow is laminar''
#''For air at film temp = 75C (348K), Prandtl number is''
Pr = 0.71;
#''And the product Gr*Pr is''
#Prodect of Gr and Pr
GrPr = Gr*Pr;
#''From Fig 5.5 on page 305, at this value of GrPr, Nusselt number is''
Nu = 35.7;
#''Value of thermal conductivity at this film temp in W/m-K''
k = 0.029;
#''Umath.sing Nu = hc*L/k, we get ''
#Heat transfer coefficient for convection in W/m2-K
hc = (Nu*k)/(L/100.0);
#''Heat transfer coefficient for radiation, hr in W/m2-K''
hr = 8.5;
#''Total area in m2 is given by 2*(b/100)*(L/100)''
A = (2*(b/100.0))*(L/100.0);
print "Therefore total heat transfer in W is given by A*(hc+hr)*(Ts-Tinfinity)"
#total heat transfer in W
q = (A*(hc+hr))*(Ts-Tinfinity)
print round(q,1)
#''For plate to be 450cm in height, Rayleigh number becomes 4.62*10**11''
#''which implies that the flow is turbulent''
#''From Fig 5.5 on page 305, at this value of GrPr, Nusselt number is 973''
#''Umath.sing Nu = hc*d/k, we get in W/m2-K, hc_bar=6.3''
#''New Total area in m2, A_bar=2*(0.1)*(4.5)''
print "Therefore in new case, total heat transfer in W is given by A_bar*(hc_bar+hr)*(Ts-Tinfinity)"
print "we get q=1465W"
print " Discussion - For same temperature difference: "
print " Heat transfer will be more, if area math.exposed for convection and radiation is more"
```

In [9]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.3 "
#''Surface temp in degree C''
TsC = 227.0;
#''Body temp in degree K'')
Ts = TsC+273;
#''Ambient temp in degree C''
TinfinityC = 27.0;
#''Ambient temp in degree K''
Tinfinity = TinfinityC+273;
#''Film temperature = (Surface Temperature + Ambient Temperature)/2''
#''Film temp in degree K'')
Tf = (Ts+Tinfinity)/2;
#''For a square plate, Height and width of plate in m''
L = 1.0;
b = 1.0;
#''For a square plate, characteristic length = surface area/parameter in m''
L_bar = (L*L)/(4.0*L);
#''Value of coefficient of math.expansion at this film temp in degree K inverse''
B = 1/Tf;
#''Value of Prandtl number at this film temp''
Pr = 0.71;
#''Value of thermal conductivity at this film temp in W/m-K''
k = 0.032;
#''Value of kinematic vismath.cosity at this film temp in m2/s''
v = 0.000027;
#''acceleration due to gravity in m/s2''
g = 9.81;
#''temperature diff. between body and ambient in degree K''
deltaT = Ts-Tinfinity;
#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*(L_bar)**3)/v**2)''
#Rayleigh number
Ra = ((((Pr*g)*B)*deltaT)*(L_bar**3))/(v**2);
#''From eq. 5.17 on page 311, we have nusselt number for bottom plate as 0.27*Pr**0.25''
NuBottom = 25.2;
#''From eq. 5.16 on page 311, we have nusselt number for top plate as 0.27*Pr**0.25''
NuTop = 63.4;
#''And therefore corresponding heat transfer coeeficients are in W/m2-K''
hcBottom = (NuBottom*k)/L_bar; #heat transfer coeeficients are in W/m2-K at bottom
hcTop = (NuTop*k)/L_bar; #heat transfer coeeficients are in W/m2-K at top
print "Therefore total heat transfer in W is given by A*(hcTop+hcBottom)*(deltaT)"
#heat transfer in W
q = ((L*b)*(hcTop+hcBottom))*deltaT
print round(q)
```

In [8]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.4 ";
#''Ambient temp in degree C''
TinfinityC = 27;
#''Ambient temp in degree K''
Tinfinity = TinfinityC+273;
#''The criterion for transition is rayleigh number to be 10**9''
#''Value of coefficient of math.expansion at this temp in degree K inverse''
B = 1/Tinfinity;
#''Value of Prandtl number at this ambient temp''
Pr = 0.71;
#''Diameter of pipe in m''
D = 1;
#''Value of kinematic vismath.cosity at this temp in m2/s''
v = 0.0000164;
#''acceleration due to gravity in m/s2''
g = 9.81;
#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*(D)**3)/v**2) = 10**9''
#''we get the temperature difference in centrigrade to be''
deltaT = 12;
print "therefore the temperature of pipe in C is"
# temperature of pipe in C
Tpipe = TinfinityC+deltaT
print round(Tpipe,2)
#''From table 13 in Appendix 2, for the case of water and umath.sing the same procedure we get''
# temperature difference in C
deltaTw = 0.05;
print "therefore the temperature of pipe in C is"
# temperature of pipe in C
Tpipew = TinfinityC+deltaTw
print round(Tpipew,2)
print " Discussion - For air and water: "
print " Temperature required to induce turbulence is higher in air"
```

In [13]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.5 ";
#''Top surface temp in degree C''
Tt = 20;
#''Body temp in degree K''
TtK = Tt+273;
#''Bottom temp in degree C''
Tb = 100;
#''Ambient temp in degree K''
TbK = Tb+273;
#''Average temp = (Bottom Temperature + top Temperature)/2''
#''average temp in degree K''
T = (TbK+TtK)/2;
#''Value of coefficient of math.expansion at this temp in degree K inverse''
B = 0.000518;
#''Value of Prandtl number at this temp''
Pr = 3.02;
#''Value of kinematic vismath.cosity at this temp in m2/s''
v = 0.000000478;
#''acceleration due to gravity in m/s2''
g = 9.8;
#''temperature diff. between body and ambient in degree K''
deltaT = TbK-TtK;
#''depth of water in m''
h = 0.08;
#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*h**3)/v**2)''
Ra = ((((Pr*g)*B)*deltaT)*(h**3))/(v**2);
#''From Eq. (5.30b) on page 318, we find''
#Nusselt number
Nu = 79.3;
#''Value of thermal conductivity at this film temp in W/m-K''
k = 0.657;
#''Umath.sing Nu = hc*d/k, we get heat transfer coefficient in W/m2-K''
hc = (Nu*k)/h;
#''diameter of pan in m''
d = 0.15;
#''area = pi*d*d/4''
a = ((math.pi*d)*d)/4;
print "The rate of heat loss in W is given by hc*(A)*deltaT"
#heat loss in W
q = (hc*deltaT)*a
print int(q)
```

In [14]:

```
print "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.6 ";
#''RPM of shaft''
N = 3;
#''Angular velocity, omega=2*pi*N/60 in rad/s''
omega = 0.31;
#''Ambient temp in degree C''
Ta = 20;
#''Ambient temp in degree K''
TaK = Ta+273;
#''Shaft temp in degree C''
Ts = 100;
#''Shaft temp in degree K''
TsK = Ts+273;
#''Film temperature = (Shaft Temperature + Ambient Temperature)/2''
#''Film temp in degree K''
TfK = (TsK+TaK)/2;
#''diameter of shaft in m''
d = 0.2;
#''Value of kinematic vismath.cosity at this film temp in m2/s''
v = 0.0000194;
#''Value of reynolds number''
Re = (((math.pi*d)*d)*omega)/v;
#''acceleration due to gravity in m/s2''
g = 9.81;
#''temperature diff. between body and ambient in degree K''
deltaT = TsK-TaK;
#''Value of Prandtl number at this film temp''
Pr = 0.71;
#''Value of coefficient of math.expansion at this film temp in degree K inverse''
B = 1/TfK;
#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*d**3)/v**2)''
#Rayleigh number
Ra = ((((Pr*g)*B)*deltaT)*(d**3))/(v**2);
#''From Eq. 5.35 on Page 322, we get''
#Nusselt number
Nu = 49.2;
#''Value of thermal conductivity at this film temp in W/m-K''
k = 0.0279;
#''Umath.sing Nu = hc*d/k, we get in W/m2-K''
hc = (Nu*k)/d;
#''let the length math.exposed to heat transfer is l=1m''
#''then area in m2 = pi*d*l''
a = math.pi*d;
print "The rate of heat loss in air in W is given by hc*(a)*deltaT"
#heat loss in air in W
q = (hc*deltaT)*a
print round(q)
```