CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing & Mesh Conversion (
-   -   CfxToFoam (

tutlhino May 24, 2007 04:34

Hey all, I'm currently workin
Hey all,
I'm currently working on a comparison between cfx and openfoam. Therefore I need the meshes in both formats. Therefore I build a mesh in icemCFD and converted it to cfx4 as it was said to be the best way. The conversion of the mesh worked, but just gave little errors about patches:

Default patch type set to wall
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 573
Found 94 undefined faces in mesh; adding to default patch.
Checking mesh
Number of non-orthogonality errors: 0. Number of severely non-orthogonal faces: 18.
--> FOAM Warning :
From function primitiveMesh::checkFaceSkewness(const bool report, labelHashSet* setPtr) const
in file meshes/primitiveMesh/primitiveMeshCheck.C at line 838
Large face skewness detected. Max skewness = 493.014 percent.
This may impair the quality of the result.
12 highly skew faces detected.
Failed 1 mesh geometry checks.
Failed some mesh checks.
Writing polyMesh

The Problem now is that I've got the mesh in the openFOAM format, but the patches aren't defined in 'boundaries', although I though I did this in icemCFD and therefore should appear also in oprnFOAM!? Do I really have to search manually for the faces for all boundaries and fill them in?


joakim May 24, 2007 05:12

Hi Florian From my experien
Hi Florian

From my experience, the best way to export a mesh from ICEM-CFD to OpenFoam is to use a the star-CD 3.2.0 format.


1) Set solver
2) Set boundary conditions
3) write output

-Remember to set the "write shells in element file" to none.

-Be sure that for "Boundaries to write", only "Those with a BC type" is checked.

Than through the starToFoam utility you will have your mesh. It works fine with 2D and 3D bodies. I have had problems with axi-symmetric bodies. If you get this to work, please let me know.

Futhermore, Im very interested in seeing any results of your comparison between the codes.

Good luck


mayank May 24, 2007 06:02

hello all, I have tried con
hello all,

I have tried converting icemcfd meshes to openfoam by first exporting to Fluent_V6 then using fluentmeshtofoam utility.

However I could not convert hexa_dominant meshes to openfoam.

Also, cfxToFoam utility requires a mesh in .geo format.I was unable to export the meshes from icemcfd to this format.

I need some help in these regards.


eugene May 24, 2007 07:43

I have found that most meshes
I have found that most meshes created in ICEM have to be imported to their native solvers and re-saved before they convert to Foam. No idea why.

cfxToFoam is a very old converter and only supports up to cfx4 block structured meshes, which arent exported by ICEM.

I'm afraid to compare CFX and foam will probably require at least a two step process:
1) Either make the two meshes seperately and to the same specs in blockMesh and ICEM
2) or
- make the mesh in ICEM,
- export it to Fluent or STAR format.
- Open the mesh in STAR/Fluent and export the geometry again.
- Convert to Foam.

All times are GMT -4. The time now is 07:56.