CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

parallel issue: global face zone/patch ...

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2010, 12:51
Default parallel issue: global face zone/patch ...
matteo lombardi
Join Date: Apr 2009
Posts: 67
Rep Power: 16
matteoL is on a distinguished road
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,
matteoL is offline   Reply With Quote

Old   June 16, 2010, 06:13
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 16
herbert is on a distinguished road
Hi Matteo,

if you only need some integral values over the patch the most elegant way is using gMax/gMin/gAverage/gSum.

herbert is offline   Reply With Quote

Old   June 16, 2010, 06:22
matteo lombardi
Join Date: Apr 2009
Posts: 67
Rep Power: 16
matteoL is on a distinguished road
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?
matteoL is offline   Reply With Quote


facezone, parallelization, patch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07

All times are GMT -4. The time now is 12:25.