CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] How to run snappyHexMesh in parallel? (https://www.cfd-online.com/Forums/openfoam-meshing/83943-how-run-snappyhexmesh-parallel.html)

klausb January 16, 2011 09:31

How to run snappyHexMesh in parallel?
 
Hello,

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:

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

cp system/fvSolution.org system/fvSolution
cp -r 0.org 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


Klaus

openfoam_user January 17, 2011 03: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,

Stephane

mksajib August 4, 2022 04:51

Quote:

Originally Posted by openfoam_user (Post 290683)
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,

Stephane

Dear Stephane,
Thank you for sharing the commands. I did it with the scotch method in decmposeParDict. Also, the command for snappyHexMesh is "mpirun -np 8 snappyHexMesh -parallel"

Regards


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