CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Improving Mesh - deleting cells (

sErik December 10, 2009 07:12

Improving Mesh - deleting cells
Hello Foamers,

I have some problems with my converted mesh. The original data was a CCM+ file and I converted it with ccm26ToFoam, without any difficulties.

Then I checked the data with checkMesh, and I recieved severel errors (take a look here: )-
upperTriangularFace size:4158
wrongOrientedFaces size:249
nonOrthoFaces size:37012

I want to delete these faces, but I don't know how. I looked at the advises in and but I couldn't solve the problem.

I actually want to convert the faces into cells, delete these cells and then "remesh" my case without the broken cells.
I've tried setSet and in there faceSet with the files but I didn't manage to get the rigth commands.
I'm getting confused about faceSet, faceToCell, topoSurface...
cellSet | faceSet | pointSet <setName> <action> <source>

I don't know how to handle it. Is such an delating-operation acutally possible with OpenFOAM? What else could I do to get my case running?Remeshing the CCM+ file, but with which conditions (we didn't have any problems, running CCM+ on it)

I realy hope you can help me on this problem.

sErik December 14, 2009 09:51

Now I remeshed the original CCM+ file, so that there were only tetrahedrons, and then executed ccm26ToFoam without any problems. But with checkMesh, I get this again:

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 4117194
faces: 25971655
internal faces: 25514953
cells: 11248772
boundary patches: 26
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 0
prisms: 6440594
wedges: 669
pyramids: 8892
tet wedges: 692
tetrahedra: 4790830
polyhedra: 7095

Checking topology...
Boundary definition OK.
Point usage OK.
<<Found 16 neighbouring cells with multiple inbetween faces.
Upper triangular ordering OK.
<<Writing 32 unordered faces to set upperTriangularFace
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
Eintritt 2056 1709 ok (non-closed singly connected)
Austritt 2399 1992 ok (non-closed singly connected)
Leitung_11 42976 21881 ok (non-closed singly connected)
Leitung_12 30138 15203 ok (non-closed singly connected)
Leitung_13 20433 10340 ok (non-closed singly connected)
Leitung_14 9016 4779 ok (non-closed singly connected)
Verbindungsstueck_1119763 10537 ok (non-closed singly connected)
Verbindungsstueck_127305 4022 ok (non-closed singly connected)
Leitung_21 134484 68478 ok (non-closed singly connected)
Leitung_22 10386 5299 ok (non-closed singly connected)
Leitung_23 13568 6898 ok (non-closed singly connected)
Leitung_24 9042 4637 ok (non-closed singly connected)
Leitung_25 6512 3364 ok (non-closed singly connected)
Leitung_26 2250 1378 ok (non-closed singly connected)
Leitung_27 3419 2011 ok (non-closed singly connected)
Verbindungsstueck_2115346 8196 ok (non-closed singly connected)
Verbindungsstueck_225676 3101 ok (non-closed singly connected)
Leitung_31 27488 14439 ok (non-closed singly connected)
Leitung_32 16428 8361 ok (non-closed singly connected)
Leitung_33 14876 7562 ok (non-closed singly connected)
Leitung_34 11499 5884 ok (non-closed singly connected)
Verbindungsstueck_3117209 9125 ok (non-closed singly connected)
Verbindungsstueck_322515 1470 ok (non-closed singly connected)
Kasten_11 25917 13407 ok (non-closed singly connected)
Kasten_12 5864 3190 ok (non-closed singly connected)
Gap_Closure_Faces 137 90 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.440584 0.141049 -0.0649587) (2.36067 0.445945 0.20541)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-7.41015e-17 2.41612e-16 2.23077e-17) OK.
***High aspect ratio cells found, Max aspect ratio: 1.07065e+294, number of cells 21543
<<Writing 21543 cells with high aspect ratio to set highAspectRatioCells
***Zero or negative face area detected. Minimum area: 0
<<Writing 8270 zero area faces to set zeroAreaFaces
Min volume = 1.66667e-300. Max volume = 7.76812e-07. Total volume = 0.00257272. Cell volumes OK.
Mesh non-orthogonality Max: 180 average: 23.132
*Number of severely non-orthogonal faces: 765830.
***Number of non-orthogonality errors: 37206.
<<Writing 803036 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 9428 faces are incorrectly oriented.
<<Writing 8784 faces with incorrect orientation to set wrongOrientedFaces
I had to rename all the boundarys after running ccm26ToFoam, because they were like 12_abcdefg-34. To be able to perform checkMesh I changed all the names into a form like abcdefg34. Could this be the problem?

I really appreciate some help.

ericnutsch December 17, 2009 01:11

Your methods are a little beyond my experiance. However, you can delete cells by hunting them down in polyMesh folder files. I wouldnt have any idea how to repair them though.

I am not familiar with CCM+ files. Perhaps you could increase your resolution in the sharp geometry areas and see if that decreases the number of non-orthogonal faces.

sErik December 17, 2009 06:07

Hi eric,
I decreases the number of cells in the original file from 12 millions to 3 millions and now checkMesh is working fine without any problems and I could already run some test-solvers on the case.
Meanwhile I'm sure that there were/are some serious problems with the CCM+ file and that they also ought to be in there. Moreover the OF tools for these operations are really badly documented and it's very hard to get them running - I couldn't figure out how to.
Best regards,
Erik :)

andrea August 3, 2010 05:34

Hi Erik,
I'm facing now the very same problem importing a mesh from ccm+, have you understood what the problem is? Have you some guidelines for meshin in ccm+ and importing in OF?
Any help will be appreciate!


kwardle August 3, 2010 09:25

ccm+ meshes
I have been using the ccm26ToFoam converter to convert ccm mesh files for some time now. I have recently learned that Star-CCM+ actually by default makes rather poor meshes. (I have not had so many problems with tet meshes, but I primarily use poly) So my first recommendation/question would be have you tried to clean up the mesh within ccm+ before trying to convert it? In case you are not familiar with the process, first you make only the surface mesh, then you go to Representations, right click on remeshed surface and click repair surface. A box will open where you can specify the face quality--change this from the embarrassingly small default value of 0.01 to something like 0.7. From this then you can use the mesh repair tools to target specific cells and remesh them. Your resulting volume mesh should be much cleaner and you should find that you can get rid of many of your errors on conversion.

All that said, your errors seem to have quite a few bad cells/faces so you may have something else wrong. Are you using anything like interfaces or stuff like that that may not have been defined correctly?

Hope this is helpful.

kwardle August 3, 2010 09:28


Originally Posted by sErik (Post 239937)
I had to rename all the boundarys after running ccm26ToFoam, because they were like 12_abcdefg-34. To be able to perform checkMesh I changed all the names into a form like abcdefg34. Could this be the problem?

I saw your note above about having to change all the boundary names--I have never had this problem. What versions are you using both for OF and for CCM+?

All times are GMT -4. The time now is 17:47.