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:

1/*--------------------------------*- C++ -*----------------------------------*\
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>
The <fluentUnitNumber> is a label used by the Fluent post-processor that only recognises a fixed set of fields. The basic set of <fluentUnitNumber> numbers are quoted in Table 7.1.


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




Table 7.1: Fluent unit numbers for post-processing.

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
The mesh and data files can be loaded in and the results visualised. The mesh is read by selecting Read Case from the File menu. Support items should be selected to read certain data types, e.g. to read turbulence data for k and epsilon, the user would select k-epsilon from the Define->Models->Viscous menu. The data can then be read by selecting Read Data from the File menu.

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.