CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   Snappy in parallel mode (

jajoju October 27, 2009 14:50

Snappy in parallel mode
Hi everybody

i am new to OpenFOAM and snappyHexMesh. I need to create a mesh with a lot of cells (arround 8 Mio.) so I thought it would be usefull to use more than one cpu. I tried to generate the mesh with the help of several cpu in OpenFOAM 1.6.x. Everything went fine so far after:

-mpirun -n 4 snappyHexMesh -parallel
-reconstructParMesh (after I added master time 1 to the controlDict)

If I open the mesh now in paraFoam I just can see the 'first mesh'. That means the surface is not smooth it's square cut (?).

Does anybody know if the step with the 'master time' was right (after that it finished reconstructing the first time!)? Maybe there is another mistake I made. I really hope that someone can help me! Thanks a lot!


alexm October 27, 2009 20:05

Hello Jakob,
I don't know what these 'master time' is you're about. Maybe there is another thing, I have to learn ;-)
After a parallel run of snappyHexMesh in each processor folder are the the folders for the 'time steps' 1 + 2 + 3 (if add layers had been set in snappyHexMeshDict).
For the smooth surface you need the second time step.
Normaly reconstructPar - without any parameter - will reconstruct each time step in the processor folders. You should try reconstructPar -time 2 (or '-time 3' or '-latestTime')
if you have problems, try this one:
reconstructParMesh -mergeTol 1e-03 -latestTime

Hope, that helps!

Good night and greetings, Axel

jajoju October 28, 2009 05:03

Hi Axel

thanks a lot it works!!! You really made my day!

best greetings Jakob

estang December 3, 2014 06:24

If i use reconstructPar without any parameters, it tells me that there is no times selected. If i run reconstructParMesh -mergeTol 1e-06 it tells me there is no mesh


Merge tolerance : 1e-06
Write tolerance : 1e-06
Doing geometric matching on correct procBoundaries only.
This assumes a correct decomposition.
Found 8 processor directories

Reading database "snappyMultiRegionLayerMeshing_2/processor0"
Reading database "snappyMultiRegionLayerMeshing_2/processor1"
Reading database "snappyMultiRegionLayerMeshing_2/processor2"
Reading database "snappyMultiRegionLayerMeshing_2/processor3"
Reading database "snappyMultiRegionLayerMeshing_2/processor4"
Reading database "snappyMultiRegionLayerMeshing_2/processor5"
Reading database "snappyMultiRegionLayerMeshing_2/processor6"
Reading database "snappyMultiRegionLayerMeshing_2/processor7"
Time = 0

No mesh.


This is the tree of one processor after snappyHexMesh has run

├── processor7
│  ├── 0
│  │  ├── cellLevel
│  │  └── pointLevel
│  └── constant
│      └── polyMesh
│          ├── boundary
│          ├── boundaryProcAddressing
│          ├── cellLevel
│          ├── cellProcAddressing
│          ├── cellZones
│          ├── faceProcAddressing
│          ├── faces
│          ├── faceZones
│          ├── level0Edge
│          ├── neighbour
│          ├── owner
│          ├── pointLevel
│          ├── pointProcAddressing
│          ├── points
│          ├── pointZones
│          ├── refinementHistory
│          ├── sets
│          │  └── wrongFaces
│          └── surfaceIndex

whats wrong?

Tobi December 3, 2014 11:48


reconstructParMesh -mergeTol 1e-6 -constant
Why you have to use it because you are using

mpirun -np x snappyHeMesh -parallel -overwrite
Therefor -overwrite tells sHM to overwrite the mesh in constant/polyMesh and therefor you will not get a time folder. Hence this happens reconstructParMesh is not able to reconstruct a mesh because it is searching in a time folder which you do not have. To avoid this error you have to tell the application that you want to reconstruct the mesh in constant folder.

estang December 4, 2014 02:57

you solved my problem

All times are GMT -4. The time now is 12:00.