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

[blockMesh] blockMesh-how to use prism

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By wyldckat
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2013, 09:34
Post blockMesh-how to use prism
  #1
Member
 
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 13
bieshuxuhe is on a distinguished road
Hi, I am a beginner.
I know how to use hex in blockMeshDict because user guide has told us.
for example: hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)

But I wonder how to use prism in blockMeshDict, as user guide doesn't tell us!
I don't know where to find how to use "prism" .
Could you help me?

Thank you!
bieshuxuhe is offline   Reply With Quote

Old   September 1, 2013, 18:17
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings bieshuxuhe,

It's explained in the section "5.3.3 Creating blocks with fewer than 8 vertices": http://www.openfoam.org/docs/user/blockMesh.php

edit: I see you've gotten the answer here: http://www.cfd-online.com/Forums/ope...tml#post448744

Best regards,
Bruno
amuzeshi likes this.
__________________

Last edited by wyldckat; September 1, 2013 at 18:19. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   March 31, 2014, 09:25
Default
  #3
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings bieshuxuhe,

It's explained in the section "5.3.3 Creating blocks with fewer than 8 vertices": http://www.openfoam.org/docs/user/blockMesh.php

edit: I see you've gotten the answer here: http://www.cfd-online.com/Forums/ope...tml#post448744

Best regards,
Bruno
Dear Burno,

Is there any way to make uniform cell distribution in prism?

Like this (http://www.cfd-online.com/Forums/ope...blockmesh.html)

Thanks

Regards
CFDUser_

Last edited by wyldckat; August 11, 2014 at 11:36. Reason: fixed broken link
CFDUser_ is offline   Reply With Quote

Old   April 1, 2014, 16:16
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by CFDUser_ View Post
Is there any way to make uniform cell distribution in prism?

Like this (http://www.cfd-online.com/Forums/ope...blockmesh.html)
Quick answer: AFAIK, it's not possible to do it in an easy way. You'll have to build the prism manually with several blocks.
wyldckat is offline   Reply With Quote

Old   April 2, 2014, 01:36
Default
  #5
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: AFAIK, it's not possible to do it in an easy way. You'll have to build the prism manually with several blocks.
Can you explain little more?
CFDUser_ is offline   Reply With Quote

Old   April 5, 2014, 19:57
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by CFDUser_ View Post
Can you explain little more?
It's simple... well, sort-of simple. The triangular prism feature in blockMesh is actually a squished quadrangular prism, on one of the sides. Therefore, the only way to create with blockMesh such a prism which is shown in the post, namely this:


Is to build it in parts, namely by using:
  • 1 large quadrangular prism
  • + 2 smaller quadrangular prisms
  • + 4 triangular prisms
The other possibility is to use splitMesh, which means that you first need to create a normal mesh and then split it diagonally.


I suggest that you try using SwiftBlock instead of creating the "blockMeshDict" manually: http://openfoamwiki.net/index.php/Contrib/SwiftBlock


Best regards,
Bruno
njdyck and ahparvin like this.
__________________
wyldckat is offline   Reply With Quote

Old   April 10, 2014, 02:46
Default
  #7
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
It's simple... well, sort-of simple. The triangular prism feature in blockMesh is actually a squished quadrangular prism, on one of the sides. Therefore, the only way to create with blockMesh such a prism which is shown in the post, namely this:


Is to build it in parts, namely by using:
  • 1 large quadrangular prism
  • + 2 smaller quadrangular prisms
  • + 4 triangular prisms
The other possibility is to use splitMesh, which means that you first need to create a normal mesh and then split it diagonally.


I suggest that you try using SwiftBlock instead of creating the "blockMeshDict" manually: http://openfoamwiki.net/index.php/Contrib/SwiftBlock


Best regards,
Bruno

Dear Bruno,

I am not looking for 1big hex+2small hex and 4 triangular blocks. I want grading as shown in the figure. I tried all the ways but getting squeezed cells to one corner of the triangle.
If you dont mind can you post blockMeshDict file n series of operations i have to follow. Sorry for struggling but i dont want to do it in blender because i have to try different triangle angles for my problem. for that i can write script file for generating it automatically. all i need now is how to do it in blockmesh.

Thankyou,

Regards
CFDUser_
CFDUser_ is offline   Reply With Quote

Old   April 10, 2014, 04:15
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

do you REALLY need prisms? As the geometry you've shown can be easily meshed with hexagons.
alexeym is offline   Reply With Quote

Old   April 10, 2014, 04:36
Default
  #9
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

do you REALLY need prisms? As the geometry you've shown can be easily meshed with hexagons.
Hi Alexeym,

Yes, i need prisms as shown in the attached figure (all four sides in 3D) and i have to play with different theta.

Last edited by CFDUser_; April 13, 2014 at 08:03.
CFDUser_ is offline   Reply With Quote

Old   April 10, 2014, 04:51
Default
  #10
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

do you REALLY need prisms? As the geometry you've shown can be easily meshed with hexagons.
Hi Alexeym again,

problem is grading. One can make prisms using blockMesh, but grading will be something like in the attached fig.




i want to make grading like in the below fig


I want it to be done in blockMeshDict. If its possible please help me.

Regards
CFDUser_
Attached Images
File Type: jpg untitled.JPG (6.7 KB, 36 views)
CFDUser_ is offline   Reply With Quote

Old   April 10, 2014, 04:59
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Still not sure if I get you correctly.

You need to construct a mesh which consists of a cuboid block and a prismatic block to simulate something. (You can create fully hexagonal mesh for the geometry you've attached)

OR

You need a mesh with the prismatic cells at the edges to check how good OpenFOAM at dealing with this type of meshes (AFAIK blockMesh can't automatically build the mesh you've shown in your figures. Well, that's more-or-less what wyldckat said already).
alexeym is offline   Reply With Quote

Old   April 10, 2014, 05:09
Default
  #12
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Still not sure if I get you correctly.

You need to construct a mesh which consists of a cuboid block and a prismatic block to simulate something. (You can create fully hexagonal mesh for the geometry you've attached)

OR

You need a mesh with the prismatic cells at the edges to check how good OpenFOAM at dealing with this type of meshes (AFAIK blockMesh can't automatically build the mesh you've shown in your figures. Well, that's more-or-less what wyldckat said already).
1st one. i need cuboids and prisms to define my geometry. Defining them in blockmeshDict is pretty straight forward. using simpleGrading i need somthing like in the attached pic.

blacklines define geometry and red lines define grading.

Thankyou

Last edited by CFDUser_; April 13, 2014 at 07:59.
CFDUser_ is offline   Reply With Quote

Old   April 10, 2014, 05:26
Default
  #13
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well,

see my suggestion about splitting your mesh into hexagonal blocks in the attached picture. Arrows along the sides show grading direction (hope I get right what you need).

In general you'll need to define separate patches for top cuboid surface (patch-c in the picture) and prism bottom surface (patch-c in the picture). And then use mergePatchPairs or stitchMesh to merge these patches (so there's no obstacle between prism and cuboid).
Attached Images
File Type: jpg blocks.jpg (18.0 KB, 101 views)
alexeym is offline   Reply With Quote

Old   April 10, 2014, 05:38
Default
  #14
Member
 
CFDUser
Join Date: Mar 2014
Posts: 59
Rep Power: 13
CFDUser_ is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Well,

see my suggestion about splitting your mesh into hexagonal blocks in the attached picture. Arrows along the sides show grading direction (hope I get right what you need).

In general you'll need to define separate patches for top cuboid surface (patch-c in the picture) and prism bottom surface (patch-c in the picture). And then use mergePatchPairs or stitchMesh to merge these patches (so there's no obstacle between prism and cuboid).
Hi Alexeym,

I tried this already, but the problem is im getting the skewed cells at point P as shown in the attached fig. to avoid that i need triangular cells. thats what i mean by different kind of grading in prisms.
Anyway thanks for the help. Thanks a lot for your time.

Regards
CRDUser_

Last edited by CFDUser_; April 13, 2014 at 08:02.
CFDUser_ is offline   Reply With Quote

Old   August 7, 2014, 04:17
Default
  #15
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 16
bullmut is on a distinguished road
Hi Foamers

So when i read through this thread, you guys keep using the keyword hex
In the user documentation there is a keyword prisim.
Am i incorrect in assuming the difference between them is
hex (0 1 2 3 4 5 6 7) ( )...
prism (0 1 2 3 4 5) ( )...

If this is the case can i have a prism and hex block in the same mesh?

/* I have removed the prism entry from my file, it works now.
But still not sure how to use prism as an option*/

Last edited by bullmut; August 7, 2014 at 09:16. Reason: Fixed my problem with a work around
bullmut is offline   Reply With Quote

Old   August 11, 2014, 11:41
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings bullmut,

According to the documentation: http://www.openfoam.org/docs/user/blockMesh.php - currently only the "hex" blocks are supported. If you want a prism (a "wedge", according to the documentation), you'll have to repeat 2 vertex indexes, as explained in the subsection "Creating blocks with fewer than 8 vertices".

The possibility to use other names was left open for other keywords so that other new blocks could be implemented, but I guess no one ever funded such an effort, possibly because configuring "blockMeshDict" files can be pretty hard to do, specially if done manually.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 18, 2021, 12:45
Default Prism blockMesh
  #17
New Member
 
Mohammad Karimi Zand
Join Date: Jan 2021
Posts: 3
Rep Power: 5
Zand is on a distinguished road
Quote:
Originally Posted by CFDUser_ View Post
Hi Alexeym again,

problem is grading. One can make prisms using blockMesh, but grading will be something like in the attached fig.




i want to make grading like in the below fig


I want it to be done in blockMeshDict. If its possible please help me.

Regards
CFDUser_
Hi fellow CFDUser
Have you found an answer to this problem? I am also having the same issue, where using repeated vertices with hex block definition generates "bad" mesh in the corners of the block.

Please let me know if you have found any solutions.

Thank you in advance.
Zand is offline   Reply With Quote

Old   December 20, 2021, 11:03
Default
  #18
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Sakun View Post
did you manage to sort out the problem?
Regarding this type of meshing:


About a month back I was investigating a related topic (https://develop.openfoam.com/Develop...bd5c9735bc2256)


I figured that we should be able to establish the topologically merged points (for each block) instead of relying on geometric merging for wedge-like geometries. However, even to deal with those types of shapes becomes fairly intricate. It starts off with small things like the edge-grading. Although this is often just specified as 3 values, internally it actually corresponds to 12 values (one for each edge of a hex-cell). From the edge grading and the layout of a hex, you then know the number of faces/points on each side of the hex, as well as the total number of faces/points within each hex. For the cells within each hex, they simply correspond to (nx * ny * nz) for that block. For the sides of the hex, you have (nx * ny), (ny * nz) or (nz * nx) on the block faces.
All of these counts are used when determining the final number of faces/points and which faces/points will be merged together at the lowest level. If the base building block changes to something other than a hex, all of this accounting falls apart (internally). Even with a degenerate hex (eg, a prism as a collapsed hex), the low-level internals simply don't quite fit. It would probably need a moderate amount of effort (a couple of days) to sort that bit out before it would be possible to also consider different internal meshing for a prism.

There is probably not enough of a demand to these types of meshes, I would guess. Of course, if you are only talking about meshing exactly one prism as shown, there is no reason not to simply generate the points/cells with a smallish script instead.
olesen is offline   Reply With Quote

Reply

Tags
blockmesh


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
[blockMesh] Uniform prism cells with blockMesh keepfit OpenFOAM Meshing & Mesh Conversion 1 April 5, 2014 19:59
Getting prism to inflate into mixed tet-hex meshes Joe CFX 16 October 10, 2011 08:06
blockMesh prism undefined faces flowris OpenFOAM 3 May 25, 2010 12:07
ICEM - Prism Tool Problem carpe85 CFX 0 February 10, 2009 13:25
Icemcfd: Preventing prism inflation collisions? Joe CFX 1 July 31, 2007 10:13


All times are GMT -4. The time now is 23:47.