|
[Sponsors] |
September 11, 2008, 09:20 |
I want to make the mixing plan
|
#1 |
New Member
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
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 |
|
September 12, 2008, 11:52 |
Maybe i asked the wrong questi
|
#2 |
New Member
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
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. |
|
September 13, 2008, 01:47 |
The faces of a patch are alway
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
September 13, 2008, 09:56 |
Hi Mattijs
thank you very m
|
#4 |
New Member
Franz
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
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. |
|
September 14, 2008, 05:27 |
I added some addressing info a
|
#5 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
September 9, 2009, 06:53 |
|
#6 |
Member
|
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 |
|
September 10, 2009, 16:51 |
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
June 14, 2010, 14:26 |
U.boundaryField()[CylPatch].snGrad() over a whole patch in parallel
|
#8 |
Member
matteo lombardi
Join Date: Apr 2009
Posts: 67
Rep Power: 17 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
periodic condition at parallel solver | Amer Mahmood | FLUENT | 3 | October 28, 2019 09:34 |
Domain and boundary axis are not parallel | romed | CFX | 1 | September 24, 2016 11:42 |
Own boundary condition modified simpleFoam erorr in parallel execution | sponiar | OpenFOAM Running, Solving & CFD | 1 | August 27, 2008 10:16 |
Boundary condition of the third kind or Danckwertz boundary condition | plage | OpenFOAM Running, Solving & CFD | 4 | October 3, 2006 13:21 |
Slip Boundary Condition for Moving Boundary | Shukla | Main CFD Forum | 3 | November 11, 2005 16:02 |