Combustion of hydrogen (Ordinary differential equations)

Update: January 31, 2018
OpenFOAM 4.x

Case directory

$FOAM_TUTORIALS/combustion/chemFoam/h2

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 10 chemical species and 27 chemical reactions defined in the file "chemkin/chem.inp".

constantProperty pressure;

fractionBasis  mole;
fractions
{
    H2              1;
    N2              3.76;
    O2              1;
}
p               202650;
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 calculation results between OpenFOAM (chemFOAM) and CHEMKIN II Comparison of 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/h2 h2
cd h2

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

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