from __future__ import division
import math
# Initialization of Variable
Tsi = 385 #degC
Ka = 0.15 #W/m.K
Kb = 0.08 #W/m2.K
Tinf = 25 #degC
ho = 25 #W/m2.K
Tso = 50 #degC
x = 2
#calculations:
#La
La = (Tsi - Tso)/(Tso - Tinf)/ho*Ka*Kb*2/(2*Kb + Ka)
#Lb
Lb = La/2
#required thickness for the composite window
L = La + Lb
#Results
print "required thickness of composite window is", round(L,4),"m"
from __future__ import division
import math
# Initialization of Variable
Tinf = 25 #degC
h = 100 #W/m2.K
Rtc2 = 0.9E-4 #m2.K/W
Pe2 = 10000 #W/m2
L = 8 #mm
k = 238 #W/m.K
#calculations:
Tc = Tinf + Pe2/(h + 1/(Rtc2 + L*1E-3/k + 1/h))
#Results
print "maximum allowable temperature is",round(Tc,1),"degC"
from __future__ import division
import math
# Initialization of Variable
Tinf2 = 300 #K
h = 20 #W/m2.K
Tinf1 = 77 #K
p = 804 #kg/m3
hfg = 2E5 #J/kg
r1 = 0.25 #m
r2 = 0.275 #m
k = 0.0017 #W/m.K
#calculations:
#resistances due to conduction
Rtcond = 1/(4*math.pi*k)*(1/r1 - 1/r2)
#resistances due to convection
Rtconv = 1/(h*4*math.pi*r2**2)
#rate of heat transfer to the liquid nitrogen
q = (Tinf2 - Tinf1)/(Rtcond - Rtconv)
#volumetric mass rate of nitrogen boil-off per day
mdotp = q/hfg*3600*24/p*1000
#Results
print "a) heat transfer is", round(q,2),"W"
print "b) rate of nitrogen boil-off is", round(mdotp,0),"liters/day"
from __future__ import division
import math
# Initialization of Variable
qadot = 1.5E6 #W/m3
ka = 75 #W/m.K
La = 50 #mm
Lb = 20 #mm
kb = 150 #W/m.K
qbdot = 0
Tinf = 30 #degC
h = 1000 #W/m2.K
#calculations:
#outer surface temperature
T2 = Tinf + qadot*La*1E-3/h
#resistance (conduction and converction):
RcondB2 = Lb*1E-3/kb
Rconv2 = 1/h
q2 = qadot*La*1E-3
#temperature at the composite interface
T1 = Tinf + (RcondB2 + Rconv2)*q2
#the inner surface temperature of the composite
To = qadot*(La*1E-3)**2/(2*ka) + T1
#Results
print "Inner and outer surface temperatures of the composite are", To,"degC and", T2,"degC respectively"
from __future__ import division
import math
# Initialization of Variable
Tinf = 25 #degC
r2 = 250 #mm
r1 = 200 #mm
kss = 15 #W/m.K
krw = 20 #W/m.K
qdot = 1E5 #W/m3
h = 500 #W/m2.K
#calculations:
#the tube wall conduction and convection resistances
Rcond1 = math.log(r2/r1)/(2*math.pi*kss)
Rconv1 = 1/(h*2*math.pi*r2*1E-3)
#heat rate per unit length
q1 = qdot*math.pi*(r2*1E-3)**2
#waste surface temperature
Ts1 = Tinf + q1*(Rcond1 + Rconv1)
#the centerline temperature
To = qdot*(r1*1E-3)**2/(4*krw) + Ts1
#Results
print "Maximum temperature in the system is", round(To,0),"degC"
#answer wrong in book
from __future__ import division
import math
#from pylab import *
%pylab inline
# Initialization of Variable
Tinf = 25 #degC
h = 100 #W/m2.K
D = 5 #mm
Tb = 100 #degC
#calculations:
#from Table HT-1
kcu = 398 #W/m.K
kal = 180 #W/m.K
kss = 14 #W/m.K
#m
mcu = (4*h/(kcu*D*1E-3))**0.5
mal = (4*h/(kal*D*1E-3))**0.5
mss = (4*h/(kss*D*1E-3))**0.5
#creating empty lists for plotting
x =[]
Tcu =[]
Tal =[]
Tss =[]
for h in range(3000):
x.append((h-1)/10)
k = (h-1)/10
#Temp profile
Tcu.append(Tinf + (Tb - Tinf)*math.e**-(mcu*k/1000))
Tal.append(Tinf + (Tb - Tinf)*math.e**-(mal*k/1000))
Tss.append(Tinf + (Tb - Tinf)*math.e**-(mss*k/1000))
# plots
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.plot(x,Tcu,'.')
ax.plot(x,Tal,'.')
ax.plot(x,Tss,'.')
ax.legend('CAS')
xlabel('x(mm)')
ylabel('T (degC)')
title('Temperature distribution along the fin')
show()
#fin heat rate
qfcu = (h*math.pi*D*1E-3*kcu*math.pi/4*(D*1E-3)**2)**0.5*(Tb - Tinf)
qfal = (h*math.pi*D*1E-3*kal*math.pi/4*(D*1E-3)**2)**0.5*(Tb - Tinf)
qfss = (h*math.pi*D*1E-3*kss*math.pi/4*(D*1E-3)**2)**0.5*(Tb - Tinf)
#length
Lcu = 2.65*((kcu*(math.pi*(D*1E-3)**2)/4)/(h*math.pi*D*1E-3))**0.5
Lal = 2.65*(kal*math.pi/4*(D*1E-3)**2/(h*math.pi*D*1E-3))**0.5
Lss = 2.65*(kss*math.pi/4*(D*1E-3)**2/(h*math.pi*D*1E-3))**0.5
#results
print "a) fin heat rate for copper is", round(qfcu,1),"W, for Aluminium is", round(qfal,1),"W and for Stainless Steel is", round(qfss,1),"W"
print "b) length for copper >=", round(Lcu*1000,3),"mm, for Aluminium >=",round(Lal*1000,0),"mm and for Stainless Stell >=", round(Lss*1000,0),"mm"
from __future__ import division
import math
# Initialization of Variable
t = 0.7 #mm
Tinf = 20 #degC
h = 25 #W/m2.K
T1 = 80 #degC
Rtc2 = 1E-3 #m2.K/W
r1 = 2 #mm
r2 = 3 #mm
r3 = 13 #mm
H = 6 #mm
k = 200 #W/m.K
#calculations:
#Thermal resistances associated with the contact joint and sleeve
Rtc = Rtc2/(2*math.pi*r1*1E-3*H*1E-3)
Rtsleeve = math.log(r2/r1)/(2*math.pi*H*1E-3*k)
#P, Ac
P = 2*(H+t)*1E-3
Ac = t*H*1E-6
#m, L
m = (h*P/(k*Ac))**0.5
L = r3 - r2
#the thermal resistance for a single fin
Rtf = ((h*P*k*Ac)**0.5*(math.sinh(m*L*1E-3) + h/(m*k)*math.cosh(m*L*1E-3))/(math.cosh(m*L*1E-3) + h/(m*k)*math.sinh(m*L*1E-3)))**-1
#thermal resistance of 12 fins
Rtf12 = Rtf/12
#the thermal resistance due to convection
Rtb = 1/(h*(2*math.pi*r2*1E-3 - 12*t*1E-3)*H*1E-3)
#the equivalent resistance is
Requiv = (1/Rtf12 + 1/Rtb)**-1
#total resistance of the finned sleeve
Rtot = Rtc + Rtsleeve + Requiv
#heat transfer rate from the sleeve
qt = (T1-Tinf)/Rtot
#Results
print "heat transfer rate is", round(qt,2),"W"
from __future__ import division
import math
# Initialization of Variable
Tinf = 20 #degC
h = 25 #W/m2.K
Ti = 225 #degC
D = 12.5 #mm
t = 6 #min
#calculations:
#from Table HT-2
p = 2225 #kg/m3
c = 835 #J/kg
k = 1.4 #W/m.K
#the characteristic length of the spherical bead
Lc = D*1E-3/6
#Biot num
Bi = h*Lc/k
#temperature T(t) after 6 min
Tt = Tinf + (Ti - Tinf)*math.e**(-1*h*t*60/(p*Lc*c))
#Results
print "temperature after 6 min is", round(Tt,0),"degC"
from __future__ import division
import math
# Initialization of Variable
e = 0.8
h = 40 #W/m2.K
Tinf = 175 #degC
Ti = 25 #degC
L = 1.5 #mm
Tsur = 175 #degC
Tc = 150 #degC
t = 5
#calculations:
k = 177 #W/m.K
hrad = 12 #W/m2.K
p = 2770 #kg/m3
c = 875 #J/kg
#biot num
Bi = (h + hrad)*L*1E-3/k
#time required for the panel to reach the cure temperature
tc = (p*L*1E-3*c/(h+hrad))*math.log((Ti-Tinf)/(Tc - Tinf))
#total time to complete the 5-min duration cure
tc = tc + t*60
#Results
print "Elapsed time for completion of the cure process, tc =", round(tc,0),"sec"
from __future__ import division
import math
# Initialization of Variable
L = 25 #mm
Tinf = 175 #degC
h = 100 #W/m2.K
Ti = 25 #degC
p = 2325 #kg/m3
c = 800 #J/kg
k = 1.0 #W/m.K
t = 10 #min
#calculations:
a = k/(p*c)
#a) at t = 10 min
Bi = h*L*1E-3/k
Fo = a*t*60/(L*1E-3)**2
#b)
zeta = 1.1347
C = 1.1949
theta0_s = C*math.e**(-1*Fo*zeta**2)
#midplane temperature
T0_10 = Tinf + theta0_s*(Ti-Tinf)
#surface temperature
theta_s = theta0_s*math.cos(zeta*1)
TL_10 = Tinf + theta_s*(Ti - Tinf)
#c)
#Heat transfer to the slab outer surface
qL2 = h*(TL_10 - Tinf)
#d)
#the energy per unit surface area is
Q2 = (1 - math.sin(zeta)*theta0_s/zeta)*p*c*L*1E-3*(Ti-Tinf)
#Results
print "a) Biot and Fourier numbers after 10 min are",round(Bi,2),"and", round(Fo,3),"respectively"
print "b) Slab midplane and surface temperatures after 10 min is", round(T0_10,0),"degC"
print "c) Heat flux to the slab at 10 min is", round(qL2,0),"W/m2"#answer wrong in book
print "d) Energy transferred to the slab per unit surface area after 10 min is", round(Q2,0),"J/m2"
from __future__ import division
import math
# Initialization of Variable
Tinf = 20 #degC
h = 6000 #W/m2.K
Ti = 400 #degC
T0_tc = 50 #degC
r0 = 5 #mm
p = 3000 #kg/m3
c = 1000 #J/kg
k = 20 #W/m.K
a = 6.66E-6 #m2/s
#calculations:
#biot num
Bilcm = h*(r0/3*1E-3)/k
Bi = h*r0*1E-3/k
#from Table 16.6
zeta = 1.8
C = 1.376
#Fourier number
Fo = -1/zeta**2*math.log(1/C*(T0_tc - Tinf)/(Ti - Tinf))
#center termperature
tc = Fo*(r0*1E-3)**2/a
#Results
print "Time tc required to satisfy the cooling requirement is", round(tc,1),"s"
from __future__ import division
import math
# Initialization of Variable
Ts = -15 #degC
Ti = 20 #degC
Txm_t = 0#degC
p = 2050 #kg/m3
c = 1840 #J/kg
k = 0.52 #W/m.K
t = 60 #days
#calculations:
a = k/(p*c)
LHS = (Txm_t - Ts)/(Ti - Ts)
#from Appendix HT-6
#if erf(z) = LHS then
z = 0.4
#minimum depth to avoid freezing
xm = 2*(a*t*3600*24)**0.5*z
#Results
print "Minimum pipe depth to avoid freezing is", round(xm,2),"m"