CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Create a "triangular box" with blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/96284-create-triangular-box-blockmesh.html)

voingiappone January 18, 2012 06:43

Create a "triangular box" with blockMesh
 
Hello everybody....

I have a simple question that I cannot solve in any way.... would you like to help me with this thing??

I want to create a simple solid to use as a part of a more complicated patch. I am already able to create complicated meshes as log as only square faces are involved. For example, if a cube is needed I define the points:

Bottom face
1
2
3
4
Top Face
5
6
7
8

and then the block:

hex(1 2 3 4 5 6 7 8) (..etc etc....)

Easy. But what if I need to create a solid with two triangular faces??? Like for example:

Quote:

vertices
(

(0 0 0) //1
(1 0 0) //2
(1 1 0) //3
(0 0 1) //4
(1 0 1) //5
(1 1 1) //6

);

blocks
(
hex (1 2 3 4 5 6) (10 10 10) simpleGrading (1 1 1)
);
If I run a code like this, the blockMesh crashes with a segfault!
Can somebody help me with this thing? It seems that nobody on the net needs to create triangular faces like this....:confused:

Thank you in advance!

Luca

romant January 18, 2012 08:27

Quote:

Originally Posted by voingiappone (Post 339890)
Hello everybody....

I have a simple question that I cannot solve in any way.... would you like to help me with this thing??

I want to create a simple solid to use as a part of a more complicated patch. I am already able to create complicated meshes as log as only square faces are involved. For example, if a cube is needed I define the points:

Bottom face
1
2
3
4
Top Face
5
6
7
8

and then the block:

hex(1 2 3 4 5 6 7 8) (..etc etc....)

Easy. But what if I need to create a solid with two triangular faces??? Like for example:

If I run a code like this, the blockMesh crashes with a segfault!
Can somebody help me with this thing? It seems that nobody on the net needs to create triangular faces like this....:confused:

Thank you in advance!

Luca

In order to create triangles, you need to place some points double into the hex part. Look at section 5.3.3 on http://www.openfoam.org/docs/user/blockMesh.php

voingiappone January 18, 2012 21:13

romant, thank you so much for the fast reply and the fast solution! It was indeed such an easy problem that no tutorial was needed --> no google results.
Believe it or not, I've been reading that page many times without actually reading "through" all the page... I always see that in OpenFOAM manual only the basic things are written and I thought it was the same here... the old RTFM rule still works.

Thanks so much.

Luca

voingiappone January 22, 2012 21:52

A small follow-up for those who will read this post in the future (if anybody will ;)).

I was able to create the mesh I need using the instructions on the link above (actually the blockMesh manual) but I would like to focus the attention to the creation phase.
If your mind works like mine does, you will end up creating your polygon using the same numbering technique as that on the page but rotated according to your configuration (for simplifying). I just wanted to warn that if you do this, you will end with a completely messed up x,y,z coordinate system in that polygon... only!
I was keeping getting the error "Inconsistent number of faces" but I was sure that all was right.... until I decided to just create the polygon itself on a separate blockmesh dictionary and watch the result; I noticed that the x, y and z axis for the resulting subdivision of the mesh where inverted!

This way I learnt that all the polygons in your mesh need the same axis system whichi can be achieved using always the same definition pattern for all the blocks... maybe this will look natural or trivial but keep this in mind when you will draw these atypical polygons!

Take care


All times are GMT -4. The time now is 02:44.