CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[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 Search this Thread 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: 15
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: Eindhoven, NL
Posts: 374
Rep Power: 20
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: 15
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: 15
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, 03:22
Default
  #5
New Member
 
Elisa Lafforgue
Join Date: May 2015
Location: France
Posts: 13
Rep Power: 10
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 Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using createPatch and cyclicAMI in FOAM Extend to create periodicbox manuc OpenFOAM Running, Solving & CFD 1 April 12, 2022 12:36
[blockMesh] create a sphere with blockMesh decibelle OpenFOAM Meshing & Mesh Conversion 4 September 7, 2020 10:37
phantom region created outside blockmesh bounding box derekm OpenFOAM Pre-Processing 0 May 15, 2014 11:31
Immersol Simulation of a Heated Box Dong Phoenics 0 March 2, 2006 22:20
[blockMesh] Does blockMesh create mesh vertices in any particular order brooksmoses OpenFOAM Meshing & Mesh Conversion 3 December 12, 2005 21:26


All times are GMT -4. The time now is 18:53.