CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   Manually divide sub-domain for parallel computing (https://www.cfd-online.com/Forums/openfoam-meshing/68111-manually-divide-sub-domain-parallel-computing.html)

duongquaphim September 7, 2009 12:00

Manually divide sub-domain for parallel computing
 
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

Ralph M November 18, 2012 12:10

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

vbchris November 19, 2012 15:50

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 ( );

Ralph M November 20, 2012 02:52

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

vbchris November 20, 2012 17:47

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.

Ralph M November 21, 2012 03:00

For 4 million cells and often a lot of calculations it would be another story though ;)

Regards,

Ralph

cuba November 26, 2012 12:00

Quote:

Originally Posted by vbchris (Post 393046)
(
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

Ralph M November 26, 2012 13:33

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!

kalle November 28, 2012 02:38

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!

Ralph M November 28, 2012 03:08

I figured this already out ;) But anyway (on behalf of future readers); thanks for the hint!

Bernhard November 29, 2012 03:11

Quote:

Originally Posted by kalle (Post 394552)
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?

Metikurke February 11, 2018 09:20

Ggi runs well in serial, but having problems with parallel run.
 
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 (Post 394557)
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.


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