Matlab Programs –
1) Calculation of ignition delay by Hardenberg and Hase
method:-
function t = ignitiondelaycn(CNd,ne,nbd,L,N,T,P)
% CNd = 52; Input 'CNd is cetane number of diesel'
% ne = 0.05; Input 'ne is ethanol ratio in the blend'
% nbd = 0.1; Input 'nbd is biodiesel ratio in the
blend'
% L = 0.1; Input 'L is stroke length in metres'
% N = 4000; Input 'N is speed in rpm'
% P = 45; Input 'P is charge pressure in atm'
% T = 500; Input 'T is charge temperature in Kelvin'
R = 8.314;
%------Calculation of mean piston speed--------
Sp = 2*L*(N/60);
%------Calculation of cetane number of diesel ethanol
biodiesel blend------
CN = CNd - 0.59*ne + 0.55*nbd;
%------Calculation of activation energy--------
Ea = 618840 / (CN + 25);
%------Calculation of ignition delay using hardenberg
and Hase method------
tca = (0.36+0.22*Sp)*exp(Ea*(1/(R*T)-1/17190)*(21.2/(P-
12.4))^0.63);
t = tca / (0.006 * N);
2) Variation of ignition delay with cetane number –
function t = ignitiondelaycn1(CNd,L,N,T,P)
% CNd = 51; Input 'CNd is cetane number of diesel'
% ne = 0.05; Input 'ne is ethanol ratio in the blend'
% nbd = 0.1; Input 'nbd is biodiesel ratio in the
blend'
% L = 0.1; Input 'L is stroke length in metres'
% N = 4000; Input 'N is speed in rpm'
% P = 45; Input 'P is charge pressure in atm'
% T = 500; Input 'T is charge temperature in
Kelvin'
R = 8.314;
%------Calculation of mean piston speed--------
Sp = 2*L*(N/60);
%------Calculation of cetane number of diesel ethanol
biodiesel blend------
ne = 0:2:20;
nbd = 0:2:20;
CN = CNd - 0.59*ne + 0.55*nbd;
%------Calculation of activation energy--------
Ea = 618840 ./ (CN + 25);
%------Calculation of ignition delay using hardenberg
and Hase method------
tca = (0.36+0.22*Sp)*exp(Ea*(1/(R*T)-1/17190)*(21.2/(P-
12.4))^0.63);
t = tca / (0.006 * N);
figure(1);
plot(CN,t);
xlabel('cetane number');
ylabel('ignition delay');
3) Variation of cetane number with volume fraction of
ethanol –
function CNbd = linearbd(CNd)
% CNd = 52; Input ‘cetane number of diesel’
%-----Volume Fraction of Biodiesel = 5%-------
nbd = 0.05;
ne = 0:0.05:0.4;
CNbd = CNd - 0.59 * ne + 0.55 * nbd;
plot(ne,CNbd);
xlabel('Volume fraction of ethanol');
ylabel('Cetane Number');
title('Variation of cetane number with blend % of
ethanol');
hold on; grid on;
%-----Volume Fraction of Biodiesel = 10%--------
nbd1 = 0.1;
ne = 0:0.05:0.4;
CNbd = CNd - 0.59 * ne + 0.55 * nbd1;
plot(ne,CNbd,'m');
xlabel('Volume fraction of ethanol');
ylabel('Cetane Number');
title('Variation of cetane number with blend % of
ethanol');
%-----Volume Fraction of Biodiesel = 20%-----
nbd2 = 0.2;
ne = 0:0.05:0.4;
CNbd = CNd - 0.59 * ne + 0.55 * nbd2;
plot(ne,CNbd,'k');
xlabel('Volume fraction of ethanol');
ylabel('Cetane Number');
legend('Biodiesel = 5%','Biodiesel = 10%','Biodiesel =
20%');
title('Variation of cetane number with blend % of
ethanol');
4) Variation of cetane number with volume fraction of
biodiesel –
function CNet = linearet(CNd)
% CNd = 52; ‘Input cetane number of diesel’
%-----Volume Fraction of Ethanol = 5%-----
ne = 0.05;
nbd = 0:0.05:0.4;
CNet = CNd - 0.59 * ne + 0.55 * nbd;
plot(nbd,CNet);
xlabel('Volume fraction of biodiesel');
ylabel('Cetane Number');
title('Variation of cetane number with blend % of
biodiesel');
hold on;
%-----Volume Fraction of Ethanol = 10%-----
ne1 = 0.1;
nbd = 0:0.05:0.4;
CNet = CNd - 0.59 * ne1 + 0.55 * nbd;
plot(nbd,CNet,'k');
xlabel('Volume fraction of biodiesel');
ylabel('Cetane Number');
title('Variation of cetane number with blend % of
biodiesel');
hold on; grid on;
%-----Volume Fraction of Ethanol = 20%------
ne2 = 0.2;
nbd = 0:0.05:0.4;
CNet = CNd - 0.59 * ne2 + 0.55 * nbd;
plot(nbd,CNet,'m');
xlabel('Volume fraction of biodiesel');
ylabel('Cetane Number');
legend('Ethanol = 5%','Ethanol = 10%','Ethanol = 20%');
title('Variation of cetane number with blend % of
biodiesel');