CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   How to run snappyHexMesh in parallel? (

klausb January 16, 2011 10:31

How to run snappyHexMesh in parallel?

I read that it's possible to run snappyHexMesh in parallel but I couldn't find an explanation how to do it.

I am planning to analyze different configurations so I'd like to speedup the meshing process.

My testcase is motorBike.

What needs to be changed in the Allrun file:

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

cp system/ system/fvSolution
cp -r 0 > /dev/null 2>&1

runApplication blockMesh
runApplication snappyHexMesh -overwrite

sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 10;/g' system/fvSolution
runApplication potentialFoam -writep
sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 0;/g' system/fvSolution

runApplication simpleFoam


openfoam_user January 17, 2011 04:09

Hi Klaus,

How to run snappyHexMesh in parallel:

- decomposeMethod in decomposeParDict must be hierarchical !
- run "decomposePar"
- run "mpirun -np 8 -parallel snappyHexMesh"
- afterwards run "reconstructParMesh -mergeTol 1e-06 -latestTime"

Hope it can help you,


All times are GMT -4. The time now is 17:25.