#Find the theoretical air for combustion of octane to CO2 and H2O
#initialisation of variables
M= 114 #lb
Mo= 32 #lb
Mn= 28 #lb
Mc= 44 #lb
Mw= 18 #lb
#CALCULATIONS
Ma= (12.5*Mo+(12.5)*(79./21.)*Mn)/114. #theoretical air
#RESULTS
print '%s %.2f' %('Theoretical air for combustion (lb air per lb C8H18) = ',Ma)
raw_input('press enter key to exit')
#Fuel oil containing 86 percent of carbon and 14 percent hydrogen by mass is to
#be burned with 10% excess air. (b) If the pressure is 15 psia. What is the dew
# point of the products? (c)If the products are cooled to 100 F at 15 psia how
#much liquid water will condense per pound of fuel burned?
#Initialization of variables
MW=18. #gm/mol
MCO2=44. #gm/mol
MN2=28. #gm/mol
MO2=32. #gm/mol
P=15. #psia
#calculations
xw=(0.074/MW)/(0.184/MCO2 + 0.074/MW + 0.02/MO2 + 0.722/MN2)
Pw=xw*P
print '%s' %("Part b")
print '%s' %("\n From steam tables")
T=121.6 #F
print '%s %.2f' %('\n Partial pressure of water (psia) = ',Pw)
print '%s %.2f' %('\n Dew point at the pressure (F) = ',T)
print '%s' %("\n Part c")
pw2=0.9492 #Pressure
xw2=pw2/P
y = MW*(0.0346*xw2/(1-xw2))
diff=0.074-y
lb=17.15 #lb/ lbm of products
w=lb*diff
print '%s %.2f' %('\n Partial pressure of water (psia) = ',pw2)
print '%s %.2f' %('\n The liquid water formed per pound of the fuel is (lb) ',w)
#The internal energy of reaction for burning carbon to CO2 at 68F is -14087 .
#Find the heat trasnferred when a system composed of 1 lb of C and 4 lb of O2
#at 300 C burns at constant volume at a final temp of 1000 F . Cp=0.17
#initialisation of variables
mO2=1.33 #lb
mCO2=3.67 #lb
CvO2=0.155 #Btu/lb F
CvCO2=0.165 #Btu/lb F
Cc=0.170 #Btu/lb F
t2=1000. #F
tB=68. #F
t=300. #F
mC=1
mO=4
#Calculations
deltaE1=mO2*CvO2*(t2-tB) + mCO2*CvCO2*(t2-tB) #Energy change
deltaE2=mC*Cc*(tB-t) + mO*CvO2*(tB-t) #Energy change
E= -14087 #Btu
Q=deltaE1+E+deltaE2 #Heat transfer
#Results
print '%s %.2f' %('Heat Transfer from the system (Btu) =',Q)
raw_input('press enter key to exit')
#Given the reaction for burning of CO and the Cp=4344. Find the Cv?
#initialisation of variables
HV=4344 #Btu/lb
m=56 #lb
R=1.986 #Btu/lb mol R
Tb=530 #R
#Calculations
HR=m*HV #Heat of reaction
Eb=-HR-R*Tb*(2-3) #Heatin value
print '%s %.2f' %('Constant pressure heating value (Btu/lb formula wt) = ',Eb)
raw_input('press enter key to exit')
#Assume carbon burns with air in a steady flow process. If theoretical air
#is used, calculate the products temp. for adiabatic combustion, assuming
#the products have constant sp. heats of room temp. magnitude
#initialisation of variables
mC=1 #lb
mO2=2.67 #lb
mN2=8.78 #lb
mCO2=3.67 #lb
mN2=8.78 #lb
tB=77 #F
deltaH=14087 #Btu/lb
CpCO2=0.196 #Btu/lb F
CpCO2f=0.3 #Btu/lb F
CpN2=0.248 #Btu/lb F
CpN2f=0.285 #Btu/lb F
#Calculations
t2= tB+ deltaH/(mCO2*CpCO2 + mN2*CpN2) #Final temp in case 1
t2f=tB+ deltaH/(mCO2*CpCO2f + mN2*CpN2f) #Final temp in case 2
#Results
print '%s %.2f' %('In case 1,Final temp (F) = ',t2)
print '%s %.2f' %('\n In case 2, Final temp (F) = ',t2f)
raw_input('press enter key to exit')
#Suppose 1 pound of carbon burns at Cp so that 0.9 goes into CO2, 0.05lb goes
#into CO and 0.05 emerges as unburned carbon; find the efficiency of the
#combustion process
#initialisation of variables
HR=14087 #Btu
HRC=3952 #Btu
x1=0.9
x2=0.05
#Calculations
HR1=x1*HR #Heat of reaction
HR2=x2*HRC #Heat of reaction
e=(HR2+HR1)/HR #Efficiency
#Results
print '%s %.3f' %('Efficiency = ',e)
raw_input('press enter key to exit')
#A steam generator produces 10000 lb/hr of steam at 150 psia, saturated vapor.
#In addition, there is drawn off from the boiler 500 lb/hr of saturated liquid
# at 150 psia as "blow down" The feed water is supplied to the boiler at 210 F.
#Oil fuel having a hv of 19500 is burned in the furnace at the rate of 700 lb/hr.
#Find the efficiency of the steam generator, as defined above.
#initialisation of variables
hvi=19500. #Btu/hr
Q=10240000. #Btu/hr
rate=700. #lb/hr
#calculations
Hv=rate*hvi
efficiency=Q/Hv
#results
print '%s %.2f' %('efficiency = ',efficiency)