CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Decomposing a case with redistributePar utility

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2021, 03:59
Default Decomposing a case with redistributePar utility
  #1
Senior Member
 
Join Date: Nov 2009
Posts: 111
Rep Power: 16
Gearb0x is on a distinguished road
Hello everyone,

I am working on a case where I would like to use redistributePar to decompose and recompose my geometry.

Unfortunately, I am encountering several issues. Some of them I could solved. But now I am blocked and would like to sollicitate your support.

My case has the following structure :
Code:
 - 0.orig
 - constant
 - system
   - controlDict
   - decomposeParDict
   - ...
The commands I am using to try to solve my case are the following ones :

Code:
mpirun -np 16 redistributePar -decompose -parallel 
ls -d processor* | xargs -i rm -rf ./{}/0
ls -d processor* | xargs -i cp -r 0.orig ./{}/0
mpirun -np 16 renumberMesh -parallel -overwrite -constant -decomposeParDict system/decomposeParDict
mpirun -np 16 patchSummary -parallel -decomposeParDict system/decomposeParDict 
mpirun -np 16 simpleFoam -parallel
I first ran into trouble just getting the decomposition going.

Indeed, OpenFOAM was creating the following directories :

Code:
processor1 
processor 2
...
processor15
but was not creating the processor0 directory. This was solved by renaming my 0 directory to 0.orig. I don't understand why since tutorials e.g. $FOAM_TUTORIALS/mesh/parallel/cavity which uses redistributePar does not need that ...

Now the issue I have when running the solver (simpleFOAM) is that I get several messages like :

Code:
Cannot find patchField entry for procBoundaryXtoY
and I don't understand why. I have tried applying the commands :

Code:
mpirun -np 16 renumberMesh -parallel -overwrite -constant -decomposeParDict system/decomposeParDict
mpirun -np 16 patchSummary -parallel -decomposeParDict system/decomposeParDict
but this does not solve the problem.

Any idea ? Thank you very much for your support !
Gearb0x is offline   Reply With Quote

Old   March 30, 2021, 11:50
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
redistributePar went through several iterations to get rid of various bugs.
could you please share us what software environment were you using? e.g. version
HPE is offline   Reply With Quote

Old   March 30, 2021, 11:51
Default
  #3
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
if it would not cause any headache for you, I would simply use "decomposePar" in place of "redistributePar -decompose -parallel" (for now).
HPE is offline   Reply With Quote

Old   May 6, 2021, 05:14
Default
  #4
Member
 
Piotr Prusinski
Join Date: Oct 2009
Location: Warsaw, Poland
Posts: 67
Rep Power: 16
piprus is on a distinguished road
I'm facing similar problem. Described it here: [v1812] redistributePar -decompose -parallel and missing /processor0 folder

So in case of any updates in this matter I would be glad to learn.
piprus is offline   Reply With Quote

Old   August 25, 2021, 01:59
Default
  #5
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
hello!
mmm If I understand correctly you are having trouble running the case in parallel. as another user mentioned before, you can use:
Code:
decomposePar -force -copyZero
this will create the processor0 folder without any issue, and it runs smoothless.
there might be a specific reason why you want to use redistributePar (if thats the case sorry for not having an answer) but if it is not the case, this is my workflow script that runs smoothly whatever the case:
I am using the runFucntions https://damogranlabs.com/2020/10/run...ck-cheatsheet/ but it is not necessary obviously, but the great benefit that you have with them is speccially in the runParallel that you dont need to specify the number of domains as with mpirun, it recovers it directly from your decomposeParDict.
Code:
#!/bin/bash
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------
./Allclean
caseName=$(echo "${PWD##*/}")
echo "================================================================================================================================================="
echo "Begining of Meshing of $caseName case
=================================================================================================================================================
"
cp ./constant/triSurface/modelBackup.stl ./constant/triSurface/model.stl
runApplication blockMesh												
runApplication surfaceFeatureExtract									
cp -r 0.orig/. 0
decomposePar -force -copyZero											
runParallel		snappyHexMesh -overwrite								
runParallel 	renumberMesh -overwrite
runParallel 	checkMesh -allTopology -allGeometry -latestTime  		
touch simulation.foam
#------------------------------------------------------------------------------
The above script is only for the meshing part, but after that a:
Code:
runParallel 	$(getApplication)
and it will run the solver that is in your controlDict file.

one short extra info that I had a lot of problems before if you want to reconstruct the case for whatever reason (now paraView can analyse the decomposed case so it is not really important to do it), you should run first reconstructParMesh follow up by recontructPar
otaolafr is offline   Reply With Quote

Reply

Tags
openfoam, parallel, redistributepar


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
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
Numerical error or case error? Flow in a 3D pipe fsalvucci OpenFOAM 40 January 30, 2013 07:10
Sample utility problems msrinath80 OpenFOAM Running, Solving & CFD 12 December 21, 2012 05:51
About the problem of decomposePar utility zou_mo OpenFOAM Running, Solving & CFD 3 July 27, 2005 18:18
Turbulent Flat Plate Validation Case Jonas Larsson Main CFD Forum 0 April 2, 2004 10:25


All times are GMT -4. The time now is 04:11.