Combustion of methane (Ordinary differential equations)

OpenFOAM 4.x

Case directory

$FOAM_TUTORIALS/combustion/chemFoam/gri

Summary

We import CHEMKIN II input files and calculate chemical reaction, then compare the calculation result with CHEMKIN II's result. CHEMKIN is a proprietary software for chemical reaction calculations that is developed at Sandia National Laboratories.

We solves pressure, temperature, and chemical composition, but not flow. And there are no spatial degrees of freedom (i.e. we calculate reactions in a single cell as ordinary differential equations). There are CHEMKIN format input files in the directory "chemkin", and we load them from the file "thermophysicalProperties" in the directory "constant" as follows.

thermoType
{
    type            hePsiThermo;
    mixture         reactingMixture;
    transport       sutherland;
    thermo          janaf;
    energy          sensibleEnthalpy;
    equationOfState perfectGas;
    specie          specie;
}

CHEMKINFile     "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";

The initial pressure, temperature, and chemical composition are defined in the file "initialConditions" in the directory "constant" as follows. The entire calculation takes into account 53 chemical species and 325 chemical reactions defined in the file "chemkin/chem.inp".

constantProperty pressure;

fractionBasis   mole;
fractions
{
    CH4             0.5;
    N2              3.76;
    O2              1;
}
p               1.36789e+06;
T               1000;

And the file "chemistryProperties" in the directory "constant" is used to configure the chemistry solver.

The calculation result is as follows.

Comparison of temperature calculation results between OpenFOAM (chemFOAM) and CHEMKIN II Comparison of temperature calculation results between OpenFOAM (chemFOAM) and CHEMKIN II

We can see that the OpenFOAM result is in good agreement with CHEMKIN II's.

Commands

cp -r $FOAM_TUTORIALS/combustion/chemFoam/gri gri
cd gri

chemFoam

cd validation
./Allrun
convert -flatten -density 100x100 OF_vs_CHEMKINII.eps OF_vs_CHEMKINII.png

After the calculation, the results are compared with the results of CHEMKIN II under the directory "validation" and drawn on a graph. Here, we use the convert command of ImageMagick to convert the file format from EPS to PNG.

Calculation time

3.23 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz

Reference