CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Boundary condition in parallel

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 11, 2008, 08:20
Default I want to make the mixing plan
  #1
New Member
 
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 8
ffbof is on a distinguished road
I want to make the mixing plane approach presented at the Workshop in Milano
to run in parallel. Therefore i need to access the global patch and the global patchfield.
Otherwise the building of the circumferential average would lead to wrong results.

My Approach to get those values would be the following :

List<type> globalFields(Pstream::nProcs()); // nProcs is number of processors

for(
int slave = 0;
slave <= Pstream::lastSlave();
slave++
)
{

IPstream fromProc(slave);

fromProc >> globalFields[slave];

}

Type is the type of the patchField for example vectorField
or scalarField.

But now i have the complete field but is the adressing of the field conserved during
decomposition or must the adressing of the field also reconstructed in a way ?

So to get the faceList corresponding to my mixing plane patch
can i write the following ?


List<facelist> globalFields(Pstream::nProcs()); // nProcs is number of processors

for(
int slave = 0;
slave <= Pstream::lastSlave();
slave++
)
{

IPstream fromProc(slave);

fromProc >> globalFields[slave];

}

and do the reconstruction of my patch by accessing the faces in every processor.

But where do i get the adressing of the faces belonging to the right patch, because this would only deliver me the faces of the whole computational domain.

Best Regards
Franz
ffbof is offline   Reply With Quote

Old   September 12, 2008, 10:52
Default Maybe i asked the wrong questi
  #2
New Member
 
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 8
ffbof is on a distinguished road
Maybe i asked the wrong question.

I try to explain again my problem.

When the mesh is decomposed the patches are also decomposed, but i need to access all the faces of a patch. How can i access those faces within a fvPatchField. And also how can i access all the cell values near my fvPatchField in case of a decomposed field.

Would be great if somebody could answer even if my question was wrong formulated.
ffbof is offline   Reply With Quote

Old   September 13, 2008, 00:47
Default The faces of a patch are alway
  #3
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
The faces of a patch are always local to the processor. Ask yourself what you need from those faces? Do you need to e.g. average over their area? In that case do your sums per processor, reduce and do the division.

If you really want to reconstruct a whole patch on one processor (i.e. undo the decomposition) this is not trivial and does not scale and might not fit onto your processor.
mattijs is offline   Reply With Quote

Old   September 13, 2008, 08:56
Default Hi Mattijs thank you very m
  #4
New Member
 
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 8
ffbof is on a distinguished road
Hi Mattijs

thank you very much for the reply.
I know it is a difficult thing. I dont want to reconstruct the patch but what i must have is a list to all the faces of the my patch which is maybe split up into pieces. After i have that i will build a virtual patch on which i perform all the averaging. After that i interpolate from the whole patch onto the decomposed patches. To impress the averaged field values as a boundary condition there.

So the only two things i need are access to the faces belonging to the original patch and also the points of that original patch and also the field values of the original(global reconstructed field).

So the "reconstructed patch" will only reside as a help instance to perform the correct averaging over the whole patch.

Another way would be to decompose the mesh in a way that the mixing plane patch is not affected.

So if you have a hint where to watch for such a interprocessor communication i would welcome that very much.
ffbof is offline   Reply With Quote

Old   September 14, 2008, 04:27
Default I added some addressing info a
  #5
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
I added some addressing info about decomposed meshes to

http://openfoamwiki.net/index.php/Write_OpenFOAM_meshes

- or have a look at the manual decomposition option which reads a file with the wanted decomposition and do the decomposition yourself.
mattijs is offline   Reply With Quote

Old   September 9, 2009, 05:53
Default
  #6
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
hi Mattijs,

I am a new user of OpenFoam and I want to make a manual data file for decomposition for parallel computing. However, I can not find any information about the format of this file. Can you please post a sample file to this forum?

Thank you

Duong
duongquaphim is online now   Reply With Quote

Old   September 10, 2009, 15:51
Default
  #7
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
run decomposePar with -cellDist option. It will write a 'constant/polyMesh/cellDecomposition' file which is consistent with the manualDecomp option.

You will need the absolute latest 1.6.x.
mattijs is offline   Reply With Quote

Old   June 14, 2010, 13:26
Default U.boundaryField()[CylPatch].snGrad() over a whole patch in parallel
  #8
Member
 
matteo lombardi
Join Date: Apr 2009
Posts: 61
Rep Power: 8
matteoL is on a distinguished road
Hello,
I have recently created a new thread "http://www.cfd-online.com/Forums/openfoam-solving/77133-parallel-issue-global-face-zone-patch.html" and the found out this thread which seems related to what i need..

In brief, I need to get a vector containg the normal gradient of U over a patch. In serial it is very easy, i just need to do "vectorField UgradN=U.boundaryField()[CylPatch].snGrad();" but in parallel obviously the trick doesn't work anymore sicne the patch i need as been decomposed as well..

How do i do it then?
Do i have to pass by a global faceZone?

One possibility i think would be to create a VectorField (with size the whole Serial Patch) on every partition (and i presume i should get a zero if the face is not part of the the decomposed patch, the correct value if it is) and then somehow reconstruct all values (doing something like a check over evry face, and taking the values different from zero...) .... etc etc..

Is this feasible? is this the way to go?

Thanks,
matteo
matteoL is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Own boundary condition modified simpleFoam erorr in parallel execution sponiar OpenFOAM Running, Solving & CFD 1 August 27, 2008 09:16
Domain and boundary axis are not parallel romed CFX 0 August 20, 2007 15:24
periodic condition at parallel solver Amer Mahmood FLUENT 2 October 18, 2006 16:14
Boundary condition of the third kind or Danckwertz boundary condition plage OpenFOAM Running, Solving & CFD 4 October 3, 2006 12:21
Slip Boundary Condition for Moving Boundary Shukla Main CFD Forum 3 November 11, 2005 16:02


All times are GMT -4. The time now is 05:09.