Description: I generated a te
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
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
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#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/libOpenFOAM.so"
#3 main in "/home/kuhn/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/tetgenToFoam"
#4 __libc_start_main in "/lib/i686/cmov/libc.so.6"
#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.
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.
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?
Hi Karen, Could you try the
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'.
Hi Mattijs, with the modifi
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!
|All times are GMT -4. The time now is 08:40.|