Reactor & Stoichiometric mixture

196 views
Skip to first unread message

Giovanni Padovani

unread,
May 18, 2015, 8:56:37 AM5/18/15
to canter...@googlegroups.com
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
massFraction.jpg

Steven DeCaluwe

unread,
May 18, 2015, 11:32:04 AM5/18/15
to canter...@googlegroups.com
Hi Giovanni,

How much oxygen remains?   While the thermodynamics will generally favor the combustion products, at equilibrium I would imagine you would have *some* small amount of oxygen left. 

I'm not too familiar with the numbers, but imagine that this equilibrium amount if O2 would be pretty small. Anyway, just a thought. Can you provide more info about how much oxygen remains?

Cheers,
Steven 



Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at http://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.
<massFraction.jpg>

Giovanni Padovani

unread,
May 18, 2015, 12:05:24 PM5/18/15
to canter...@googlegroups.com
Hi steve, thanks for your reply

how initial condition I set the stoichiometric condition for the methane CH4:1, O2:2, N2:7.52, that corrisponde at this molar fraction:
O2: 0.190114,
CH4: 0.095057,
N2:  0.714829.

At the end of the simulation, i have this molar fraction:
O2: 0.007323;
CH4:  6.30943e-13;
N2:  0.714829.

So how you can see, I have too much oxygen at the end of the test. I tried to make long simulation, but the oxygen molar fraction doesn't goes down.

Best regard
Giovanni

Bryan W. Weber

unread,
May 18, 2015, 1:22:19 PM5/18/15
to canter...@googlegroups.com
Dear Giovanni,

Those appear to be mass fractions at the final condition; for mole fractions, I get

O2: 0.00623297
CH4: 1.2457E-12
N2: 0.700564

So I can reproduce your results, and I'm using the Python interface. I get the same results using the equilibrate method of the Solution class, so I expect its some left over from the equilibrium, as Steven suggested.

Bryan

Nick Curtis

unread,
May 18, 2015, 3:12:07 PM5/18/15
to canter...@googlegroups.com
Also, in regard to your first question the IdealGasReactor explicitly uses the Temperature as a state variable and thus avoids a potentially problematic Newton iteration to determine the state of the gas from the internal energy and volume (or enthalpy and pressure).  In general, you should use the IdealGasReactor when possible
Nick

Giovanni Padovani

unread,
May 19, 2015, 3:56:15 AM5/19/15
to canter...@googlegroups.com
Hi Bryan,
I'm sorry, probably i confused the mass fraction with the molar fraction. My apologies.
I don't understand what do you mean with your sentence: "I get the same results using the equilibrate method of the Solution class, so I expect its some left over from the equilibrium". There's too much oxygen at the beginning of the test?
Also I calculated the oxygen number of mole by stoichiometry equations: 1 CH4 + 2 O2 => 1 CO2 + 1 H2O. 1 mole of fuel and 2 mole of oxygen, is that right?


Thank you very much for your reply
Best Regards

Giovanni

Giovanni Padovani

unread,
May 19, 2015, 3:57:28 AM5/19/15
to canter...@googlegroups.com
Hi Nick,
Ok I understand, thanks a lot!!!

Best regard
Giovanni
Reply all
Reply to author
Forward
0 new messages