Stochiometric Combustion calculator for alkane,alkene and alkyne fuels
`In this project, a matlab code was written to calculate the air-fuel ratio (stochiometric ratio, ar), for alkanes, alkenes and alkynes. The variation of 'ar' with number of Carbon atoms in alkanes, alkenes and alkynes were compared.
`For Alkanes, the general combustion equation is C n H 2 n + 2 + a r ( O 2 + 3.76 N 2 ) = a C O 2 + b H 2 O + c ( 3.76 N 2 ) For balancing this equation, a = n ( C − b a l a n c e ) , b=n+1 ( H 2 − b a l a n c e ) , c = a r ( N 2 − b a l a n c e ) , a r = a + b 2 = n + n + 1 2 ( O 2 − b a l a n c e ) ∴ a r = 3 n + 1 2
For Alkenes, C n H 2 n + a r ( O 2 + 3.76 N 2 ) = a C O 2 + b H 2 O + c ( 3.76 N 2 ) For balance, a r = a + b 2 = n + n 2 = 3 n 2
`For Alkynes, C n H 2 n − 2 + a r ( O 2 + 3.76 N 2 ) = a C O 2 + b H 2 O + c ( 3.76 N 2 ) a r = a + b 2 = n + n − 1 2 = 3 n − 1 2
The program was run for Carbon atoms ranging from 1 to 10 for all alkanes, alkenes and alkynes and it was noted that the stochiometric ratio varied linearly with carbon moles.`
Matlab code:
clear all
close all
clc
%n = number of moles
n = 1:10;
%for alkane, CnH2n+2 + ar*(O2 + 3.76*N2) = a*CO2 + b*H2O + c*3.76*N2
% For balancing this equation,
% a = n (C balance)
% b = (n+1) (H2 balance)
% c = ar (N2 balance)
% ar = a+b/2 = n+(n+1/2) (O2 balance)
% ar = (3*n+1)/2
ar_alkane = 1.5*n+0.5;
%for alkene, CnH2n + ar*(O2 + 3.76*N2) = n*CO2 + n*H2O + ar*3.76*N2
% Therefore ar = a+b/2 = n+n/2
% ar = 2n
ar_alkene = 1.5*n;
%for alkyne, CnH2n-2 + ar*(O2 + 3.76*N2) = n*CO2 + (n-1)*H2O + ar*3.76*N2
% Therefore ar = a+b/2 = n+(n-1)/2
% ar = (3*n-1)/2
ar_alkyne = 1.5*n-0.5;
%plotting
plot (n,ar_alkane,'r', n,ar_alkene,'b', n,ar_alkyne,'g')
legend('Alkane', 'Alkene', 'Alkyne')
%labelling
xlabel("Number of moles of Carbon")
ylabel("Stoiciometric coefficient")