Hi Christopher,
The Cantera documentation contains a page providing some details on how time integration works.
For your mixture, I’d suggest looking at the initial net production rates of the species and the net rates of progress for the reactions. At least some of them should be non-zero, although they will be quite small. Using the GRI 3.0 mechanism for an initial methane/air mixture at 300 K, the largest net production rates are around 1e-35 kmol/m^3/s, and after one time step of 1e-15 seconds, the largest changes to the mass fractions are around 1e-48, which seems consistent with those production rates. All of these values are effectively zero within the absolute tolerances of the integrator.
Regards,
Ray
Hi Christopher,
Are you trying to re-implement the calculation of the reaction rates from the rate parameterizations and the stoichiometric coefficients? What’s shown in that diagram is that they use Cantera not only to compute the reaction rates and species production rates, but also to do the time integration of the local reaction term. But the equations written are only a subset of what’s actually being solved — this is missing the calculation of the backwards rate constant from the equilibrium constant for each reaction, the various reactions that are not parameterized as just modified Arrhenius rates, and the reactions that have third-body effects that need to be accounted for. If you’re just doing this for your own edification, you might have better luck comparing some of the intermediate quantities that Cantera can provide, such as the rates of progress for each reaction (getFwdRatesOfProgress and getRevRatesOfProgress) or even just the rate constants (getFwdRateConstants). It will be easier to see where your calculation is going wrong by looking at individual reactions, rather than looking at the net production rate for a species, where this result is the combination of all reactions involving that species.
In the ReactorNet::eval method, as described on the page I linked to, the state of the ThermoPhase is updated within the Reactor::updateState method.
Regards,
Ray