CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Parallelize snappyHexMesh optimally?

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

Like Tree8Likes
  • 1 Post By Antimony
  • 7 Post By Antimony

LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2016, 09:13
Default Parallelize snappyHexMesh optimally?
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi All,

I have been thinking of a better way to run snappyHexMesh from my current approach. Here is what I typically do:

Run blockMesh, then run decomposePar (usually with the scotch method [I understand that it does load balancing when decomposing the mesh]) and then run snappyHexMesh in parallel.

Let us say that the problem that I am solving is an external flow, and the geometry (STL files) is at the center of the domain. The entire domain has been blockMeshed and decomposed.

Now, by running snappyHexMesh in parallel, I am sure that the processors that have the geometry within their bounds are going to be worked far more than the ones on the outside (via local refinements), resulting in unequal processor loading.

And yet, the processor distribution was determined based on the blockMesh.

Is there any way by which I could get decomposePar to look at the geometry files and then make an educated guess as to where more cells are likely and decompose the mesh accordingly?

I noticed that the scotch method has coefficients and strategy options as well. Would any of those help?

One solution that I can think of is to run snappyHexMesh with just the castellated option at true and then decompose that case and rerun snappy in parallel with the snap option at true. However, I am not sure that is a good idea either, as I want to speed up the entire snappyHexMesh process in parallel and not just a part of it.

Has anyone encountered a similar problem before? (Quick search didn't yield anything).

Any comments/suggestions are most welcome!

kishore96 likes this.
Antimony is offline   Reply With Quote

Old   May 25, 2016, 00:01
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi All,

Basically, one does not need to worry about what I had mentioned in my previous post, because snappyHexMesh does load balancing by itself when run in parallel.

This is mentioned here: (It runs in parallel with a load balancing step every iteration being the crucial line)

So essentially, the base decomposition using decomposePar that needs to be run, is simply used as a first step by snappy, before it changes the partitioning of the mesh.

For those that are interested, here are a couple of snapshots of the partitioning before and after snapping (Simple case with a bunch of cubes in a bigger cube with 2 processors)

Hope this helps someone else in the future.

Attached Images
File Type: jpg originalPartition.jpg (46.1 KB, 146 views)
File Type: jpg finalPartition.jpg (70.7 KB, 130 views)
Antimony is offline   Reply With Quote


parallel, snappyhexmesh

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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 06:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 02:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 02:55
Strange Results With snappyHexMesh calebamiles OpenFOAM Running, Solving & CFD 0 August 14, 2011 16:02
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 02:09

All times are GMT -4. The time now is 03:45.