OpenFOAM provides many libraries for converting meshes generated in any of the major common formats. Listed below are reported these utilities.
| Library | Conversion from: | |
|---|---|---|
fluentMeshToFoam |
FLUENT mesh .msh, both 2D and 3D | |
starToFoam |
Mesh STAR-CDPROSTAR | |
sammToFoam |
Mesh STAR-CD SAMMA | |
gambitToFoam |
GAMBIT mesh .neu | |
ansysToFoam |
I-DEAS mesh ANSYS.ans | |
cfxToFoam |
CFX mesh .geo | |
ccm26ToFoam |
File STAR-CCM | |
gmshToFoam |
Gmsh file .msh | |
kivaToFoam |
KIVA3v mesh | |
netgenNeutralToFoam |
Netgen mesh | |
tetgenToFoam |
Tetgen .ele, .node and .face meshes | |
In order to convert a mesh to OpenFOAM format it suffices to make the following steps:
mkdir casenamemkdir casename/systemmkdir casename/constantmkdir casename/constant/polyMeshmkdir casename/0controlDict file which contains temporal evolution information (see the OpenFOAM User Guide):vi casename/system/controlDictvi casename/system/fvSchemesvi casename/system/fvSolutionlibrary < caseroot > < casename > < meshfile >
fluent3DMeshToFoam . casename file.mshBelow is shown the result of a simple 3D GAMBIT mesh conversion. The GAMBIT mesh was exported as a .msh file and the OpenFOAM fluent3DMeshToFoam utility was used.
|
|
|
|
OpenFOAM mesh converters can be used even in case of complicated geometries. Next is shown a mesh in OpenFOAM format after having converted it from FLUENT. The geometry describes a train coach and was designed for studying air conditioning flow inside the vehicle.
|
|
The next example shows how to convert a mesh generated by OpenFOAM to a FLUENT format. The steps to do are the following.
foamMeshToFluent utility:
foamMeshToFluent < caseroot > < casename >
fluentInterface subdirectory of the case directory, i.e. casename/fluentInterface/casename.msh . The converted mesh can be read by GAMBIT. To do this, one has to read the mesh in FLUENT, save it as a .cas file and read it back into GAMBIT, importing as FLUENT 5/6 .cas 2D or 3D file.
|
|
|
|