I'm trying to compare Cantera simulations with simulations using OpenFoam.
In OpenFoam I'm looking at a constant volume process where I'm using a source term (in the file "fvOptions") to introduce the fuel into the heated air in the box used in the calculations (i.e. "cheating" in the sense that the fuel is just "sourced" into each cell in the computational domain).
In this specific case the "type irreversibleinfiniteReaction" is used and as long as there is oxygen the reaction is basically immediate.
The Cantera result from q_mix.equilibrate('UV') (where "q_mix" is of the Quantity class) compares reasonably with the converged (after all the fuel have been "sourced into" the box) OpenFoam solution.
The mass fractions and initial states are the same as the corresponding ones in the OpenFoam calculation.
So this is all good.
In next step, in an attempt to altogether skip the details of the combustion, I tried to again using source terms in the OF-calculations ("fvOptions") to "inject" enthalpy, products (CO2, H2O) as well as O2 (with a negative source term).
The enthalpy to inject was obtained by:
h_cold = q_mix.enthalpy
q_mix.equilibrate('UV')
h_inject = q_mix.enthalpy-h_cold
In the same way as when the fuel was injected the enthalpy was sourced into the computational domain over a specified time interval, and the calculation was continued until a stationary solution was reached.
However, in this case the solutions do not agree, with the OF-simulations giving way too low values on both pressure and temperature. Since I'm so far off, I suspect I'm doing something completely wrong, and any help/hints would be greatly appreciated.
Thanks!
/jon