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: 1.5 | 5 | \\ / A nd | Web: http://www.OpenFOAM.org | 6 | \\/ M anipulation | | 7 \*---------------------------------------------------------------------------*/ 8 FoamFile 9 { 10 version 2.0; 11 format ascii; 12 class dictionary; 13 object foamDataToFluentDict; 14 } 15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 16 17 p 1; 18 19 U 2; 20 21 T 3; 22 23 h 4; 24 25 k 5; 26 27 epsilon 6; 28 29 gamma 150; 30 31 // ************************************************************************* //
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 6.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 6.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 6.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.