Tut reactingFoam firstTutorial

From OpenFOAMWiki

1 Description

This sample case for the reactingFoam solver was created from the dieselFoam tutorial. The 2D-Mesh from the "pitzDaily" examples was used and an additional inlet just below the backward facing step was added.

Oxygen enters the domain through this second inlet and C7H16 through the main inlet. The domain is initially filled with N2, which is an inert species in this case. Downstream of the step, the reaction takes place.

There are 4 species-fields in the 0/-directory, which are initially required for the chemistry: O2, N2, C7H16 and Ydefault. Ydefault gives the boundary conditions for all other species than O2, N2, C7H16, that appear in the reaction mechanism. The reactions are defined in the "chem.inp"-file in the chemkin/-subdirectory (there are two more files for more complex mechanisms, which can also be chosen), the thermodynamic properties of the species are defined in the "therm.dat"-file in the same subdirectory.

2 Usage

For running this tutorial, the path of the "chem.inp" and "therm.dat" files need to be updated to meet your directory setup (set in "thermophysicalProperties"-Dictionary). To run: 1. type 'blockMesh', 2. type 'reactingFoam', 3. post-process with parafoam (type 'paraFoam'). One output timestep of my calculation is also included, so that you can look at the results immediately.

3 Adaption to OpenFOAM-1.7

It is possible to use the tutorial in OpenFOAM-1.7.1 with some minor changes:

  • a "g"-file is needed in the /constant directory, which can be used from the new combustion/dieselFoam/aachenBomb-tutorial
  • file "constant/chemistryProperties"
    • put the header (from "version" to "object") into FoamFile{ ... }
    • chemistrySolver should be ode instead of ODE
    • there should be a odeCoeffs-dictionary instead of ODECoeffs
    • added the line psyChemistryModel ODEChemistryModel<gasThermoPhysics>; after the header
  • file "constant/thermophysicalProperties"
    • replace line thermoType hMixtureThermo<reactingMixture>; by thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
    • check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with CHEMKINFile "../chemkin/chem.inp"; and CHEMKINThermoFile "../chemkin/therm.dat";
  • file "constant/turbulenceProperties"
    • replace the solver section with one from a similar file from the new aachenBomb-tutorial
  • file "0/T"
    • in boundary condition "outlet", replace type fixedValue; value uniform 800; with type zeroGradient;
  • a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial
  • file "system/controlDict"
    • set startFrom to startTime instead of latestTime

4 Download


5 History

Discussed in the message board and contributed by [[User:Hannes_Kr�?¶ger|Hannes Kr�?¶ger]]