|
[Sponsors] |
September 24, 2010, 05:09 |
DecomposePar and CellZones
|
#1 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Hey Foamers,
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 |
|
September 24, 2010, 13:20 |
|
#2 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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.
|
|
September 27, 2010, 04:17 |
|
#3 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Hey Travis,
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..... |
|
September 29, 2010, 05:30 |
|
#4 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
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 forAll(zoneCells, zcI) { label cellI = zoneCells[zcI]; average+=alpha[cellI]; i=i+1;} (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. |
|
October 13, 2010, 10:18 |
|
#5 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Hey
I found an answer for my problem myself. If I add the expression reduce(average,sumOp<scalar>()); everything works fine because due to this expression I get the total value. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DecomposePar and sets | jhierroa | OpenFOAM Pre-Processing | 7 | January 25, 2008 10:48 |
DecomposePar and mergePatchPairs | hannes | OpenFOAM Bugs | 4 | June 26, 2007 13:01 |