summaryrefslogtreecommitdiff
path: root/2168/CH8/EX8.10/Chapter8_example10.sce
blob: 10542652972a0711e015789c5a93c473f7cf70b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
CO2=10.9//Volumetric analysis composition in percent
CO=1//Volumetric analysis composition in percent
O2=7.1//Volumetric analysis composition in percent
N2=81//Volumetric analysis composition in percent
mO2=32//Molecular weight of O2
mCO2=44//Molecular weight of CO2
mCO=28//Molecular weight of CO
mN2=28//Molecular weight of N2

//Calculations
pCO2=(CO2/100)*mCO2//Proportional weight for CO2
pCO=(CO/100)*mCO//Proportional weight for CO
pO2=(O2/100)*mO2//Proportional weight for O2
pN2=(N2/100)*mN2//Proportional weight for N2
T=(pCO2+pCO+pO2+pN2)//Total proportional weight
ppCO2=(pCO2/T)*100//Weight per kg of exhaust gas for CO2
ppCO=(pCO/T)*100//Weight per kg of exhaust gas for CO
ppO2=(pO2/T)*100//Weight per kg of exhaust gas for O2
ppN2=(pN2/T)*100//Weight per kg of exhaust gas for N2

printf('The gravimetric analysis is given by (in percent) \n CO2 -> %3.2f \n CO -> %3.2f \n O2 -> %3.2f \n N2 -> %3.2f',ppCO2,ppCO,ppO2,ppN2)