Patchdata in Parallel
I am currently working on the integration of an Acoustic Analogy into
OpenFoam. The key idea here is to do the analysis at runtime, such that
the pressure-data required to do so does not have to be stored during the computation. This helps to reduce disk-space which is a critical issue at my company. Given my very limited experience with OpenFoam programming I would have a few basic questions about the way OpenFoam handles parallel processing.
The routine essentially works as follows: An object containing the actual
acoustic analysis algorithm is created for every relevant patch of the geometry and for every observer position. All of the aforementioned are read from a dedicated dict-file before entering the time-loop. In serial mode the routine works perfectly fine and the results correspond well to references, when applying it to standard benchmark cases.
Now, in parallel I have run into the following problem: When accessing the field "acousticPressure" on a given patch "PATCH_XYZ" as follows:
const fvPatchField& = acousticPressure[mesh.boundaryMesh().findPatchID("PATCH_XYZ")]
and handing this fvPatchField over to my Acoustic-Analogy-object, the latter only receives parts of the field or even nothing at all, depending on the decomposition. This is obviously due to the fact that the solver only uses one of the processor meshes and those parts of the respective patch defined on it. I allways thought (without double-checking...) that the fvMesh-, GeometricField- and fvPatchField-objects somehow implicitly handled the decomposition automatically. Thus, I would have the following questions:
1) How do I explicitly access the different processor meshes manually?
2) How do I access the sub-patches of a given patch on these meshes individually?
3) How do I access my relevant field on these sub-patches?
I have had a look at some of the tools/solvers of OpenFoam (Version 1.5-dev) and tons of threads on this forum, but I can't seem to find a reasonable solution. Thanks in advance for your help,
PS: This is my first thread, so if it does not comply with the good-practice standards on this forum please let me know.
|All times are GMT -4. The time now is 02:47.|