CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Tetra block

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 26, 2008, 12:49
Default Hi all, Sorry for the begin
  #1
blo
New Member
 
blo blo
Join Date: Mar 2009
Posts: 7
Rep Power: 8
blo is on a distinguished road
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:stream&) 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:stream&) 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"

blo is offline   Reply With Quote

Old   August 26, 2008, 16:11
Default hi the first error is beca
  #2
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road
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.
mgz1985 is offline   Reply With Quote

Old   August 27, 2008, 02:21
Default Hi, the first error is beca
  #3
blo
New Member
 
blo blo
Join Date: Mar 2009
Posts: 7
Rep Power: 8
blo is on a distinguished road
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
blo is offline   Reply With Quote

Old   August 27, 2008, 03:06
Default Blo blo, please, go first t
  #4
Member
 
Ville Tossavainen
Join Date: Mar 2009
Location: Helsinki, Finland
Posts: 60
Rep Power: 8
villet is on a distinguished road
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
villet is offline   Reply With Quote

Old   August 27, 2008, 06:05
Default hi blo, i changed the point
  #5
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road
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 is offline   Reply With Quote

Old   August 27, 2008, 06:26
Default with the above change u will g
  #6
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road
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:stream&) 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.


mgz1985 is offline   Reply With Quote

Old   August 27, 2008, 06:29
Default 4got to attach the image ht
  #7
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road
4got to attach the image


mgz1985 is offline   Reply With Quote

Old   August 27, 2008, 06:30
Default http://www.cfd-online.com/Open
  #8
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road

mgz1985 is offline   Reply With Quote

Old   August 27, 2008, 09:25
Default hi blo, i was trying to use
  #9
Senior Member
 
mayank gupta
Join Date: Mar 2009
Posts: 110
Rep Power: 8
mgz1985 is on a distinguished road
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.
mgz1985 is offline   Reply With Quote

Old   August 14, 2009, 18:43
Default Has to be a solution
  #10
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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 is offline   Reply With Quote

Old   September 2, 2009, 12:19
Default Solved
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Reply

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
Block Tridiagonal and Block Bidiagonal solver Amit Main CFD Forum 8 February 18, 2015 17:53
problems with viewing mesh block by block James CFX 0 January 22, 2008 13:11
Multiblock: one block to many block interface kpv CFX 0 December 9, 2007 20:53
Block-Block tridiagonal matrix inverse Abdulhafid Elfaghi Main CFD Forum 3 September 16, 2007 02:55
looking for 2D block/multi-block grid generator phsieh Main CFD Forum 0 October 29, 2003 09:07


All times are GMT -4. The time now is 10:30.