# Prism Mesh with OpenFoam

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

 April 15, 2013, 11:17 Prism Mesh with OpenFoam #1 New Member   Giancarlo Join Date: Apr 2013 Location: Milan Posts: 21 Rep Power: 6 Sponsored Links Hi everybody, does anybody know how to create a mesh with PRIMS instead of HEX in "blocks" in blockMeshDict? Is there any guide online? Thanks

 April 15, 2013, 13:03 #2 Member   Yosmcer Mocktai Join Date: Apr 2013 Location: Behind a computer Posts: 48 Rep Power: 10 If you want less faces (prism with triangular base), you can define the hex with two pair of points that are the same: ( 0 0 1 2 3 3 4 5 6) Will make you a prism with base 0 1 2. The same manipulations can lead to pyramids (with quad or triangular base). If you want more faces, you can add some hex to en up with the wanted geometry (example, 6 triangular prism to have a hexagonal prism). I'm a newbie in the cfd world, so I can have missed something. The guides I know existing: Official: http://www.openfoam.org/docs/user/ Non official: http://openfoamwiki.net/index.php

 August 29, 2013, 08:54 #3 Member   xuhe-openfoam Join Date: Aug 2013 Location: DaLian，china Posts: 82 Rep Power: 5 Could you tell me how to use "prism" in blockMeshDict ? I think maybe you have known it.

August 29, 2013, 10:29
#4
Member

Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 48
Rep Power: 10
Quote:
 Originally Posted by Yosmcer If you want less faces (prism with triangular base), you can define the hex with two pair of points that are the same: ( 0 0 1 2 3 3 4 5) Will make you a prism with base 0 1 2 and the opposite face 3 4 5. The same manipulations can lead to pyramids (with quad or triangular base). If you want more faces, you can add some hex to en up with the wanted geometry (example, 6 triangular prism to have a hexagonal prism). I'm a newbie in the cfd world, so I can have missed something. The guides I know existing: Official: http://www.openfoam.org/docs/user/ Non official: http://openfoamwiki.net/index.php
There was a litle mistake, I corrected it here (I cannot edit the previous message as there is more than a month that it has been created.

Quote:
 Originally Posted by bieshuxuhe Could you tell me how to use "prism" in blockMeshDict ? I think maybe you have known it.
This is just a normal hex, but with the nodes collapsed:

hex ( 0 0 1 2 3 3 4 5) (a b c) simpleGrading (1 1 1)

 August 29, 2013, 10:38 #5 Member   xuhe-openfoam Join Date: Aug 2013 Location: DaLian，china Posts: 82 Rep Power: 5 Thank you very much!

 October 7, 2013, 06:57 #6 Senior Member   Alex Join Date: Oct 2013 Posts: 334 Rep Power: 14 Hello Yosmcer!! First of all I have to say that I'm a complete newbie in OpenFOAM (although I have read all the User's Guide). I've been trying to generate a prism cell since a few days ago but i can't find the proper way. I read the way to collapse points in the Guide, some advices here in the forum coming from advanced users but I still have problems executing blockMesh. Here is my blockMeshDict file after having read how to implement a prism cell: Code: ```vertices ( ( 0 0 0 ) ( 5 5 0 ) ( 0 10 0 ) ( 0 0 10 ) ( 5 5 10 ) ( 0 10 10 ) ); blocks ( prism ( 0 1 2 0 3 4 5 3 ) (1 1 1) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (0 0 1 2) ); } outlet { type patch; faces ( (3 5 4 3) ); } walls { type wall; faces ( (0 1 4 3) (1 2 5 4) (2 0 3 5) ); } collapsed { type empty; faces ( (0 3 3 0) ); } ); mergePatchPairs ( );``` As you can see, I applied an empty patch to the collapsed face as I understood I had to do according to the Guide. This is the error message I got: --> FOAM FATAL ERROR: face 0 in patch 0 does not have neighbour cell face: 4(0 0 1 2) Thanks a lot in advance. And sorry for my english, english is not my mother tongue at all... Last edited by zfaraday; October 7, 2013 at 07:03. Reason: Orthography and format adited.

 October 18, 2013, 10:19 #7 Senior Member   ok Join Date: Oct 2013 Posts: 346 Rep Power: 6 Hi, I did the changes for blockMeshDict for prism instead of hex as above in cavity. But, when I apply icoFoam, I got this following error (as shown in attached screenshot ). Can you help me to solve the problem? Are my steps correct? Regards Maimouna

October 18, 2013, 16:22
#8
Member

Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 48
Rep Power: 10
Quote:
 Originally Posted by zfaraday Hello Yosmcer!! First of all I have to say that I'm a complete newbie in OpenFOAM (although I have read all the User's Guide).
Hello, I'm neither an advanced user. I made some try few days ago, but didn't found out what is the problem. I'll need to have some time to look at it further.

Quote:
 Originally Posted by Maimouna Hi, I got this following error (as shown in attached screenshot ).
Sorry, I can't see any screenshot. I think something goes wrong when you tried to attach it.

To display errors codes, I think the best is to use [CODE] tags.

 March 24, 2014, 07:17 Documented #9 New Member   Richel Bilderbeek Join Date: Nov 2013 Posts: 14 Rep Power: 5 Because I could not find a complete example (with image) of how to create prisms in block Mesh, I documented this myself. Below I will paste the comment-stripped blockMeshDict of a two-prism cube, and an image that displays the resulting mesh its point and face indices. More details can be found at http://richelbilderbeek.nl/ToolOpenFoamExample24.htm Enjoy, assert Code: ```FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } convertToMeters 1.0; vertices ( (-1 -1 -1) ( 1 -1 -1) (-1 1 -1) ( 1 1 -1) (-1 -1 1) ( 1 -1 1) (-1 1 1) ( 1 1 1) ); blocks ( hex (0 1 1 2 4 5 5 6) (1 1 1) simpleGrading (1 1 1) hex (2 1 1 3 6 5 5 7) (1 1 1) simpleGrading (1 1 1) ); edges ( ); boundary ( my_faces { type patch; faces ( (0 1 1 2) (2 1 1 3) (0 4 6 2) (1 5 4 0) (3 7 5 1) (2 6 7 3) (4 5 5 6) (6 5 5 7) ); } ); ``` __________________ I will never accept a 'Friend' request, I will always accept beer

 April 15, 2015, 03:13 #11 New Member   Nilotpole Kalita Join Date: Oct 2014 Posts: 2 Rep Power: 0 can anyone please help me? nilotpole

 April 15, 2015, 03:32 #12 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,688 Rep Power: 27 Hi, Can you please: 1. Attach blockMeshDict as an archive (or even archive of the case? usually it is not very convenient to check contents of dictionaries inside message body) 2. Post geometry you are trying to mesh. blockMesh is not the only mesh generator capable of producing hexagonal meshes compatible with OpenFOAM. 3. And finally if you comment out boundary definitions, the error becomes Code: ```--> FOAM FATAL ERROR: Inconsistent point locations between block pair 0 and 2 probably due to inconsistent grading. From function blockMesh::calcMergeInfo() in file blockMesh/blockMeshMerge.C at line 294. FOAM exiting```

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24 NGH ANSYS Meshing & Geometry 1 June 14, 2011 06:42 sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11 lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09