Good Afternoon,
I'm running Cantera on Matlab, to simulate engine combution.
I have two different question:
1) What's the difference beetwen Reactor and IdealGasReactor. There are some differences in the results?
2) I noticed that carrying out the simulation of stoichiometric combustion remains oxygen at the end of the test (I have attached the Matlab figure). Using gri30 mechanism also with other type of chemical kinetics mechanism, at the end of the test i remain some oxygen mass fraction at stoichiometric condition. I'd like to know if it is a known issue with cantera, or if it is my mistakes. I also use the composition which is in the tutorial of cantera but i've the same result.
T = 900; %K
p = 90.e+5; %Pa
phi = 1;
gas = importPhase('gri30.xml')
X = 'CH4:1, O2:2, N2:7.52';
set (gas, 'T', T, 'P', p, 'X', X)
R = Reactor(gas);
net = ReactorNet(R);
t = 0;
dt = 1.e-5;
tf = 1.e-1;
value = tf/dt;
for z = 1:value
t = t+dt;
advance(net,t)
oxy(z) = massFraction(gas, 'O2');
methane(z) = massFraction(gas, 'CH4');
time(z) = t;
end
figure(1), hold on
plot(time, oxy)
plot(time methane, 'r')
legend('O2', 'CH4')
xlabel('Time [s]')
ylabel('Mass Fraction')
set(gcf, 'position', [100 100 550 450])
Thanks a lot for your response.
My apologies, for my bad english