# Initialization of Variable
from math import pi
from math import atan
from numpy import *
x1=0.135 #moisture
x2=0.056 #ash content
veca=array([32.5, 48.4, 5.6, 13.5]) #materials as received
B1=11788.0 #Btu/lb
#calculations
vecb=veca/(1-x1) #moisture free
vecc=veca/(1-x1-x2) #moisture and ash free
B2=B1/(1-x1)
B3=B1/(1-x1-x2)
vecb[3]=0
vecc[3]=0
vecc[2]=0
#results
print "In Moisture free case",vecb
print "In Moisture and Ash free case ",vecc
print "Energy in Moisture free case Btu per lb",round(B2,3)
print "Energy in Moisture and ash free case Btu per lb",round(B3,2)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
y1=13.5
x1=0.135 #moisture
x2=0.056 #ash
veca=array([66.0, 1.5, 1.1, 5.6, 5.9, 19.9]) # fram table 2.3
vecb=array([66.0, 1.5, 1.1, 5.6, 5.9, 19.9,13.5]) #with moisture
#calculations
vecb[4] = vecb[4] - 1.0/9*y1 ;
vecb[5] = vecb[5] - 8.0/9*y1 ;
vecc=vecb/(1-x1)
vecd=vecb/(1-x1-x2) # moisture and ash free
vecd[3]=0
vecd[6]=0
vecc[6]=0
s1=sum(vecc)
s2=sum(vecd)
#results
print "With moisture as a separate item",vecb
print "In Moisture free case, ",vecc
print "In Moisture and Ash free case",vecd
print "Total Mositure free content percent",round(s1,3)
print " Total Mositure and ash free content percent",round(s2,3)
print "slight error due to rounding off error"
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
H=5.9
O=19.9
H2=4.4
O2=7.9
#calculations
Ha1=H-O/8
Ha2=H2-O2/8
#results
print "Available hydrogen in case 1 percent by weight",round(Ha1,3)
print " Available hydrogen in case 2 percent by weight",round(Ha2,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
H1=0.059
O1=0.199
H2=0.044
O2=0.079
C=0.66
S=0.011
#calculations
Qh1= 14600*C+62000*(H1-O1/8)+4050*S #heating value
Qh2=14600*C+62000*(H2-O2/8)+4050*S #heating value
#results
print "Heating value in case 1 Btu/lb ",round(Qh1,3)
print " Heating value in case 2 Btu/lb ",round(Qh2,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
H1=0.059
O1=0.199
C=0.66
S=0.011
#calculations
Qh1= 11.52*C+34.56*(H1-O1/8)+4.32*S
#results
print "Theoretical air required in lb of air per lb of coal ",round(Qh1,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
mf=10000 #lb
mr=700 #lb
Cr=0.20
Cco2=14.1 #% CO2
Co2=5.1 #% O2
Cco=0.1 #% CO
Cf=0.66
#calculations
Cn2=100-(Cco2+Co2+Cco) #% N2
Ci=mf*Cf #carbon input
Ca=mr*Cr #carbon in ashpit
Cb=(Ci-Ca)/mf
Cb2=((mf*Cf)-mr*Cr)/(mf)
Mco2=Cco2 *44 #mass of CO2
Mo2=Co2 *32 #mass of O2
Mco=Cco *28 #mass of CO
Mn2=Cn2 *28 #mass of N2
sumvec=Mo2+Mco2+Mco+Mn2;
Lbc=Cco2*12 + Cco*12
Gc=sumvec/Lbc
Gf=Gc*Cb
#results
print "Carbon in the dry products combustion in lb per lb of fuel",round(Cb,3)
print " In case 2, Carbon in the dry products combustion in lb per lb of fuel",round(Cb2,3)
print " Dry gaseous products of combstion per lb of coal in lb ",round(Gf,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
mf=10000.0 #lb
mr=700.0 #lb
Cr=0.20
Cco2=14.1
Co2=5.1
Cco=0.1
Cf=0.66
#calculations
Cn2=100-(Cco2+Co2+Cco)
Ci=mf*Cf
Ca=mr*Cr
Cb=(Ci-Ca)/mf
Cb2=((mf*Cf)-mr*Cr)/(mf)
Mco2=Cco2 *44 #mass of CO2
Mo2=Co2 *32 #mass of O2
Mco=Cco *28 #mass of CO
Mn2=Cn2 *28 #mass of N2
sumvec=Mn2+Mco2+Mco+Mn2;
Cbb1=Cb*Cco*12/(Cco2*12 + Cco*12)
Cbb2= Cb*(Cco /(Cco + Cco2))
#results
print "In case 1, Carbon burned per lb of fuel in lb per lb of fuel",round(Cbb1,6)
print " In case 2, Carbon burned per lb of fuel in lb per lb of fuel",round(Cbb2,6)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
H=4.4/100 #hydrogen
M=13.5/100 #moisture
H2=0.059 #hydrogen
#calculations
pro=M+9*H
pro2=9*H2
#results
print "In case 1, watervapor present in products in lb",round(pro,3)
print "In case 2, watervapor present in products in lb",round(pro2,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
Gf=11.57;#lb
f=11.57 #lb per lb of fuel
H=4.4/100
M=13.5/100
mr=700.0 #lb
mf=10000.0 #lb
mc=1 #lb
#calculations
pro=M+9*H
mrf=mr/mf
Aa=Gf+pro+mrf-mc
#results
print "Actual air supplied in lb of air supplied per lb of fuel",round(Aa,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
Gf=11.57 #lb per lb of fuel
H=4.4/100
M=13.5/100
mr=700.0
mf=10000.0
mc=1.0 #lb
#calculations
pro=M+9*H
mrf=mr/mf
Aa=Gf+pro+mrf-mc
At=8.83
ea=(Aa-At)/At *100
#results
print "Excess air in percent",round(ea,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
Gf=11.57 #lb per lb of fuel
tg=500 #F
ta=70 #F
#calculations
Q1=0.24*Gf*(tg-ta)
#results
print "Heat loss in Btu per lb of fuel",round(Q1,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
Co=0.1
Co2=14.1
Cb=0.646
#calculations
Q2=Co/(Co+Co2) *Cb*10160
#results
print "Heat loss in Btu per lb of fuel",round(Q2,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
mf=10000.0 #lb
mr=700.0 #lb
Cr=0.2
#calculations
Q3=mr*Cr/mf *14600
#results
print "Heat loss in Btu per lb of fuel",round(Q3,2)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
M=0.135
tg=500.0 #F
ta=70.0 #F
#calculations
Q4=M*(1089+0.46*tg-ta) #heat loss
#results
print "Heat loss in Btu per lb of fuel",round(Q4,3)
# Initialization of Variable
from math import pi
from math import atan
from numpy import *
Per=0.044 #percentage
tg=500 #F
ta=70 #F
#calculations
Q5=9*Per*(1089+0.46*tg-ta) #heat loss
#results
print "Heat loss in Btu per lb of fuel",round(Q5,3)