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

blockMesh - parallel mesh generation

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

Like Tree3Likes
  • 1 Post By gschaider
  • 2 Post By Hisham

Reply
 
LinkBack Thread Tools Display Modes
Old   February 2, 2011, 05:52
Default blockMesh - parallel mesh generation
  #1
New Member
 
Wolfgang Strauss
Join Date: Nov 2010
Location: Germany / Bavaria / Eichstätt
Posts: 15
Rep Power: 6
WolfgangS. is on a distinguished road
Hi Foamers!

I have just a short question.

Is a parallel mesh generation with blockMesh possible?


Thanks and best regards!

Wolfgang
WolfgangS. is offline   Reply With Quote

Old   February 3, 2011, 05:21
Default
  #2
New Member
 
Felix W.
Join Date: Jan 2011
Posts: 4
Rep Power: 6
Rusty Velo is on a distinguished road
Hi Wolfgang,
I'm not sure, what you're meaning with a parallel mesh generation.. But if you want to define a rectangular area with a mesh (existing of rectangular cells, which can have regular or irregular dimensions): This is possible.

I normally define my (3d) domains with BlockMesh and insert other geometries with snappyHexMesh.. But I'm still a Beginner in OF, so that this is maybe not the best way for a geometry preparation..

best regards,
felix
Rusty Velo is offline   Reply With Quote

Old   February 3, 2011, 05:59
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
I think he meant if he can run blockMesh in parallel, and I think the answer is no.
akidess is offline   Reply With Quote

Old   February 3, 2011, 09:00
Default
  #4
New Member
 
Wolfgang Strauss
Join Date: Nov 2010
Location: Germany / Bavaria / Eichstätt
Posts: 15
Rep Power: 6
WolfgangS. is on a distinguished road
hi felix and akidess

akidess is right.

By now i used...

blockMesh
decomposePar
mpiexec -n 12 snappyHexMesh -parallel

... and it worked fine.

Thanks akidess for your quick answer.

Best regards
Wolfgang
WolfgangS. is offline   Reply With Quote

Old   January 15, 2013, 10:19
Default
  #5
New Member
 
mo houssami
Join Date: May 2011
Posts: 14
Rep Power: 6
mo.houssami is on a distinguished road
Hi Foamers,

Now that we're in 2013 , do you know if there's a way to run blockMesh in parallel?

I am trying to run a 3D case on a cluster, with 28 blocks and a total of 67x10^6 cells... Hence, blockMesh it taking forever.

Do you have any suggestions?

Thanks
mo.houssami is offline   Reply With Quote

Old   January 15, 2013, 11:42
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mo.houssami View Post
Hi Foamers,

Now that we're in 2013 , do you know if there's a way to run blockMesh in parallel?

I am trying to run a 3D case on a cluster, with 28 blocks and a total of 67x10^6 cells... Hence, blockMesh it taking forever.

Do you have any suggestions?
Yeah. Use a more sensible mesh.

No seriously: blockMesh doesn't work in parallel and would be hard to write such a thing in parallel (think about it: you're asking the decomposition algorithm to know how to decompose before the actual cells are known).

Anyway: one way would be the following (I'm only sketching this. You have a cluster for a 67m cell mesh so I assume you either have the time to set this up yourself or the money to buy support to do this for you):

- set up blockMeshes for single blocks (or small managable groups). Set up patches for the processor patches (but give them the type patch)
- run blockMesh on each of these blocks
- copy the constant/polyMesh into the appropriate processorX/constant/polyMesh directory
- either edit by hand or have a script to edit the polyMesh/boundary-files to change the type of the patches from patch to processor

Now you have a mesh that is decomposed for 28 processors (assuming each block gets his own processor). If that is not the number of processors you want to do the calculation with or if the mesh is unbalanced because the blocks are not of the same cell number then you can use the redistributeParMesh utility to get an evenly distributed mesh on any number of processors you like.

All these steps can be scripted (even decomposing the big blockMeshDict into 28 dicts ... but it won't be pretty)
Hisham likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 3, 2014, 19:56
Default
  #7
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Although this seems to be a year later. I think a nice solution would also be to:

1. make a coarse mesh
2. decomposePar it
3. Edit: run topoSet in parallel to add sets to constant/polyMesh
in system/topoSetDict create a cellSet via a large box to include
all cells for refinement
3. run refineHexMesh as many times as you desire in parallel


Best regards,
Hisham
karlvirgil and mo.houssami like this.

Last edited by Hisham; January 4, 2014 at 01:29.
Hisham 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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
Mesh generation software is needed H.Dou Main CFD Forum 12 May 4, 2011 15:20
Parallel mesh generation using snappyHexMesh aki_yafuji OpenFOAM Mesh Utilities 0 December 25, 2010 04:49
Mesh generation without using blockMesh mamaly60 OpenFOAM Meshing & Mesh Conversion 1 November 1, 2007 03:45


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