Chapter 15: Chemical Reactions

Example 15-1 ,Page No.755

In [1]:
#given data
nO2i=20;#intial moles of air 
nC8H18i=1;#intial moles octane

#from Table A-1
Mair=29;
MC=12;
MH=2;

#calculations
# Chemical Reaction
# C8H18 + 20(O2+3.76N2)= xCO2 + yH2O +  zO2 + wN2
#by elemental balance of moles
x=8;
y=18/2;
z=20*2-2*x-y;
w=20*3.76;
print'kmoles of CO2 %i'%x;
print'kmoles of H2O %i'%y;
print'kmoles of O2 %f'%round(z,1);
print'kmoles of N2 %f'%round(w,1);
#thus equn becomes
# C8H18 + 20(O2+3.76N2)= 8CO2 + 9H2O +  7.5O2 +75.2N2
AF=nO2i*4.76*Mair/(x*MC + y*MH);
print'air-fuel ratio of combustion process %f kg air/kg fuel'%round(AF,1)
kmoles of CO2 8
kmoles of H2O 9
kmoles of O2 15.000000
kmoles of N2 75.200000
air-fuel ratio of combustion process 24.200000 kg air/kg fuel

Example 15-2 ,Page No.757

In [2]:
#given data
P=100;#total pressure in kPa

#from Table A-1
Mair=29.0;
MC=12.0;
MH=2.0;

#calculations
#Chemical reaction
#C2H6 +  1.2at(1O2 +  3.76) =2CO2 +  3H2O +  0.2athO2 + (1.2*3.76)athN2
#ath is the stoichiometric coefficient for air
#Oxygen balance gives
# 1.2ath = 2 + 1.5 + 0.2ath
ath=(2+1.5)/(1.2-0.2);
AF=(1.2*ath)*4.76*Mair/(2*MC+3*MH);
print'air-fuel ratio of combustion process %f kg air/kg fuel'%round(AF,1);
#C2H6 + 4.2(O2 + 3.76N2)  = 2CO2 + 3H2O + 0.7O2 + 15.79N2;
Nprod=2+3+0.7+15.79;
#for dew point water vapour condenses
Nv=3;
Pv=Nv/Nprod*P;
#at this Pv
Tdp=52.3;
print'the dew-point %f C'%Tdp
air-fuel ratio of combustion process 19.300000 kg air/kg fuel
the dew-point 52.300000 C

Example 15-3 ,Page No.758

In [3]:
#given data
P=101.325;#total pressure in kPa
RH=0.8;#realtive humidity
T1=20;#tempearture of air in C

#from Table A-4
Psat=2.3392;

#calculations
#consedering 1 kmol of fuel
# 0.72CH4 + 0.09H2 + 0.14N2 + 0.02O2 + 0.03CO2 +  ath(O2 + 3.76N2) = xCO2 + yH2O + zN2
#element balance
x=0.72+0.03
y=(0.72*4+0.09*2)/2;
ath=x+y/2-0.02-0.03;
z=0.14+3.76*ath;
Pv=RH*Psat;
# Nv,air = Pv,air/Ptotal * Ntotal
Nvair=Pv/P*6.97/(1-(Pv/P));
#0.72CH4 + 0.09H2 + 0.14N2 + 0.02O2 + 0.03CO2 +  1.465(O2 + 3.76N2) + 0.131H20 = 0.75CO2 + 1.661H2O + 5.648N2
Pvprod=1.661/8.059*P;
#at this Pvprod
Tdp=60.9;
print'the dew-point %f C'%Tdp
the dew-point 60.900000 C

Example 15-4 ,Page No.760

In [5]:
#given data
Pprod=100;#total pressure in kPa

#from Table A-1
Mair=29;
MC=12;
MH=2;

#from Table A-4
Psat=3.1698;

#calculations
#consedering 100 kmol of dry products
# xC8H18 + a (O2 + 3.76N2) = 10.02CO2 + 0.88C0 + 84.48N2 + bH20
#from mass balamces
a=83.48/3.76;
x=(0.88+10.02)/8;
b=18*x/2;
# 1.36C8H18 + 22.2 (O2 + 3.76N2) = 10.02CO2 + 0.88C0 + 84.48N2 + 12.24H20
# 1 mol conversion
# C8H18 + 16.32 (O2 + 3.76N2) = 7.37CO2 + 4.13C0 + 61.38N2 + 9H20
AF= 16.32*4.76*Mair/(8*MC+9*MH);
print'air-fuel ratio of combustion process %f kg air/kg fuel'%round(AF,2);
# C8H18 + ath (O2 + 3.76N2) = 8CO2 + 9H2O + 3.76athN2
ath=8+4.5;
Pth=16.32/ath*4.76/4.76*100;
print'percentage of theoretical air is %i'%round(Pth);
Nprod=7.37+0.65+4.13+61.98+9;
# Nv/Nprod = Pv/Pprod
Pv=Psat;
Nw= (Nprod*Pv-9*Pprod)/(Pv-Pprod);
print'the amount of H2O that condenses as the products %f kmol'%round(Nw,2)
air-fuel ratio of combustion process 19.760000 kg air/kg fuel
percentage of theoretical air is 131
the amount of H2O that condenses as the products 6.570000 kmol

Example 15-5 ,Page No.764

In [2]:
#there is a difference in the answer due to approximation in the textbook

#given data
T=25;#temperature of octane in C

#from Table A-6
HCO2=-393520;
HH2O=-285830;
HC8H18=-249950;

#calculations
# C8H18 + ath (O2 + 3.76N2) = 8CO2 + 9H2O + 3.76athN2
#N2 and O2 are stable elements, and thus their enthalpy of formation is zero
#hc = Hprod - Hreact
hc= 8*HCO2 + 9*HH2O - HC8H18;
print'the enthalpy of combustion of liquid octane %i kJ/kmol'%hc
print 'or %i kJ/kg C8H18'%round(hc/114,0)
the enthalpy of combustion of liquid octane -5470680 kJ/kmol
or -47989 kJ/kg C8H18

Example 15-6 ,Page No.767

In [7]:
#given data
mfuel=0.05;#mass flow rate in kg/min

#from Table A-1
Mair=29;
MC=12;
MH=2;

#calculation
#stochiometric reaction
#C3H8 + ath(O2 + 3.76N2) = 3CO2 + 4H2O + 3.76athN2
#O2 balance
ath=3+5;
#50 percent excess air and some CO in the products
#C3H8 + 7.5(O2 + 3.76N2) = 2.7CO2 + 0.3CO + 4H2O + 2.65O2+ 28.2N2
AF=7.5*4.76*Mair/(3*MC+4*MH);
mair=AF*mfuel;
print'the mass flow rate of air %f kg air/min'%round(mair,2);
#from property tables
#C3H8 designated as p
hfp=-118910;
#oxygen as o
hfo=0;
ho280=8150;
ho298=8682;
ho1500=49292;
#nitrogen as n
hfn=0;
hn280=8141;
hn298=8669;
hn1500=47073;
#water as w
hfw=-241820;
hw298=9904;
hw1500=57999;
#carbondioxode as c
hfc=-393520;
hc298=9364;
hc1500=71078;
#carbon monoxide as co
hfco=-110530;
hco298=8669;
hco1500=47517;
qout=1*(hfp)+7.5*(hfo+ho280-ho298)+28.2*(hfn+hn280-hn298)-2.7*(hfc+hc1500-hc298)-0.3*(hfco+hco1500-hco298)-4*(hfw+hw1500-hw298)-2.65*(hfo+ho1500-ho298)-28.2*(hfn+hn1500-hn298);
#for kg of propane
qout=qout/44;
Qout=mfuel*qout/60;
print'the rate of heat transfer from the combustion chamber %f kW'%round(Qout,2)
the mass flow rate of air 1.180000 kg air/min
the rate of heat transfer from the combustion chamber 6.890000 kW

Example 15-7 ,Page No.769

In [3]:
#the 0.175% error in last part is due to the approximation in the textbook

#given data
Preact=1.0;#total pressure in kPa
Treact=77+460.0;#reaction temperature in R
Tprod=1800.0;#final temperature in R

#constants used
Ru=1.986;

#calculation
#CH4 + 3O2 = CO2 + 2H2O + O2
Nreact=4;
Nprod=4;
Pprod=Preact*Nprod/Nreact*Tprod/Treact;
print'the final pressure in the tank %f atm'%round(Pprod,2);
#from std. values of heat of formation and ideal gasses in Appendix
#CH4 as m
hfm=-32210.0;
#O2 as o
hfo=0;
h537o=3725.1;
h1800o=13485.8;
#water as w
hfw=-104040.0;
h537w=4528.0;
h1800w=15433.0
#carbondioxide as c
hfc=-169300.0;
h537c=4027.5;
h1800c=18391.5;
Qout=1*(hfm-Ru*Treact)+3*(hfo-Ru*Treact)-1*(hfc+h1800c-h537c-Ru*Tprod)-2*(hfw+h1800w-h537w-Ru*Tprod)-1*(hfo+h1800o-h537o-Ru*Tprod);
print'the heat transfer during this process %i Btu/lbmol'%round(Qout)
the final pressure in the tank 3.350000 atm
the heat transfer during this process 309269 Btu/lbmol

Example 15-8 ,Page No.771

In [14]:
#this invovles EES hence the below code explains a approach with approximation

#calculations

#part - a
#C8H18 + 12.5 (O2 + 3.76N2) = 8CO+ 9H2O + 47N2
#from std. values of heat of formation and ideal gasses in Appendix
#octane as oc
hfoc=-249950.0;
#oxygen as o
hfo=0;
h298o=8682.0;
#nitrogen as n
hfn=0;
h298n=8669.0;
#water as w
hfw=-241820.0;
h298w=9904.0;
#carbondioxide as c
hfc=-393520.0;
h298c=9364.0;
#x refers to 8hCO2 + 9hH20 + 47hN2
xac=1*(hfoc)+8*(h298c-hfc)+9*(h298w-hfw)+47*(h298n-hfn);
#from EES the Tprod is determined by trial and error
#at 2400K
x2400=5660828.0;
#at 2350K
x2350=5526654.0;
#the actual value of x is xac and T can be determined by interpolation
Tprod=(xac-x2350)*(2400.0-2350.0)/(x2400-x2350)+2350.0;
print'adiabatic flame temperature for complete combustion with 100 percent theoretical air %i K'%round(Tprod);

#part - b
#C8H18 + 50 (O2 + 3.76N2) = 8CO+ 9H2O + 37.5O2 + 188N2
#solved similarly using EES and approximation and interpolation
#similarly we can solve the part - c 
#the above concept is applied
adiabatic flame temperature for complete combustion with 100 percent theoretical air 2395 K

Example 15-9 ,Page No.776

In [15]:
#from Table A-26E
#Gibbs function of formation at 77°F
gfc=0;#for carbon
gfo=0;#for oxygen
gfco=-169680;#for carbondioxide

#calculations
# C + O2 = CO2
Wrev=1*gfc+1*gfo-1*gfco;
print'the reversible work for this process %i Btu'%round(Wrev) 
the reversible work for this process 169680 Btu

Example 15-10 ,Page No.777

In [20]:
from math import log

#given values
T0=298;#combustion chamber temperature in K

#contansts used 
Ru=8.314;#in kJ/kmol K

#calculations
# CH4 + 3(O2 + 3.76N2)  = CO2 + 2H2O + O2 + 11.28N2
#from std. values of heat of formation and ideal gasses in Appendix
#methane as m
hfm=-74850;
#oxygen as o
hfo=0;
h298o=8682;
#nitrogen as n
hfn=0;
h298n=8669;
#water as w
hfw=-241820;
h298w=9904;
#carbondioxide as c
hfc=-393520;
h298c=9364;
#x refers to hCO2 + 2hH2O + 11.28hN2
xac=1*(hfm)+1*(h298c-hfc)+2*(h298w-hfw)+11.28*(h298n-hfn);
#from EES the Tprod is determined by trial and error
Tprod=1789;
print'the temperature of the products %i K'%round(Tprod);
#entropy calculations by using table A-26
#Si = Ni*(si - Ruln yiPm
#reactants
Sm=1*(186.16-Ru*log(1*1));
So=3*(205.04-Ru*log(0.21*1));
Sn=11.28*(191.61-Ru*log(.79*1));
Sreact=Sm+So+Sn;
#products
Nt=1+2+1+11.28;#total moles
yc=1/Nt;
yw=2/Nt;
yo=1/Nt;
yn=11.28/Nt;
Sc=1*(302.517-Ru*log(yc*1));
Sw=2*(258.957-Ru*log(yw*1));
So=1*(264.471-Ru*log(yo*1));
Sn=11.28*(247.977-Ru*log(yn*1));
Sprod=Sc+Sw+So+Sn;
Sgen=Sprod-Sreact;
print'exergy destruction %i kJ/kmol - K'%round(Sgen);
Xdestroyed=T0*Sgen/1000;#factor of 1000 for converting kJ to MJ
print'%i MJ/kmol'%round(Xdestroyed);
#This process involves no actual work. Therefore, the reversible work and energy destroyed are identical
Wrev=Xdestroyed;
print'the reversible work %i MJ/kmol'%round(Wrev)
the temperature of the products 1789 K
exergy destruction 966 kJ/kmol - K
288 MJ/kmol
the reversible work 288 MJ/kmol

Example 15-11 ,Page No.778

In [4]:
from math import log

#given values
Tsurr=298;#temperature of surroundings in K

#contansts used 
Ru=8.314;#in kJ/kmol K

#calculations

#part - a
# CH4 + 3(O2 + 3.76N2)  = CO2 + 2H2O + O2 + 11.28N2
#The amount of water vapor that remains in the products is determined as in Example 15–3
Nv=0.43;#moles of water vapour
Nw=1.57;#moles of water in liquid
#hf values
#methane as m
hfm=-74850;
#carbondioxide as c
hfc=-393520;
#water vapour as v
hfv=-241820;
#water in liquid as w
hfw=-285830;
Qout=1*hfm-1*hfc-Nv*hfv-Nw*hfw;
print'Qout = %i kJ/kmol'%round(Qout)

#part - b
#entropy calculations by using table A-26
#Si = Ni*(si - Ruln yiPm
#reactants
Sm=1*(186.16-Ru*log(1*1));
So=3*(205.04-Ru*log(0.21*1));
Sn=11.28*(191.61-Ru*log(.79*1));
Sreact=Sm+So+Sn;
#products
Nt=Nv+1+1+11.28;#total moles
yw=1;
yc=1/Nt;
yv=Nv/Nt;
yo=1/Nt;
yn=11.28/Nt;
Sw=Nw*(69.92-Ru*log(yw*1));
Sc=1*(213.80-Ru*log(yc*1));
Sv=Nv*(188.83-Ru*log(yv*1));
So=1*(205.04-Ru*log(yo*1));
Sn=11.28*(191.61-Ru*log(yn*1));
Sprod=Sc+Sw+So+Sn+Sv;
Sgen=Sprod-Sreact+Qout/Tsurr;
print'Sgen = %i kJ/kmol - K'%round(Sgen);
Xdestroyed=Tsurr*Sgen/1000;#factor of 1000 for converting kJ to MJ
print'exergy destruction %i MJ/kmol'%round(Xdestroyed);
#This process involves no actual work. Therefore, the reversible work and energy destroyed are identical
Wrev=Xdestroyed;
print'the reversible work %i MJ/kmol'%round(Wrev)
Qout = 871406 kJ/kmol
Sgen = 2746 kJ/kmol - K
exergy destruction 818 MJ/kmol
the reversible work 818 MJ/kmol