|
[Sponsors] |
June 14, 2010, 13:51 |
parallel issue: global face zone/patch ...
|
#1 |
Member
matteo lombardi
Join Date: Apr 2009
Posts: 67
Rep Power: 17 |
Hello,
My problem is the following: Let's say I am simulating the flow around a cylynder and I need to be able to get the normal gradient of the velocity on the cylinder. In serial it is very easy, i just have to do: vectorField UgradN=U.boundaryField()[CylPatch].snGrad(); where cylPatch is the index corresponding my "Cylinder" patch. I would like to do the same in parallel: If i do the same call and run the code in parallel I will end up with different vectorField per processor because the CylPath will have been split among the different partition, and every partition will see only its part of the Cylinder. What should I do? How can I be able to obtain the WHOLE UgradN field in a parallel decomposed cases? I think (but it is here that I need some help since I am really very unsure about what I am saying) that the solution may be to define a global faceZone set that is the same as my cylinder patch but in this way i can force the code to keep a reference of all cylinder faces on every subpartition. Is this correct? If yes, how can i compute the "U.boundaryField()[CylPatch].snGrad()" ? Also if I do the Zone trick, I am not sure this keep enough information on every partition to be able to evaluate the normal gradient (it would need also some cell values and those are not available on every partition..). I could do some trick like evaluating the gradient on every partition and then use gMax/gMin/gAverage to get a "complete" one... but I am not sure if it is feasible and anyway very likely it is not the best way to go.. Any idea? Thanks for your help, Matteo |
|
June 16, 2010, 07:13 |
|
#2 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 18 |
Hi Matteo,
if you only need some integral values over the patch the most elegant way is using gMax/gMin/gAverage/gSum. Regards, Stefan |
|
June 16, 2010, 07:22 |
|
#3 |
Member
matteo lombardi
Join Date: Apr 2009
Posts: 67
Rep Power: 17 |
Hello Stefan,
thanks for the help. Unfortunately I don't need integral values but punctual values of some quatity (i.e. th normal gradient of U) on all patch faces. My idea is that every partition evaluate its share, and then I make them share "somehow" their information.. But how do i share them? Is there control of MPI comamnds in OF? If not, the first trick that comes to my mind is initialze a vector to zero with lenght the total number of patch faces, let every partition fill its part locally (i need some sort of conenctivity information between local face index and globalfaceZone index) and then "reduce(max)" every compoment of the vector so to get the whole vector... I know that this is completely unefficient, but at the moment this is the only solution that comes to my mind.. Any other idea? Thanks, Matteo |
|
Tags |
facezone, parallelization, patch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 06:50 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |