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

Manually divide sub-domain for parallel computing

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

Like Tree4Likes
  • 1 Post By vbchris
  • 3 Post By Bernhard

Reply
 
LinkBack Thread Tools Display Modes
Old   September 7, 2009, 12:00
Default Manually divide sub-domain for parallel computing
  #1
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
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: 6
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: 36
Rep Power: 4
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 ( );
luiscardona likes this.
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: 6
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: 36
Rep Power: 4
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: 6
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: 4
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: 6
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: 255
Rep Power: 12
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: 6
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: 12
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?
Ralph M, A_Pete and abtinansari like this.
Bernhard is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22
rotating domain in rotating domain, different axis Robert Stringer CFX 3 December 4, 2006 08:04
how to divide domain? manish Phoenics 0 May 10, 2006 02:25
How to get BC for Psi in the computing domain? Pierre Forges Main CFD Forum 1 July 26, 2000 20:10
BC for the stream function in the computing domain Pierre Forges Main CFD Forum 1 July 26, 2000 14:47


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