CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Problems with preserving baffles with scotch parallel decomposition (https://www.cfd-online.com/Forums/openfoam-pre-processing/222400-problems-preserving-baffles-scotch-parallel-decomposition.html)

AnnaF November 22, 2019 06:24

Problems with preserving baffles with scotch parallel decomposition
 
3 Attachment(s)
Hi all

I am trying to decompose my case with the scotch (and simple) method with baffle/patch preservation, but my baffle (set up as cyclic) gets split between two processors.

It is a 2D mesh with a vertical surface which is defined as a baffle/faceZone. The baffle gets split between two processors when I decompose the domain into 14 subdomains, which leads to problems later on. I don't get any error messages, but I get a message that the baffle is specified:
Code:

  “…
  Selecting decompositionMethod scotch
  Selecting decompositionConstraint preserveBaffles
  preserveBaffles : setting constraints to preserve baffles
  Selecting decompositionConstraint preservePatches
  preservePatches : adding constraints to keep owner of faces in patches 1(plateBaffle) on same processor. This only makes sense for cyclics.
  Selecting decompositionConstraint preserveFaceZones
  preserveFaceZones : adding constraints to keep owner and neighbour of faces in zones 1(plateBaffle) on same processor
 

Please find pictures attached that show the baffle in red and the mesh parts of the two processors containing the baffle in blue and gray.

Things do work (baffles/patches exist and give correct results) when I decompose into e.g. 4 subdomains, but this could just be lucky as it doesn't have to split the baffles.

One question in general: Shouldn't baffles (or patches) be preserved with the scotch method automatically?


As it didn't preserve my baffles automatically, I added constraints for preservation to my decomposeParDict as follows:
Code:

numberOfSubdomains 14;

method          scotch;

constraints
{
    // Keep owner and neighbour of baffles on same processor
    // (ie, keep it detectable as a baffle).
    // Baffles are two boundary face sharing the same points
    preserveBaffles //baffles
    {
        type    preserveBaffles;
        enabled true;
    }
    preservePatches //patches
    {
        type    preservePatches;
        patches (plateBaffle); //(plateFront plateBack plateBaffle); //NO COMMAS!
        //patches  (plateFrontPatch_half0 plateBackPatch_half0 plateBafflePatch_half0);
        enabled true;
    }
    preserveFaceZones //faces
    {
        type    preserveFaceZones;
        zones  (plateBaffle); //(plateFront plateBack plateBaffle);
        //zones  (plateFrontPatch_half0 plateBackPatch_half0 plateBafflePatch_half0);
        enabled true;
    }
}

I have tried a few options as you can see, but all give me the same result: a decomposition across the baffle, no error messages. Of course, I could find a different number of subdomains which works out as a workaround, but I would like to have 14 for comparative reasons and it might be a bug (?)....

Please find my case attached.

Maybe someone has an idea?

Best wishes
Anna

AnnaF December 5, 2019 09:21

I still do have this problem... does anyone have an idea?

syavash June 19, 2020 13:14

Quote:

Originally Posted by AnnaF (Post 751642)
I still do have this problem... does anyone have an idea?

Hi Anna,

I am working with an older version of OpenFOAM (2.3.1), but I've got the same problem. I need to preserve a certain planar inlet patch on one process.
I have used similar options in decomposePar, but they apparently not working.

Did you find a solution for this issue?

Kind regards,
syavash

AnnaF June 19, 2020 14:47

Dear syavash

Unfortunately, I couldn't solve the problem with the scotch decomposition method. Instead I used manual decomposition to avoid this.

Good luck

Anna

syavash June 19, 2020 16:32

Quote:

Originally Posted by AnnaF (Post 775211)
Dear syavash

Unfortunately, I couldn't solve the problem with the scotch decomposition method. Instead I used manual decomposition to avoid this.

Good luck

Anna

Anna,

Happy to hear that it worked for you.
How many processes you decomposed into?
I have seen how manual method works, but I wonder if there is a straightforward way to use it for large number of processes (over 100)?

Kind regards
Syavash

AnnaF June 21, 2020 06:21

Hi again

I have not looked into it for a larger number of processes. I only decomposed into 14 subdomains which was obviously not much effort to do it manually. I will have another look at my case and if I find out more I would give you an update.

Best wishes
Anna

simply-alex April 6, 2021 03:04

Are you still facing the same problem?

Depending on which type of internal boundary you introduce, OpenFOAM wants different constraints (as you know).

For baffles
Code:

    baffles
    {
        type    preserveBaffles;
        enabled true;
    }

For cyclics
Code:

    patches
    {
        type    preservePatches; //set (".*") for all patches, & DONT USE COMMAS!
        patches (cyclicPatchA0 cyclicPatchA1 cyclicPatchB0 cyclicPatchB1);
        enabled false;
    }

for AMIcyclics
Code:

    processors
    {
        type    singleProcessorFaceSets;
        sets
        (      (cyclicAMI_A    -1) //these names are specefied in topoSetDict
                (cyclicAMI_B    -1) //these names are specefied in topoSetDict
        );
        enabled true;
    }

could it be that you are using AMI cyclics in your setup?


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