CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Tetra block (https://www.cfd-online.com/Forums/openfoam-meshing/61787-tetra-block.html)

blo August 26, 2008 12:49

Tetra block
 
Hi all,

Sorry for the beginner's question, but I've been trying for hours w/o any result.

I got a mesh from Catia (tetra 3D elements) and I need to use it in OpenFoam. When I try this :


convertToMeters 0.1;

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)

);

blocks
(
tet (0 1 2 3) (1 1 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(



);

mergePatchPairs
(
);


I get a "floating point exception" (please see error 1 below). When I try this :


convertToMeters 0.1;

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 1)
(1 0 1)
(1 1 1)
(0 1 1)
);

blocks
(
hex (0 1 1 3 4 4 4 4) (30 30 30) simpleGrading (1 1 1)
);

edges
(
);

patches
(



);

mergePatchPairs
(
);

I get a segmentation error (please see error 2 below).


If someone could save me...

____

First error :
Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 4
Number of defined boundary faces : 4
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list #0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::blockMesh::createMergeList() in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#4 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#5 main in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#6 __libc_start_main in "/lib/libc.so.6"
#7 __gxx_personality_v0 in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"


___
Second one :

Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0

Checking patch -> block consistency
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::face::compare(Foam::face const&, Foam::face const&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::face::compare(Foam::face const&, Foam::face const&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::blockMesh::checkBlockMesh(Foam::polyMesh const&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#6 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#7 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#8 main in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"
#9 __libc_start_main in "/lib/libc.so.6"
#10 __gxx_personality_v0 in "/home/blo/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMesh"


mgz1985 August 26, 2008 16:11

hi the first error is beca
 
hi

the first error is because u need to define 8 points to define a block.

then second error is due to absence of thickness in the z-direction for the mesh.

u shuld keep in mind while meshing in openfoam, it creates only 3-d mesh.

please go thru the meshing chapter in the user guide for more help. i m new to openfoam myself but have been meshing for the past 2 months so i can only tell u y u r getting these errors. if u want to create this mesh i can do it for u 2moro in the office and post the file here.

if u want to mesh the cube, try tet (0 1 2 3 4 5 6 7) .

i hope it helps.

blo August 27, 2008 02:21

Hi, the first error is beca
 
Hi,

the first error is because u need to define 8 points to define a block.

OK, but table 5.1 (p. u-123) in the User Guide shows that one needs only 4 points to define a tet. ???

then second error is due to absence of thickness in the z-direction for the mesh.

This is strange, because points 0,1,3 and 4 are :
(0 0 0)
(1 0 0)

(1 1 0)
(0 1 0)
(0 0 1)

(1 0 1)
(1 1 1)
(0 1 1)

i.e., there should are thicknesses in the 3 directions.

I think I read the meshing chapter about 200 times, but I don't find precise info about tet meshes.

If you could just tell me how you can define a tet cell with these coord. ((0 0 0),(1 0 0), (0 1 0), (0 0 1)), I would really appreciate.

Thanks again

villet August 27, 2008 03:06

Blo blo, please, go first t
 
Blo blo,

please, go first through the tutorials in the user guide and you'll get the idea how blockMesh utility works.

You can use blockMesh to create simple mesh using hexahedral blocks. If you have already created a mesh in Catia, then you should use one of the mesh conversion tools. There's no need to touch the "blockMeshDict" file.

I don't have experience on Catia, so maybe someone else can help you. Or even better way is to search for the issue.

Ville

mgz1985 August 27, 2008 06:05

hi blo, i changed the point
 
hi blo,

i changed the points from tet (0 1 2 4 0 1 2 4) in the second case

it creates a mesh. but in doing so, it is adding some default patches. i do not know what that means.

try doing that and c what happens

mgz1985 August 27, 2008 06:26

with the above change u will g
 
with the above change u will get a mesh which i dont think is a tetrahedral mesh. but if i change to 0 1 2 4 4 4 4 4, i get an error

-> FOAM FATAL ERROR : face 0 in patch 0 does not have neighbour cell face: 4(0 31 991 31)#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) addr2line failed
#1 Foam::error::abort() addr2line failed
#2 Foam::polyMesh::facePatchFaceCells(Foam::List<foam ::face> const&, Foam::List<foam::list<int> > const&, Foam::List<foam::list<foam::face> > const&, int) const addr2line failed
#3 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::List<foam::word> const&, bool) addr2line failed
#4 main addr2line failed
#5 start addr2line failed


From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

FOAM aborting


u can check for urself and c. whatever let me know if u can make it successfully or not.

http://www.cfd-online.com/OpenFOAM_D...your_image.gif

mgz1985 August 27, 2008 06:29

4got to attach the image ht
 
4got to attach the image

http://www.cfd-online.com/OpenFOAM_D...your_image.gif

mgz1985 August 27, 2008 06:30

http://www.cfd-online.com/Open
 
http://www.cfd-online.com/OpenFOAM_D...ges/1/8879.png

mgz1985 August 27, 2008 09:25

hi blo, i was trying to use
 
hi blo,

i was trying to use the guide to create the tet mesh. I was trying the technique they used for wedge shaped elements with 6 vertices. but it generates a bus error which i m unable to understand.

neways, if u want a tetra mesh, u can make it in GMSH and then import into openfoam. It is a free software.

i m sorry, i could not be of more help.

mturcios777 August 14, 2009 18:43

Has to be a solution
 
I've recently run across this (apparent) limitation of blockMesh. I want to create a tetrahedron using blockMesh, but it seems there is a violation of topology somewhere.

What I tried was collapsing all the points in the z = 1 plane (EXCEPT point 4) to the z = 0 plane, and the resulting pyramid shape is acceptable to blockMesh.

The problem is that to make a tet, points2/6 would need to be collapsed onto either points 1/5 or 3/7, and there is a problem there. At first I thought it was because a block face wasn't allowed to have only one index describing it, but I could also define a pyramid by hex (0 1 2 3 4 4 4 4), so I am at a loss. The only other possibility I can see is that the cell creation inside the blocks is compomised by such a geometry.

It would be very valuable to me (and others I am sure) for a way to make a tetrahedron in blockMesh. Any ideas would be fab, or at least an explanation of why there are problems.

mturcios777 September 2, 2009 12:19

Solved
 
I found a way, after some trial and error. If anyone else still needs it:

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 1)
(1 0 1)
(1 1 1)
(0 1 1)
);

blocks
(
hex (0 1 2 0 4 1 2 4) (1 1 1) simpleGrading (1 1 1)
);


My guess is has something to go with face normal calculation.


All times are GMT -4. The time now is 06:05.