import math
# Variables
Ts = 5780. #K, surface temp.
# Calculations and Results
#(a)
lamda1 = 0.4 #micrometer, starting visible spectrum range
lamda2 = 0.7 #micrometer,ending visible spectrum range
E1 = lamda1*Ts #micrometer K,
E2 = lamda2*Ts #micrometer K,
#from table 7.2
#fraction of radiation lying between 0 and lamda1
F1 = 0.1229
#fraction of radiation lying between 0 and lamda2
F2 = 0.4889
#the fraction of radiation falls betweem lamda1 & lamda 2
F3 = F2-F1
print "the fraction of radiation falls in visible range is %.3f "%(F3)
#(b)
F4 = F1
print "the fraction of radiation on the left of visible range is %.4f "%(F4)
#(c)
F5 = 1-F2
print "the fraction in right of visible range is %.4f "%(F5)
#(d)
#from wein's print lacement law
lmax = 2898/Ts
print "The maximum wavelength is %.4f micrometer is"%(lmax)
c = 2.998*10**8 #m/s, speed of light
mu = c/lmax
print "The frequency is %1.2e s**-1"%(mu)
#(e)
#from eq. 7.4
h = 6.6256*10**-34 #Js planck's consmath.tant
k = 1.3805*10**-23 #J/K, boltzman consmath.tant
Eblmax = (2*math.pi*h*c**2*(lmax*10**-6)**-5)/((math.exp(h*c/(lmax*10**-6*k*Ts)))-1)
print "the maximum spectral emissive power is %1.3e W/m**2"%(Eblmax)
#(f)
s = 5.668*10**-8 #stephen math.cosmath.tant
Eb = s*Ts**4
print "the hemispherical total emissive power is %1.3e W/m**2"%(Eb)
# note : rounding off error.
#Variables
Eb = 4000. #W/m sq, Total emmisive power
s = 5.669*10**-8 #Stephen boltzman consmath.tant
#Calculation
T = (Eb/s)**0.25 #k, surface temp. of black body
ym = 2898./T #micro meter,
#By weins law : Max. wavelength of emmision is inversaly proportional
#to temprature. and consmath.tant is 2898 micrometer.
#Result
print "Surface temp. is %.0f C"%(T)
print "wavength is %.2f micrometer "%(ym)
print " from fig 7.1 it falls in the infrared region of spectrum."
# Variables
T = 1500. #K, surface temprature
#from fig 7.7
e1 = 0.2 #emissivity ,when wavelength(l1) is 0<l1<2 micrometer
e2 = 0.6 #emissivity ,when wavelength(l2) is 2<l2<6 micrometer
e3 = 0.1 #emissivity ,when wavelength(l3) is 6<l3<10 micrometer
e4 = 0 #emissivity ,when wavelength(l4) is l4>10 micrometer
#from table 7.2
F1 = 0.2733 #fraction of energy in wavelength (l1)
F2 = 0.89-F1 #fraction of energy in wavelength (l2)
F3 = 0.9689-0.89 #fraction of energy in wavelength (l3)
#Calculation and Result
s = 5.669*10**-8 #stephen's consmath.tant
Eb = s*T**4 #emissive power
E = (e1*F1+e2*F2+e3*F3)*Eb
print "total hemispherical) emissive power is %1.3e W/m**2"%(E)
#(b)
e = E/(s*T**4)
print "total hemispherical) emissivity of the surface is %.4f"%(e)
from scipy.integrate import quad
# Variables
ri = 5. #cm ,inside radius of ring
w = 3. #cm, width
ro = ri+w #cm, outside radius
L = 20. #cm, surface dismath.tance
# Calculations
def f4(r):
return 20.**2*r/(20.**2+r**2)**2
F1 = 2* quad(f4,0,ri)[0]
#view factor along surface dA1-A2"
def f5(r):
return 20**2*r/(20**2+r**2)**2
F2 = 2* quad(f5,ri,ro)[0]
# Results
print "fraction of radiation passes through hole %.4f "%(F1)
print "fraction of radiation intercepted by the ring %.4f "%(F2)
import math
#Variables
F11 = 0 #view factor
d = 1. #let it be
print "view factor F11 = %.0f" %(F11)
#Calculation and Result
F12 = 1-F11 #view factor
print "view factor F22 = %.0f"%(F12)
A1 = ((math.pi)*d**2)/4 #sq m, area
A2 = ((math.pi)*d**2)/2 #sq m, area
F21 = A1/A2 #from eq . 7.26
print "view factor F21 = %.1f"%( F21)
F22 = 1-F21
#Results
print "view factor = %.1f"%(F22)
import math
#Variable
s = 3. #no. of surface
tvf = s**2 #total view factor
#using the result of example 7.8
F11 = 0
F33 = 0.5
print "view factor F11 = %.0f"%(F11)
print "view factor F33 = %.1f"%(F33)
#Calculation & Results
R1 = 0.25 #R = d/2*h &h = 2d
R2 = 0.25
X = 1+((1+R2**2)/(R1**2))
F14 = (0.5)*(X-math.sqrt((X**2)-4*(R2/R1)**2))
print "view factor F14 = %.3f"%(F14)
F13 = F14
print "view factor F13 = %.3f"%(F13)
F12 = 1-F11-F13 # from eq. 7.31 for surface 1
print "view factor F12 = %.3f"%(F12)
d = 1. #say
A1 = (math.pi*(d**2))/4.
A3 = (math.pi*(d**2))/2.
F31 = A1*F13/(A3)
print "view factor F31 = %.3f"%(F31)
# from eq. 7.31 for surface 3
F33 = 0.5
F32 = 1-F31-F33
print "view factor F32 = %.3f"%(F32)
#for surface 2
A2 = 2*math.pi*d**2
F21 = A1*F12/A2
print "view factor F21 = %.3f"%(F21)
F23 = A3*F32/A2
print "view factor F23 = %.3f"%(F23)
F22 = 1-F21-F23
print "view factor F22 = %.3f"%(F22)
import math
# Variables
ds = 0.3 #m, diameter of shell
r1 = 0.1 #m, dismath.tance from the centre
#Calculation and Results
#by the defination of view factor
F12 = 1.
print "The view factor from surface 1 to 2 is %.0f"%(F12)
#F21
R = ds/2. #m, radius of sphere
r2 = math.sqrt(R**2-r1**2)
A1 = math.pi*r2**2 #m**2 area
A2 = 2*math.pi*R**2+2*math.pi*R*math.sqrt(R**2-r2**2)
#from reciprocity relation
F21 = (A1/A2)*F12
print "The view factor from surface 2 to 1 is %.3f"%(F21)
import math
from scipy.integrate import quad
# Variables
d = 0.3 #m, diameter of steel sphere
Ti = 800. #K, initial temp. of sphere
T2 = 303. #C,ambient temp.
T1 = 343. #C, final tempreture
rho = 7801. #kg/m**3, density of steel
cp = 0.473 #kj/kg C, specific heat of steel
#calculation
R = d/2 #m, radius of sphere
A1 = 4*math.pi*R**2 #m**2, area of sphere
m = 4./3*math.pi*R**3*rho #m**3, mass of sphere
F12 = 1. #view factor
s = 5.669*10**-8 #stephen Boltzman's consmath.tant
#-dT1/dt = A1*F12*s*(T**4-T2**4)/(m*cp)
def f1(T1):
return (1/(T1**4-T2**4))
I = quad(f1,343,800)[0]
t = I/(A1*F12*s/(m*cp*10**3))
# Results
print "The time required for the ball to cool is %.1f h"%(t/3600)
import math
#Variables
d = 0.114 #m, dia.o f pipe
l = 1. #m, length of pipe
A = (math.pi)*d*l #m sq, area
e1 = 1. #emmisivity of black body
F12 = 1. #view factor, 1:pipe surface, 2:room walls
s = 5.67*10**-8 #stephen boltzman consmath.tant
T1 = 440. #K, steam temp.
T2 = 300. #K, wall temp.
#Caluclation
Q12 = A*e1*F12*s*(T1**4-T2**4) #net rate of radiative heat loss
#Results
print "a) Net rate of radiative heat loss Q12 = %.1f W "%(Q12)
#Part-b
e2 = 0.74
Q12 = A*e2*F12*s*(T1**4-T2**4) #net rate of radiative heat loss
print "b) Net rate of radiative heat loss Q12 = %.1f W"%(Q12)
import math
#Variable declaration
F12 = 1. #view factor
r1 = 0.15 #m inner radius of phere
r2 = 0.155 #m , outer radius
#Calculation
A1 = 4.*(math.pi)*r1**2 #sq m inner area
A2 = 4.*(math.pi)*r2**2 #sq m,outer area
F21 = A1/A2
h = 200. #J/g, heat of vaporization of nitrogen
s = 5.669*10**-8 # boltzman consmath.tant
T2 = 298. #K, temp. of outer wall
T1 = 77. #K, Temp. of inner wall
e1 = 0.06 #emmisivity
e2 = 0.06 #emmisivity
x = ((1-e1)/(e1*A1))+(1/(A1*F12))+((1-e2)/(e2*A2))
Q1net = (s*(T2**4-T1**4))/(x)
#Result-a-i
print "a-i) View factor F12 = %.0f"%(F12)
print "view factor F21 = %.3f"%(F21)
#Result- b
print "ii) The net rate of heat gain Q1net = %.1f J/s"%(Q1net)
nl = Q1net/h
nl = nl*3600 #g/h
print "b) Rate of nitrogen loss = %.0f g/h"%(nl)
import math
# Variables
x = 0.15 #m, length of opening on a furnace
y = 0.12 #m, width of opening on a furnace
x1 = 6. #m, width of wall
y1 = 5. #m, height of wall
e2 = 0.8 #emissivity of wall
T1 = 1400. #C, furnace temp.
T2 = 35. #C, wall temp.
T3 = 273. #C, smath.radians(numpy.arcmath.tan(ard temp.
s = 5.669*10**-8 #stephen boltzman's consmath.tant
#in fig. 7.29
l1 = 2. #m, l1 = AF
l2 = 1.5 #m, l2 = AH
h = 3. #m, E = dA1
# Calculations
F1 = (1./(2*math.pi))*((l2/(math.sqrt(l2**2+h**2)))*math.tanh(l1/(math.sqrt(l2**2+h**2)))+(l1/(math.sqrt(l1**2+h**2)))*math.tan(l2/(math.sqrt(l1**2+h**2))))
#Similarly
#for the dA1-A3 pair the equation is
F2 = 0.1175
#for the dA1-A4 pair the equation is
F3 = 0.1641
#for the dA1-A5 pair the equation is
F4 = 0.0992
#view factor b/w the opening (dA1)and the wall (W) is
F5 = F1+F2+F3+F4
#Calculation of radient heat exchange
dA1 = x*y
Aw = x1*y1
Eb1 = s*(T1+T3)**4
Ebw = s*(T2+T3)**4
F6 = dA1*F5/Aw
Q = dA1*F5*e2*(Eb1*(1-(1-e2)*F6)-Ebw)
# Results
print "the net rate of radiant heat transfer to the wall is %.0f W"%(round(Q,-2))
#Variable declaration
l = 3. #m, length of wall
w = 2. #m, width of, wall
d = 3. #m
R1 = l/d
A1 = l*w #sq m,area 1: front part
A2 = A1 #sq m , area, 2"back part
e1 = 0.7 #emmisivity
e2 = 0.7 #emmisivity
T1 = 673. #k
T2 = 523. #k
s = 5.669*10**-8 #stephen boltzman consmath.tant
#Calculation
F12 = 0.148 #view factor ,from fig. 7.12
x = (A1+A2-2*A1*F12)/(A2-(A1*(F12**2)))+((1/e1)-1)+(A1/A2)*((1/e2)-1)
#Results
Q1net = -1*A1*(s*(T2**4-T1**4))/(x)
print "the net rate of radiant heat loss = %.1f kW "%(Q1net/1000)
# (b)
F24 = 1. #from fig 7.12
T20 = 333. #K, outer surface temp. of surface 2
T4 = 303. #K, ambient temp
Q2rad = A2*e2*F24*s*(T20**4-T4**4)
q = Q1net-Q2rad
q1 = q/1000 # Kw
h = q/(A2*(T20-T4))
print "convective heat transfer coeff. = %.0f W/sq m C"%(h)
from numpy import array, linalg
import math
# Variables
r1i = 0.1 #m, inner radius of disk 1
r1o = 0.2 #m, outer radius of disk 1
r2i = 0.12 #m, inner radius of disk 2
r2o = 0.25 #m, outer radius of disk 2
h = 0.08 #m, dismath.tance between the disks
R2 = r2o/h
R1 = r1o/h
X = 1+(1+R1**2)/R2**2
F23_14 = 1./2*(X-math.sqrt(X**2-4*(R1/R2)**2))
#calculation
R2_ = r2o/h
R1_ = r1i/h
X_ = 1+(1+R1_**2)/R2_**2
F23_4 = 1/2*(X_-math.sqrt(X_**2-4*(R1_/R2_)**2)) #view factor
#similarly
F3_14 = 0.815 #view factor
F34 = 0.4 #view factor
A23 = math.pi*r2o**2 #area
A3 = math.pi*r2i**2
A1 = math.pi*(r1o**2-r1i**2)
#from eq. 1
F12 = A23*(F23_14-F23_4)/A1-(A3*(F3_14-F34))/A1
#calculation of the rate of radiative heat exchange
# Variables
T1 = 1000. #K, temprature of disk 1
T2 = 300. #K, temprature of disk 2
s = 5.669*10**-8 #stephen's Boltzman consmath.tant
e1 = 0.8 #emissivity
e2 = 0.7
A2 = math.pi*(r2o**2-r2i**2)
F1s = 1-F12
F2s = 1-(A1*F12/A2)
#calculation
#let some quantities equal to
a = (1-e1)/(e1*A1)
b = 1/(A1*F12)
c = (1-e2)/(e2*A2)
d = 1/(A1*F1s)
e = 1/(A2*F2s)
f = s*T1**4
g = s*T2**4
#from eq. 7.42(a)
#(f-J1)/a = (J1-J2)/b+J1/d
#(g-J2)/c = (J2-J1)/b+J1/e
#solving two eqns by matrix
A = array([[-0.0564,0.5036],[0.4712,-0.0564]])
B = array([[161.847],[21376.31]])
X = linalg.solve(A,B)
J1 = X[0]
J2 = X[1]
#net rate of radiation exchange
Q12net = (J1-J2)/17.73
# Results
print "net rate of radiation exchange b/w disk 1 and 2 is %d W/m**2"%(Q12net)
from scipy.optimize import fsolve
import math
# Variables
di = 0.0254 #m, inner diameter of tube
Ti = 77. #K, liquid temprature
do = 52.5*10**-3 #m, pipe internal diameter
To = 270. #K, wall temprature
l = 1. #m, length of tube
e1 = 0.05 #emissivity of tube wall
e2 = 0.1 #emissivity of pipe wall
e3 = 0.02 #emissivity for inner surface of radiation field
e4 = 0.03 #emissivity for outer surface of radiation field
s = 5.669*10**-8 #stephen boltzman math.cosmath.tantl
#Calculation
ds = (do+di)/2 #m, diameter of radiation shield
Ao = math.pi*do*l #m**2, outer pipe area
As = math.pi*ds*l #m**2, shield area
Ai = math.pi*di*l #m**2, inner pipe area
#View factors
#for the long cylindrical enclosure made up of the outer pipe and the shield
Fso = 1. #because outer surface of shield cant see itself
Fos = As/Ao
Fsi = Ai/As
#now assume
#(1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4) = x
#(1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1 = y
x = (1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4)
y = (1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1
#solving the equations for heat transfer from the outer pipe and inner pipe
def f(Ts):
return (Ao*(To**4-Ts**4)/x)-(Ai*(Ts**4-Ti**4)/x)
Ts = fsolve(f,1)
Qos = (Ao*s*(To**4-Ts**4))/x
# Results
print "The net rate of heat gain of tube is %.2f W"%(Qos)
# note : rounding off error.
# Variables
T1 = 300 + 273. #K
Ta = 30. + 273. # K
w = 0.075 # m
k = 0.08 # W/m c
l = 1.075 # m
delta = 5.669 * 10**-8 # W/m**2 K**4
A1 = 1 * 1.5 # M**2
A2 = A1
A2m = (1.5 + 1.9)/2 # m**2
A3m = (5. + 6.02)/2 # m**2
# Calculations
T2 = 545.1 # k
T2_ = 322.6
T3 = 544.7
T3_ = 328.4
rate_of_heatloss1 = int(A2m*k/w*(T2-T2_))
rate_of_heatloss2 = int(A3m*k/w*(T3-T3_))
total = rate_of_heatloss1 + rate_of_heatloss2
# results
print "Rate of heat loss from the top surface : %d W"%rate_of_heatloss1
print "Rate of heat loss from the side walls : %d W"%rate_of_heatloss2
print "Total rate of heat loss : %d W"%total
import math
# Variables
T = 300. #K, temprature
per = 91. #percent, adsorbed radiation
lam = 4.2 #micrometer, wavelength radiation
L = 0.1 #m, path length
#calculation
# I2/I1 = f
f = 1-per/100. #fraction of incident radiation transmitted
#from eq. 7.69
a = -math.log(f)/L
# Results
print "the spectral extinction coefficient is %.2f m**-1"%(a)
# note : rounding off error.
# Variables
Ts = 800. #C, wall temp.
Tg = 1100. #C. burner temprature
CO2 = 8. #percent, composition of CO2 in flue gas
M = 15.2 #percent, composition of moisture in flue gas
a = 0.4 #m, length of duct
b = 0.4 #width of duct
h = 15. #W/m**2 C, heat transfer coefficient
P = 1. #atm pressure
#CAlCULATION of Eg(Tg)
pc = CO2/100.*P #atm, partial pressure of CO2
pw = M/100.*P #atm, partial pressure of moisture
l = 1. #m, length of duct
V = a*b*l #m**3, volume of duct
A = 1.6*l #m**2 area of duct
Le = 3.6*(V/A) #m, mean beam length
pc*Le
pw*Le
Tg_ = Tg+273.
Ts_ = Ts+273.
#from fig 7.38
Ec = 0.06
Eg = 0.048 #from fig 7.39
#a correction dE need to be calculated
#pw/(pc+pw)
#pc*Le+pw*Le
#from fig. 7.39
dE = 0.003
Eg_Tg = Ec+Eg-dE #emissivity at temp. Tg
#Calculation of alpha
#pc*Le*Ts/Tg
#from fig. 7.37
Ec1 = 0.068
#from fig. 7.38
Ew1 = 0.069
Cc = 1 #correction factor
Cw = 1 #correction factor
d_alpha = dE #AT 1 ATM TOTAL PRESSURE
alpha = Cc*Ec1*(Tg_/Ts_)**0.65+Cw*Ew1*(Tg_/Ts_)**0.45-dE
#radiant heat ransfer rate
s = 5.669*10**-8 #stephen's boltzman consmath.tant
Qrad = A*s*(Eg_Tg*Tg_**4-alpha*Ts_**4) #kW
Qconv = h*A*(Tg-Ts) #kW, convective heat transfer rate
Q = Qrad+Qconv
# Results
print "The total rate of heat transfer from the gas to the wall is %.1f kW"%(Q/1000)