# Variables
l = 2. #m, length of flat surface
T1 = 150. #C, surface temp.
p = 1. #atm, pressure
T2 = 30. #C, bulk air temp.
V = 12. #m/s, air velocity
#Calculation
Tf = (T1+T2)/2 #C, mean air film temp.
mu = 2.131*10**-5 #m**2/s, vismath.cosity
k = 0.031 #W/m C, thermal conductivity
rho = 0.962 #kg/m**3, density of air
cp = 1.01 #kj/kg C, specific heat of air
Pr = cp*10**3*mu/k #Prandtl no.
Remax = l*V*rho/mu #maximum Reynold no.
Re = 5.*10**5 #Reynold no. during transition to turbulent flow
L_ = (Re*mu)/(V*rho) #m,dismath.tance from the leading edge
#for laminar flow heat transfer coefficient h,
#h16.707*x**-(1/2)
#(a)
#h2 = 31.4*x**(-1/5)
#b
hav = 22.2
#c
Q = hav*l*p*(T1-T2)
# Results
print "The rate of heat loss is %.0f W"%(Q)
# rounding off error.
import math
# Variables
d = 7.24*10**-4 #m, diameter of wire
l = 1. #m, length of wire
I = 8.3 #A, current in a wire
R = 2.625 #ohm/m, electrical resistance
V = 10. #m/s, air velocity
Tb = 27. #C, bulk air temp.
#the properties at bulk temp.
mu = 1.983*10**-5 #m**2/s, vismath.cosity
k = 0.02624 #W/m C, thermal conductivity
rho = 1.1774 #kg/m**3, density of air
cp = 1.0057 #kj/kg C, specific heat of air
# Calculations and Results
Pr = cp*10**3*mu/k #Prandtl no.
Re = d*V*rho/mu # Reynold no.
#from eq. 4.19, nusslet no.
Nu = 0.3+(0.62*Re**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1./4))*(1+(Re/(2.82*10**5))**(5./8))**(4./5)
hav = Nu*k/d #W/m**2 C, average heat transfer coefficient
Q = I**2*R #W, rate of electrical heat generation
A = math.pi*d*l
dt = Q/(hav*A) #C,temp. difference
T = dt+Tb #C, steady state temp.
print "The steady state temprature is %.0f C"%(T)
Tm = (T+Tb)/2 #C, mean air film temp.
#the properties at Tm temp.
mu1 = 2.30*10**-5 #m**2/s, vismath.cosity
k1 = 0.0338 #W/m C, thermal conductivity
rho1 = 0.878 #kg/m**3, density of air
cp1 = 1.014 #kj/kg C, specific heat of air
Re1 = d*V*rho1/mu1 # Reynold no.
Pr1 = (1.014*10**3*2.30*10**-5)/k1 #Prandtl no.
#from eq. 4.19, nusslet no.
Nu1 = 0.3+(0.62*Re1**(1./2)*Pr1**(1./3)/(1+(0.4/Pr1)**(2./3))**(1./4))*(1+(Re1/(2.82*10**5))**(5./8))**(4./5)
hav1 = Nu1*k1/d #W/m**2 C, average heat transfer coefficient
dt1 = Q/(hav1*A) #C,temp. difference
T1 = dt1+Tb #C, steady state temp.
print "The recalculated value is almost equal to previous one."
import math
# Variables
di = 0.04 #m, diameter of ice ball
V = 2. #m/s, air velocity
T1 = 25. #C, steam temp.
T2 = 0.
#the properties of air
mu = 1.69*10**-5 #kg/ms, vismath.cosity
k = 0.026 #W/m C, thermal conductivity
rho = 1.248 #kg/m**3, density
cp = 1.005 #kj/kg C, specific heat
#propertice of ice
lamda = 334. #kj/kg, heat of fusion
rhoice = 920. #kg/m**3 density of ice
# Calculations and Results
Pr = cp*10**3*mu/k #Prandtl no.
Re = di*V*rho/mu # Reynold no.
#from eq. 4.19, nusslet no.
Nu = 2+(0.4*Re**0.5+0.06*Re**(2./3))*Pr**0.4
hav = Nu*k/di #W/m**2 C, average heat transfer coefficient
Ai = math.pi*di**2 #initial area of sphere
Qi = Ai*hav*(T1-T2) #W = J/s, initial rate of heat transfer
Ri = Qi/lamda #initial rate of melting of ice
print "initial rate of melting of ice is %.4f g/s"%(Ri)
#(b)
#mass of ice ball 4/3*math.pi*r**3
#Rate of melting = Rm = -d/dt(m)
#Rate of heat input required = -lamda*Rate of melting
#heat balance equation
# -lamda*(Rm) = h*4*math.pi*r**2*dt
#integrating and solving
rf = ((di/2)**3/2.)**(1./3)
#solving eq. 3
t1 = 1.355*10**-4/(8.136*10**-8)
print "The required time is is %.0f s"%(t1)
from scipy.integrate import quad
# Variables
Vo = 0.5 #m/s air velocity
T1 = 800. #C, initial temp.
T2 = 550. #C, final temp.
Tam = 500. #C, air mean temp.
P = 1.2 #atm, pressure
#the properties of solid particles.
dp = 0.65*10**-3 #m, average particle diameter
cps = 0.196 #kcal/kg C, specific heat
rhos = 2550. #kg/m**3, density
#Properties of air
mu = 3.6*10**-5 #kg/ms, vismath.cosity
k = 0.05 #kcal/hm C, thermal conductivity
rho = 0.545 #kg/m**3, density of air
cp = 0.263 #kcal/kg C, specific heat of air
#calculation
Pr = cp*mu*3600/k #Prandtl no.
Redp = dp*Vo*rho/mu # Reynold no.
#from eq. 4.29(b) heat transfer coefficient
h = (k/dp)*(2+0.6*(Redp)**(1./2)*(Pr)**(1./3))
Tg = 500 #C, gas temp.
#from heat balance equation
# -(dTs/dt) = 6h/(dp*rhos*cps)*(Ts-Tg)
def f2(Ts):
return (1/(Ts-Tg))
t = (dp*rhos*cps/(6*h))* quad(f2,550,800)[0]
# Results
print "the required contact time is %.2f s"%(t*3600)
import math
# Variables
mo_ = 1000. #kg/h, cooling rate of oil
cpo = 2.05 #kj/kg C, specific heat of oil
T1 = 70. #C, initial temp. of oil
T2 = 40. #C, temp. of oil after cooling
cpw = 4.17 #kj/kg C, specific heat of water
T3 = 42. #C, initial temp. of water
T4 = 28. #C, temp. of oil after cooling
A = 3. #m**2, heat exchange area
# Calculation and Results
mw_ = mo_*cpo*(T1-T2)/(cpw*(T3-T4))
print "the required rate of flow of water is %.0f kg/h "%(mw_)
Q = mo_*cpo*(T1-T2)/3600 #kw, heat duty
dt1 = T1-T3 #C, hot end temp. difference
dt2 = T2-T4 #C, cold end temp. difference
LMTD = (dt1-dt2)/(math.log(dt1/dt2)) #math.log mean temp. difference
dtm = LMTD
U = Q*10**3/(A*dtm)
print "the overall heat transfer coefficient is %.0f W/m**2 C"%(round(U,-1))
from scipy.optimize import fsolve
import math
# Variables
Q = 38700. #kcal/h, heat duty
W = 2000. #kg/h gas flow rate
cp = 0.239 #kcal/kg C, specific heat of nitrogen
A = 10. #m**2 ,heat exchanger area
U = 70. #kcal/hm**2 C, overall heat transfer coefficient
n = 0.63 #fin efficiency
#Calculation
dt = Q/(W*cp) #C, temp. difference
#To-Ti = dt.........................(i)
dtm = Q/(U*A*n)
#(To-Ti)/(math.log((160-Ti)/(160-To))) = 87.8........(2)
#solving 1 and 2
def f(To):
return (To-(To-dt))/(math.log((160-(To-dt))/(160-To)))-87.8
To = fsolve(f,100)
Ti = To-dt
# Results
print "The inlet temprature is Ti = %.0f C"%(Ti)
print "The outlet temprature is To = %.0f C"%(To)
# note : answers are slightly different because of fsolve function of python.
import math
# Variables
V = 1.8 #m/s, velocity of hot water
T1 = 110. #C, initial temp.
l = 15. #m, length of pipe
t = 0.02 #m, thickness of insulation
kc = 0.12 #W/mC,thermal conductivity of insulating layer
ho = 10. #Wm**2 C, outside film coefficient
T2 = 20. #C, ambient temp.
#the properties of water at 110 C
mu = 2.55*10**-4 #m**2/s, vismath.cosity
k = 0.685 #W/m C, thermal conductivity
rho = 950. #kg/m**3, density of air
cp = 4.23 #kj/kg C, specific heat of air
di = 0.035 #m, actual internal dia. of pipe
ri = di/2. #m,internal radius
t1 = 0.0036 #m, actual thickness of 1-1/4 schedule 40 pipe
ro = ri+t1 #m, outer radius of pipe
r_ = ro+t #m, outer radius of insulation
kw = 43. #W/mC, thermal conductivity of steel
#calculation
Pr = cp*10**3*mu/k #Prandtl no.
Re = di*V*rho/mu # Reynold no.
#from eq. 4.9, Nusslet no.
Nu = 0.023*(Re)**0.88*Pr**0.3
hi = Nu*k/di #W/m**2 C, average heat transfer coefficient
#the overall coefficient inside area basis Ui
Ui = 1./(1/hi+(ri*math.log(ro/ri))/kw+(ri*math.log(r_/ro))/kc+ri/(r_*ho))
Ai = math.pi*di*l #m**2, inside area basis
W = math.pi*ri**2*V*rho #kg/s, water flow rate
#from the relation b/w LMTD and rate of heat loss
def f(To):
return (W*cp*10**3)/(Ui*Ai)*(T1-To)-((T1-To)/math.log((T1-T2)/(To-T2)))
To = fsolve(f,100)
# Results
print "The outlet eater temp. is %.1f C"%(To)
import math
# Variables
T1 = 28. #C, inlet temp.
T2 = 250. #C,bulk temp.
V = 10. #m/s, gas velocity
l = 20. #m, length of pipe
mw = 1.*3600 #kg/h, water flow rate
di = 4.1*10**-2 #m, inlet diameter
Tm = (T1+T2)/2 #C, mean temp.
ro = 0.0484 #m, outside radius
#properties of water
mu = 8.6*10**-4 #kg/ms, vismath.cosity
kw = 0.528 #kcal/h m C, thermal conductivity
kw_ = 0.528*1.162 #W/ m C, thermal conductivity
rho = 996. #kg/m**3, density of air
cp = 1*4.18 #kj/kg C, specific heat of air
cp_ = 1. #kcal/kg C
#properties of flue gas
mu1 = 2.33*10**-5 #kg/ms, vismath.cosity
ka = 0.0292 #kcal/h m C, thermal conductivity
rho1 = 0.891 #kg/m**3, density of air
cp1 = 0.243 #kcal/kg C, specific heat of air
Pr = 0.69
#calculation
A = math.pi/4*di**2 #m**2, cross section of pipe
Vw = 1/(rho*A) #m/s, velocity of warer
Re = di*Vw*rho/mu # Reynold no.
Pr1 = cp*10**3*mu/kw_ #Prandtl no. for water
Nu = 0.023*Re**0.8*Pr1**0.4 #Nusslet no.
#water side heat transfer coefficient hi
hi = 206*kw/di
#gas side heat transfer coefficient ho
a = 41 #mm, i.d. schedule
Tw = 3.7 #mm, wall thickness
do = a+2*Tw #mm, outer diameter of pipe
Re1 = do*10**-3*V*rho1/mu1 # Reynold no
#from eq. 4.19, nusslet no.
Nu1 = 0.3+(0.62*Re1**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1/4.))*(1+(Re1/(2.82*10**5))**(5./8))**(4/5.)
ho = (Nu1*ka/do)*10**3 #kcal/h m**2 C
Uo = 1/(ro/(di/2*hi)+1/ho) #kcal/h m**2 C, overall heat transfer coefficient
#Heat balance
A1 = math.pi*ro*l #m62, outside area of pipe
#from the formula of LMTD
def f(T2_):
return mw*cp_*(T2_-T1)-Uo*A1*((T2_-T1)/math.log((T2-T1)/(T2-T2_)))
T2_ = fsolve(f,1)
# Results
print "The exit water temp is %.0f C"%(T2_)
import math
# Variables
dti = 0.0212 #m inner tube
dto = 0.0254 #cm, outer tube
dpi = 0.035 #cm, outer pipe
mo_ = 500. #kh/h, cooling rate of oil
To2 = 110. #C, initial temo. of oil
To1 = 70. #C, temp. after cooling of oil
Tw2 = 40. #C, inlet temp. of water
Tw1 = 29. #C, outlet temp. of water
#properties of oil
cpo = 0.478 #kcal/kg C
ko = 0.12 #kcal/h m C, thermal conductivity
rho = 850. #kg/m**3, density of oil
#properties of water
kw = 0.542 #kcal/h m C, thermal conductivity
kw_ = (kw*1.162) #kj/kg C
muw = 7.1*10**-4 #kg/ms, vismath.cosity of water
cpw = 1. #kcal/kg C
cpw_ = cpw*4.17 #kcal/kg C
rhow = 1000. #kg/m**3, density
#calculation
HL = mo_*cpo*(To2-To1) #kcal/h, heat load of exchanger
mw_ = HL/(cpw*(Tw2-Tw1)) #kg/h water flow rate
mw_1 = mw_/(3600*10**3) #m**3/s water flow rate
A1 = (math.pi/4)*(dti)**2 #m**2, flow area of tube
Vw = mw_1/A1 #m/s water velocity
Rew = dti*Vw*rhow/muw #Reynold no.
Prw = cpw_*10**3*muw/kw_ #Prandtl no.
Nuw = 0.023*Rew**0.8*Prw**0.4 #nusslet no.
#water side heat transfer coefficient hi
hi = Nuw*kw/dti
#oil side heat transfer coefficient
A2 = math.pi/4*(dpi**2-dto**2) #m**2, flow area of annulus
Vo = mo_/(3600*rho*A2) #m/s velocity of oil
de = (dpi**2-dto**2)/dto #m, equivalent dia of annulus
Tmo = (To2+To1)/2 #C,mean oil temp.
muoil = math.exp((5550./(Tmo+273))-19) #kg/ms, vismath.cosity of oil
Reo = de*Vo*rho/muoil
Pro = cpo*muoil*3600/ko #prandtl no. for oil
#assume (1st approximation)
Nuo = 3.66
ho = Nuo*ko/de #kcal/h m**2 c
L = 1 #assume length of tube
Ai = math.pi*dti*L
Ao = math.pi*dto*L
#overall heat transfer coefficient 1st approximation
Uo = 1/(1/ho+Ao/(Ai*hi))
LMTD = ((To2-Tw2)-(To1-Tw1))/(math.log((To2-Tw2)/(To1-Tw1)))
Ao1 = HL/(Uo*LMTD) #m**2, heat transfer area
Lt = Ao1/(math.pi*dto) #m, tube length
#from eq. 4.8
Nuo1 = 1.86*(Reo*Pro/(Lt/de))**(1./3) #Nusslet no.
ho1 = Nuo1*ko/de
Tmw = (Tw1+Tw2)/2 #C, mean water temp.
#balancing heat transfer rate of oil and water
#average wall temp. Twall
Twall = ((hi*dti*(-Tmw))-(ho1*dto*Tmo))/(-65.71216)
#vismath.cosity of oil at this temp.
muwall = math.exp((5550/(Twall+273))-19) #kg/ms, vismath.cosity of oil
#Nusslet no.
Nuo2 = 1.86*(Reo*Pro/(Lt/de))**(1./3)*(muoil/muwall)**0.14
ho2 = Nuo2*ko/de
Uo2 = 1/((1/ho2)+(Ao/(Ai*hi)))
Ao2 = HL/(Uo2*LMTD)
Lt_ = Ao2/(math.pi*dto)
# Results
print "The tube length is %d m"%(Lt_)
# rounding off error.
import math
# Variables
Ti = 260. #C, initial temp.
Ts = 70. #C, skin temp.
St = 0.15 #m,space between tubes in equilateral triangular arrangement
Sd = St #space between tubes
mu = 4.43*10**-5 #m**2/s, momentum diffusity
k = 0.0375 #W/m C, thermal conductivity
rho = 0.73 #kg/m**3, density of air
cp = 0.248 #kj/kg C, specific heat of air
V = 16. #m/s, velociity
d = 0.06 #m, outside diameter of tube
Nt = 15. #no. of tubes in transverse row
Nl = 14. #no. of tubes in longitudinal row
N = Nl*Nt #total no. of tubes
L = 1. #m, length
#Calculation
Sl = (math.sqrt(3)/2)*St
Pr = cp*mu*3600*rho/k #Prandtl no. of bulk air
Pr = 0.62
Prw = 0.70 #Prandtl no. of air at wall temp. 70 C
#from eq. 4.25
Vmax = (St/(St-d))*V
#from eq. 4.26
Vmax1 = (St/(2*(St-d)))*V
Redmax = d*Vmax/mu
p = St/Sl #pitch ratio
#from table 4.3
m = 0.6
C = 0.35*(St/Sl)**0.2
h = round((k/d)*C*(36163)**m*(Pr)**(0.36)*(Pr/Prw)**(0.25))
#from eq. 4.28
dt = round(190*math.exp(-math.pi*d*N*h/(rho*V*3600*Nt*St*cp)))
LMTD = ((Ti-Ts)-(dt))/math.log((Ti-Ts)/dt)
A = round(math.pi*d*L*N,1) #m**2, heat transfer area
Q = h*A*LMTD
# Results
print " the rate of heat transfer to water.is %.2e kcal/h"%(Q)
# Note : Value of LMTD is wrong in book please check.
import math
# Variables
W = 0.057 #m**3/min/tube, flow rate of water
W_ = W*16.66 #kg/s. water flow rate
di = 0.0212 #m,inside diameter
Ti = 32. #C, inlet water temp.
Tw = 80. #C, wall temp.
L = 3. #m, length of pip
#Calculation
V = (W/60)*(1/((math.pi/4)*di**2)) #m/s, water velocity
#the properties of water at mean liquid temp..
mu = 7.65*10**-4 #m**2/s, vismath.cosity
k = 0.623 #W/m C, thermal conductivity
rho = 995. #kg/m**3, density of air
cp = 4.17 #kj/kg C, specific heat of air
Pr = cp*10**3*mu/k #Prandtl no.
Re = di*V*rho/mu # Reynold no.
#from eq. 4.19, nusslet no.
#from dittus boelter eq.
Nu = 0.023*Re**0.8*Pr**0.4 #Prandtl no.
f = 0.0014+0.125*Re**-0.32 #friction factor
#Reynold anamath.logy
St = f/2 #Smath.tanton no.
Nu1 = Re*Pr*St
#Prandtl anamath.logy
St1 = (f/2)/(1+5*(Pr-1)*math.sqrt(f/2))
Nu2 = St1*Re*Pr
#colburn analogy
Nu3 = Re*Pr**(1./3)*(f/2)
h = Nu3*k/(di) #W/m**2 C av heat transfer coefficient
#Q = W_*cp*10**3*(To-Ti) = h*A*LMTD
A = math.pi*di*L #m**2
def f(To):
return W_*cp*10**3*(To-Ti)-h*A*((To-Ti)/math.log((Tw-Ti)/(Tw-To)))
To = fsolve(f,1)
#Revised calculation
Tm = (Ti+To)/2 #C, mean liquid temp.
#the properties of water at new mean liquid temp..
mu1 = 6.2*10**-4 #m**2/s, vismath.cosity
k1 = 0.623 #W/m C, thermal conductivity
rho1 = 991. #kg/m**3, density of air
cp1 = 4.17 #kj/kg C, specific heat of air
Pr1 = cp1*10**3*mu1/k1 #Prandtl no.
Re1 = di*V*rho1/mu1 # Reynold no.
#from dittus boelter eq.
f1 = 0.0014+0.125*Re1**(-0.32) #friction factor
#colburn anamath.logy
Nu4 = Re1*Pr1**(1./3)*(f1/2)
h1 = Nu4*k1/(di) #W/m**2 C av heat transfer coefficient
def f(To_):
return W_*cp*10**3*(To_-Ti)-h1*A*((To_-Ti)/math.log((Tw-Ti)/(Tw-To_)))
To_ = fsolve(f,1)
print "Outlet temp. of water for one pass through the tubes is %.0f C"%(To_)