CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Bugs


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

LinkBack Thread Tools Display Modes
Old   August 6, 2008, 03:18
Default Description: I generated a te
Posts: n/a
I generated a tetgen-mesh (beam.1.face, beam.1.node, beam.1.ele) by
tetgen -qfa0.005 beam.poly
(tetgen version 1.4.1) where beam.poly is the following file:

# Part 1 - node list
# node count, 3 dim, no attribute, no boundary marker
8 3 0 0
# Node index, node coordinates
1 0.0 0.0 0.0
2 2.0 0.0 0.0
3 2.0 1.0 0.0
4 0.0 1.0 0.0
5 0.0 0.0 1.0
6 2.0 0.0 1.0
7 2.0 1.0 1.0
8 0.0 1.0 1.0

# Part 2 - facet list
# facet count, boundary marker
6 1
# facets
1 0 1 # 1 polygon, no hole, boundary marker
4 1 2 3 4 # front
1 0 1
4 5 6 7 8 # back
1 0 2
4 1 2 6 5 # bottom

If I try
tetgenToFoam beam.1
in a testcase-file I get the following Error-message:

Trying to specify a boundary face 3(83 169 47) on the face on cell 0 which is either an internal face or already belongs to some other patch. This is face 0 of patch 0 named patch0.#0 Foam::error::printStack(Foam:stream&) in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#1 Foam::error::abort() in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#2 Foam::polyMesh::polyMesh(Foam::IOobject const&, 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/kuhn/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#3 main in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/tetgenToFoam"
#4 __libc_start_main in "/lib/i686/cmov/"
#5 __gxx_personality_v0 in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/tetgenToFoam"

From function polyMesh::polyMesh
const IOobject& io,
const pointField& points,
const cellShapeList& cellsAsShapes,
const faceListList& boundaryFaces,
const wordList& boundaryPatchTypes,
const wordList& boundaryPatchNames,
const word& defaultBoundaryPatchType
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 483.

FOAM aborting

I had the feeling, that tetgen write the internal faces in the .face file with one boundary marker (different to the boundary markers of the boundary faces) and tetgenToFoam try to put these internal faces in an extra boundary-patch.
So I removed the boundary markers of the internal faces in the .face file, and tried tetgenToFoam again, but then I get the same error.

Application: tetgenToFoam

Source: ...OpenFOAM-1.5/applications/utilities/mesh/conversion/tetgenToFoam

Platform: Linux, Version 2.6.18, i686 GNU/Linux

Version: OpenFOAM 1.5

Before I generated a tetgen-mesh with the -f option I tried it without this option (tetgen -qa0.005 beam.poly) and this seems to work. CheckMesh said the mesh is ok and I had also different boundary patches in the boundary-file.
But with this mesh I get no simulation working (the solution always diverged).
Also in the sourcecode of tetgenToFoam is a note, that you have to use the -f option.
Is this a bug?
  Reply With Quote

Old   August 6, 2008, 04:24
Default Hi Karen, Could you try the
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18
mattijs is on a distinguished road
Hi Karen,

Could you try the following tetgenToFoam.C? (the problem was that tetgen thinks a face is a boundary face if it has three boundary points - this is not always the case)

Replace tetgenToFoam.C (in $FOAM_UTILITIES/mesh/conversion/tetgenToFoam/) with attached one and 'wmake'.

mattijs is offline   Reply With Quote

Old   August 6, 2008, 11:27
Default Hi Mattijs, with the modifi
Posts: n/a
Hi Mattijs,

with the modified tetgenToFoam.C it works. I only get a warning like:

FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576
Found 524 undefined faces in mesh; adding to default patch.

But the mesh seems to be ok. Thank you very much for help!
  Reply With Quote


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
TetgenToFoam arguments davod Open Source Meshers: Gmsh, Netgen, CGNS, ... 3 August 4, 2008 13:28

All times are GMT -4. The time now is 12:36.