CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   converting CGNS mesh with cgnsToFoam (http://www.cfd-online.com/Forums/openfoam-meshing/78901-converting-cgns-mesh-cgnstofoam.html)

bb_ August 5, 2010 08:04

converting CGNS mesh with cgnsToFoam
 
1 Attachment(s)
Hello,

I'm trying to convert a cgns block mesh generated with NUMECA Autogrid/IGG into the foam specific format with the utitlity cgnsToFoam. Some of the simpler examples seem to work just fine. However, with more complex meshes (more blocks, finer mesh) pretty much always an error occurs. At the end of the conversion the following message is shown:

***Number of faces with non-consecutive shared points: xxx

cgnsToFoam doesn't crash and exists normally though. The checkMesh output also shows an error message if run with such a converted mesh:

<<Writing xxx conflicting points to set nonManifoldPoints

When viewing the mesh with paraview (see attached image), it seems as if there are internal patch faces in the geometry which are not connected to the rest of the mesh. They always occur on internal blocking interfaces where two blocks are connected (I've made sure that they are properly connected with IGG). Therefore, I think the problem arises when trying to connect multiple blocks.

Using the cgnsToFoam parameter "-mergeTolerance" seems to have an influence in that a larger value reduces the number of non-consecutive shared points. But so far, I didn't succed in getting them to zero.

Does anyone got a similar error message when trying to convert a mesh with cgnsToFoam? Any suggestions on how to deal with this kind of problem?

Any help greatly appreciated.

elvis August 24, 2010 12:33

I would contact Martin Beaudoin http://www.cfd-online.com/Forums/members/mbeaudoin.html maybe he will help you

http://www.cfd-online.com/Forums/ope...available.html

mbeaudoin August 24, 2010 15:29

Hello,

The cgnsToFoam converter was developed to support multi-blocks meshes.

The error message reported by cgnsToFoam or checkMesh comes from a basic mesh validation test from inside primitiveMesh::checkFaceFaces() in primitiveMeshCheck.C.

The test complains because common vertices shared between 2 faces are not consecutive on both faces.

The problem might be caused by the presence of the "internal patches" your picture is showing.

Are those "internal patches" supposed to be there in the first place?

If not, I would suggest you first try to validate the content of your CGNS file with a simple tool like adfviewer from the cgnstools utility set.

If you can see those "internal patches" with adfviewer, then the problem is probably coming from your CGNS generator.

Try to clean-up the problem at the source, because cgnsToFoam will basically convert all the patches present in your CGNS file, good or bad.

If after all this you still have problems with cgnsToFoam, please post the cgnsToFoam conversion messages so I could see more information.

Regards,

Martin

Quote:

Originally Posted by bb_ (Post 270389)
Hello,

I'm trying to convert a cgns block mesh generated with NUMECA Autogrid/IGG into the foam specific format with the utitlity cgnsToFoam. Some of the simpler examples seem to work just fine. However, with more complex meshes (more blocks, finer mesh) pretty much always an error occurs. At the end of the conversion the following message is shown:

***Number of faces with non-consecutive shared points: xxx

cgnsToFoam doesn't crash and exists normally though. The checkMesh output also shows an error message if run with such a converted mesh:

<<Writing xxx conflicting points to set nonManifoldPoints

When viewing the mesh with paraview (see attached image), it seems as if there are internal patch faces in the geometry which are not connected to the rest of the mesh. They always occur on internal blocking interfaces where two blocks are connected (I've made sure that they are properly connected with IGG). Therefore, I think the problem arises when trying to connect multiple blocks.

Using the cgnsToFoam parameter "-mergeTolerance" seems to have an influence in that a larger value reduces the number of non-consecutive shared points. But so far, I didn't succed in getting them to zero.

Does anyone got a similar error message when trying to convert a mesh with cgnsToFoam? Any suggestions on how to deal with this kind of problem?

Any help greatly appreciated.


bb_ August 25, 2010 04:04

Hey,

thanks for the reply! Sadly, I guess the whole topic is quite complicated...

These internal patches aren't supposed to be there ... the error is occuring at internal block faces that should be connected - The picture is showing a circular pipe, meshed with a butterfly O-grid. Those strange faces occur where the central block is adjacent to the surrounding blocks of the O-ring.

I checked the various cgns-files coming form IGG with adfviewer and cgnsplot. I'm not sure if there's a problem. At first sight everything looks ok. However, I compared cgns-files coming from IGG and ICEM and noticed some differences. For example, when using ICEM, the nodes describing the blocks in adfviewer have child-nodes called "1to1Connections". I assume they hold the appropriate information concerning the internal block connections. These entries are missing in IGG-cgns files. Here, all block faces are summarized in a node called "Boundary Conditions".

So I assume that the cgns generator in IGG failes to give this information and the conversion therefore failes. A full output of cgnsToFoam is something similar to:

--> FOAM Warning : More than one CGNS Base were found in the file.
Only the first one will be treated.
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 582
Found 4592 undefined faces in mesh; adding to default patch.
Output of mesh and boundary conditions


Another strange thing: i can successfully import the cgns file into CFX-Pre. Passing it on to ICEM works too. However, using the cgns output of ICEM fails with yet another error message:

terminate called after throwing an instance of 'CGNSOO::cgns_exception'
what(): CGNS error in file::open while calling cg_open
Error exit: Element connectivity incorrectly defined
Aborted

While exporting it from ICEM to fluent and using fluentMeshToFoam works just fine....

For now this is a workaround for me, although a quite dirty one... Not sure if it's possible to locate the error. Anyway, many thanks.


All times are GMT -4. The time now is 21:54.