Project

MATLAB/Octave Code To Plot The Variation of Stoichiometric Co-efficient (ar) For Alkane, Alkene & Alkyne With Number of Carbon Atoms (n).

Abstract:- The work is focused on writing a simple MATLAB/Octave code using functions to calculate the stoichiometric co-efficient (ar) for air-fuel ratio for alkane, alkene, and alkynes. Stoichiometric combustion offers an easy way to understand combustion concepts. When fuel and air mix they produce products such as co2, co, oh, h2o, no, n2o, and many more. In stoichiometric combustion, we make a simple assumption that the by-products are limited to only co2, h2o, and n2. As an output parameter, we need to plot a graph that compares the effect of the number of atoms of carbon on the stoichiometric co-efficient "ar" & compare how this trend changes with the fuel type (alkane, alkene, and alkyne).

Methodology:-

A. Balancing The Combustion Reaction For Alkanes

`C_n H_(2n+2) + a_r(O_2+3.76N_2) = aCO_2 + bH_2O+cN_2`

Here

n = Number of moles of C

ar = Stoichiometric co-efficient

a = Number of moles of Carbon-di-oxide

b = Number of moles of water

c = Number of moles of nitrogen

Balancing the Carbon molecules

LHS = `C_n` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*n=n]

RHS = `aC` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*1=a]

Relationship between LHS & RHS `=>` n=a

Balancing the Hydrogen molecules

LHS = `H_(2n+2)` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*(2n+2)=2n+2]

RHS = `bH_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [b*2=2b]

Relationship between LHS & RHS `=>` 2n+2=2b `=> n+1=b`

Balancing the Oxygen molecules

LHS = `a_rO_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [`a_r`*2=2`a_r`]

RHS = `aO_2 + bO` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*2+b*1]

Relationship between LHS & RHS `=>` `2a_r=2a+b`

Substituting the value of a & b in the above equation we get `=>` `a_r= (3n+1)/2`

The above equation provides us the required relationship between the number of carbon atoms (n) & Stoichiomatric co-efficient (`a_r`), this will allow us to vary the value of carbon atoms & write code accordingly to plot graphs.

B. Balancing The Combustion Reaction For Alkenes

`C_n H_(2n) + a_r(O_2+3.76N_2) = aCO_2 + bH_2O+cN_2`

Here

n = Number of moles of C

ar = Stoichiometric co-efficient

a = Number of moles of Carbon-di-oxide

b = Number of moles of water

c = Number of moles of nitrogen

Balancing the Carbon molecules

LHS = `C_n` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*n=n]

RHS = `aC` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*1=a]

Relationship between LHS & RHS `=>` n=a

Balancing the Hydrogen molecules

LHS = `H_(2n)` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*(2n)=2n]

RHS = `bH_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [b*2=2b]

Relationship between LHS & RHS `=>` 2n=2b `=> n=b`

Balancing the Oxygen molecules

LHS = `a_rO_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [`a_r`*2=2`a_r`]

RHS = `aO_2 + bO` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*2+b*1]

Relationship between LHS & RHS `=>` `2a_r=2a+b`

Substituting the value of a & b in the above equation we get `=>` `a_r= (3n)/2`

The above equation provides us the required relationship between the number of carbon atoms (n) & Stoichiomatric co-efficient (`a_r`), this will allow us to vary the value of carbon atoms & write code accordingly to plot graphs.

C. Balancing The Combustion Reaction For Alkynes

`C_n H_(2n-2) + a_r(O_2+3.76N_2) = aCO_2 + bH_2O+cN_2`

Here

n = Number of moles of C

ar = Stoichiometric co-efficient

a = Number of moles of Carbon-di-oxide

b = Number of moles of water

c = Number of moles of nitrogen

Balancing the Carbon molecules

LHS = `C_n` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*n=n]

RHS = `aC` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*1=a]

Relationship between LHS & RHS `=>` n=a

Balancing the Hydrogen molecules

LHS = `H_(2n-2)` `=>` No.of Moles * No.of atoms per Mole `"=>"` [1*(2n-2)=2n-2]

RHS = `bH_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [b*2=2b]

Relationship between LHS & RHS `=>` 2n-2=2b `=> n-1=b`

Balancing the Oxygen molecules

LHS = `a_rO_2` `=>` No.of Moles * No.of atoms per Mole `"=>"` [`a_r`*2=2`a_r`]

RHS = `aO_2 + bO` `=>` No.of Moles * No.of atoms per Mole `"=>"` [a*2+b*1]

Relationship between LHS & RHS `=>` `2a_r=2a+b`

Substituting the value of a & b in the above equation we get `=>` `a_r= (3n-1)/2`

The above equation provides us the required relationship between the number of carbon atoms (n) & Stoichiomatric co-efficient (`a_r`), this will allow us to vary the value of carbon atoms & write code accordingly to plot graphs.

GNU Octave/MATLAB Code :-

clear all
close all
clc

% Number of Moles of carbon denoted by 'n'
% Stoichiometric Co-eff is denoted by 'ar'
% alkane = CnH(2n+2), alkene = CnH(2n), alkyne = CnH(2n-2)

% moles of Carbon varying from 1 to 20 with an interval of 1

n = 0:1:20;

% The Stoichiometric Co-eff for the above compounds are as follows

ar_alkane=(3*n+1)/2;
ar_alkene=(3*n)/2;
ar_alkyne=(3*n-1)/2;

% plotting graphs for comparitive study 

plot (n,ar_alkane)
hold on

plot (n,ar_alkene)
hold on

plot (n,ar_alkyne)
title ("Effect of Number of Moles of Carbon (n) on the Stoichiometric Co-eff of Alkane, Alkene & Alkyne")
xlabel ("Number of Carbon atoms (n)")
ylabel ("Stoichiometric Co-efficient (ar)")
legend ('ar of Alkane', 'ar of Alkene', 'ar of Alkyne')
hold off



 

Observation :- From the above plot we can conclude that the variation of the Stoichiometric Co-efficient (`a_r`) vs the number of carbon atoms (n) is linear.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.