#calculate the experimental value of thermal conductivity and Required temperature
#Initialization of variables
import math
r1=1.12 #in
r2=3.06 #in
t1=203 #F
t2=184 #F
r3=2.09 #in
po=11.1 #watts
#calculations
km=po*3.413*(12/r1-12/r2)/(4*math.pi*(t1-t2))
dt=po*3.413*(12/r1-12/r3)/(4*math.pi*km)
t3d=t1-dt
#results
print '%s %.2f %s' %("The experimental value of thermal conductivity =",km,"Btu/hr ft F")
print '%s %.1f %s' %("\n Required temperature =",t3d," F")
#calculate the heat loss and Temperature required
#Initialization of variables
import math
r1=4.035 #in
r2=4.312 #in
r3=5.312 #in
r4=6.812 #in
k12=25 #Btu/hr ft F
k23=0.05 #Btu/hr ft F
k34=0.04 #Btu/hr ft F
t1=625. #F
t4=125. #F
l=100. #ft
hr=1.7 #Btu/hr ft^2 F
#calculations
Rs=1/(2.*math.pi*l) *(math.log(r2/r1) /k12+math.log(r3/r2) /k23 +math.log(r4/r3) /k34)
Qd=(t1-t4)/Rs
dt=Qd*12/(hr*math.pi*2*l*6.812)
t0=t4-dt
#results
print '%s %d %s' %("Heat loss =",Qd,"Btu/hr")
print '%s %d %s' %("\n Temperature required =",t0,"F")
print '%s' %("The answers given in the textbook are a bit different due to rounding off error")
#calculate the Coefficient of heat transfer
#Initialization of variables
import math
dout=1 #in
d1=0.049 #in
t1=70. #F
t2=80. #F
rho=62.2 #lbm/ft^3
mum=2.22 #lbm/ft hr
k=0.352 #Btu/hr ft F
cp=1 #Btu/lbm F
vel=500000. #lbm/hr
n=100. #tubes
#calculations
D=dout-2*d1
t=(t1+t2)/2.
V=vel/n *4*144/(math.pi*D**2 *rho)
Re=rho*V*D/(mum*12)
Pr=cp*mum/k
Nu=0.023*Re**0.8 *Pr**0.4
hc=Nu*k*12/D
#results
print '%s %d %s' %("Coefficient of heat transfer =",hc,"Btu/hr ft^2 F")
#calculate the Coefficient of heat transfer and Percentage change
#Initialization of variables
import math
d1=0.5 #ft
t1=200. #F
t2=80. #F
ta=400. #F
rho=0.0662 #lbm/ft**3
mum=0.0483 #lbm/ft hr
k=0.0167 #Btu/hr ft F
cp=0.2408 #Btu/lbm F
rho2=0.0567 #lbm/ft**3
mum2=0.0542 #lbm/ft hr
k2=0.0190 #Btu/hr ft F
cp2=0.2419 #Btu/lbm F
g=32.17
#calculations
ti=(t1+t2)/2.
bet=1/(460.+ti)
Pr1=cp*mum/k
Gr1=d1**3 *rho**2 *3600**2 *g*bet*(t1-t2)/mum**2
Gr1pr1=Gr1*Pr1
hc1=k/d1 *0.53*(Gr1pr1)**0.25
Q1=hc1*(t1-t2)
tf=(ta+t2)/2.
bet2=1/(460.+tf)
Pr2=cp2*mum2/k2
Gr2=d1**3 *rho2**2 *3600**2 *g*bet2*(ta-t2)/mum2**2
Gr2pr2=Gr2*Pr2
hc2=k2/d1 *0.53*(Gr2pr2)**0.25
Q2=hc2*(ta-t2)
per=100*(Q2-Q1)/Q1
#results
print '%s %.3f %s' %("Coefficient of heat transfer in case 1=",hc1," Btu/hr ft^2 F")
print '%s %.3f %s' %("\n Coefficient of heat transfer in case 2 =",hc2,"Btu/hr ft^2 F")
print '%s %d %s' %("\n Percentage change =",per,"percent")
#calculate the Temperature o wing surface and Heat transfer convective
#Initialization of variables
chord=40. #ft
v=1200. #mph
t1=80. #F
t2=200. #F
mu=0.0447 #lbm/ft hr
rho=5280. #lbm/ft**3
cp=0.2404 #Btu/lbm F
k=0.0152 #Btu/hr ft F
J=778.
gc=32.17 #ft/s**2
mu2=0.0514 #lbm/ft hr
k2=0.0179 #Btu/hr ft F
cp2=0.2414 #Btu/lbm F
#calculations
Re=rho*v*chord*0.0735/mu
r=(mu*cp/k)**(1./3.)
tav=t1+ r*v**2 *rho**2 /(2*gc*J*cp*3600**2)
ts=t1+ 0.5*(t2-t1)+ 0.22*(tav-t1)
Re2=v*rho*chord*0.0610/mu2
Pr2=cp2*mu2/k2
hc=cp2*v*rho*0.0610 *0.037*Re2**(-0.2) *Pr2**(-0.667)
Q2=hc*(t2-tav)
#results
print '%s %.1f %s' %("Temperature of wing surface =",tav," F")
print '%s %d %s' %("\n Heat transfer convective =",Q2,"Btu/hr ft^2")
print '%s' %("The answers are a bit different due to rounding off error in textbook")
#calculate the percent of radiation emitted by surface and percent absorbed
#Initialization of variables
import math
r1=1. #in
r2=5. #in
F12=1.
#calculations
F21=4*math.pi*r1**2 *F12/(4*math.pi*r2**2)*100
F22=(1-F21/100.)*100.
#results
print '%s %d %s' %("Percent of radiation emitted by surface 2 on small sphere =",F21," percent")
print '%s %d %s' %("\n Remaining",F22, "percent is absorbed by inner surface of larger sphere")
#calculate the Net exchange of radiation
#Initialization of variables
short=2. #ft
apart=3. #ft
lon=4. #ft
T1=2260. #R
T2=530. #R
sigma=0.1714
#calculations
A1=short*lon
ratio=short/apart
print '%s' %("from curve 3")
F=0.165
Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)
#results
print '%s %d %s' %("Net exchange of radiation =",Q12,"Btu/hr")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Net exchange of radiation
#Initialization of variables
F=0.51
A1=8 #ft^2
sigma=0.1714
T1=2260. #R
T2=530. #R
#calculations
Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)
#results
print '%s %d %s' %("Net exchange of radiation =",Q12,"Btu/hr")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Net exchange of radiation
#Initialization of variables
F=0.51
A1=8. #f^2
sigma=0.1714
T1=2260. #R
T2=530. #R
#calculations
F12=1/(1/0.51 +(1/0.9 -1) +(1/0.6 -1))
Q12=A1*F12*sigma*((T1/100)**4 -(T2/100)**4)
#results
print '%s %d %s' %("Net exchange of radiation =",Q12,"Btu/hr")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Percentage change in total heat transfer
#Initialization of variables
em=0.79
sigma=0.1714
T1=660. #R
T2=540. #R
T3=860. #R
#calculations
Q1=em*sigma*((T1/100)**4 -(T2/100)**4)
Q2=em*sigma*((T3/100)**4 -(T2/100)**4)
Qh1=129+Q1
Qh2=419+Q2
per=100*(Qh2-Qh1)/Qh1
#results
print '%s %.1f %s' %("Percentage change in total heat transfer =",per,"percent")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Error in probe reading
#Initialization of variables
Tp=12.57
Tw=10.73
ep=0.8
sig=0.1714
hc=7
#calculations
dt=ep*sig*(Tp**4-Tw**4)/hc
#results
print '%s %d %s' %("Error in probe reading =",dt,"F")
#calculate the Heat transfer in both cases
#Initialization of variables
import math
l=6 #ft
d1=0.55 #in
d2=0.75 #in
h1=280. #Btu/hr ft^2 F
h2=2000. #Btu/fr ft^2 F
k=220. #Btu/hr ft F
t2=212. #F
t1=60. #F
f=500. #Btu/hr ft^2 F
#calculations
A2=math.pi*d1*l/12
A3=math.pi*d2*l/12
Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)
Q=(t2-t1)/Rt
Rt2=Rt+ 1/(f*A2)
Q2=(t2-t1)/Rt2
#results
print '%s %d %s' %("Heat transfer =",Q,"Btu/hr")
print '%s %d %s' %("\n Heat transfer in case 2=",Q2," Btu/hr")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Overall Heat transfer coefficient
#Initialization of variables
import math
l=6 #ft
d1=0.55 #in
d2=0.75 #in
h1=280. #Btu/hr ft^2 F
h2=2000. #Btu/fr ft^2 F
k=220. #Btu/hr ft F
t2=212. #F
t1=60. #F
#calculations
A2=math.pi*d1*l/12
A3=math.pi*d2*l/12
Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)
U3=1/(A3*Rt)
#results
print '%s %.1f %s' %("Overall Heat transfer coefficient =",U3,"Btu/hr ft^2 F")
print '%s' %("The answer in the textbook is a bit different due to rounding off error in textbook.")
#calculate the Parameters X and Z
#Initialization of variables
t1=300. #F
t2=260. #F
t3=200. #F
t4=160. #F
#calculations
X=(t2-t4)/(t1-t4)
Z=(t1-t3)/(t2-t4)
#results
print '%s %.3f %s %.1f %s' %("Parameters X and Z are",X, "and",Z,"respectively")