CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Manually divide sub-domain for parallel computing

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 3 Post By vbchris
  • 4 Post By Bernhard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2009, 13:00
Default Manually divide sub-domain for parallel computing
  #1
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 93
Rep Power: 17
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
Hi all,

I am working with parallel computing in OpenFoam and I would like to divide my computational domain into two sub-domains at an exact position.

How can I manually set up the parameters to define a position of an interface between two sub-domains instead of just using simple method that OpenFoam supported? I would not like to manually define every cell of my domain with manual method since it is impossible.

Thank you.

Duong
duongquaphim is offline   Reply With Quote

Old   November 18, 2012, 12:10
Default
  #2
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Hello Duong,

It's some time ago since you posted this; did you manage to find a solution?

I would be interested in your findings!

Regards,

Ralph
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   November 19, 2012, 15:50
Default
  #3
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 14
vbchris is on a distinguished road
You need to use a decomposeDict file in /constant.

It looks like this

FoamFile
{
version 2.0;
format ascii;
class labelList;
location "constant";
object decompDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

(
0
0
... // These are the mesh cells in order as defined in blocks in blockMeshDict, so for a 2D block with 10x10 cells this would have 100 entries
1
);


Then modify your decomposeDict to refernce your decomposeDict File

Like this:


numberOfSubdomains 8;

method manual;

simpleCoeffs
{
n ( 4 1 1);
delta 0.00000001;
}

hierarchicalCoeffs
{
n ( 2 2 1 );
delta 0.001;
order xyz;
}

scotchCoeffs
{
processorWeights
( 1 1 1 1 1 1 );
}

manualCoeffs
{
dataFile "decompDict"; // Here is where your point to decompDict
}

distributed no;

roots ( );
vbchris is offline   Reply With Quote

Old   November 20, 2012, 02:52
Default
  #4
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Dear Chris,

Thanks for clearing this up. Is there a way to automatically generate the file which is located in constant? I found a way to generate this file based on one of the other decomposition methods (decomposePar -cellDist) but I'm looking for a way to define the cells in another way.

Cheers,

Ralph
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   November 20, 2012, 17:47
Default
  #5
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 14
vbchris is on a distinguished road
I made the file manually. For 70 000 cells took about 5 minutes in a spread sheet.
But the split wasn't that complicated. You can check the decompose in paraview after by /processor0/paraFoam.
vbchris is offline   Reply With Quote

Old   November 21, 2012, 03:00
Default
  #6
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
For 4 million cells and often a lot of calculations it would be another story though

Regards,

Ralph
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   November 26, 2012, 12:00
Default
  #7
New Member
 
Join Date: Oct 2012
Posts: 17
Rep Power: 14
cuba is on a distinguished road
Quote:
Originally Posted by vbchris View Post
(
0
0
... // These are the mesh cells in order as defined in blocks in blockMeshDict, so for a 2D block with 10x10 cells this would have 100 entries
1
);

are 0 and 1 processor numbers?

the row-wise order of 0's btw the brackets specifies the cell ID ?

Thanks
cuba is offline   Reply With Quote

Old   November 26, 2012, 13:33
Default
  #8
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Yes, the numbers define the processor which is used... they are ranked on cell number in one row.

Try
Quote:
decomposePar -cellDist
for an arbitrary case and you'll see the output in a file in the "constant"-folder.

Cheers!
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   November 28, 2012, 02:38
Default
  #9
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
I guess it cannot be impossible to write a simple OF-tool that reads in cellSets or cellZones and based on those creates the decomposeDict. Then, you could control domain decomposition using the setSet utility!
kalle is offline   Reply With Quote

Old   November 28, 2012, 03:08
Default
  #10
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
I figured this already out But anyway (on behalf of future readers); thanks for the hint!
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   November 29, 2012, 03:11
Default
  #11
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Quote:
Originally Posted by kalle View Post
I guess it cannot be impossible to write a simple OF-tool that reads in cellSets or cellZones and based on those creates the decomposeDict. Then, you could control domain decomposition using the setSet utility!
Maybe you can use setFields to define the values in the blocks, and then change the header files a bit?
me.ouda, Ralph M, A_Pete and 1 others like this.
Bernhard is offline   Reply With Quote

Old   February 11, 2018, 09:20
Default Ggi runs well in serial, but having problems with parallel run.
  #12
New Member
 
Metikurke
Join Date: May 2017
Posts: 21
Rep Power: 9
Metikurke is on a distinguished road
Hi Mr. Ralph,

I am trying to run dynamic-simulation of wind turbine using foam-extend ggi option. I have a mesh size of about 12 millions, and I have successfully run the case in serial for about 0.005 seconds(it took about half a day). But tried to run the case in cluster with 24 processors and I got several errors.

I found out from this forum that the case has to be solved by manual decomposition method and the above hints are really useful.

Quote:
Originally Posted by Ralph M View Post
I figured this already out But anyway (on behalf of future readers); thanks for the hint!
Since you have solved your problem, it would be nice if you can elaborate a little bit about the procedure to be followed. Looking forward for your reply.

Thank you.
Metikurke is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Periodic Pressure drop cfd_begin CFX 10 May 25, 2017 08:09
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
How to get BC for Psi in the computing domain? Pierre Forges Main CFD Forum 1 July 26, 2000 21:10
BC for the stream function in the computing domain Pierre Forges Main CFD Forum 1 July 26, 2000 15:47


All times are GMT -4. The time now is 06:30.