Chapter3: Convection

Example no:3.1,Page no:3.44

In [1]:
#Boundary layer thickness

#Variable declaration
mu=10**-3        #N.s/m**2
#At distance y from surface
#ux=a+by+cy**2+dy**3
#At y=0,ux=0 therefore a=0
#i.e tao=0
#At edge of boundary layer,ie y=del
#ux=u_inf
#At y=o,c=0
#At y=del,ux=b*del+d*del**3

#Therefore, b=-3*d*del**3
#d=-u_inf/(2*del**2)
#b=3*u_inf/(2*del)

#For velocity profile,we have:
#del/x=4.64*(Nre_x)**(-1/2)

#Evaluate N re_x

x=75.0         #[mm]
x=x/1000         #[m]
u_inf=3.0             #[m/s]
rho=1000.0            #[kg/m**3] for air

#Calculation
Nre_x=u_inf*rho*x/mu        #Reynold number
#Substituting the value,we get
dell=x*4.64*(Nre_x**(-1.0/2.0))       #[m]

#Result
print"Boundary layer thickness is del=",round(dell,6),"m or ",round(dell*1000,3),"mm"
print"Wrong units in answer of book,m and mm are wrongly interchanged"
Boundary layer thickness is del= 0.000734 m or  0.734 mm
Wrong units in answer of book,m and mm are wrongly interchanged

Example no:3.2,Page no:3.45

In [144]:
#Boundary layer thickness of plate

#Variable declaration
mu=15*10**-6    #sq m /s
v=2    #m/s
L=2    #[m] length of plate
Nre_x=3*10**5

#Calculation

xc=Nre_x*mu/v    #critical length at whihc the transition takes place
#Since xc is less than 2 m.Therefore the flow is laminar
#at any distance x,.it is calculated from
#del/x=4.64/(math.sqrt(NRe,x))
#At x=L=2 m
Nre_l=v*L/mu
del_l=4.64*L/math.sqrt(Nre_l)
del_l=del_l*1000    #[mm]

#Result
print"Boundary layer thickness at the trailing edge is",round(del_l),"mm"
Boundary layer thickness at the trailing edge is 18.0 mm

Example no:3.3,Page no:3.45

In [2]:
#Thickness of hydrodynamic boundary layer

#Variable declaration
mu=15*10**-6    #Kinematic viscosity in [sq m /s]
x=0.4    #[m]
u_inf=3    #[m/s]


#Calculation
#At x=0.4 m,
Nre_x=u_inf*x/mu     
import math
dell=4.64*x/math.sqrt(Nre_x)    #[m]
dell=dell*1000    #[mm]
Cf_x=0.664/math.sqrt(Nre_x) 

#Result
print"Since Nre,x(",Nre_x,")is Less than 3*10**5,..the boundary layer is laminar"
print"Thickness of boundary layer at x=",x,"m",round(dell,2),"mm" 
print"Local skin friction coefficient is :",round(Cf_x,4)
Since Nre,x( 80000.0 )is Less than 3*10**5,..the boundary layer is laminar
Thickness of boundary layer at x= 0.4 m 6.56 mm
Local skin friction coefficient is : 0.0023

Example no:3.4,Page no:3.46

In [3]:
#Flat plate boundary layer

import math
from scipy import integrate

#Variable declaration
mu=1.85*10**-5           #[kg/(m.s)]
P=101.325                #Pressure in [kPa]
M_avg=29.0                 #Avg molecular wt of air
R=8.31451                #Gas constant
T=300.0                    #[K]

#Calculation
rho=P*M_avg/(R*T)   #[kg/m**3]
u_inf=2.0             #Viscosity in [m/s]
#At x=20 cm =0.2 m
x=0.2                    #[m]
Nre_x=rho*u_inf*x/mu     #[Reynolds number]
del_by_x=4.64/math.sqrt(Nre_x)   #[Boundary layer]
dell=del_by_x*x              #[m]
#del=del*1000                #[mm]

#At
x=0.4           #[m]
Nre_x=(rho*u_inf*x)/mu      #<3*10**5
#Boundary layer is laminar
del_by_x=4.64/math.sqrt(Nre_x)   
del1=del_by_x*x              #[m]
#del1=del1*1000                #[mm]
d=del1-dell                      #Del 
def f(y):
    m_dot=u_inf*(1.5*(y/d)-0.5*(y/d)**3)*rho
    return(m_dot)
m_dot=integrate.quad(f,0,d)


#Result
print"Boundary layer thickness at distance 20 cm from leading edge is",round(dell,4),"m=",round(dell*1000,1),"mm"
print"Boundary layer thickness at distance 40 cm from leading edge is",round(del1,4),"m=",round(del1*1000,1),"mm"
print"Thus,Mass flow rate entering the boundary layer is",round(m_dot[0],6),"kg/s"
Boundary layer thickness at distance 20 cm from leading edge is 0.0058 m= 5.8 mm
Boundary layer thickness at distance 40 cm from leading edge is 0.0082 m= 8.2 mm
Thus,Mass flow rate entering the boundary layer is 0.003547 kg/s

Example no:3.5,Page no:3.47

In [4]:
#Rate of heat removed from plate

#Variable declaration
mu=3.9*10**-4    #Kinematic viscosity in sq m/s
k=36.4*10**-3    #Thermal conductivity in W/(m.K)
Npr=0.69
u_inf=8    #[m/s]
L=1    #Lenght of plate in [m]
import math

#Calculation
Nre_l=u_inf*L/mu 
#Since Nre_l is less than 3*10**5 ,the flow is laminar over the entire length of plate
Nnu=0.664*math.sqrt(Nre_l)*Npr**(1.0/3.0)    #=hL/k
h=k*Nnu/L    #w/sq m.K
h=3.06      #Approximation   [W/sq m.K]
T_inf=523    #[K]
Tw=351    #[K]
W=0.3    #Width of plate [m]
A=W*L    #Area in [sq m]
Q=h*A*(T_inf-Tw)    # Rate of heat removal from one side in [W]
#from two side:
Q2=2*Q    #[W]

#Result
print"Rate of heat removal is",round(Q,1),"W"
print round(Q2,1)," W heat should be removed continously from the plate"
Rate of heat removal is 157.9 W
315.8  W heat should be removed continously from the plate

Example no:3.6,Page no:3.48

In [158]:
#Heat removed from plate

#Variable declaration
P1=101.325    #Pressure in [kPa]
mu1=30.8*10**-6    #Kinematic viscosity in[sq m /s]
k=36.4*10**-3    #[W/(m.K)]
Npr=0.69
u_inf=8    #Velocity in [m/s]
Cp=1.08    #kJ/(kg.K)
L=1.5    #Length of plate in [m]
W=0.3    #Width in [m]
A=L*W    #Area in [sq m]

#Calculation
import math
#At constant temperature: mu1/mu2=P2/P1
P2=8     #[kPa]
mu2=mu1*P1/P2    #Kinematic viscosity at P2 in [sq m/s]
Nre_l=u_inf*L/mu2    #Reynold's no.
#Since this is less than 3*10**5
Nnu=0.664*math.sqrt(Nre_l)*(Npr**(1.0/3.0))
h=Nnu*k/L  # Heat transfer coeffficient in [W/sq m.K]
h=round(h,1)

T_inf=523    #[K]
Tw=353    #[K]
Q=2*h*A*(T_inf-Tw)    #Heat removed from both sides in [W]

#Result
print"Rate of heat removed from both sides of plate is",Q,"W"
Rate of heat removed from both sides of plate is 382.5 W

Example no:3.7,Page no:3.49

In [160]:
#Local heat transfer coefficient

#Variable declaration
rho=0.998    #kg/cubic m
v=20.76*10**-6    #[sq m/s]
Cp=1.009    #[kJ/kg.K]
k=0.03    #[W/m.K]
u_inf=3    #[m/s]
x=0.4    #[m]
w=1.5    #[m]

#Calculation
Nre_x=u_inf*x/v    #Reynolds no at x=0.4 m
#Since this is less than 3*10**5.The flow is laminar upto x=0.4 m
mu=rho*v  #[kg/(m.s)]
import math
Cp=1.009    #[kJ/kg.K]
Cp=Cp*1000    #[J/kg.K]
k=0.03    #W/(m.K)
Npr=Cp*mu/k
Nnu_x=0.332*(math.sqrt(Nre_x))*(Npr**(1.0/3.0))
hx=Nnu_x*k/x    #[W/(m.K)]
#Average value is twice this value
h=round(2*hx,1)    #[W/(m.K)]
A=x*w    #Area in [sq m]
Tw=407    #[k]
T_inf=293    #[K]
Q=h*A*(Tw-T_inf)     #[W]
#From both sides of the plate:
Q=2*Q    #[W]
#Result
print"The heat transferred from both sides of the plate is",round(Q),"W"
The heat transferred from both sides of the plate is 1450.0 W

Example no:3.8,Page no:3.50

In [161]:
#Width of plate
import math

#Variable declaration
rho=0.998    #[kg/cubic m]
v=20.76*10**-6    #[sq m/s]
k=0.03    #[W/m.K]
Npr=0.697
x=0.4    #[m] from leading edge of the plate
u_inf=3    #[m/s]

#Calculation
Nre_x=u_inf*x/v    #Reynold numebr at x=0.40 m
#Since this is less than 3*10**5    
#therefore flow is laminar and 
Nnu_x=0.332*math.sqrt(Nre_x)*(Npr**(1.0/3.0)) 
hx=Nnu_x*k/x    #[W/sq m.K]
#Average heat tarnsfer coefficient is twice this value
h=2*hx    #[W/sq m.K]
#Given:
Q=1450    #[W]
Tw=407    #[K]
T_inf=293    #[K]
L=0.4    #[m]
#Q=h*w*L*(Tw-T_inf)
#L=Q/(h*w*(Tw-T_inf))
w=Q/(h*L*(Tw-T_inf))    #[m]

#Result
print"Width of plate is",round(w),"m"
Width of plate is 3.0 m

Example no:3.9,Page no:3.51

In [163]:
#Heat transferred in flat plate

#Variable declaration
v=17.36*10**-6    #Viscosity for air    [sq m./s]
k=0.0275    #for air ..[W/(m.K)]
Cp=1.006    #[kJ/(kg.K)]
Npr=0.7    #for air
u_inf=2    #[m/s]
x=0.2    #[m]

#Calculation
Nre_x=u_inf*x/v    #Reynolds number at x=0.2    m
#Since this is less than 3*10**5
import math
Nnu_x=0.332*math.sqrt(Nre_x)*(Npr**(1.0/3.0))
hx=Nnu_x*k/x    #[W/(sq m.K]
#Average value of heat transfer coeff is twice this value
h=round(2*hx,1)    #[W/sq m.K)]
w=1    #width in [m]
A=x*w    #[sq m] Area of plate
Tw=333    #[K]
T_inf=300    #[K]
Q=h*A*(Tw-T_inf)    #Heat flow in [W]

#Result
print"Heat flow is :",Q,"W"
#From both sides of plate:
Q=2*Q    #[W]
print"Heat flow from both sides of plate is",Q,"W"
 
Heat flow is : 81.18 W
Heat flow from both sides of plate is 162.36 W

Example no:3.10,Page no:3.51

In [165]:
#Rate of heat transferred in turbulent flow

#Variable declaration
v=16.96*10**-6    #[sq m./s]
rho=1.128    #[kg/cubic m]
Npr=0.699    #Prandtl number
k=0.0276    #[W/m.K]
u_inf=15    #[m/s]
L=0.2    #[m]

#Calculation
Nre_l=L*u_inf/v    #Reynold's number
import math

#Since this is less than 3*10**5,the boundary layer is laminar over entire length
Nnu=0.664*math.sqrt(Nre_l)*(Npr**(1.0/3.0))
h=Nnu*k/L    #[W/sq m.K]
A=L**2    #Area in [sq m]
Tw=293    #[K]
T_inf=333    #[K]
#Rate of heat transfer from BOTH sides is:
Q=2*h*A*(T_inf-Tw)    #[W]
print"Rate of heat transfer from both sides of plate is",round(Q,1),"W\n"
#ii-With turbulent boundary layer from the leading edge:
h=k*0.0366*(Nre_l**(0.8))*(Npr**(1.0/3.0))/L       #[W/(sq m.K)]
#Heat transfer from both sides is :
Q=2*h*A*(T_inf-Tw)            #[W]
print "With turbulent boundary layer,\nRate of heat transfer from both sides of the plate=",round(Q,1)
print"\nThese calculations show that the that transfer rate is approximately doubled if boundary layer is turbulent from the leading edge \n"
Rate of heat transfer from both sides of plate is 109.4 W

With turbulent boundary layer,
Rate of heat transfer from both sides of the plate= 226.4

These calculations show that the that transfer rate is approximately doubled if boundary layer is turbulent from the leading edge 

Example no:3.11,Page no:3.52

In [169]:
#Heat transfer from plate in unit direction

#Variable declaration
mu=1.906*10**-5    #[kg/(m.s)]
k=0.02723    #W/m.K
Cp=1.007    #[kJ/(kg.K)]
rho=1.129    #[kg/cubic m]
Npr=0.70
Mavg=29
u_inf=35    #[m/s]
L=0.75    #[m]
Tm=313    #[K]
P=101.325    #[kPa]

#Calculation
Nre_l=rho*u_inf*L/mu    #Reynold's number >5*10**5
Nnu=0.0366*Nre_l**(0.8)*Npr**(1.0/3.0) 
h=Nnu*k/L    #[W/s m.K]
A=1*L    #[sq m]
Tw=333    #[K]
T_inf=293    #[K]
Q=h*A*(Tw-T_inf)     #[W]

#Result
print"Heat transfer from the plate is",round(Q,1),"W(approx)"
Heat transfer from the plate is 3179.2 W(approx)

Example no:3.12,Page no:3.53

In [170]:
#Heat lost by sphere
import math

#Variable declaration
v=18.23*10**-6    #sq m/s
k=0.02814    #[W/m.K]
D=0.012    #[m]
r=0.006    #[m]
u_inf=4    #[m/s]

#Calculation
Nre=D*u_inf/v    #Reynold's number
Nnu=0.37*Nre**(0.6) 
h=Nnu*(k/D)    
A=4*math.pi*r**2    #Area of sphere in [sq m]
Tw=350    #[K]
T_inf=300    #[K]
Q=h*A*(Tw-T_inf)    #Heat lost by sphere in [W]

#Result
print"Heat lost by sphere is",round(Q,2),"W"
Heat lost by sphere is 2.21 W

Example no:3.13,Page no:3.53

In [171]:
#Heat lost by sphere

#Variable declaration
v=15.69*10**-6    #[sq m./s]
k=0.02624    #[W/m.K]
Npr=0.708    #Prandtl number
mu=2.075*10**-5    #kg/m.s
u_inf=4    #[m/s]
mu_inf=1.8462*10**-5    #[m/s] velocity
Tw=350    #[K]
T_inf=300    #[K]
D=0.012    #[m]
r=D/2    #Radius in [m]

#Calculation
Nre=u_inf*D/v    #Reynold's numbe
Nnu=2+(0.4*Nre**(1.0/2.0)+0.06*Nre**(2.0/3.0))*Npr**(0.4)*(mu_inf/mu)**(1.0/4.0)
h=Nnu*k/D    #[W/sq m.K]
import math
A=4*math.pi*r**2    #Area in [sq m]
Q=h*A*(Tw-T_inf) 

#Result
print"\n Heat lost by the sphere is",round(Q,3),"W"
 Heat lost by the sphere is 1.554 W

Example no:3.14,Page no:3.54

In [4]:
#Percent power lost in bulb
#Variable declaration
v=2.08*10**-5    #[sq m/s]
k=0.03    #W/(m.K)
Npr=0.697    #Prandtl number
D=0.06    #[m]
u_inf=0.3    #[m/s]

#Calculation
Nre=D*u_inf/v    #Reynolds number
#Average nusselt number is given by:
Nnu=0.37*(Nre**0.6) 
h=Nnu*k/D    #W/sq m.K
Tw=400    #[K]
T_inf=300    #[K]
D=0.06    #[m]
r=0.03    #[m]
import math
A=4*math.pi*r**2    #Area in [sq m]
Q=h*A*(Tw-T_inf)    #[W]
per=Q*100/100    #Percent of heat lost by forced convection

#Result
print"Heat transfer rate is",round(Q,2),"W,And percentage of power lost by convection is:",round(per,2),"%" 
 
Heat transfer rate is 12.1 W,And percentage of power lost by convection is: 12.1 %

Example no:3.15,Page no:3.55

In [181]:
 
#Heat lost by cylinder  
u_inf=50    #velocity in [m/s]
mu=2.14*10**-5    #[kg/(m.s)]
rho=0.966    #[kg/cubic m]
k=0.0312    #[W/(m.K)]
Npr=0.695    #Prandtl number
D=0.05    #Diameter in [m]
Nre=D*u_inf*rho/mu    #Reynold's number
Nnu=0.0266*Nre**0.805*Npr**(1.0/3.0) 
h=round(Nnu*k/D,1)     #W/sq m.K
Tw=423    #[K]
T_inf=308    #[K]
import math
#Heat loss per unit length is :
Q_by_l=h*math.pi*D*(Tw-T_inf)   #[W]

#Result
print"Heat lost per unit length of cylinder is",round(Q_by_l),"W" 
Heat lost per unit length of cylinder is 3102.0 W

Example no:3.16,Page no:3.55

In [186]:
#Heat transfer in tube

#Variable declaration
v=20.92*10**-6    #sq m/s
k=3.0*10.0**-2    #W/(m.K)
Npr=0.7
u_inf=25.0    #[m/s]
d=50.0    #[mm]
d=d/1000    #[m]
Nre=u_inf*d/v    #Reynold's number
Tw=397.0    #[K]
T_inf=303.0    #[K]


#Calculation
import math
#Case 1: Circular tube
Nnu=0.0266*Nre**(0.805)*Npr**(1.0/3.0) 
h=Nnu*k/d    #[W/sq m.K]
A=math.pi*d    #Area in [sq m]
Q=h*A*(Tw-T_inf)    #[W]
Q_by_l1=h*math.pi*d*(Tw-T_inf)    #[W/m]

#Case 2:Square tube
A=50.0*50.0    #Area in [sq mm]
P=2.0*(50.0+50.0)    #Perimeter [mm]
l=4.0*A/P       #[mm]
l=l/1000        #[m]
Nnu=0.102*(Nre**0.675)*(Npr**(1.0/3.0))
h=Nnu*k/d    #W/(sq m.K)
A=4*l*l        #[sq m]

Q=h*A*(Tw-T_inf)
Q_by_l2=Q/l    #[W/m]


#Result

print"Rate of heat flow from the circular pipe is",round(Q_by_l1,1),"W/m" 
print"Rate of heat flow from the square pipe=",round(Q_by_l2,1),"W/m"
print"Hence rate of heat flow from square pipe is more than that from circular pipe"
Rate of heat flow from the circular pipe is 1464.2 W/m
Rate of heat flow from the square pipe= 1711.2 W/m
Hence rate of heat flow from square pipe is more than that from circular pipe

Example no:3.17,Page no:3.63

In [188]:
#Heat transfer coefficient

#Variable declaration
mu=0.8    #Viscosity of flowing fluid [N.s/sq m]
rho=1.1    #Density of flowinf fluid [g/cubic cm]
rho=rho*1000    #Density in [kg/cubic m]
Cp=1.26    #Specific heat [kJ/kg.K]
Cp=Cp*10**3    # in[J/(kg.K)]
k=0.384    #[W/(m.K)]
mu_w=1.0    #Viscosity at wall temperature [N.s/sq m]
L=5.0    #[m]
vfr=300.0    #Volumetric flow rate in [cubic cm/s]
vfr=vfr*10.0**-6    #[cubic m/s]
mfr=vfr*rho    #Mass flow rate of flowinf fluid [kg/s]
Di=20.0    #Inside diameter in[mm]
Di=Di/1000    #[m]


#Calculation
import math
Area=(math.pi/4)*Di**2    #Area of cross-section [sq m]
u=vfr/Area    #Veloctiy in [m/s]
Nre=Di*u*rho/mu    #Reynold's number
#As reynold's number is less than 2100,he flow is laminar
Npr=Cp*mu/k    #Prandtl number
Nnu=1.86*(Nre*Npr*Di/L)**(1.0/3.0)*(mu/mu_w)**(0.14)
hi=Nnu*k/Di    #inside heat transfer coefficient [W/sq m.K]

#Result
print"Inside heat transfer coefficient is",round(hi),"W/(sq m.K)"
#Note:
print"NOTE:The answer given in book..ie 1225 is wrong.please redo the calculation of last line manually to check\n"
Inside heat transfer coefficient is 225.0 W/(sq m.K)
NOTE:The answer given in book..ie 1225 is wrong.please redo the calculation of last line manually to check

Example no:3.18,Page no:3.64

In [5]:
#Heat transfer coefficient in heated tube

#Variable declaration
m=5500.0    #Mass flow rate in [kg/h]
m=m/3600.0    #[kg/s]
rho=1.07    #Density of fluid in [g/cm**3]
rho=rho*1000    #[kg/m**3]
vfr=m/rho    #Volumetric flow rate in [m**3/s]
Di=40.0    #Diameter of tube [mm]
Di=Di/1000    #[m]
import math

#Calculation
A=(math.pi/4)*Di**2    #Area of cross-section in [sq m]
u=vfr/A    #Velocity of flowing fluid    [m/s]
rho=1070.0    #Density in [kg/m**3]
mu=0.004    #Viscosity in [kg/m.s]
Nre=Di*u*rho/mu
Nre=12198.0       #Approx
#Since this reynold's number is less than 10000,the flow is turbulent
Cp=2.72    #Specific heat in [kJ/kg.K]
Cp=Cp*10**3    #Specific heat in [J/kg.K]
k=0.256    #thermal conductivity in [W/m.K]
Npr=Cp*mu/k    #Prandtl number
Nnu=0.023*(Nre**0.8)*(Npr**0.4)    #Nusselt number
hi=k*Nnu/Di    #Inside heat transfer coefficient in [W/m**2.K]

#Result
print"Inside heat transfer coefficient is ",round(hi,1),"W/sq m.K"
Inside heat transfer coefficient is  1225.4 W/sq m.K

Example no:3.19,Page no:3.66

In [1]:
#h of water flowing in tube

#Variable declaration
rho=984.1    #Density of water [kg/m**3]
Cp=4187.0    #Specific heat in [J/kg.K]
mu=485.0*10**-6    #Viscosity at 331 K[Pa.s]
k=0.657    #[W/(m.K)]
mu_w=920.0*10**-6    #Viscosity at 297 K [Pa.s]


#Calculation
D=16.0    #Diameter in [mm]
D=D/1000    #Diameter in [m]
u=3.0    #Velocity in [m/s]
rho=984.1    #[kg/m**3]
Nre=D*u*rho/mu    #Reynolds number
Nre=round(Nre)
Npr=Cp*mu/k    #Prandtl number

#Dittus-Boelter equation (i)
Nnu=0.023*(Nre**0.8)*(Npr**0.3)    #nusselt number
h=k*Nnu/D    #Heat transfer coefficient [W/m**2.K]

#Result
print"ANSWER-(i) \nBy Dittus-Boelter equation we get h=",round(h,1),"W/sq m.K"
#sieder-tate equation (ii)
Nnu=0.023*(Nre**0.8)*(Npr**(1.0/3.0))*((mu/mu_w)**0.14)    #Nusselt number
h=k*Nnu/D    #Heat transfer coefficient in [W/sq m.K]
print"Answer-(ii)\nBy Sieder-Tate equation we get h=",round(h,2),"W/sq m.K"
print"\nNOTE:Calculation mistake in book in part 2 ie sieder tate eqn"
ANSWER-(i) 
By Dittus-Boelter equation we get h= 12972.6 W/sq m.K
Answer-(ii)
By Sieder-Tate equation we get h= 12315.04 W/sq m.K

NOTE:Calculation mistake in book in part 2 ie sieder tate eqn

Example no:3.20,Page no:3.67

In [6]:
#Overall heat transfer coefficient

#Variable declaration
m_dot=2250    #Mass flow arte in [kg/h]
Cp=3.35    #Specific heat in [kJ/(kg.K)]
dT=316-288.5    #Temperature drop for oil    [K]
Q=Cp*m_dot*dT    #Rate of heat transfer in [kJ/h]
Q=round(Q*1000/3600)    #[J/s] or[W]
Di=0.04    #Inside diameter [m]
Do=0.048    #Outside diamter in [m]
hi=4070    #for steam [W/sq m.K]
ho=18.26    #For oil [W/sq m.K]
Rdo=0.123    #[sq m.K/W]
Rdi=0.215    #[sq m.K/W]

#Calculation
Uo=1.0/(1.0/ho+Do/(hi*Di)+Rdo+Rdi*(Do/Di))    #[W/m**2.K]
Uo=2.3
import math
dT1=373-288.5    #[K]
dT2=373-316    #[K]
dTm=(dT1-dT2)/math.log(dT1/dT2)    #[K]
Ao=Q/(Uo*dTm)    #Heat transfer area in [m**2]

#Result
print"Heat transfer area is:",round(Ao,1),"m**2"
Heat transfer area is: 358.4 m**2

Example no:3.21,Page no:3.68

In [123]:
#Number of tubes in exchanger
import math

#Variable declaration
k_tube=111.65    #[W/m.K]
W=4500.0    #[kg/h]
rho=995.7    #[kg/sq m]
Cp=4.174    #[kJ/(kg.K)]
k=0.617    #[W/(m.K)]
v=0.659*10**-6    #Kinematic viscosity [sq m/s]
m_dot=1720.0    #kg/h
T1=293.0    #Initial temperature in [K]
T2=318.0    #Final temperature in [K]


#Calculation
dT=T2-T1    #[K]
Q=m_dot*Cp*dT    #Heat transfer rate in [kJ/h]
Q=Q*1000.0/3600.0    #[J/s] or [W]
Di=0.0225    #[m]
u=1.2    #[m/s]
#Nre=Di*u*rho/mu or
Nre=Di*u/v    #Reynolds number
#As Nre is greater than 10000,Dittus Boelter equation is applicable
Cp=Cp*10**3    #J/(kg.K)
mu=v*rho    #[kg/(m.s)]
Npr=Cp*mu/k    #Prandtl number
#Dittus-Boelter equation for heating is 
Nnu=0.023*(Nre**0.8)*(Npr**0.4)
hi=k*Nnu/Di    #Heat transfer coefficient  [W/(sq m.K)]
Do=0.025    #[m]
Dw=(Do-Di)/math.log(Do/Di)    #math.log mean diameter in [m]
ho=4650.0    #[W/sq m.K]
k=111.65    #[W/m.K]
xw=(Do-Di)/2    #[m]
Uo=1.0/(1.0/ho+Do/(hi*Di)+xw*Do/(k*Dw))    #Overall heat transfer coefficient in W/(m**2.K)
T_steam=373.0    #Temperature of condensing steam in [K]
dT1=T_steam-T1+10    #[K]
dT2=T_steam-T2+10    #[K]
dTm=(dT1-dT2)/math.log(dT1/dT2)    #[K]
Ao=Q/(Uo*dTm)#Area in [m**2]
L=4.0    #length of tube [m]
n=Ao/(math.pi*Do*L)    #number of tubes


#Result
print"No. of tubes required=",round(n) 
print"\nNOTE: there is an error in book in calculation of dT1 and dT2,\n373-293 is written as 90,instead of 80...similarly in dT2,\nSo,in compliance with the book,10 is added to both of them"
No. of tubes required= 1.0

NOTE: there is an error in book in calculation of dT1 and dT2,
373-293 is written as 90,instead of 80...similarly in dT2,
So,in compliance with the book,10 is added to both of them

Example no:3.22,Page no:3.71

In [196]:
#Convective film coefficient
import math

#Variable declaration
m_dot=25000    #massflow rate of water [kg/h]
rho=992.2    #[kg/m**3]
k=0.634    #[W/m.K]
vfr=m_dot/rho    #[m**3/h]
Npr=4.31    #Prandtl numberl
Di=50    #[mm]
Di=0.05    #[m]
dT=10    #[K] as the wall is at a temperature of 10 K above the bulk temperature

#Calculation
u=round((vfr/3600)/(math.pi*(Di/2)**2),2)    #Velocity of water in [m/s]
#Nre=Di*u*rho/mu=Di*u/v    as v=mu/rho
v=0.659*10**-6     #[m**2/s]
Nre=Di*u/v    #Reynolds number
#As it is less than 10000,the flow is in the turbulent region for heat transfer and Dittus Boelter eqn is used
Nnu=0.023*(Nre**0.8)*(Npr**0.4)     #Nusselt number
hi=Nnu*k/Di    #Heat transfer coefficiet in [W/sq m.K]
q_by_l=hi*math.pi*Di*dT   #Heat transfer per unit length[kW/m]

#Result
print"Average value of convective film coefficient is hi=",round(hi)," W/sq m.K"
print"Heat transferred per unit length is Q/L=",round(q_by_l/1000,1),"kW/m"
 
Average value of convective film coefficient is hi= 11584.0  W/sq m.K
Heat transferred per unit length is Q/L= 18.2 kW/m

Example no:3.23,Page no:3.72

In [7]:
#Length of tube
import math

#Variable declaration
vfr=1200.0     #Water flow rate in [l/h]
rho=0.98     #Density of water in g/[cubic cm]
m_dot=vfr*rho    #Mass flow rate of water [kg/h]
m_dot2=m_dot/3600.0    #[kg/s]
Cp=4.187*10**3     #[J/kg.K]
Di=0.025     #Diameter in [m]
mu=0.0006     #[kg/(m.s)]

#Calculation
Ai=math.pi*((Di/2)**2)    #Area of cross-section in [m**2]
Nre=(Di/mu)*(m_dot2/Ai)    #Reynolds number
k=0.63   #for metal wall in [W/(m.K)]
Npr=Cp*mu/k     #Prandtl number
#Since Nre>10000
#therefore ,Dittus boelter eqn for heating is 
Nnu=0.023*(Nre**(0.8))*(Npr**(0.4))
ho=5800.0     #Film heat coefficientW/(m**2.K)
hi=Nnu*k/Di    #Heat transfer coeffcient in [W/(sq m.K)]
Do=0.028     #[m]
Di=0.025     #[m]
xw=(Do-Di)/2     #[m]
Dw=(Do-Di)/math.log(Do/Di)     #[m]
k=50.0     #for metal wall in [W/(m.K)]
Uo=1.0/(1.0/ho+Do/(hi*Di)+xw*Do/(k*Dw))     #in [W/sq m.K]
dT=343.0-303.0   #[K]
dT1=393.0-303.0     #[K]
dT2=393.0-343.0     #[K]
dTm=(dT1-dT2)/math.log(dT1/dT2)     #[K]
Cp=Cp/1000.0   #[in [kJ/kg.K]]
Q=m_dot*Cp*dT     #Rate of heat transfer in [kJ/h]
Q=Q*1000.0/3600.0     #[J/s] or [W]
Ao=Q/(Uo*dTm)     #Heat transfer area in [sq m]
#Also,..Ao=math.pi*Do*L    ..implies that
L=Ao/(math.pi*Do)    #[m]

#Result
print"Length of tube required is",round(L),"m"
Length of tube required is 5.0 m

Example no:3.24,Page no:3.73

In [8]:
#Cooling coil
#1.For initial conditions:
import math
from scipy.optimize import fsolve

#Variable declaration
T=360            #[K]
T1=280          #[K]
T2=320          #[K]
dT1=T-T1        #[K]
dT2=T-T2        #[K]

#Calculation
#Q1=m1_dot*Cp1*(T2-T1)
Cp1=4.187           #Heat capacity 
dTlm=(dT1-dT2)/math.log(dT1/dT2) #[K]
m1_by_UA=dTlm/(Cp1*(T2-T1)) 
#For final conditions :
#m2_dot=m1_dot
#U2=U1
#A2=5*A1
def f(t):
    x=m1_by_UA*Cp1*(t-T1)-5*((dT1-(T-t))/math.log(dT1/(T-t)))
    return(x)
T=fsolve(f,350.5)

#Result
print"Outlet temperature of water is",T[0],"K"
Outlet temperature of water is 357.5 K

Example no:3.25,Page no:3.74

In [199]:
#Outlet temperature of water
import math


#Variable declaration
mo_dot=60.0   #Mass flow rate of oilin [g/s]
mo_dot=6.0*10**-2  #[kg/s]
Cpo=2.0     #Specific heat of oil in [kJ/(kg.K)]
T1=420.0  #[K]
T2=320.0  #[K]

#Calculation
Q=mo_dot*Cpo*(T1-T2)    #Rate of heat flow in [kJ/s]
mw_dot=mo_dot   #Mass flow rate of water   #kg/s
t1=290.0 #[K]
Cpw=4.18    #[kJ/(kg.K)]
#For finding outlet temperature of water
t2=t1+Q/(mw_dot*Cpw)    #[K]
dT1=T1-t2   #[K]
dT2=T2-t1   #[K]
dTm=(dT1-dT2)/math.log(dT1/dT2)  #[K]
ho=1.6  #Oil side heat transfer coefficient in [kW/(sq m.K)]
hi=3.6  #Water side heat transfer coeff in [kW/(sq m.K)]
#Overall heat transfer coefficient is:
U=1.0/(1.0/ho+1.0/hi) #[kW/(m**2.K)]
A=Q/(U*dTm) #[sq m]
Do=25.0   #[mm]
Do=Do/1000  #[m]
L=A/(math.pi*Do)    #Length of tube in [m]

#Result
print"Outlet temperature of water is:",round(t2),"K" 
print"Area of heat transfer required is",round(A,2),"m^2"
print"Length of tube required is",round(L,2),"m"
Outlet temperature of water is: 338.0 K
Area of heat transfer required is 0.21 m^2
Length of tube required is 2.66 m

Example no:3.26,Page no:3.76

In [200]:
#Inside heat transfer coefficient
import math

#Variable declaration
k=0.14  # for oil[W/m.K]
Cp=2.1 # for oil [kJ/kg.K]
Cp=Cp*10**3  #J/kg.K
mu=154  #[mN.s/sq m]
mu_w=87 #(mn.s/sq m)
L=1.5   #[m]
m_dot=0.5   #Mass flow rate of oil[kg/s]
Di=0.019 #Diameter of tube [m]
mean_T=319  #Mean temperature of oil [K]

#Calculation
mu=mu*10**-3 #[N.s/sq m] or [kg/(m.s)]
A=math.pi*(Di/2)**2   #[sq m]
G=m_dot/A   #Mass velocity in [kg/sq m.s]
Nre=Di*G/mu  #Reynolds number
#As Nre<2100,the flow is laminar
mu_w=mu_w*10**-3 #[N.s/sq m] or kg/(m.s)
#The sieder tate equation is 
hi=(k*(2.0*((m_dot*Cp)/(k*L))**(1.0/3.0)*(mu/mu_w)**(0.14)))/Di   #Heat transfer coeff in [W/sq m.K]

#Result
print"The inside heat transfer coefficient is",round(hi,2),"W/(m**2.K) " 
print"NOTE:Calculation mistake in last line.ie in the calculation of hi in book,please perform the calculation manually to check the answer"
The inside heat transfer coefficient is 272.97 W/(m**2.K) 
NOTE:Calculation mistake in last line.ie in the calculation of hi in book,please perform the calculation manually to check the answer

Example no:3.27,Page no:3.77

In [202]:
#Film heat transfer coefficient
import math

#Variable declaration
m_dot=0.217 #Water flow rate in [kg/s]
Do=19.0   #Outside diameter in [mm]
rho=1000.0    #Density
t=1.6   #Wall thickness in [mm]
Di=Do-2*t   #i.d of tube in [mm]
Di=Di/1000.0  #[m]
Do=Do/1000.0  #[m]


#Calculation
Ai=math.pi*(Di/2)**2 #Cross-sectional area in sq m
u=m_dot/(rho*Ai)  #Water velocity through tube  [m/s]
u=1.12  #approx in book
Di=0.0157   #apprx in book
T1=301.0  #Inlet temperature of water in [K]
T2=315.0  #Outlet temperature of water in [K]
T=(T1+T2)/2 #[K]
hi=(1063.0*(1+0.00293*T)*(u**0.8))/(Di**0.20) #Inside heat transfer coefficient W/(sq m.K)
hi=5084.0     #Approximation
hio=hi*(Di/Do)  #Inside heat transfer coeff based on outside diameter  in W/(sq m.K)

#Result
print"Based on outside temperature,Inside heat transfer coefficient is",round(hio),"W/(m**2.K) or ",round(hio/1000,1),"kW/(m**2.K)"
Based on outside temperature,Inside heat transfer coefficient is 4201.0 W/(m**2.K) or  4.2 kW/(m**2.K)

Example no:3.28,Page no:3.77

In [9]:
#Area of exchanger
import math
#Variable declaration
mair_dot=0.90   #[kg/s]
T1=283.0  #[K]
T2=366.0  #[K]
dT=(T1+T2)/2    #[K]
Di=12.0   #[mm]
Di=Di/1000.0  #[m]
G=19.9  #[kg/(sq m.s)]
mu=0.0198   #[mN.s/(sq m)]
mu=mu*10**-3 #[N.s/sq m] or [kg/(m.s)]

#Calculation
Nre=Di*G/mu #Reynolds number
#It is greater than 10**4
k=0.029 #W/(m.K)
Cp=1.0    #[kJ/kg.K]
Cp1=Cp*10**3  #[J/kg.K]
Npr=Cp1*mu/k #Parndtl number
#Dittus-Boelter equation is
hi=0.023*(Nre**0.8)*(Npr**0.4)*k/Di   #[W/sq m.K]
ho=232.0  #W/sq m.K
U=1.0/(1.0/hi+1.0/ho) #Overall heat transfer coefficient  [W/m**2.K]
Q=mair_dot*Cp*(T2-T1)   #kJ/s
Q=Q*10**3    #[J/s] or [W]
T=700.0   #[K]
dT1=T-T2    #[K]
dT2=T2-T1   #[K]
dTm=(dT1-dT2)/math.log(dT1/dT2)  #[K]
#Q=U*A*dTm
A=Q/(U*dTm) #Area in sq m

#Result
print"Heat transfer area of equipment is",round(A,2),"m^2" 
Heat transfer area of equipment is 6.5 m^2

Example no:3.29,Page no:3.82

In [206]:
#Natural and forced convection
import math
#Variable declaration
v=18.41*10**-6   #[sq m./s]
k=28.15*10**-3   #[W/m.K]
Npr=0.7 #Prandtl number
Beta=3.077*10**-3    #K**-1
g=9.81  #m/s**2
Tw=350  #[K]
T_inf=300   #[K]
dT=Tw-T_inf #[K]
L=0.3   #[m]


#Calculation
#1.Free Convection
Ngr=(g*Beta*dT*L**3)/(v**2) #Grashof number
Npr=0.7 #Prandtl number
Nnu=0.59*(Ngr*Npr)**(1.0/4.0)    #Nusselt number
h=Nnu*k/L   #Average heat transfer coefficient [W/sq m K]

#2.Forced Convestion
u_inf=4 #[m/s]
Nre_l=u_inf*L/v
Nnu=0.664*(Nre_l**(1.0/2.0))*(Npr**(1.0/3.0))     #Nusselt number
h1=Nnu*k/L   #[W/sq m.K]


#Result
print"In free convection,heat transfer coeff,h=",round(h,1),"W/(m^2.K)"
print"In forced convection,heat transfer coeff,h=",round(h1,2),"W/(m^2.K)"
print"From above it is clear that heat transfer coefficient in forced convection is much larger than that in free convection"
In free convection,heat transfer coeff,h= 5.3 W/(m^2.K)
In forced convection,heat transfer coeff,h= 14.12 W/(m^2.K)
From above it is clear that heat transfer coefficient in forced convection is much larger than that in free convection

Example no:3.30,Page no:3.83

In [208]:
#Natural convection

import math
#Variable declaration
k=0.02685   #W/(m.K)
v=16.5*10**-6  #kg/(m.s)
Npr=0.7 #Prandtl number
Beta=3.25*10**-3 #K**-1
g=9.81  #m/(s**2)
Tw=333  #[k]
T_inf=283   #[K]
dT=Tw-T_inf  #[K]
L=4 #Length/height  of plate [m]

#Calculation
Ngr=(g*Beta*dT*(L**3))/(v**2)   #Grashoff number
#Let const=Ngr*Npr
const=Ngr*Npr
#Sice it is >10**9
Nnu=0.10*(const**(1.0/3.0))   #Nusselt number
h=round(Nnu*k/L,1)   #W/(sq m.K)
W=7 #width in [m]
A=L*W   #Area of heat transfer in [sq m]
Q=h*A*dT    #[W]

#Result
print"Heat transferred is",Q,"W"
Heat transferred is 6020.0 W

Example no:3.31,Page no:3.84

In [210]:
#Free convection in vertical pipe
import math

#Variable declaration
v=18.97*10**-6   #m**2/s
k=28.96*10**-3   #W/(m.K)
Npr=0.696
D=100.0   #Outer diameter [mm]
D=D/1000    #[m]
Tf=333.0  #Film temperature in [K]
Tw=373.0  #[K]
T_inf=293.0   #[K]

#Calculation
dT=Tw-T_inf #[K]
Beta=1.0/Tf   #[K**-1]
g=9.81  #[m/s**2]
L=3.0 #Length of pipe [m]
Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashof number
Nra=Ngr*Npr
Nnu=0.10*(Ngr*Npr)**(1.0/3.0)    #nusselt number for vertical cylinder
h=Nnu*k/L   #W/(sq m.K)
Q_by_l=h*math.pi*D*dT   #Heat loss per metre length [W/m]

#Result
print"Hence,Heat loss per metre length is",round(Q_by_l,2),"W/m"
Hence,Heat loss per metre length is 120.68 W/m

Example no:3.32,Page no:3.84

In [213]:
#Heat loss per unit length
import math

#Variable declaration
k=0.630 #W/(m.K
Beta=3.04*10**-4 #K**-1
rho=1000.0    #kg/m**3
mu=8.0*10**-4    #[kg/(m.s)]
Cp=4.187    #kJ/(kg.K)
g=9.81  #[m/(s**2)]
Tw=313.0  #[K]
T_inf=298.0   #[K]
dT=Tw-T_inf #[K]
D=20.0    #[mm]
D=D/1000    #[m]

#Calculation
Ngr=9.81*(rho**2)*Beta*dT*(D**3)/(mu**2)   #Grashoff number
Cp1=Cp*1000.0 #[J/kg.K]
Npr=Cp1*mu/k #Prandtl number
#Average nusselt number is
Nnu=0.53*(Ngr*Npr)**(1.0/4.0)
h=Nnu*k/D  #[W/ sqm.K]
Q_by_l=h*math.pi*D*dT   #Heat loss per unit length [W/m]

#Result
print"Heat loss per unit length of the heater is",round(Q_by_l,1),"W/m(APPROX)"
Heat loss per unit length of the heater is 653.4 W/m(APPROX)

Example no:3.33,Page no:3.85

In [214]:
#Free convection in pipe
import math

#Variable declaration
k=0.03406   #[W/(m/K)]
Beta=2.47*10**-3 #K**-1
Npr=0.687   #Prandtl number
v=26.54*10**-6   #m**2/s
g=9.81  #[m/s**2]
Tw=523.0  #[K]
T_inf=288.0   #[K]
dT=Tw-T_inf #[K]
D=0.3048    #[m]

#Calculation
Ngr=(g*Beta*dT*(D**3))/(v**2)     #Grashof number
Nra=Ngr*Npr 
#For Nra less than 10**9,we have for horizontal cylinder
Nnu=0.53*(Nra**(1.0/4.0))    #Nusselt number
h=Nnu*k/D   #[W/sq m.K]
Q_by_l=h*math.pi*D*dT   #W/m

#Result
print"Heat loss of heat transfer per meter lengh is",round(Q_by_l,1),"W/m"
Heat loss of heat transfer per meter lengh is 1492.4 W/m

Example no:3.34,Page no:3.86

In [215]:
#Free convection in plate
import math

#Variable declaration
rho=960.63  #Density in [kg/m**3]
Cp=4.216*10**3   #Specific heat in [J/(kg.K)]
D=16.0    #Diameter in [cm]
D=D/100 #[m]
k=0.68  #Thermal conductivity in [W/m.K]

#Calculation
A=(math.pi*(D/2)**2)
L=A/(math.pi*D)   #Length=A/P  in [m]
Beta=0.75*10**-3  #[K**-1]
alpha=1.68*10**-7    #[m**2/s]
g=9.81  #[m/s**2]
Tw=403.0  #[K]
T_inf=343.0   #[K]
dT=Tw-T_inf #[K]
v=0.294*10**-6   #[m**2/s]
Nra=(g*Beta*(L**3)*dT)/(v*alpha) 
#1.For Top surface
Nnu=0.15*(Nra)**(1.0/3.0)   #Nusselt number
ht=Nnu*k/L  #Heat transfer coeff for top surface in W/(m**2.K)
ht=round(ht)
#2.For bottom surface
Nnu=0.27*Nra**(1.0/4.0)  #Nusselt number
hb=Nnu*k/L  #[W/sq m.K]
hb=round(hb)
Q=(ht+hb)*A*dT  #[W]

#Result
print"The rate of heat input is",round(Q,1),"W"
The rate of heat input is 3410.4 W

Example no:3.35,Page no:3.87

In [234]:
#Heat transfer from disc
import math

#Variable declaration
v=2.0*10**-5   #[m**2/s]
Npr=0.7 #Prandtl number
k=0.03  #[W/m.K]
D=0.25   #Diameter in [m]
L=0.90*D    #Characteristic length,let  [m]
T1=298.0  #[K]
T2=403.0  #[K]
dT=T2-T1    #[K]

#Calculation
Tf=(T1+T2)/2  #[K]
Beta=1.0/Tf   #[K**-1]
A=math.pi*(D/2)**2   #Area in[sq m]
g=9.81  #[m/s**2]

#Case 1: Hot surface facing up
Ngr=g*Beta*dT*(L**3)/(v**2)   #Grashoff number
Nnu=0.15*((Ngr*Npr)**(1.0/3.0))    #Nusselt number
print "Nnu in the book is wrongly calculated as 66.80,\nActually it is:58.22"
h=Nnu*k/L   #[W/sq m.K]
Q=h*A*dT    #[W]

#Case 2:For hot surface facing down
Nnu=0.27*(Ngr*Npr)**(1.0/4.0)    #Grashof Number
h=Nnu*k/L   #[W/sqm.K]
Q1=h*A*dT    #[W]


#Result
print"\nHeat transferred when hot surface is facing up is",round(Q,2),"W"
print"NOTE:Taking into consideration the correct value of Nnu\n"
print"Heat transferred when hot surface is facing down is",round(Q1,2),"W"
Nnu in the book is wrongly calculated as 66.80,
Actually it is:58.22

Heat transferred when hot surface is facing up is 40.04 W
NOTE:Taking into consideration the correct value of Nnu

Heat transferred when hot surface is facing down is 16.23 W

Example no:3.36,Page no:3.88

In [235]:
#Rate of heat input to plate
import math
#Variable declaration
rho=960 #[kg/m**3]
Beta=0.75*10**-3 #[K**-1]
k=0.68  #[W/m.K]
alpha=1.68*10**-7    #[m**2/s]
v=2.94*10**-7    #[m**2/s]
Cp=4.216    #[kJ/kg.K]
Tw=403  #[K]
T_inf=343   #[K]
dT=Tw-T_inf     #[K]
g=9.81  #[m/s**2]
l=0.8   #[m]
W=0.08  #[m]

#Calculation
A=l*W   #Area in [m**2]
P=2*(0.8+0.08)   #Perimeter in [m]
L=A/P   #Characteristic dimension/length,L in   [m]
Nra=g*Beta*L**3*dT/(v*alpha) 
#(i) for natural convection,heat transfer from top/upper surface heated 
Nnu=0.15*(Nra**(1.0/3.0))    #Nusselt number
ht=Nnu*k/L  #[W/m**2.K]
ht=2115.3   #Approximation in book,If done manually then answer diff
#(ii)For the bottom/lower surface of the heated plate
Nnu=0.27*(Nra**(1.0/4.0))    #Nusselt number
hb=Nnu*k/L  #[W/(m**2.K)]
hb=round(hb)
#Rate of heat input is equal to rate of heat dissipation from the upper and lower surfaces of the plate
Q=(ht+hb)*A*(Tw-T_inf)   #[W]

#Result
print"Rate of heat input is equal to heat dissipation =",round(Q,1),"W"
Rate of heat input is equal to heat dissipation = 10914.4 W

Example no:3.37,Page no:3.89

In [3]:
#Two cases in disc
import math

#Variable declaration
k=0.03  #W/(m.K)
Npr=0.697   #Prandtl number
v=2.076*10**-6   #m**2/s
Beta=0.002915   #K**-1
D=25.0      #[Diameter in cm]
D=D/100 #[m]
Tf=343.0  #Film temperature in [K]

#Calculation
A=math.pi*(D/2)**2   #Area in [m**2]
P=math.pi*D #Perimeter [m]
T1=293.0 #[K]
T2=393.0  #[K]
g=9.81  #[m/s**2]
#Case (i) HOT SURFACE FACING UPWARD
L=A/P   #Characteristic length in [m]
Beta=1.0/Tf   #[K**-1]
dT=T2-T1    #[K]
Ngr=(g*Beta*dT*(L**3))/(v**2) #Grashoff number
Nra=Ngr*Npr 
Nnu=0.15*(Nra**(1.0/3.0))    #Nusselt number
h=Nnu*k/L   #[W/m**2.K]
Q1=h*A*dT    #[W]

#Case-(ii) HOT FACE FACING DOWNWARD
Nnu=0.27*(Nra**(1.0/4.0))    #Nusselt number
h=Nnu*k/L   #W/(m**2.K)
Q2=h*A*dT    #[W]

#Case-(iii)-For disc vertical 
L=0.25  #Characteristic length[m]  
D=L #dia[m]
A=math.pi*((D/2)**2) #[sq m]
Ngr=(g*Beta*dT*(L**3))/(v**2)     #Grashoff number
Npr=0.697
Nra=Ngr*Npr 
Nnu=0.10*(Nra**(1.0/3.0))    #Nusselt number
h=Nnu*k/D   #[W/(m**2.K)]
Q3=h*A*dT    #[W]


#Result
print"Heat transferred when disc is horizontal with hot surface facing upward is",round(Q1,1),"W"
print"Heat transferred when disc is horizontal with hot surface facing downward is",round(Q2,1),"W" 
print"For vertical disc,heat transferred is",round(Q3),"W"
Heat transferred when disc is horizontal with hot surface facing upward is 170.8 W
Heat transferred when disc is horizontal with hot surface facing downward is 65.6 W
For vertical disc,heat transferred is 114.0 W

Example no:3.38,Page no:3.91

In [240]:
#Total heat loss in a pipe
import math

#Variable declaration
v=23.13*10**-6     #[m**2/s]
k=0.0321     #[W/m.K]
Beta=2.68*10**-3  #[K**-1]
Tw=443.0   #[K]
T_inf=303.0    #[K]
dT=Tw-T_inf     #[K]
g=9.81   #[m/s**2]
Npr=0.688    #Prandtl number
D=100.0    #Diameter [mm]
D=D/1000    #Diameter [m]

#Calculation
Nra=(g*Beta*dT*(D**3)*Npr)/(v**2)
Nnu=0.53*(Nra**(1.0/4.0))    #Nusselt number
h=Nnu*k/D   #[W/(m**2.K)]
h=7.93      #Approximation
e=0.90  #Emissivity
sigma=5.67*10**-8     
#Q=Q_conv+Q_rad  #Total heat loss
#for total heat  loss per meter length
Q_by_l=h*math.pi*D*dT+sigma*e*math.pi*D*(Tw**4-T_inf**4)  #[W/m]

#Result
print"Total heat loss per metre length of pipe is",round(Q_by_l,1),"W/m"
Total heat loss per metre length of pipe is 831.1 W/m

Example no:3.39,Page no:3.91

In [241]:
#Heat loss by free convection
import math

#Result
k=0.035  #[W/(m.K)]
Npr=0.684    #Prandtl number
Beta=2.42*10**-3  #[K**-1]
v=27.8*10**-6     #[m**2/s]
Tw=533.0   #[K]
T_inf=363.0       #[K]
dT=Tw-T_inf #[K]
D=0.01   #[m]
g=9.81  #[m/s**2]

#Calculation
Nra=(g*Beta*dT*(D**3))/(v**2)
#For this <10**5,we have for sphere
A=4*math.pi*(D/2)**2 #Area of sphere in [m**2]
Nnu=(2+0.43*Nra**(1.0/4.0))#Nusslet number
h=Nnu*k/D   #W/(m**2.K)
Q=h*A*dT    #[W]

#Result
print"Rate of heat loss is",round(Q,2),"W"
Rate of heat loss is 1.06 W

Example no:3.40,Page no:3.92

In [246]:
#Heat loss from cube
import math
#Variable declaration
v=17.95*10**-6   #[m**2/s]
dT=353.0-293.0  #[K]
k=0.0283    #[W/m.K]
g=9.81  #[m/s**2]
Npr=0.698   #Prandtl number
Cp=1005.0 #J/(kg.K)
Tf=323.0  #Film temperature in [K]
Beta=1.0/Tf   #[K**-1]
l=1.0 #[m]

#Calculation
Nra=(g*Beta*dT*(l**3)*Npr)/(v**2)
#In textbook result of above statement is wrongly calculated,So
Nra=3.95*10**8
#For Nra <10**9,for a vertical plate,the average nusselt number is
Nnu=0.59*Nra**(1.0/4.0)  #Nusselt number
h=round(Nnu*k/l,2)   #[W/m**2.K]
A=l**2   #Area [m**2]
#Heat loss form 4 vertical faces of 1m*1m is 
Q1=4.0*(h*A*dT)   #[W]
#For top surface 
P=4.0*l   #Perimeter in [m]
L=A/P   #[m]
Nra=(Npr*g*Beta*dT*(L**3))/(v**2)
Nnu=0.15*Nra**(1.0/3.0)  #Nusselt number
h=round(Nnu*k/L,1)   #[W/m**2.K]
Q2=h*A*dT   #[W]
Q_total=Q1+Q2   #Total heat loss[W]

#Result
print"Total heat loss is",Q_total,"W"
Total heat loss is 966.0 W

Example no:3.41,Page no:3.93

In [2]:
#Plate exposed to heat

#Variable declaration
rho=0.910            #Density in [kg/m**3]
Cp=1.009*1000             #[J/kg.K]
k=0.0331             #[W/m.K]
mu=22.65*10**-6       #[N.s/m**2]

#Calculation
#Let a=smaller side
#b=bigger side
#Qa=ha*A*dT
#Qb=hb*A*dT
#Qa=1.14*Qb
#Given a*b=15*10**-4
#On solving we get:
a=0.03           #[m]
b=0.05           #[m]
A=a*b           #Area in [sq m]
Tf=388           #[K]
Beta=1.0/Tf       #[K**-1]
T1=303           #[K]
T2=473          #[K]
dT=T2-T1        #[K]
v=mu/rho        
g=9.81      #m/s**2[acceleration due to gravity ]
hb=0.59*(((g*Beta*dT*(b**3))/(v**2))*Cp*mu/k)**(1.0/4.0)*(k/b)       #[W/sq m.K]
Qb=hb*A*(dT)            #[W]

Qa=1.14*Qb              #[W]

#Result
print"Dimensions of the plate are",a,"x",b,"m=",a*100,"x",b*100,"cm"
print"Heat transfer when the bigger side held vertical is",round(Qb,2),"W"
print"Heat transfer when the small side held vertical is",round(Qa,2),"W" 
Dimensions of the plate are 0.03 x 0.05 m= 3.0 x 5.0 cm
Heat transfer when the bigger side held vertical is 2.77 W
Heat transfer when the small side held vertical is 3.16 W

Example no:3.42,Page no:3.99

In [251]:
#Nucleate poolboiling
import math

#Variable declaration
Ts=373.0  #[K]
rho_l=957.9    #rho*l[kg/m**3]
Cpl=4217.0    #[J/kg.K]
mu_l=27.9*10**-5 #[kg/(m.s)]
rho_v=0.5955   #[kg/m**3]
Csf=0.013
sigma=5.89*10**-2    #[N/m]
Nprl=1.76
lamda=2257.0 #[kJ/kg]
lamda=lamda*1000  #in [J/kg]
n=1 #for water
m_dot=30.0    #Mass flow rate [kg/h]

#Calculation
m_dot=m_dot/3600    #[kg/s]
D=30.0    #Diameter of pan [cm]
D=D/100 #[m]
g=9.81  #[m/s**2]
A=math.pi*(D/2)**2   #Area in [sq m]
Q_by_A=m_dot*lamda/A   #[W/sq m]
#For nucleate boiling point we have:
dT=(lamda/Cpl)*Csf*(((Q_by_A)/(mu_l*lamda))*math.sqrt(sigma/(g*(rho_l-rho_v))))**(1.0/3.0)*(Nprl**n) #[K]
Tw=Ts+dT    #[K]

#Result
print"Temperature of the bottom surface of the pan is",round(Tw,1),"W/(m^2)"
Temperature of the bottom surface of the pan is 385.5 W/(m^2)

Example no:3.43,Page no:3.100

In [252]:
#Peak Heat flux
import math

#Variable declaration
lamda=2257.0 #[kJ/kg]
lamda=lamda*1000  #in [J/kg]
rho_l=957.9    #rho*l[kg/m**3]
rho_v=0.5955   #[kg/m**3]
sigma=5.89*10**-2    #[N/m]
g=9.81  #[m/s**2]

#Calculation
#Peak heat flux is given by
Q_by_A_max=(math.pi/24)*(lamda*rho_v**0.5*(sigma*g*(rho_l-rho_v))**(1.0/4.0))    #W/m**2
Q_by_A_max=Q_by_A_max/(10**6)    #MW/(sq m)


#Result
print"Peak heat flux is",round(Q_by_A_max,3),"MW/sq m"
Peak heat flux is 1.106 MW/sq m

Example no:3.44,Page no:3.100

In [1]:
#Stable film pool boiling
import math

#Variable declaration
rho_l=957.9 #[kg/m**3]
lamda=2257.0 #[kJ/kg]
lamda=lamda*10**3  #[J/kg]
rho_v=31.54 #[kg/m**3]
Cpv=4.64    #[kJ/kg.K]
Cpv=Cpv*10**3    #[J/kg.K]
kv=58.3*10**-3#[W/(m.K)]
g=9.81  #[m/s**2]
mu_v=18.6*10**-6 #[kg/(m.s)]
e=1.0   #Emissivity
sigma=5.67*10**-8 
Ts=373.0  #[K]
Tw=628.0  #[K]

#Calculation
dT=Tw-Ts    #[K]
D=1.6*10**-3 #[m]
T=(Tw+Ts)/2 #[K]

hc=0.62*((kv**3)*rho_v*(rho_l-rho_v)*g*(lamda+0.40*Cpv*dT)/(D*mu_v*dT))**(1.0/4.0)  #Convective heat transfer coeff  [W/sq m.K]
hr=e*sigma*(Tw**4-Ts**4)/(Tw-Ts)  #Radiation heat transfer coeff in [W/sq m.K]
h=hc+(3.0/4.0)*hr   #Total heat transfer coefficient W/(sq m.K)
Q_by_l=h*math.pi*D*dT   #Heat dissipation rate per unit length in [kW/m]
Q_by_l=Q_by_l/1000  #[kW/m]
#Result
print"Stable film boiling point heat transfer coefficient is",round(h,1),"W/(sq m.K)"
print"Heat dissipated per unit length of the heater is",round(Q_by_l,1),"kW/m"

print"\nNOTE:In textbook,value of hc is wrongly calculated as 1311.4,Actually it is 1318.9,"
print"So,there is a difference in final values of 'h'"
Stable film boiling point heat transfer coefficient is 1340.9 W/(sq m.K)
Heat dissipated per unit length of the heater is 1.7 kW/m

NOTE:In textbook,value of hc is wrongly calculated as 1311.4,Actually it is 1318.9,
So,there is a difference in final values of 'h'

Example no:3.45,Page no:3.102

In [136]:
#Heat transfer in tube
import math

#Variable declaration
dT=10   #[K]
P=506.625   #[kPa]
P=P/10**3    #[Mpa]
D=25.4  #Diameter [mm]
D=D/1000    #[m]

#Calculation
h=2.54*(dT**3)*(math.exp(P/1.551))   #[W/sq m.K]
#Q=h*math.pi*D*L*dT
#Heat transfer rate per meter length of tube is 
Q_by_l=h*math.pi*D*dT   #[W/m]

#Result
print"Rate of heat transfer per 1m length of tube is",round(Q_by_l),"W/m" 
Rate of heat transfer per 1m length of tube is 2810.0 W/m

Example no:3.46,Page no:3.102

In [265]:
#Nucleat boiling and heat flux

#Variable declaration
dT=8.0    #[K]
P=0.17  #[Mpa]
P=P*1000    #[kPa]
h1=2847.0 #[W/(sq m.K)]
P1=101.325  #[kPa]
h=5.56*(dT**3)   #[W/sq m.K]

#Calculation
Q_by_A=h*dT #[W/sq m]
hp=h*(P/P1)**(0.4)   #[W/sq m.K]
#Corresponding heat flux is :
Q_by_A1=hp*dT #[W/sq m]
per=(Q_by_A1-Q_by_A)*100.0/Q_by_A #Percent increase in heat flux

#Result
print"Heat flux when pressure  is 101.325 kPa is",Q_by_A,"W/m^2(APPROX)"
print"Percent increase in heat flux is",round(per),"%" 
Heat flux when pressure  is 101.325 kPa is 22773.76 W/m^2(APPROX)
Percent increase in heat flux is 23.0 %

Example no:3.47,Page no:3.110

In [269]:
#Dry steam condensate
import math

#Variable declaration
mu=306*10**-6    #[N.s/m**2]
k=0.668 #[W/m.K]
rho=974.0 #[kg/m**3]
lamda=2225.0 #[kJ/kg]
lamda=lamda*10**3  #[J/kg.K]
g=9.81  #[m/s**2]
Ts=373.0  #[K]
Tw=357.0  #[K]
dT=Ts-Tw    #[K]
Do=25.0   #[mm]
Do=Do/1000  #[m]

#Calculation
h=0.725*((rho**2*g*lamda*k**3)/(mu*Do*dT))**(1.0/4.0) #[W/sq m.K]
Q_by_l=h*math.pi*Do*dT  #[W/m]
m_dot_byl=(Q_by_l/lamda)   #[kg/s]
m_dot_byl=m_dot_byl*3600    #[kg/h]

#Result
print"Mean heat transfer coefficient is",round(h),"W/(m^2.K)" 
print"Heat transfer per unit length is",round(Q_by_l),"W/m" 
print"Condensate rate per unit length is",round(m_dot_byl,1),"kg/h" 
Mean heat transfer coefficient is 10864.0 W/(m^2.K)
Heat transfer per unit length is 13653.0 W/m
Condensate rate per unit length is 22.1 kg/h

Example no:3.48,Page no:3.111

In [10]:
#Laminar Condensate film

#Variable declaration
rho=960.0 #[kh/m**3]
mu=2.82*10**-4   #[kg/(m.s)]
k=0.68  #[W/(m.K)]
lamda=2255.0 #[kJ/kg]
lamda=lamda*10**3  #[J/kg]
Ts=373.0  #Saturation temperature of steam [K]
Tw=371.0  #[K]
dT=Ts-Tw    #[K]
L=0.3   #Dimension [m]
g=9.81  #[m/s**2]

#Calculation
h=0.943*(rho**2*g*lamda*k**3/(L*mu*dT))**(1.0/4.0)    #W/sq m.K
A=L**2   #[sq m] 
Q=h*A*(Ts-Tw)   #[W]=[J/s]
m_dot=Q/lamda  #Condensate rate[kg/s]
m_dot=m_dot*3600.0    #[kg/h]

#Result
print"Average heat transfer coefficient is",round(h)," W/(m^2.K)(APPROX)"
print"Heat transfer rate is",round(Q),"J/kg"
print"Steam condensate rate per hour is",round(m_dot,2),"kg/h"
Average heat transfer coefficient is 13156.0  W/(m^2.K)(APPROX)
Heat transfer rate is 2368.0 J/kg
Steam condensate rate per hour is 3.78 kg/h

Example no:3.49,Page no:3.112

In [279]:
#Saturated vapour condensate in array
import math

#Variable declaration
rho=1174.0    #[kg/m**3]
k=0.069 #[W/(m.K)]
mu=2.5*10**-4    #[N.s/m**2]
lamda=132*10**3 #[J/kg]
g=9.81  #[m/s**2]
Ts=323.0  #[K]
Tw=313.0  #[K]
dT=Ts-Tw    #[K]

#Calculation
#For square array,n=4
n=4.0 #number of tubes
Do=12.0   #[mm]
Do=Do/1000  #[m]
h=0.725*(rho**2*lamda*g*k**3/(n*Do*mu*dT))**(1.0/4.0) #W/(sq m.K) 
#For heat transfer area calcualtion,n=16
A=n*math.pi*Do #[sq m]
A=0.603
Q=h*A*dT#[W/m]
m_dot=round(Q/lamda,3)  #[kg/s]

m_dot=m_dot*3600    #[kg/h]

#Result
print"Rate of condensation per unit length is",m_dot,"kg/h"
Rate of condensation per unit length is 176.4 kg/h

Example no:3.50,Page no:3.113

In [286]:
#Mass rate of steam condensation
import math

#Variable declaration
rho=960.0 #[kg/m**3]
k=0.68  #[W/m.K]
mu=282.0*10**-6    #[kg/(m.s)]
Tw=371.0  #Tube wall temperature [K]
Ts=373.0  #Saturation temperature in [K]
dT=Ts-Tw    #[K]
lamda=2256.9   #[kJ/kg]
lamda=lamda*10**3  #[J/kg]

#Calculation
#For a square array with 100tubes,n=10
Do=0.0125 #[m]
g=9.81  #[m/s**2]
n=10.0
h=0.725*(((rho**2)*g*lamda*(k**3)/(mu*n*Do*dT))**(1.0/4.0)) #W/(sq m.K)

L=1.0 #[m]
#n=100
n=100.0 
A=n*math.pi*Do*L    #[m**2/m length]
Q=h*A*dT    #Heat transfer rate in [W/m]
ms_dot=Q/lamda #[kg/s]
ms_dot=ms_dot*3600.0  #[kg/h]

#Result
print"Mass rate of steam condensation is",round(ms_dot),"kg/h" 
print"NOTE:ERROR in Solution in book.Do is wrongly taken as 0.012 in lines 17 and 22 of the book,Also A is wrongly calculated"
Mass rate of steam condensation is 158.0 kg/h
NOTE:ERROR in Solution in book.Do is wrongly taken as 0.012 in lines 17 and 22 of the book,Also A is wrongly calculated

Example no:3.51,Page no:3.114

In [288]:
#Saturated tube condensate in a wall
import math

#Variable declaration
rho=975.0 #[kg/m**3]
k=0.871 #[W/m.K]
dT=10.0   #[K]
mu=380.5*10**-6  #[N.s/m**2]
lamda=2300.0 #[kJ/kg]
lamda=lamda*1000  # Latent heat of condensation [J/kg]
Do=100.0  #Outer diameter [mm]
Do=Do/1000  #[m]
g=9.81  #[m/s**2]

#Calculation
#for horizontal tube
h1=0.725*((rho**2*lamda*g*k**3)/(mu*Do*dT))**(1.0/4.0)    #Average heat transfer coefficient
#for vertical tube
#h2=0.943*((rho**2*lambda*g*k**3)/(mu*L*dT))**(1/4)    #Average heat transfer coefficient
h2=h1   #For vertical tube
#implies that
L=(0.943*((rho**2*lamda*g*k**3)**(1.0/4.0))/(h1*((mu*dT)**(1.0/4.0))))**4   #[m]
L=0.29      #Approximate in book
h=0.943*((rho**2*lamda*g*k**3)/(mu*L*dT))**(1.0/4.0)  #[W/(sq m.K)]
A=math.pi*Do*L  #Area in [m**2]
Q=h*A*dT    #Heat transfer rate [W]
mc_dot=Q/lamda  #[Rate of condensation]in [kg/s]
mc_dot=mc_dot*3600  #[kg/h]

#Result
print"Tube length is",L,"m"
print"Rate of condensation per hour is",round(mc_dot,2),"kg/h" 
Tube length is 0.29 m
Rate of condensation per hour is 14.32 kg/h

Example no:3.52,Page no:3.115

In [289]:
#Condensation rate

#Variable declaration
m1_dot=50.0    # For horizontal position[kg/h]
Do=10.0   #[mm]
Do=Do/1000  #[m]
L=1.0  #[m]
#For 100 tubes n=10
n=10.0 

#Calculation
#We know that
#m_dot=Q/lambda=h*A*dT/lambda
#m_dot is proportional to  h
#m1_dot prop to h1
#m2_dot  propn to h2
#m1_dot/m2_dot=h1/h2
#or :
m2_dot=m1_dot/((0.725/0.943)*(L/(n*Do))**(1.0/4.0))  #[kg/h]

#Result
print"For vertical position,Rate of condensation is",round(m2_dot,2),"kg/h"
For vertical position,Rate of condensation is 36.57 kg/h

Example no:3.53,Page no:3.116

In [295]:
#Condensation on vertical plate
rho=975 #[kg/m**3]
k=0.671 #[W/(m.K)]
mu=3.8*10**-4    #[N.s/m**2]
dT=10   #[K]
lamda=2300*10**3    #[J/kg]
L=1 #[m]
g=9.81  #[m/s**2]

#Calculation
ha=0.943*((rho**2*lamda*g*k**3)/(mu*L*dT))**(1.0/4.0)  #W/(sq m.K)    #[W/sq m.K]
#Local heat transfer coefficient
#at x=0.5  #[m]
x=0.5   #[m]
h=((rho**2*lamda*g*k**3)/(4*mu*dT*x))**(1.0/4.0)  #[W/sq m.K]
delta=((4*mu*dT*k*x)/(lamda*rho**2*g))**(1.0/4.0)    #[m]
delta=delta*10**3    #[mm]

#Result
print"(i)- Average heat transfer coefficient is",round(ha)," W/(m**2.K)"
print"(ii)-Local heat transfer coefficient at 0.5 m height is",round(h),"W/(m^2.K)"
print"(iii)-Film thickness is",round(delta,3),"m"
(i)- Average heat transfer coefficient is 6060.0  W/(m**2.K)
(ii)-Local heat transfer coefficient at 0.5 m height is 5404.0 W/(m^2.K)
(iii)-Film thickness is 0.124 m