DecomposePar and CellZones
I have a little problem with running a test case in parallel in OpenFOAM and I hope you can help me.
I am using OpenFOAM 1.7.0 and would like to decompose a case and running it on the cluster with several processors.
So far I run several cases which worked fine.
But now I have defined specific cellZones in my constant/polyMesh folder.
When decomposing the case I noticed that the cellZones were not maintained in the constant/polyMesh/cellZones- File of the n processors.
The cellZones are important for the computation of a specific value which has to be treated different on each cellZone.
I ran the case and recontructed it in the hope that everything will be right in the end, but when I compared it to the results of a non-parallel computation I obtained different results.
It would be great if someone could tell me whether/how it is possible to decompose a case by maintaining cellZones.
If I find no answer I have to compute my case non-parallel which would take much more time.
Looking forward to your answers!
Maybe a little more details:
1.) I used decomposePar and I tried simple, metis and scotch with standard settings in decomposeParDict.
2.) When comparing constant/polyMesh/cellZones in my case-file it was different to processorN/constant/polyMesh/cellZones and also the printStatements showed such a "wrong" specification of the cellZones
3.) I ran resontructPar and compared it to the results of a non-parallel case which showed differences where no differences should be.
Thank you very much in advance :D
So you specified your cellSet and created your cellZones, did you happen to specify the boundaries of your cellSets as faceSets then convert them to faceZones? In my work, it's the faceZones that are preserved during the decomposition.
thank you for answering.
I did not specify any boundaries neither did I convert to faceZones.
The cellZones are defined in constant/polymesh/cellZones by giving them a name and a list of cellIDs.
I tried to copy the settings from an example which I was given by a colleague.
The computations worked when computing non-parallel as far as I could notice.
Did I oversee something when defining the cellZones?
Thank you a lot.....
Now I understand a bit more what is going wrong in my code.
First of all I learned that differences in solutions of parallel and serial computations are "normal" as long as the computation has not yet converged.
Secondly I still have a problem with a routine that I wrote
label cellI = zoneCells[zcI];
(Later everything is divided by i)
This method should compute the average value of each cellZones which I defined in my constant/polyMesh/cellZones file.
In serial computation everything works fine, so there should be no grave error in the code.
But when running parallel the cellZones are decomposed on the n processors which has the consequence that each processor computes its "own" average value for the part of the cellZoneX he obtained. So for cellZoneX I have n different average value (if it is splitted over n processors)
To solve this problem I would have to need a statement in the code which interchanges informations between the processors so that for each iteration the right average value is computed.
Does somebody know how to do this?
I would be graceful for each hint which helps me to solve my problem.
I found an answer for my problem myself.
If I add the expression
everything works fine because due to this expression I get the total value.
|All times are GMT -4. The time now is 03:23.|