7.2 Post-processing with Fluent
It is possible to use Fluent as a post-processor for the cases run in OpenFOAM. Two converters are supplied for the purpose: foamMeshToFluent which converts the OpenFOAM mesh into Fluent format and writes it out as a .msh file; and, foamDataToFluent converts the OpenFOAM results data into a .dat file readable by Fluent. foamMeshToFluent is executed in the usual manner. The resulting mesh is written out in a fluentInterface subdirectory of the case directory, i.e.<caseName>/fluentInterface/<caseName>.msh
foamDataToFluent converts the OpenFOAM data results into the Fluent format. The conversion is controlled by two files. First, the controlDict dictionary specifies startTime, giving the set of results to be converted. If you want to convert the latest result, startFrom can be set to latestTime. The second file which specifies the translation is the foamDataToFluentDict dictionary, located in the constant directory. An example foamDataToFluentDict dictionary is given below:
2| ========= | |
3| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4| \\ / O peration | Version: v2006 |
5| \\ / A nd | Website: www.openfoam.com |
6| \\/ M anipulation | |
7\*---------------------------------------------------------------------------*/
8FoamFile
9{
10 version 2.0;
11 format ascii;
12 class dictionary;
13 location "system";
14 object foamDataToFluentDict;
15}
16// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17
18p 1;
19
20U 2;
21
22T 3;
23
24h 4;
25
26k 5;
27
28epsilon 6;
29
30alpha1 150;
31
32
33// ************************************************************************* //
The dictionary contains entries of the form
<fieldName> <fluentUnitNumber>
Fluent name | Unit number | Common OpenFOAM name |
PRESSURE | 1 | p |
MOMENTUM | 2 | U |
TEMPERATURE | 3 | T |
ENTHALPY | 4 | h |
TKE | 5 | k |
TED | 6 | epsilon |
SPECIES | 7 | — |
G | 8 | — |
XF_RF_DATA_VOF | 150 | gamma |
TOTAL_PRESSURE | 192 | — |
TOTAL_TEMPERATURE | 193 | — |
The dictionary must contain all the entries the user requires to post-process, e.g. in our example we have entries for pressure p and velocity U. The list of default entries described in Table 7.1. The user can run foamDataToFluent like any utility.
To view the results using Fluent, go to the fluentInterface subdirectory of the case directory and start a 3 dimensional version of Fluent with
fluent 3d
A note of caution: users MUST NOT try to use an original Fluent mesh file that has been converted to OpenFOAM format in conjunction with the OpenFOAM solution that has been converted to Fluent format since the alignment of zone numbering cannot be guaranteed.