Difference between revisions of "Tut reactingFoam firstTutorial"

From OpenFOAMWiki
m (Reverted edit of Lgdwaf, changed back to last version by Bgschaid)
(adaptation to OpenFOAM-1.6)
Line 21: Line 21:
 
your directory setup (set in "thermophysicalProperties"-Dictionary).
 
your directory setup (set in "thermophysicalProperties"-Dictionary).
 
One output timestep of my calculation is also included, so that you can look at the results immediately.
 
One output timestep of my calculation is also included, so that you can look at the results immediately.
 +
 +
== adaption to OpenFOAM-1.6 ==
 +
 +
It is possible to use the tutorial in OpenFOAM-1.6 with some minor changes:
 +
 +
* a "g"-file is needed in the /constant directory, which can be used from the new aachenBomb-tutorial
 +
* file "constant/chemistryProperties"
 +
** <code>chemistrySolver</code> should be <code>ode</code> instead of <code>ODE</code>
 +
** there should be a <code>odeCoeffs</code>-dictionary instead of <code>ODECoeffs</code>
 +
** added the line <code>psyChemistryModel ODEChemistryModel<gasThermoPhysics>;</code> after the header
 +
* file "constant/thermophysicalProperties"
 +
** replace line <code>thermoType hMixtureThermo<reactingMixture>;</code> by <code>thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;</code>
 +
** check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with <code>CHEMKINFile "../chemkin/chem.inp";</code> and <code>CHEMKINThermoFile "../chemkin/therm.dat";</code>
 +
* file "0/T"
 +
** in boundary condition "outlet", replace <code>type fixedValue; value uniform 800;</code> with <code>type zeroGradient;</code>
 +
* a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial
  
 
== Download ==
 
== Download ==
Line 28: Line 44:
 
== History ==
 
== History ==
  
Discussed in [http://openfoam.cfd-online.com/forum/messages/1/1085.html the message board] and contributed by [[User:?¶ger|Hannes ?¶ger]]
+
Discussed in [http://openfoam.cfd-online.com/forum/messages/1/1085.html the message board] and contributed by [[User:Hannes_Kr�?¶ger|Hannes Kr�?¶ger]]

Revision as of 14:06, 12 May 2010

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). One output timestep of my calculation is also included, so that you can look at the results immediately.

3 adaption to OpenFOAM-1.6

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

  • a "g"-file is needed in the /constant directory, which can be used from the new aachenBomb-tutorial
  • file "constant/chemistryProperties"
    • 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 hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
    • check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with CHEMKINFile "../chemkin/chem.inp"; and CHEMKINThermoFile "../chemkin/therm.dat";
  • 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

4 Download

Media:reactingFoamCase.tar.gz

5 History

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