Difference between revisions of "Tut reactingFoam firstTutorial"
(adaptation to OpenFOAM-1.6) |
(→Usage) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 19: | Line 19: | ||
For running this tutorial, the path of the "chem.inp" and "therm.dat" files need to be updated to meet | 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). | + | 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. | One output timestep of my calculation is also included, so that you can look at the results immediately. | ||
− | == | + | == Adaption to OpenFOAM-1.7 == |
− | It is possible to use the tutorial in OpenFOAM-1. | + | 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 aachenBomb-tutorial | + | * a "g"-file is needed in the /constant directory, which can be used from the new combustion/dieselFoam/aachenBomb-tutorial |
* file "constant/chemistryProperties" | * file "constant/chemistryProperties" | ||
+ | ** put the header (from "version" to "object") into <code>FoamFile{ ... }</code> | ||
** <code>chemistrySolver</code> should be <code>ode</code> instead of <code>ODE</code> | ** <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> | ** there should be a <code>odeCoeffs</code>-dictionary instead of <code>ODECoeffs</code> | ||
** added the line <code>psyChemistryModel ODEChemistryModel<gasThermoPhysics>;</code> after the header | ** added the line <code>psyChemistryModel ODEChemistryModel<gasThermoPhysics>;</code> after the header | ||
* file "constant/thermophysicalProperties" | * file "constant/thermophysicalProperties" | ||
− | ** replace line <code>thermoType hMixtureThermo<reactingMixture>;</code> by <code>thermoType | + | ** replace line <code>thermoType hMixtureThermo<reactingMixture>;</code> by <code>thermoType hsPsiMixtureThermo<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> | ** 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 "constant/turbulenceProperties" | ||
+ | ** replace the <code>solver</code> section with one from a similar file from the new aachenBomb-tutorial | ||
* file "0/T" | * file "0/T" | ||
** in boundary condition "outlet", replace <code>type fixedValue; value uniform 800;</code> with <code>type zeroGradient;</code> | ** 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 | * a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial | ||
+ | * file "system/controlDict" | ||
+ | ** set <code>startFrom</code> to <code>startTime</code> instead of <code>latestTime</code> | ||
== Download == | == Download == |
Latest revision as of 20:55, 31 October 2012
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 beode
instead ofODE
- there should be a
odeCoeffs
-dictionary instead ofODECoeffs
- added the line
psyChemistryModel ODEChemistryModel<gasThermoPhysics>;
after the header
- put the header (from "version" to "object") into
- file "constant/thermophysicalProperties"
- replace line
thermoType hMixtureThermo<reactingMixture>;
bythermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
- check for correct places of CHEMKINFile and CHEMKINThermoFile, it works with
CHEMKINFile "../chemkin/chem.inp";
andCHEMKINThermoFile "../chemkin/therm.dat";
- replace line
- file "constant/turbulenceProperties"
- replace the
solver
section with one from a similar file from the new aachenBomb-tutorial
- replace the
- file "0/T"
- in boundary condition "outlet", replace
type fixedValue; value uniform 800;
withtype zeroGradient;
- in boundary condition "outlet", replace
- a "constant/RASProperties"-file could be needed, examples can be found e.g. in the new aachenBomb-tutorial
- file "system/controlDict"
- set
startFrom
tostartTime
instead oflatestTime
- set
4 Download
5 History
Discussed in the message board and contributed by [[User:Hannes_Kr�?¶ger|Hannes Kr�?¶ger]]