CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

preservepatches for cyclicAMI

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2016, 13:35
Default preservepatches for cyclicAMI
  #1
New Member
 
Jialin Su
Join Date: Mar 2015
Posts: 4
Rep Power: 8
ttjs3 is on a distinguished road
Hi Foamers,

I am using 2.4-0 at the moment. I am running a simulation that requires the use of the boundary condition "cyclicAMI". It's not possible to create the mesh in such a way that the matching patches have the same number of cells.

The single phase flow case runs no problem. But I also need to inject particles into the simulation as well. Then I ran into this problem:

--> FOAM FATAL ERROR:
Particle tracking across AMI patches is only currently supported for cases where the AMI patches reside on a single processor
From function void Foam::Cloud<ParticleType>::initCloud(const bool)
in file /work/y07/y07/cse/openfoam/2.4.0/build2/OpenFOAM-2.4.0/src/lagrangian/basic/lnInclude/Cloud.C at line 59.

FOAM parallel run aborting

So I presume I would need to preserve the patches that are "cyclicAMI". I added the following line in the decomposeParDict:

preserveFaceZones (SIDE1 SIDE2);

But this doesn't actually help to preserve the patches SIDE1 and SIDE2. They are still split into different processors. And the simulation still crashes with the same error message.

I looked up different threads here. But can't really find a solution. Is there any way to preserve the two "cyclicAMI" when decomposing the mesh? Or have I missed any other options in decomposePar?

I thought of using "simple". But I need to decompose a complex mesh into over 200 partitions. "simple" doesn't seem to apply here. Any suggestions will be really appreciated. Thank you in advance.

Best Regards,
Jialin Su
ttjs3 is offline   Reply With Quote

Old   December 14, 2016, 15:01
Default
  #2
New Member
 
Jialin Su
Join Date: Mar 2015
Posts: 4
Rep Power: 8
ttjs3 is on a distinguished road
I just realised that not just each individual cyclicAMI patch needs to be completely in the same processor for the simulation to run. Actually both patches (SIDE1 and SIDE2) need to be in one processor for the simulation to run.

Is there any way to instruct OpenFOAM to decompose in such a way? Thank you in advance.
ttjs3 is offline   Reply With Quote

Old   July 8, 2017, 16:30
Default
  #3
Member
 
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 8
ykanani is on a distinguished road
Quote:
Originally Posted by ttjs3 View Post
I just realised that not just each individual cyclicAMI patch needs to be completely in the same processor for the simulation to run. Actually both patches (SIDE1 and SIDE2) need to be in one processor for the simulation to run.

Is there any way to instruct OpenFOAM to decompose in such a way? Thank you in advance.
Hi,
Did you find the solution? I running into the same error. your parameters looks fine. PreservePatch should keep the cells in the same processor. I have done this thousands of times and it worked very well. But now I am facing this error with a particular grid. decomposition does not preserve patch.
ykanani is offline   Reply With Quote

Old   June 19, 2020, 14:08
Default
  #4
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 471
Rep Power: 15
syavash is on a distinguished road
Quote:
Originally Posted by ykanani View Post
Hi,
Did you find the solution? I running into the same error. your parameters looks fine. PreservePatch should keep the cells in the same processor. I have done this thousands of times and it worked very well. But now I am facing this error with a particular grid. decomposition does not preserve patch.
Dear Yousef,

Same here. I wonder if there is a trick to force decomposePar to preserve patches. Did you find a solution?

Regards,
Syavash
syavash is offline   Reply With Quote

Old   June 19, 2020, 15:14
Default
  #5
Member
 
Ardalan
Join Date: Jul 2012
Location: Atlanta, USA
Posts: 74
Rep Power: 11
Ardali is on a distinguished road
Quote:
Originally Posted by syavash View Post
Dear Yousef,

Same here. I wonder if there is a trick to force decomposePar to preserve patches. Did you find a solution?

Regards,
Syavash
Hi,
Please see the link below.
https://www.openfoam.com/documentati...-parallel.html

With adding constraints in decomposeParDict you can reach your intention.
Ardalan
Ardali is offline   Reply With Quote

Old   June 19, 2020, 15:34
Default
  #6
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 471
Rep Power: 15
syavash is on a distinguished road
Quote:
Originally Posted by Ardali View Post
Hi,
Please see the link below.
https://www.openfoam.com/documentati...-parallel.html

With adding constraints in decomposeParDict you can reach your intention.
Ardalan
Hi Ardalan,

Thanks for your response.
The issue is that despite using those constraints, my patch still gets splitted between multi processes.
The last option nonetheless looks promising, however I am using an older version of foam on cluster, so it's not really an option!
Please let me know if you had sth in mind.

Kind regards,
Syavash
syavash is offline   Reply With Quote

Old   November 12, 2020, 05:14
Post cyclicAMI patches on the same processor
  #7
New Member
 
Join Date: Nov 2020
Posts: 1
Rep Power: 0
robt28 is on a distinguished road
Hi,
I am currently using OpenFOAM 4.1 with a 3D axisymmetric geometry.

Using singleProcessorFaceSets dictionary in decomposeParDict
singleProcessorFaceSet
(
(front -1)
(back -1)
);
which is based on faces named "back" and "front" defined in /system/topoSetDict from the patches as :
actions
(
{
name front;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "front";
}
}
{
name back;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "back";
}
}
);
This tends to put all “front” and “back” cell faces so both cyclicAMI patches on the same processor.
However, this solution is not optimized regarding processor communications in my case.
I don’t have the solution to reach a fair decomposition of connected cell faces between processors with cyclic boundary conditions in OpenFOAM.
Best regards
robt28 is offline   Reply With Quote

Old   September 24, 2021, 15:53
Post
  #8
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
Quote:
Originally Posted by Ardali View Post
Hi,
Please see the link below.
https://www.openfoam.com/documentati...-parallel.html

With adding constraints in decomposeParDict you can reach your intention.
Ardalan



I have added as per link the following to my decomposeParDict
"""constraints

/ processors { type singleProcessorFaceSets; sets ((f1 -1)); enabled true; }
"""

unfortunately i recieve the following error....

--> FOAM FATAL IO ERROR:
keyword singleProcessorFaceSets is undefined in dictionary "/hsmstorage/work/rababqjt/3D_Pump_SinglePhase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/system/decomposeParDict.constraints.processors"

file: /hsmstorage/work/rababqjt/3D_Pump_SinglePhase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/system/decomposeParDict.constraints.processors from line 49 to line 51.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 566.

FOAM exiting



what might be the issue? thanks
qutadah.r is offline   Reply With Quote

Old   September 24, 2021, 15:58
Default
  #9
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
I have tried your solution but get following error..


--> FOAM FATAL IO ERROR:
keyword singleProcessorFaceSets is undefined in dictionary "/hsmstorage/work/rababqjt/3D_Pump_SinglePhase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/system/decomposeParDict.constraints.processors"

file: /hsmstorage/work/rababqjt/3D_Pump_SinglePhase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/system/decomposeParDict.constraints.processors from line 49 to line 53.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 566.


any suggestions??


i would also like to preserve cyclicAMI on same processor..
thanks!
Fouch likes this.
qutadah.r is offline   Reply With Quote

Old   October 11, 2021, 03:54
Default
  #10
Member
 
Join Date: Feb 2020
Posts: 46
Rep Power: 3
Fouch is on a distinguished road
Hi,


Could you share your decomposeParDict ?


Best regards,
qutadah.r likes this.
Fouch is offline   Reply With Quote

Old   October 11, 2021, 10:37
Default decomposeParDict
  #11
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
Hello,


hier is attached my decomposeParDict
Attached Files
File Type: txt decompose.txt (1.5 KB, 4 views)

Last edited by qutadah.r; October 11, 2021 at 14:08.
qutadah.r is offline   Reply With Quote

Old   October 11, 2021, 14:07
Default
  #12
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
Hi,



here is my decomposeParDict !


Thanks for looking into it!
Attached Files
File Type: txt decompose.txt (1.5 KB, 1 views)
qutadah.r is offline   Reply With Quote

Old   October 11, 2021, 15:53
Default
  #13
Member
 
Join Date: Feb 2020
Posts: 46
Rep Power: 3
Fouch is on a distinguished road
Hi,


front and back are the names of the AMI patch.
replace these terms by INT_BLADE_2-SIDE-1 and INT_BLADE_2-SIDE-2and it should work.
Fouch is offline   Reply With Quote

Old   October 12, 2021, 08:28
Default
  #14
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
Hi,


what does the front -1 mean? what is the 1 exactly?


in my case I have 16 AMI patches defined each as follows..


INT_IMP_VOL-SIDE-2
{
type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 35280;
startFace 14261224;
matchTolerance 0.0001;
transform coincidentFullMatch;
neighbourPatch INT_IMP_VOL-SIDE-1;
method faceAreaWeightAMI;
}
INT_SP_IMP-SIDE-1
{
type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 5020;
startFace 14296504;
matchTolerance 0.0001;
transform coincidentFullMatch;
neighbourPatch INT_SP_IMP-SIDE-2;
method faceAreaWeightAMI;
}

these were just two examples... I have entered them in the preserve patches as you suggested



processors
{
type singleProcessorFaceSets;
sets (
(INT_BLADE_1-SIDE-1 -1) //(f1 -1)
(INT_BLADE_1-SIDE-2 -1)
(INT_BLADE_2-SIDE-2 -1)
(INT_BLADE_2-SIDE-2 -1)
(INT_BLADE_3-SIDE-1 -1)
(INT_BLADE_3-SIDE-2 -1)
(INT_BLADE_4-SIDE-1 -1)
(INT_BLADE_4-SIDE-2 -1)
(INT_BLADE_5-SIDE-1 -1)
(INT_BLADE_5-SIDE-2 -1)
(INT_BLADE_6-SIDE-1 -1)
(INT_BLADE_6-SIDE-2 -1)
(INT_IMP_VOL-SIDE-1 -1)
(INT_IMP_VOL-SIDE-2 -1)
(INT_SP_IMP-SIDE-1 -1)
(INT_SP_IMP-SIDE-2 -1)
);
enabled true;
}

---
however im still recieving an error. any suggestion? thanks!
qutadah.r is offline   Reply With Quote

Old   October 12, 2021, 08:35
Default
  #15
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
I did as well change the topoSetDict as follows....


actions
(
{
name INT_BLADE_1-SIDE-1;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "INT_BLADE_1-SIDE-1";
}
}
{
name INT_BLADE_1-SIDE-2;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "INT_BLADE_1-SIDE-2";
}
}
);




is this correct? ofcourse for all the sets....
qutadah.r is offline   Reply With Quote

Old   October 28, 2021, 06:35
Default
  #16
Member
 
Join Date: May 2017
Posts: 30
Rep Power: 6
sqek is on a distinguished road
Hello
Quote:
however im still recieving an error. any suggestion?
It would be helpful to say exactly what error you're getting and when

Quote:
what does the front -1 mean? what is the 1 exactly?
The number in a singleProcessorFaceSet constraint tells it which processor to put it on, -1 tells it to put it on any processor. So
( front 1 )
would put all faces in front, on processor 1, and
( front -1 )
would put all faces in front on the same processor, without caring which (this normally gives better decomposition as it can choose the best processor to put the faces on) (so it could be processor 0, processor 1, etc, whatever gives the best decomposition)

Assuming that the error you're getting is that it's still splitting the patches between processors:
It's probably because you're making a separate set for each side of each blade, so while all the faces in INT_BLADE_1-SIDE-1 are on the same processor, all the faces of INT_BLADE_1-SIDE-2 might be on a different processor.

You could fix this by putting both sides into the same faceSet, so
Code:
actions
(
{
name INT_BLADE_1;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "INT_BLADE_1-SIDE-1";
}
}
{
name INT_BLADE_1;
type faceSet;
action add;
source patchToFace;
sourceInfo
{
name "INT_BLADE_1-SIDE-2";
}
}
);
This puts faces from patch INT_BLADE_1-SIDE-1 into set INT_BLADE_1, then adds the faces from patch INT_BLADE_1-SIDE-2 into the same set.
You'd then need
Code:
processors
{
type singleProcessorFaceSets;
sets (
(INT_BLADE_1 -1)
...
which makes sure all faces in set INT_BLADE_1 (so all the faces in INT_BLADE_1-SIDE-1 and INT_BLADE_1-SIDE-2) end up on the same processor

(There's also a potential issue you might run into if two of your patches are next to each other, sharing a point/cell: singleProcessorFaceSets actually takes all points of the faces of a faceSet, then all cells touching any of those points, then keeps those cells on the same processor, so nearby patches can end up forced to all be on the same processor - there's another thread on here about how to deal with that)
sqek is offline   Reply With Quote

Old   November 8, 2021, 19:00
Smile Foam fatal io error
  #17
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
Thanks for the explanation, I have tried your method and still get the following error, which also states teh error is in the lines of my processor sets in the decomposeParDict....




--> FOAM FATAL IO ERROR:
keyword singleProcessorFaceSets is undefined in dictionary "/hsmstorage/work/rababqjt/3D_Pump_singlephase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/system/decomposeParDict.constraints.processors"


Do you have any suggestions? Thanks alot!
qutadah.r is offline   Reply With Quote

Old   November 9, 2021, 08:22
Default
  #18
Member
 
Join Date: May 2017
Posts: 30
Rep Power: 6
sqek is on a distinguished road
Hello
Having a look at the decomposeParDict in OpenFOAM-8 (the one I'm using), singleProcessorFaceSets looks like:
Code:
constraints
{
    singleProcessorFaceSets
    {
        type singleProcessorFaceSets;
        singleProcessorFaceSets (
            ( set1 -1 )
            ( set2 -1 )
       ...more sets....
        );
    }
}
It looks like you've typed sets( instead of singleProcessorFaceSets( as the name of the list of sets - the error message you're getting says it's looking for an entry called "singleProcessorFaceSets" in the processors{ constraint you're setting up, so changing "sets" to "singleProcessorFaceSets" should fix that one
sqek is offline   Reply With Quote

Old   November 9, 2021, 08:41
Default
  #19
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
I have tried doing that, it says following: I am using OF- version 6


--> FOAM FATAL IO ERROR:
unexpected class name cellSet expected faceSet
while reading object region0

file: /hsmstorage/work/rababqjt/3D_Pump_singlephase/02_3D_Pumpe_M1_IncreasedGap_Qw68_CyclicAMI_SST_pim ple/constant/polyMesh/sets/region0 at line 15.

From function Foam::Istream& Foam::regIOobject::readStream(const Foam::word&, bool)
in file db/regIOobject/regIOobjectRead.C at line 166.





the sets in the polymesh folder are of class cellSet... that seems to be the error.. Any idea how to fix this? Should i be adjusting the class of my sets to "faceSet" ?

Last edited by qutadah.r; November 9, 2021 at 08:45. Reason: OF version
qutadah.r is offline   Reply With Quote

Old   November 9, 2021, 08:42
Default
  #20
Member
 
qutadah
Join Date: Jun 2021
Location: Germany
Posts: 50
Rep Power: 2
qutadah.r is on a distinguished road
keep in mind i did adjust the set names to region0, region1, region2, because it gave me an error that INT_BLADE_1, ... is not found in sets ..... I believe the sets should be also defined...
qutadah.r is offline   Reply With Quote

Reply

Tags
cyclicami, preservepatches

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CyclicAMI BC preservePatches Parallel Run - again!?! hxaxtma OpenFOAM Pre-Processing 4 August 31, 2015 18:47
The preservePatches Option in decomposePar Hisham OpenFOAM Pre-Processing 4 November 19, 2012 18:45
Cyclic patches and parallel postprocessing problems askjak OpenFOAM Bugs 18 October 27, 2010 04:35


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