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

Create a "triangular box" with blockMesh

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

Like Tree1Likes
  • 1 Post By voingiappone

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2012, 06:43
Default Create a "triangular box" with blockMesh
  #1
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
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....

Thank you in advance!

Luca
voingiappone is offline   Reply With Quote

Old   January 18, 2012, 08:27
Default
  #2
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
Quote:
Originally Posted by voingiappone View Post
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....

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
__________________
~roman
romant is offline   Reply With Quote

Old   January 18, 2012, 21:13
Default
  #3
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
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 is offline   Reply With Quote

Old   January 22, 2012, 21:52
Default
  #4
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
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
Zazen likes this.
voingiappone is offline   Reply With Quote

Old   May 22, 2015, 02:22
Default
  #5
New Member
 
Elisa Lafforgue
Join Date: May 2015
Location: France
Posts: 12
Rep Power: 2
Elisa-L is on a distinguished road
Hello everybody,

I have been looking for this for quite a while now, thank you very much! Indeed, it is simple, but I still have one little question: what do you do with the faces? If you have your triangular face, do you create it using double point as in the block?

I am sorry if it is a stupid question but I am new on CFD and don't really understand all...

Elisa
Elisa-L 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
how to set periodic boundary conditions Ganesh FLUENT 13 January 22, 2014 05:11
Include list of points Hikachu OpenFOAM Native Meshers: blockMesh 0 June 20, 2011 09:03
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 01:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 04:24.