CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   cantera 2.0.1 and OpenFOAM-1.7.1 (

adhiraj February 11, 2013 14:17

cantera 2.0.1 and OpenFOAM-1.7.1
Hi all,
I am trying to use cantera 2.0.1 with OpenFOAM 1.7.1 for equilibrium calculations.
I created a model that has a cantera IdealGasMix as a member.

Cantera::vector_fp Ymol;
Cantera::IdealGasMix g;

Then in each cell, I perform a step:

g.setState_TPY(T[ignCell], p[ignCell], DATA_PTR(Ymol));
equilibrate(g, "HP");

The code compiles properly, but the issue is that cantera tries to overwrite some memory location during the process, so that later when I try to solve the transport equation for the species mass fractions in OpenFOAM, I get a memory error.
Any help will be appreciated, thanks.

All times are GMT -4. The time now is 08:56.