# Chapter 8 - Combustion¶

## Example 1: pg 198¶

In :
#pg 198
print('Example 8.1');

#  aim : To determine
#   the stoichiometric mass of air required to burn 1 kg the fuel

#  Given values
C = .72;#  mass fraction of C; [kg/kg]
H2 = .20;#  mass fraction of H2;, [kg/kg]
O2 = .08;#  mass fraction of O2, [kg/kg]
aO2=.232;#  composition of oxygen in air

#  solution
#  for 1kg of fuel
mO2  = 8./3*C+8*H2-O2;#  mass of O2, [kg]

#  hence stoichiometric mass of O2 required is
msO2  = mO2/aO2;# [kg]

#results
print ' The stoichiometric mass of air required to burn 1 kg the fuel should be (kg/kg fuel) = ',round(msO2,1)

#  End

Example 8.1
The stoichiometric mass of air required to burn 1 kg the fuel should be (kg/kg fuel) =  14.8


## Example 2: pg 198¶

In :
#pg 198
print('Example 8.2');

#  aim : To determine
#   the stoichiometric mass of air required to burn 1 kg of heptane

#  Given values
C = .84;#  mass fraction of C; [kg/kg]
H2 = .16;#  mass fraction of H2;, [kg/kg]
x1 = 11.5;#  mass fraction of O2, [kg/kg]
x2 = 34.5;#  composition of oxygen in air

#  solution
#  for 1kg of fuel
mO2  = x1*C + x2*H2 ;#  mass of O2, [kg]

mO22 = ((11*32)+100)/100
mO2x = (mO22-1)/.232
#results
print ' The stoichiometric mass of air required to burn 1 kg the fuel should be (kg/kg fuel) = ',round(mO2,2)

#  End

Example 8.2
The stoichiometric mass of air required to burn 1 kg the fuel should be (kg/kg fuel) =  15.18


## Example 3: pg 199¶

In :
#pg 199
print('Example 8.3');

#  aim : To determine
#  the stoichiometric mass of air
#  the products of combustion both by mass and as percentage

#  Given values
C = .82;# mass composition C
H2 = .12;# mass composition of H2
O2 = .02;# mass composition of O2
S = .01;# mass composition of S
N2 = .03;# mass composition of N2

#  solution
#  for 1kg fuel
mo2 = 8./3*C+8*H2-O2+S*1;# total mass of  O2 required, [kg]
sa = mo2/.232;# stoichimetric  air, [kg]
print ' The stoichiometric mass of air is (kg/kg fuel) = ',round(sa,2)

# for one kg fuel
mCO2 = C*11/3;# mass of CO2 produced, [kg]
mH2O = H2*9;# mass of H2O produced, [kg]
mSO2 = S*2;# mass of SO2 produce, [kg]
mN2 = C*8.84+H2*26.5-O2*.768/.232+S*3.3+N2;# mass of N2 produced, [kg]

mt = mCO2+mH2O+mSO2+mN2;# total mass of product, [kg]

x1 = mCO2/mt*100;# %age mass composition of CO2 produced
x2 = mH2O/mt*100;# %age mass composition of H2O produced
x3 = mSO2/mt*100;# %age mass composition of SO2 produced
x4 = mN2/mt*100;# %age mass composition of N2 produced

print ' CO2 produced  = ',round(mCO2,2),' kg/kg fuel,  percentage composition  = ',round(x1,1),',\n H2O produced  = ',mH2O,' kg/kg fuel,  percentage composition  = ',round(x2,2),',\n SO2 produced  = ',mSO2,' kg/kg fuel,  percentage composition  = ',round(x3,2),',\n N2 produced  = ',round(mN2,2),' kg/kg fuel,  percentage composition  = ',round(x4,2)

#  End

Example 8.3
The stoichiometric mass of air is (kg/kg fuel) =  13.52
CO2 produced  =  3.01  kg/kg fuel,  percentage composition  =  20.7 ,
H2O produced  =  1.08  kg/kg fuel,  percentage composition  =  7.43 ,
SO2 produced  =  0.02  kg/kg fuel,  percentage composition  =  0.14 ,
N2 produced  =  10.43  kg/kg fuel,  percentage composition  =  71.74


## Example 4: pg 202¶

In :
#pg 202
print('Example 8.4');

#  aim : To determine
#  the stoichiometric volume of air required for complete combution of 1 m^3 of the gas

#  Given values
H2 = .14;# volume fraction of H2
CH4 = .02;# volume fraction of CH4
CO = .22;# volume fraction of CO
CO2 = .05;# volume fraction of CO2
O2 = .02;# volume fraction of O2
N2 = .55;# volume fraction of N2

# solution
#  for 1 m^3 of fuel
Va = .5*H2+2*CH4+.5*CO-O2;# [m^3]

#  stoichiometric air required is
Vsa = Va/.21;#  [m^3]
#results
print ' The  stoichiometric volume of air required for complete combustion is  (m^3/m^3  fuel) = ',round(Vsa,3)

# End

Example 8.4
The  stoichiometric volume of air required for complete combustion is  (m^3/m^3  fuel) =  0.952


## Example 5: pg 203¶

In :
#pg 203
print('Example 8.5');

#  aim : To determine
#   the volume of the air required

#  Given values
H2 = .45;# volume fraction of H2
CO = .40;# volume fraction of CO
CH4 = .15;# volume fraction of CH4

#  solution
V = 2.38*(H2+CO)+9.52*CH4;# stoichimetric volume of air, [m^3]
#results
print ' The volume of air required is(m^3/m^3 fuel) = ',V

print 'Result in the book is misprinted'

# End

Example 8.5
The volume of air required is(m^3/m^3 fuel) =  3.451
Result in the book is misprinted


## Example 6: pg 203¶

In :
#pg 203
print('Example 8.6');

# aim : To determine
# the stoichiometric volume of air for the complete combustion
# the products of combustion

# given values
CH4 = .142;# volumetric composition of CH4
CO2 = .059;# volumetric composition of CO2
CO = .360;# volumetric composition of CO
H2 = .405;# volumetric composition of H2
O2 = .005;# volumetric composition of O2
N2 = .029;# volumetric composition of N2

aO2 = .21;# O2 composition into air by volume

#  solution
svO2 = CH4*2+CO*.5+H2*.5-O2;# stroichiometric volume of O2 required, [m^3/m^3 fuel]
svair = svO2/aO2;# stroichiometric volume of air required, [m^3/m^3 fuel]
print ' Stoichiometric volume of air required is (m^3/m^3 fuel) = ',svair

# for one m^3 fuel
vN2 = CH4*7.52+CO*1.88+H2*1.88-O2*.79/.21+N2;# volume of N2 produced, [m^3]
vCO2 = CH4*1+CO2+CO*1;# volume of CO2 produced, [m^3]
vH2O = CH4*2+H2*1;# volume of H2O produced, [m^3]

vt = vN2+vCO2+vH2O;# total volume of product, [m^3]

x1 = vN2/vt*100;# %age composition of N2 in product,
x2 = vCO2/vt*100;# %age composition of CO2 in product
x3 = vH2O/vt*100;# %age composition of H2O in product

print ' N2 in products  = ',round(vN2,3),' m^3/m^3  fuel,  percentage composition  = ',round(x1,1),',\n CO2 in products = ',vCO2,' m^3/m^3 fuel,  percentage composition  =',round(x2,1),',\n H2O in products  = ',vH2O,'m^3/m^3  fuel,  percentage composition  =',round(x3,1)

# End

Example 8.6
Stoichiometric volume of air required is (m^3/m^3 fuel) =  3.15
N2 in products  =  2.516  m^3/m^3  fuel,  percentage composition  =  66.8 ,
CO2 in products =  0.561  m^3/m^3 fuel,  percentage composition  = 14.9 ,
H2O in products  =  0.689 m^3/m^3  fuel,  percentage composition  = 18.3


## Example 7: pg 206¶

In :
#pg 206
print('Example 8.7');

#  aim : To determine
#  the percentage analysis of the gas by mass

#  Given values
CO2 = 20.;# percentage volumetric composition  of CO2
N2 = 70.;# percentage volumetric composition of N2
O2 = 10.;# percentage volumetric composition  of O2

mCO2 = 44.;#  moleculer mas of CO2
mN2 = 28.;#  moleculer mass of N2
mO2 = 32.;#  moleculer mass of O2

#  solution
mgas = CO2*mCO2+N2*mN2+O2*mO2;#  moleculer mass of gas
m1 = CO2*mCO2/mgas*100;# percentage composition of CO2 by mass
m2 = N2*mN2/mgas*100;# percentage composition of N2 by mass
m3 = O2*mO2/mgas*100;# percentage composition of O2 by mass
#results
print ' Mass percentage of CO2 is  = ',round(m1,1),' \n\n Mass percentage of N2 is  = ',round(m2,1),' \n\n Mass percentage of O2 is  =  ',round(m3,1)

# End

Example 8.7
Mass percentage of CO2 is  =  27.8

Mass percentage of N2 is  =  62.0

Mass percentage of O2 is  =   10.1


## Example 8: pg 206¶

In :
#pg 206
print('Example 8.8');

#  aim : To determine
#  the percentage composition of the gas by volume

#  given values
CO = 30.;# %age mass composition of CO
N2 = 20.;# %age mass composition of N2
CH4 = 15.;# %age mass composition of CH4
H2 = 25.;# %age mass composition of H2
O2 = 10.;# %age mass composition of O2

mCO = 28.;# molculer mass of CO
mN2 = 28.;# molculer mass of N2
mCH4 = 16.;# molculer mass of CH4
mH2 = 2.;# molculer mass of H2
mO2 = 32.;# molculer mass of O2

# solution
vg = CO/mCO+N2/mN2+CH4/mCH4+H2/mH2+O2/mO2;
v1 = CO/mCO/vg*100;# %age volume composition of CO
v2 = N2/mN2/vg*100;# %age volume composition of N2
v3 = CH4/mCH4/vg*100;# %age volume composition of CH4
v4 = H2/mH2/vg*100;# %age volume composition of H2
v5 = O2/mO2/vg*100;# %age volume composition of O2
#results
print ' The percentage composition of CO by volume is  = ',round(v1,1),' \n,\nThe percentage composition of N2 by volume is  =',round(v2,1), '\n\nThe percentage composition of CH4 by volume is  = ',round(v3,1),'\n\nThe percentage composition of H2 by volume is  = ',round(v4,1),' \n\nThe percentage composition of O2by volume is= ',round(v5,1)

# End

Example 8.8
The percentage composition of CO by volume is  =  6.9
,
The percentage composition of N2 by volume is  = 4.6

The percentage composition of CH4 by volume is  =  6.0

The percentage composition of H2 by volume is  =  80.5

The percentage composition of O2by volume is=  2.0


## Example 9: pg 209¶

In :
#pg 209
print('Example 8.9');

# aim : To determine
# the mass of air supplied per kilogram of fuel burnt

# given values
CO2 = 8.85;# volume composition of CO2
CO = 1.2;#  volume composition of CO
O2 = 6.8;#  volume composition of O2
N2 = 83.15;#  volume composition of N2

# composition of gases in the fuel oil
C = .84;# mass composition of carbon
H = .14;# mass composition of hydrogen
o2 = .02;# mass composition of oxygen

mC = 12.;# moleculer mass of Carbon
mCO2 = 44.;# molculer mass of CO2
mCO = 28.;# molculer mass of CO
mN2 = 28.;# molculer mass of N2
mO2 = 32.;# molculer mass of O2
aO2 = .23;# mass composition of O2 in air

# solution
ma = (8./3*C+8*H-o2)/aO2;# theoretical mass of air/kg fuel, [kg]

mgas = CO2*mCO2+CO*mCO+N2*mN2+O2*mO2;#  total mass of gas/kg fuel, [kg]
x1 = CO2*mCO2/mgas;#  composition of CO2 by mass
x2 = CO*mCO/mgas;# composition of CO by mass
x3 = O2*mO2/mgas;#  composition of O2 by mass
x4 = N2*mN2/mgas;#  composition of N2 by mass

m1 = x1*mC/mCO2+x2*mC/mCO;# mass of C/kg of dry flue gas, [kg]
m2 = C;# mass of C/kg fuel, [kg]
mf = m2/m1;# mass of dry flue gas/kg fuel, [kg]
mo2 = mf*x3;# mass of excess O2/kg fuel, [kg]
mair = mo2/aO2;# mass of excess air/kg fuel, [kg]
m = ma+mair;# mass of excess air supplied/kg fuel, [kg]
#results
print ' The mass of air supplied per/kg of fuel burnt is (kg) = ',round(m,1)
# End

Example 8.9
The mass of air supplied per/kg of fuel burnt is (kg) =  21.1


## Example 10: pg 210¶

In :
#pg 210
print('Example 8.10');

# aim : To determine
# volumetric composition of the products of combustion

# given values
C = .86;#  mass composition of carbon
H = .14;# mass composition of hydrogen
Ea = .20;#  excess air for combustion
O2 = .23;# mass composition of O2 in air

MCO2 = 44.;# moleculer mass of CO2
MH2O = 18.;# moleculer mass of H2O
MO2 = 32.;# moleculer mass of O2
MN2 = 28.;# moleculer mass of N2,

# solution
sO2 = (8./3*C+8*H);# stoichiometric O2 required, [kg/kg petrol]
sair = sO2/O2;# stoichiometric air required, [kg/kg petrol]
# for one kg petrol
mCO2 = 11./3*C;# mass of CO2,[kg]
mH2O = 9*H;# mass of H2O, [kg]
mO2 = Ea*sO2;# mass of O2, [kg]
mN2 = 14.84*(1+Ea)*(1-O2);# mass of N2, [kg]

mt = mCO2+mH2O+mO2+mN2;# total mass, [kg]
# percentage mass composition
x1 = mCO2/mt*100;# mass composition of CO2
x2 = mH2O/mt*100;# mass composition of H2O
x3 = mO2/mt*100;# mass composition of O2
x4 = mN2/mt*100;# mass composition of N2

vt = x1/MCO2+x2/MH2O+x3/MO2+x4/MN2;# total volume of petrol
v1 = x1/MCO2/vt*100;# %age composition of CO2 by volume
v2 = x2/MH2O/vt*100;# %age composition  of H2O by volume
v3 = x3/MO2/vt*100;# %age composition of O2 by volume
v4 = x4/MN2/vt*100;# %age composition of N2 by volume
#results
print 'The percentage composition of CO2 by volume is  =',round(v1,2),'\n,\nThe percentage composition of H2O by volume is  = ',round(v2,2),'  \n,\nThe percentage composition of O2 by volume is  = ',round(v3,2),'\n,\nThe percentage composition of N2 by volume is  = ',round(v4,2)

#  End

Example 8.10
The percentage composition of CO2 by volume is  = 10.98
,
The percentage composition of H2O by volume is  =  10.72
,
The percentage composition of O2 by volume is  =  3.27
,
The percentage composition of N2 by volume is  =  75.03


## Example 11: pg 211¶

In :
#pg 211
print('Example 8.11');

# aim : To determine
#  the energy carried away by the dry flue gas/kg of fuel burned

# given values
C = .78;#  mass composition of carbon
H2 = .06;# mass composition of hydrogen
O2 = .09;# mass composition of oxygen
Ash = .07;# mass composition of ash
Ea = .50;#  excess air for combustion
aO2 = .23;# mass composition of O2 in air
Tb = 273.+20;# boiler house temperature, [K]
Tf = 273.+320;# flue gas temperature, [K]
c = 1.006;# specific heat capacity of dry flue gas, [kJ/kg K]

# solution
# for one kg of fuel
sO2 = (8./3*C+8*H2);# stoichiometric O2 required, [kg/kg fuel]
sO2a = sO2-O2;# stoichiometric O2 required from air, [kg/kg fuel]
sair = sO2a/aO2;# stoichiometric air required, [kg/kg fuel]
ma = sair*(1+Ea);# actual air supplied/kg of fuel, [kg]
# total mass of flue gas/kg fuel is
mf = ma+1;# [kg]
mH2 = 9*H2;#H2 produced, [kg]
# hence, mass of dry flue gas/kg coall is
m = mf-mH2;# [kg]
Q = m*c*(Tf-Tb);# energy carried away by flue gas, [kJ]
#results
print ' The energy carried away by the dry flue gas/kg is (kg) = ',round(Q)

#  End

Example 8.11
The energy carried away by the dry flue gas/kg is (kg) =  5000.0


## Example 12: pg 212¶

In :
#pg 212
print('Example 8.12');

# aim : To determine
# (a) the stoichiometric volume of air for the complete combustion of 1 m^3
# (b) the percentage volumetric analysis of the products of combustion

# given values
N2 = .018;# volumetric composition of N2
CH4 = .94;# volumetric composition of CH4
C2H6 = .035;# volumetric composition of C2H6
C3H8 = .007;# volumetric composition of C3H8
aO2 = .21;# O2 composition in air

# solution
# (a)
# for CH4
# CH4 +2 O2= CO2 + 2 H2O
sva1 = 2./aO2;# stoichiometric volume of air, [m^3/m^3 CH4]
svn1 = sva1*(1-aO2);# stoichiometric volume of nitrogen in the air, [m^3/m^3 CH4]

# for C2H6
# 2 C2H6 +7 O2= 4 CO2 + 6 H2O
sva2 = 7./2/aO2;# stoichiometric volume of air, [m^3/m^3 C2H6]
svn2 = sva2*(1-aO2);# stoichiometric volume of nitrogen in the air, [m^3/m^3 C2H6]

# for C3H8
# C3H8 +5 O2=3 CO2 + 4 H2O
sva3 = 5/aO2;# stoichiometric volume of air, [m^3/m^3 C3H8]
svn3 = sva3*(1-aO2);# stoichiometric volume of nitrogen in the air, [m^3/m^3 C3H8]

Sva = CH4*sva1+C2H6*sva2+C3H8*sva3;# stoichiometric volume of air required, [m^3/m^3 gas]
print ' (a) The stoichiometric volume of air for the complete combustion (m^3/m^3 gas) = ',round(Sva,3)

# (b)
# for one m^3 of natural gas
vCO2 = CH4*1+C2H6*2+C3H8*3;# volume of CO2 produced, [m^3]
vH2O = CH4*2+C2H6*3+C3H8*4;# volume of H2O produced, [m^3]
vN2 = CH4*svn1+C2H6*svn2+C3H8*svn3+N2;# volume of N2 produced, [m^3]

vg = vCO2+vH2O+vN2;# total volume of gas, [m^3]
x1 = vCO2/vg*100;# volume percentage of CO2 produced
x2 = vH2O/vg*100;# volume percentage of H2O produced
x3 = vN2/vg*100;# volume percentage of N2 produced

print ' (b) The percentage volumetric composition of CO2 in produced is  =  ',round(x1,1),' \n,\n     The percentage volumetric composition of H2O in produced is  = ',round(x2,1),'  \n,\n     The percentage volumetric composition of N2 in produced is  = ',round(x3,1)
# End

Example 8.12
(a) The stoichiometric volume of air for the complete combustion (m^3/m^3 gas) =  9.702
(b) The percentage volumetric composition of CO2 in produced is  =   9.6
,
The percentage volumetric composition of H2O in produced is  =  18.8
,
The percentage volumetric composition of N2 in produced is  =  71.6


## Example 13: pg 214¶

In :
#pg 214
print('Example 8.13');

# aim : To determine
# (a) the volume of air taken by the fan
# (b) the percentage composition of dry flue gas

# gien values
C = .82;# mass composition of carbon
H = .08;# mass composition of hydrogen
O = .03;# mass composition of oxygen
A = .07;# mass composition of ash
mc = .19;# coal uses, [kg/s]
ea = .3;# percentage excess air of oxygen in the air required for combustion
Oa = .23;# percentage of oxygen by mass in the air

# solution
# (a)
P = 100.;# air pressure, [kN/m^2]
T = 18.+273;# air temperature, [K]
R = .287;# [kJ/kg K]
# basis one kg coal
sO2 = 8./3*C+8*H;# stoichiometric O2 required, [kg]
aO2 = sO2-.03;# actual O2 required, [kg]
tO2 = aO2/Oa;# theoretical O2 required, [kg]
Aa = tO2*(1+ea);# actual air supplied, [kg]
m = Aa*mc;# Air supplied, [kg/s]

# now using P*V=m*R*T
V = m*R*T/P;# volume of air taken ,[m^3/s]
print ' (a) Volume of air taken by fan is (m^3/s) = ',round(V,2)

# (b)
mCO2 = 11./3*C;# mass of CO2 produced, [kg]
mO2 = aO2*.3;# mass of O2 produces, [kg]
mN2 = Aa*.77;# mass of N2 produced, [[kg]
mt = mCO2+mO2+mN2;# total mass, [kg]

print ' (b) Percentage mass composition of CO2 is (percent) = ',round(mCO2/mt*100,2)
print '     Percentage mass composition of O2 is (percent) = ',round(mO2/mt*100,2)
print '     Percentage mass composition of N2 is (percent) = ',round(mN2/mt*100,2)

#  End

Example 8.13
(a) Volume of air taken by fan is (m^3/s) =  2.51
(b) Percentage mass composition of CO2 is (percent) =  18.77
Percentage mass composition of O2 is (percent) =  5.24
Percentage mass composition of N2 is (percent) =  75.99


## Example 14: pg 215¶

In :
#pg 215
print('Example 8.14');

# aim : To determine
# (a) the mass of fuel used per cycle
# (b) the actual mass of air taken in per cycle
# (c) the volume of air taken in per cycle

# given values
W = 15.;# work done, [kJ/s]
N = 5.;# speed, [rev/s]
C = .84;# mass composition of carbon
H = .16;# mass composition of hydrogen
ea = 1.;# percentage excess air supplied
CV = 45000.;# calorificvalue of fuel, [kJ/kg]
n_the = .3;# thermal efficiency
P = 100.;# pressuer, [kN/m^2]
T = 273.+15;# temperature, [K]
R = .29;# gas constant, [kJ/kg K]

# solution
# (a)
E = W*2/N/n_the;# energy supplied, [kJ/cycle]
mf = E/CV;# mass of fuell used, [kg]
print ' (a) Mass of fuel used per cycle is (g) = ',round(mf*10**3,3)

# (b)
# basis 1 kg fuel
mO2 = C*8./3+8*H;# mass of O2 requirea, [kg]
smO2 = mO2/.23;# stoichiometric mass of air, [kg]
ma = smO2*(1+ea);# actual mass of air supplied, [kg]
m = ma*mf;# mass of air supplied, [kg/cycle]
print ' (b) The mass of air supplied per cycle is (kg) = ',round(m,4)

# (c)
V = m*R*T/P;# volume of air, [m^3]
print ' (c) The volume of air taken in per cycle is (m^3) = ',round(V,4)

# End

Example 8.14
(a) Mass of fuel used per cycle is (g) =  0.444
(b) The mass of air supplied per cycle is (kg) =  0.0136
(c) The volume of air taken in per cycle is (m^3) =  0.0114


## Example 15: pg 216¶

In :
#pg 216
print('Example 8.15');

#  aim : To determine
#  (a) the mass of coal used per hour
#  (b) the mass of air used per hour
#  (c) the percentage analysis of the flue gases by mass

#  given values
m = 900.;# mass of steam boiler generate/h, [kg]
x = .96;# steam dryness fraction
P = 1400.;# steam pressure, [kN/m^2]
Tf = 52.;# feed water temperature, [C]
BE = .71;# boiler efficiency
CV = 33000.;# calorific value  of coal, [kJkg[
ea = .22;# excess air supply
aO2 = .23;# oxygen composition in air
c = 4.187;# specific heat capacity of water, [kJ/kg K]

#  coal composition
C = .83;# mass composition of carbon
H2 = .05;# mass composition of hydrogen
O2 = .03;# mass composition of oxygen
ash = .09;# mass composition of ash

# solution
# from steam table at pressure P
hf = 830.1;# specific enthalpy, [kJ/kg]
hfg = 1957.1;# specific enthalpy, [kJ/kg]
hg = 2728.8;# specific enthalpy, [kJ/kg]

# (a)
h = hf+x*hfg;# specific enthalpy of steam generated by boiler, [kJ/kg]
hfw = c*Tf;# specific enthalpy of feed water, [kJ/kg]
Q = m*(h-hfw);# energy to steam/h, [kJ]
Qf = Q/BE;# energy required from fuel/h, [kJ]
mc = Qf/CV;# mass of coal/h,[kg]
print ' (a) The mass of coal used per hour is (kg) = ',round(mc,1)

# (b)
# for one kg coal
mO2 = 8./3*C+8*H2-O2;# actual mass of O2 required, [kg]
mta = mO2/aO2;# theoretical mass of air, [kg]
ma = mta*(1+ea);# mass of air supplied, [kg]
mas = ma*116;# mass of air supplied/h, [kg]
print ' (b) The mass of air supplied per hour is (kg) = ',round(mas)

# (c)
# for one kg coal
mCO2 = 11./3*C;# mass of CO2 produced, [kg]
mH2O = 9*H2;# mass of H2O produced, [kg]
mO2 = mO2*ea;# mass of excess O2 in flue gas, [kg]
mN2 = ma*(1-aO2);# mass of N2 in flue gas, [kg]

mt = mCO2+mH2O+mO2+mN2;# total mass of gas
x1 = mCO2/mt*100;# mass percentage composition of CO2
x2 = mH2O/mt*100;# mass percentage composition of H2O
x3 = mO2/mt*100;# mass percentage composition of O2
x4 = mN2/mt*100;# mass percentage composition of N2

print ' (c) The mass percentage composition of CO2  =  ',round(x1,2),' ,\n      The mass percentage composition of H2O  = ',round(x2,2),' ,\n      The mass percentage composition of O2  = ',round(x3,2),' ,\n      The mass percentage composition of N2  =',round(x4,2)
#  mass of coal taken in part (b) is wrong so answer is not matching

#  End

Example 8.15
(a) The mass of coal used per hour is (kg) =  95.7
(b) The mass of air supplied per hour is (kg) =  1590.0
(c) The mass percentage composition of CO2  =   20.83  ,
The mass percentage composition of H2O  =  3.08  ,
The mass percentage composition of O2  =  3.89  ,
The mass percentage composition of N2  = 72.2


## Example 16: pg 223¶

In :
#pg 223
print('Example 8.16');

# aim : To determine
# (a) volume of gas
# (b) (1) the average molecular mass of air
#       (2) the value of R
#       (3) the mass of 1 m^3 of air at STP

# given values
n = 1.;# moles of gas, [kmol]
P = 101.32;# standard pressure, [kN/m^2]
T = 273.;# gas tempearture, [K]

O2 = 21.;# percentage volume composition of oxygen in air
N2 = 79.;# percentage volume composition of nitrogen in air
R = 8.3143;# molar gas constant, [kJ/kg K]
mO2 = 32.;# moleculer mass of O2
mN2 = 28.;# moleculer mass of N2

# solution
# (a)
V = n*R*T/P;# volume of gas, [m^3]
print ' (a) The volume of the gas is (m^3) = ',round(V,1)

# (b)
#(1)
Mav = (O2*mO2+N2*mN2)/(O2+N2);# average moleculer mass of air
print ' (b)(1) The average moleculer mass of air is (g/mol) = ',Mav

# (2)
Rav = R/Mav;# characteristic gas constant, [kJ/kg k]
print '    (2) The value of R is (kJ/kg K) = ',round(Rav,3)

# (3)
rho = Mav/V;# density of air, [kg/m^3]
print '    (3) The mass of one cubic metre of air at STP is (kg/m^3) = ',round(rho,3)

#  End

Example 8.16
(a) The volume of the gas is (m^3) =  22.4
(b)(1) The average moleculer mass of air is (g/mol) =  28.84
(2) The value of R is (kJ/kg K) =  0.288
(3) The mass of one cubic metre of air at STP is (kg/m^3) =  1.287


## Example 17: pg 223¶

In :
#pg 223
print('Example 8.17');

# aim : To determine
# (a) the partial pressure of each gas in the vessel
# (b) the volume of the vessel
# (c)  the total pressure in the gas when temperature is raised to228 C

# given values
MO2 = 8.;#  mass of O2, [kg]
MN2 = 7.;#  mass of N2, [kg]
MCO2 = 22.;#  mass of CO2, [kg]

P = 416.;# total pressure in the vessel, [kN/m^2]
T = 273.+60;# vessel temperature, [K]
R = 8.3143;# gas constant, [kJ/kmol K]

mO2 = 32.;# molculer mass of O2
mN2 = 28.;# molculer mass of N2
mCO2 = 44.;# molculer mass of CO2

# solution
# (a)
n1 = MO2/mO2;# moles of O2, [kmol]
n2 = MN2/mN2;# moles of N2, [kmol]
n3 = MCO2/mCO2;# moles of CO2, [kmol]

n = n1+n2+n3;# total moles in the vessel, [kmol]
# since,Partial pressure is proportinal, so
P1 = n1*P/n;# partial pressure of O2, [kN/m^2]
P2 = n2*P/n;# partial pressure of N2, [kN/m^2]
P3 = n3*P/n;# partial pressure of CO2, [kN/m^2]

print ' (a)The partial pressure of O2 is (kN/m^2) = ',P1,',\n   The partial pressure of N2 is (kN/m^2) = ',P2,'\n    The partial pressure of CO2 is (kN/m^2) = ',P3

# (b)
# assuming ideal gas
V = n*R*T/P;# volume of the container, [m^3]
print ' (b) The volume of the container is (m^3) = ',round(V,3)

# (c)
T2 = 273.+228;# raised vessel temperature, [K]
# so volume of vessel  will constant , P/T=constant
P2 = P*T2/T;# new pressure in the vessel , [kn/m62]
print ' (c) The new total pressure in the vessel is (kN/m^2) = ',round(P2)

#  End

Example 8.17
(a)The partial pressure of O2 is (kN/m^2) =  104.0 ,
The partial pressure of N2 is (kN/m^2) =  104.0
The partial pressure of CO2 is (kN/m^2) =  208.0
(b) The volume of the container is (m^3) =  6.655
(c) The new total pressure in the vessel is (kN/m^2) =  626.0


## Example 18: pg 225¶

In :
#pg 225
print('Example 8.18');

# aim : To determine
# the actual mass of air supplied/kg coal
# the velocity of flue gas

# given values
mc = 635;# mass of coal burn/h, [kg]
ea = .25;# excess air required
C = .84;# mass composition of carbon
H2 = .04;# mass composition of hydrogen
O2 = .05;# mass composition of oxygen
ash = 1-(C+H2+O2);# mass composition of ash

P1 = 101.3;# pressure, [kJn/m^2]
T1 = 273;# temperature, [K]
V1 = 22.4;# volume, [m^3]

T2 = 273.+344;# gas temperature, [K]
P2 = 100.;# gas pressure, [kN/m^2]
A = 1.1;# cross section area, [m^2]
aO2 = .23;# composition of O2 in air

mCO2 = 44.;# moleculer mass of carbon
mH2O = 18.;# molecular mass of hydrogen
mO2 = 32.;# moleculer mas of oxygen
mN2 = 28.;# moleculer mass of nitrogen

# solution
mtO2 = 8./3*C+8*H2-O2;# theoretical O2 required/kg coal, [kg]
msa= mtO2/aO2;# stoichiometric mass of  air supplied/kg coal, [kg]
mas = msa*(1+ea);# actual mass of air supplied/kg coal, [kg]

m1 = 11./3*C;# mass of CO2/kg coal produced, [kg]
m2 = 9*H2;# mass of H2/kg coal produced, [kg]
m3 = mtO2*ea;# mass of O2/kg coal produced, [kg]
m4 = mas*(1-aO2);# mass of N2/kg coal produced, [kg]

mt = m1+m2+m3+m4;# total mass, [kg]
x1 = m1/mt*100;# %age mass composition of CO2 produced
x2 = m2/mt*100;# %age mass composition of H2O produced
x3 = m3/mt*100;# %age mass composition of O2 produced
x4 = m4/mt*100;# %age mass composition of N2 produced

vt = x1/mCO2+x2/mH2O+x3/mO2+x4/mN2;# total volume
v1 = x1/mCO2/vt*100;# %age volume composition of CO2
v2 = x2/mH2O/vt*100;# %age volume composition of H2O
v3 = x3/mO2/vt*100;# %age volume composition of O2
v4 = x4/mN2/vt*100;# %age volume composition of N2

Mav = (v1*mCO2+v2*mH2O+v3*mO2+v4*mN2)/(v1+v2+v3+v4);# average moleculer mass, [kg/kmol]
# since no of moles is constant so PV/T=constant
V2 = P1*V1*T2/(P2*T1);#volume, [m^3]

mp = mt*mc/3600.;# mass of product of combustion/s, [kg]

V = V2*mp/Mav;# volume of flowing gas /s,[m^3]

v = V/A;# velocity of flue gas, [m/s]
print ' The actual mass of air supplied is (kg/kg coal) = ',round(mas,2)
print ' The velocity of flue gas is (m/s) = ',round(v,2)

#  End

Example 8.18
The actual mass of air supplied is (kg/kg coal) =  13.64
The velocity of flue gas is (m/s) =  3.99


## Example 19: pg 227¶

In :
#pg 227
print('Example 8.19');

# aim : To determine
# (a) the temperature of the gas after compression
# (b) the density of the air-gas mixture

# given values
CO = 26.;# %age volume composition of CO
H2 = 16.;# %age volume composition of H2
CH4 = 7.;# %age volume composition of CH4
N2 = 51.;# %age volume composition of N2

P1 = 103.;# gas pressure, [kN/m^2]
T1 = 273.+21;# gas temperature, [K]
rv = 7.;# volume ratio

aO2 = 21.;# %age volume composition of O2 in the air
c = 21.;# specific heat capacity of diatomic gas, [kJ/kg K]
cCH4 = 36.;# specific heat capacity of CH4, [kJ/kg K]
R = 8.3143;# gas constant, [kJ/kg K]

mCO = 28.;# moleculer mass of carbon
mH2 = 2.;# molecular mass of hydrogen
mCH4 = 16.;# moleculer mas of methane
mN2 = 28.;# moleculer mass of nitrogen
mO2 = 32.;# moleculer mass of oxygen

# solution
# (a)
Cav = (CO*c+H2*c+CH4*cCH4+N2*c+100*2*c)/(100.+200);# heat capacity, [kJ/kg K]

Gama = (Cav+R)/Cav;# heat capacity ratio
# rv = V1/V2
# process is polytropic, so
T2 = T1*(rv)**(Gama-1);# final tempearture, [K]
print ' (a) The temperature of the gas after compression is (C) = ',round(T2-273.15,1)

# (b)

Mav = (CO*mCO+H2*mH2+CH4*mCH4+N2*mN2+42*mO2+158*mN2)/(100.+200)

# for 1 kmol of gas
V = R*T1/P1;# volume of one kmol of gas, [m^3]
# hence
rho = Mav/V;# density of gas, [kg/m^3]

print ' (b) The density of air-gas mixture is (kg/m^3) = ',round(rho,3)

#  End

Example 8.19
(a) The temperature of the gas after compression is (C) =  354.1
(b) The density of air-gas mixture is (kg/m^3) =  1.133


## Example 20: pg 228¶

In :
#pg 228
print('Example 8.20');

# aim : to determine
# stoichiometric equation for combustion of hydrogen

# solution
# equation with algebric coefficient is
# H2+aO2+79/21*aN2=bH2O+79/21*aN2
# by equating coefficients
b = 1;
a = b/2.;
# so equation becomes
# 2 H2+ O2+3.76 N2=2 H2O+3.76 N2
#results
print('The required stoichiometric equation is  =  ');
print('2 H2+ O2+3.76 N2 = 2 H2O+3.76 N2');

# End

Example 8.20
The required stoichiometric equation is  =
2 H2+ O2+3.76 N2 = 2 H2O+3.76 N2


## Example 22: pg 229¶

In :
#pg 229
print('Example 8.22');

# aim : To determine
# the percentage gravimetric analysis of the total products of combustion

# given values
CO = 12.;#  %age volume composition of CO
H2 = 41.;#  %age volume composition of H2
CH4 = 27.;#  %age volume composition of CH4
O2 = 2.;#  %age volume composition of O2
CO2 = 3.;#  %age volume composition of CO2
N2 = 15.;#  %age volume composition of N2

mCO2 = 44.;# moleculer mass of CO2,[kg/kmol]
mH2O = 18.;# moleculer mass of H2O, [kg/kmol]
mO2 = 32.;# moleculer mass of O2, [kg/kmol]
mN2 = 28.;# moleculer mass of N2, [kg/kmol]

ea = 15.;# %age excess air required
aO2 = 21.;# %age air composition in the air

# solution
# combustion equation by no. of moles
# 12CO + 41H2 + 27CH4 + 2O2 + 3CO2 + 15N2 + aO2+79/21*aN2 = bCO2 + dH2O + eO2 + 15N2 +79/21*aN2
# equating C coefficient
b = 12.+27+3;# [mol]
# equatimg H2 coefficient
d = 41.+2*27;# [mol]
# O2 required is 15 % extra,so
# e/(e-a)=.15 so e=.13a
# equating O2 coefficient
# 2+3+a=b+d/2 +e

a = (b+d/2.-5)/(1-.13);
e = .13*a;# [mol]

# gravimetric analysis of product
v1 =  b*mCO2;# gravimetric volume of CO2
v2 =  d*mH2O ;# gravimetric volume of H2O
v3 = e*mO2;# gravimetric volume of O2
v4 = 15*mN2 +79./21*a*mN2;# gravimetric volume of N2

vt = v1+v2+v3+v4;# total
x1 = v1/vt*100;# percentage gravimetric of CO2
x2 = v2/vt*100;# percentage gravimetric of H2O
x3 = v3/vt*100;# percentage gravimetric of O2
x4 = v4/vt*100;# percentage gravimetric of N2
#results
print ' Percentage gravimetric composition of CO2  = ',round(x1,2),'  \n ,\n Percentage gravimetric composition of H2O  = ',round(x2,2),'  \n\n Percentage gravimetric composition of O2  = ',round(x3,2),'  \n\n Percentage gravimetric composition of N2  = ',round(x4,2)

#  End

Example 8.22
Percentage gravimetric composition of CO2  =  12.65
,
Percentage gravimetric composition of H2O  =  11.7

Percentage gravimetric composition of O2  =  2.77

Percentage gravimetric composition of N2  =  72.89


## Example 23: pg 231¶

In :
#pg 231
print('Example 8.23');
import math
#  aim : To determine
# (a) the actual quantity of air supplied/kg of fuel
# (b) the volumetric efficiency of the engine

# given values
d = 300.*10**-3;# bore,[m]
L = 460.*10**-3;# stroke,[m]
N = 200.;# engine speed, [rev/min]

C = 87.;#  %age mass composition of Carbon in the fuel
H2 = 13.;#  %age mass composition of H2 in the fuel

mc = 6.75;# fuel consumption, [kg/h]

CO2 = 7.;# %age composition of CO2 by volume
O2 = 10.5;# %age composition of O2 by volume
N2 = 7.;# %age composition of N2 by volume

mC = 12.;# moleculer mass of CO2,[kg/kmol]
mH2 = 2.;# moleculer mass of H2, [kg/kmol]
mO2 = 32.;# moleculer mass of O2, [kg/kmol]
mN2 = 28.;# moleculer mass of N2, [kg/kmol]

T = 273.+17;# atmospheric temperature, [K]
P = 100;# atmospheric pressure, [kn/m**2]
R =.287;# gas constant, [kJ/kg k]

# solution
# (a)
# combustion equation by no. of moles
# 87/12 C + 13/2 H2 + a O2+79/21*a N2 = b CO2 + d H2O + eO2 + f N2
# equating  coefficient
b = 87./12;# [mol]
a = 22.7;# [mol]
e = 10.875;# [mol]
f = 11.8*b;# [mol]
# so fuel side combustion equation is
# 87/12 C + 13/2 H2 +22.7 O2 +85.5 N2
mair = ( 22.7*mO2 +85.5*mN2)/100;# mass of air/kg fuel, [kg]
print ' (a) The mass of actual air supplied per kg of fuel is (kg) = ',round(mair,2)

# (b)
m = mair*mc/60;# mass of air/min, [kg]
V = m*R*T/P;# volumetric flow of air/min, [m**3]
SV = math.pi/4*d**2*L*N/2;# swept volume/min, [m**3]

VE = V/SV;# volumetric efficiency
print ' (b) The volumetric efficiency of the engine is (percent) = ',round(VE*100,1)

#  End

Example 8.23
(a) The mass of actual air supplied per kg of fuel is (kg) =  31.2
(b) The volumetric efficiency of the engine is (percent) =  89.9


## Example 24: pg 232¶

In :
#pg 232
print('Example 8.24');

# aim : To determine
#  the mass of air supplied/kg of fuel burnt

# given values
# gas composition in the fuel
C = 84.;#  %age mass composition of Carbon in the fuel
H2 = 14.;#  %age mass composition of H2 in the fuel
O2f = 2.;# %age mass composition of O2 in the fuel

# exhaust gas composition
CO2 = 8.85;# %age composition of CO2 by volume
CO = 1.2# %age composition of CO by volume
O2 = 6.8;# %age composition of O2 by volume
N2 = 83.15;# %age composition of N2 by volume

mC = 12.;# moleculer mass of CO2,[kg/kmol]
mH2 = 2.;# moleculer mass of H2, [kg/kmol]
mO2 = 32.;# moleculer mass of O2, [kg/kmol]
mN2 = 28.;# moleculer mass of N2, [kg/kmol]

# solution
# combustion equation by no. of moles
# 84/12 C + 14/2 H2 +2/32 O2 + a O2+79.3/20.7*a N2 = b CO2 + d CO2+  eO2 + f N2 +g H2
# equating  coefficient and given condition
b = 6.16;# [mol]
a = 15.14;# [mol]
d = .836;# [mol]
f = 69.3*d;# [mol]
# so fuel side combustion equation is
# 84/12 C + 14/2 H2 +2/32 O2 +  15.14 O2 +85.5 N2
mair = ( a*mO2 +f*mN2)/100;# mass of air/kg fuel, [kg]
#results
print ' The mass of air supplied per kg of fuel is (kg) = ',round(mair,2)

#  End

Example 8.24
The mass of air supplied per kg of fuel is (kg) =  21.07