CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

cgnsToFoam error when converting ICEM mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 14, 2013, 12:09
Default cgnsToFoam error when converting ICEM mesh
  #1
New Member
 
Tobias Glasenapp
Join Date: Mar 2013
Location: Karlsruhe, Germany
Posts: 4
Rep Power: 4
glasenapp is on a distinguished road
Hello foamers,

I am currently working with cgnsToFoam on OpenFOAM-2.1.1. I created a simple unstructured mesh in Ansys ICEM with an inlet on one side, an outlet on the other side, the 4 remaining sides are walls (see https://www.dropbox.com/s/n77yvcy9f3vxuz0/mesh.jpg). I converted the .msh file using fluent3DMeshToFoam and ran checkMesh with no errors (see https://www.dropbox.com/s/h4ui0lyg10tz77v/checkMesh). In order to test the cgns-converters, I ran foamToCGNS which works well. Then I ran cgnsToFoam in order to convert the cgns-file back to the OpenFOAM format which produces this error:

--> FOAM FATAL ERROR:
Trying to specify a boundary face .. on the face on cell ... which is either an internal face or already belongs to some other patch. This is face ... of patch ... named .
From function polyMesh::setTopology
(
const cellShapeList& cellsAsShapes,
const faceListList& boundaryFaces,
const wordList& boundaryPatchNames,
labelList& patchSizes,
labelList& patchStarts,
label& defaultPatchStart,
label& nFaces,
cellList& cells
)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 360.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam:olyMesh::setTopology(Foam::List<Foam::cellS hape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#3 Foam:olyMesh:olyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4
in "/home/user/OpenFOAM/user-2.1.1/platforms/linux64GccDPOpt/bin/cgnsToFoam"
#5
in "/home/user/OpenFOAM/user-2.1.1/platforms/linux64GccDPOpt/bin/cgnsToFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/home/user/OpenFOAM/user-2.1.1/platforms/linux64GccDPOpt/bin/cgnsToFoam"
Aborted (core dumped)

Some people have had this error before (see CGNS converters available and CGNS converters available), but I couldn't find how they solved the problem.

I have tried to use the cgnsToFoam options -cfxCompatibility and -separatePatches, but the error still occurs. I checked which cell produces the error. It is the cell which is located between "outlet" and "wall". To be more exact: one face of the tetra cell is located on the "outlet" and another face on the "wall", the other 2 faces are inside the geometry (see https://www.dropbox.com/s/f59rabvi5o...error_cell.jpg). The error does not occur when I create a mesh in ICEM that contains only "wall" (no "inlet" or "outlet").

Moreover, I tried the converters on the mesh from the pitzDaily case, which gives no errors (after changing the number of cells in z-direction to at least 2). Does that mean that cgnsToFoam has problems with meshes created with ICEM? For my application, I have to use ICEM to create the mesh which is why I need to come up with a solution. Does anybody know whether I have to make any changes to the mesh before exporting it from ICEM or before converting it with foamToCGNS?
I uploaded my boundary file (https://www.dropbox.com/s/g83js4285vo7v0t/boundary) as well as the cgns-file (https://www.dropbox.com/s/at9hripgsgnx02t/0.cgns), althought it seems fine when I look at it with adfviewer.
Any suggestions? Thanks a lot in advance for your help!

Cheers,

Tobias
glasenapp is offline   Reply With Quote

Old   May 15, 2013, 10:29
Default
  #2
New Member
 
Anselme Bonnet
Join Date: Apr 2013
Location: France
Posts: 14
Rep Power: 4
OpenF is on a distinguished road
Hi Tobias,

I'm sorry I can't answer, but I'm looking for all the .tar to install CgnsToFoam and FoamToCgns. Could you give me that please ?

Thanks
Anselme
OpenF is offline   Reply With Quote

Old   May 16, 2013, 09:57
Default
  #3
New Member
 
Tobias Glasenapp
Join Date: Mar 2013
Location: Karlsruhe, Germany
Posts: 4
Rep Power: 4
glasenapp is on a distinguished road
Hi Anselme,

since the converters are part of the OpenFOAM Extend Project, you should check their website and download it from there.
I will write a quick description on the changes that have to be made in order to use the converters on OpenFOAM-2.1.x as soon as I've got a little more time.

By the way, I tried converting a mesh created by gmsh using foamToCGNS and cgnsToFoam and it worked fine. When I try to convert a mesh created by snappyHexMesh, however, I get the following error:

"--> FOAM FATAL ERROR:
Wrong number of vertices in cell
expected 4,5,6, or 8, found 0

From function foamToCGNS
in file writeCGNS.H at line 219.

FOAM aborting"

Again, I am not the first one who is facing this problem (foamToCGNS converter got Error: wrong number of vertices in cell), but I couldn't find a solution in the forum.
Any suggestions about how to get the converters to work for a mesh either created by Ansys ICEM or snappyHexMesh?

Tobias
glasenapp is offline   Reply With Quote

Old   May 16, 2013, 10:21
Default
  #4
New Member
 
Anselme Bonnet
Join Date: Apr 2013
Location: France
Posts: 14
Rep Power: 4
OpenF is on a distinguished road
Hi,

I have a lot of available converter in OpenFOAM but I don't have CgnsToFoam and I can't find the sources on http://www.extend-project.de/ or on internet. They aren't available anymore and there is a raison but it seems that it's not officiel : http://openfoamwiki.net/index.php/Main_Page

Do you have an idee how could I get the sources ?

Thanks
Anselme
OpenF is offline   Reply With Quote

Old   May 17, 2013, 12:46
Default
  #5
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Hello,

"--> FOAM FATAL ERROR:
Wrong number of vertices in cell
expected 4,5,6, or 8, found 0

Basically, snappyHexMesh has generated cells with zero vertices in your mesh. The CGNS converter does not know what to do with those cells.

Try cleaning up your mesh in order to remove these problematic or useless cells, or report the problem to the developpers of snappyHexMesh in order to remove the problem at the source.

Martin


Quote:
Originally Posted by glasenapp View Post
Hi Anselme,

since the converters are part of the OpenFOAM Extend Project, you should check their website and download it from there.
I will write a quick description on the changes that have to be made in order to use the converters on OpenFOAM-2.1.x as soon as I've got a little more time.

By the way, I tried converting a mesh created by gmsh using foamToCGNS and cgnsToFoam and it worked fine. When I try to convert a mesh created by snappyHexMesh, however, I get the following error:

"--> FOAM FATAL ERROR:
Wrong number of vertices in cell
expected 4,5,6, or 8, found 0

From function foamToCGNS
in file writeCGNS.H at line 219.

FOAM aborting"

Again, I am not the first one who is facing this problem (foamToCGNS converter got Error: wrong number of vertices in cell), but I couldn't find a solution in the forum.
Any suggestions about how to get the converters to work for a mesh either created by Ansys ICEM or snappyHexMesh?

Tobias
mbeaudoin is offline   Reply With Quote

Reply

Tags
cgnstofoam, mesh conversion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] ICEM Structured Mesh Problem OMJT ANSYS Meshing & Geometry 3 March 22, 2013 11:06
[ICEM] Unstructure Meshing Around Imported Plot3D Structured Mesh ICEM kawamatt2 ANSYS Meshing & Geometry 17 December 20, 2011 12:45
converting CGNS mesh with cgnsToFoam bb_ OpenFOAM Meshing & Mesh Conversion 3 August 25, 2010 04:04
Boddy fitted Hexcore Mesh in ICEM Cfd Mitch CFX 0 December 29, 2008 07:07
Error Converting ICEM Structured Mesh to CFX Chebeba CFX 11 October 5, 2006 08:05


All times are GMT -4. The time now is 23:34.