summaryrefslogtreecommitdiff
path: root/2090/CH3/EX3.4/Chapter3_Example4.sce
blob: 643f00dae919c5d5cc9b0cd458d663ddb503e1e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
clc
clear
//Input data
CO=12;//The composition of carbondioxide of combustion by volume in percentage 
C=0.5;//The composition of carbonmoxide of combustion by volume in percentage 
O=4;//The composition of oxygen of combustion by volume in percentage 
N=83.5;//The composition of nitrogen of combustion by volume in percentage 
o=32;//Molecular weight of the oxygen
co=44;//Molecular weight of the carbondioxide 
c=12;//Molecular weight of the carbon
s=32;//Molecular weight of the sulphur
so=64;//Molecular weight of sulphur dioxide
n1=28;//Molecular weight of the nitrogen
h=2;//Molecular weight of the hydrogen

//Calculations
m=12+0.5;//Balancing carbon
x=N/3.76;//Balancing nitrogen
z=[x-(CO+(C/2)+O)]*2;//Balancing oxygen
n=z*h;//Balancing hydrogen
Af=[(x*o)+(N*n1)]/[(m*c)+(n)];//Air/fuel ratio
As=[(18.46*o)+(69.41*n1)]/173.84;//Stoichiometric air/fuel ratio
Ta=(Af/As)*100;//Percent theoretical air
mc=[(m*c)/173.84]*100;//Composition of carbon on mass basis in percent
mh=(n/173.84)*100;//Composition of hydrogen on mass basis in percent

//Output
printf(' (a)The air/fuel ratio = %3.2f \n (b)The percent theoretical air = %3.1f percent \n (c)The percentage composition of fuel on a mass basis : \n   C = %3.1f percent \n   H = %3.1f percent ',Af,Ta,mc,mh)