CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Is it possible to avoid reconstructParMesh? (https://www.cfd-online.com/Forums/openfoam-solving/198383-possible-avoid-reconstructparmesh.html)

Rojj February 5, 2018 07:25

Is it possible to avoid reconstructParMesh?
 
Hi,

I am running a quite large case and the reconstruction of the mesh takes a very long time.

Is it possible to run mpirun simpleFoam without having to reconstruct the mesh and decompose it again?

I am running OF 4.1. My current workflow is

blockMesh
surfaceFeatureExtract
decomposePar
mpirun -np X snappyHexMesh -overwrite -parallel

reconstructParMesh -constant

decomposePar
mpirun -np X renumberMesh -overwrite -parallel
mpirun -np X simpleFoam -overwrite -parallel

I know that I can postProcess without reconstructing the case, but can I go from decomposed mesh to solution directly?

Thanks!

eric February 5, 2018 09:00

Yes, you do not need to recompose the mesh before running the solver. Have a look at the Allrun file in for instance the motorBike tutorial:
$FOAM_TUTORIALS/incompressible/simpleFoam/motorBike/Allrun

There are some commands there that help copying the 0 folder to all the individual processors. In OpenFOAM 5, you can just add -copyZero as argument to the decomposePar command.

Rojj February 5, 2018 16:15

Thanks Eric! Can't even tell you how much it has helped me.

For future readers...

After sHM in parallel you need to run

Code:

ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} cp -r 0.orig ./{}/0

This is a nice linux way to replace all the 0 folders in the processorX folder with the original ones.

Remember to add

Code:

#includeEtc "caseDicts/setConstraintTypes"
in all the boundary fields. This will cause an error if you are using PyFOAM (I am). In that case just replace the actual content of caseDicts/setConstraintTypes.


I finally run (not sure if patchSummary is needed)

Code:

mpirun --mca orte_base_help_aggregate 0 -np X patchSummary -parallel
mpirun --mca orte_base_help_aggregate 0 -np X renumberMesh -overwrite -parallel
mpirun --mca orte_base_help_aggregate 0 -np X simpleFoam -parallel

If you want to reconstruct the case at this point, you also need to reconstruct the constant directory so

Code:

reconstructParMesh -constant
reconstructPar -latestTime


RobertHB February 6, 2018 04:27

And you don't necessarily need to reconstruct. Using paraFoam -builtin you can view your decomposed case in paraview.

akidess February 6, 2018 05:54

Quote:

Originally Posted by RobertHB (Post 680604)
And you don't necessarily need to reconstruct. Using paraFoam -builtin you can view your decomposed case in paraview.

Also works with normal ParaView.


All times are GMT -4. The time now is 14:13.