|
[Sponsors] |
July 7, 2021, 07:49 |
Question about globalindex
|
#1 |
Member
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 11 |
Dear Forum,
I am trying to calculate the distance between owner and neighbor cells and store them at the faces. For parallel computation, it is impossible to do that calculation at processor boundaries because each domain does not have information about neighbor cells at processor boundaries. To deal with this issue, I searched and found that globalMeshData might be the solution. https://www.openfoam.com/documentati...lMeshData.html However, it is difficult to find any reference or tutorial to use globalindex. If you have any advice or reference or tutorial for globalMeshData in this problem, please help me. Thank you so much in advance. Best, Jun |
|
July 8, 2021, 05:35 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
You already have this value. delta() will return this field from the mesh for you. Actually it'll return the vector pointing from cell centre to cell centre. So you get even more info than a simple distance. And the processor patch will handle that issue for you. EDIT: And they have information about the neighbour region. But this information can be asked from the processorFvPatch which can collect this info from its neighbour. |
|
July 8, 2021, 22:31 |
|
#3 |
Member
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 11 |
Thank you so much for the advice.
However, actually I need global index for further works. I need this for two phase simulation. To reduce spurious velocity, I will use hybrid of interface capturing method and interface tracking method. The interface will be reconstructed using faces where gradient of marker is high enough. To make a long story short, I need to construct interface element from the faces I found above. After that, surface tension will be calculated at the interface element and it should interpolated back to cells nearby it. For processor boundaries, I really need to access to the nearby cell. I do not know whether there is other way or not. However, as far as I know, global index seems the key though I do not know how to handle it. Best, Jun |
|
July 9, 2021, 13:25 |
It is solved
|
#4 |
Member
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 11 |
Dear all,
I solved it as below. Code:
forAll(mesh.boundary(),patchi) { // processor faces if (isType<processorFvPatch>(mesh.boundary()[patchi])) { const processorPolyPatch& pp = refCast<const processorPolyPatch>(mesh.boundaryMesh()[patchi] ); forAll(mesh.boundary()[patchi],pFacei) { dist=mag(mesh.C()[mesh.boundaryMesh()[patchi].faceCells()[pFacei]]-pp.neighbFaceCellCentres()[pFacei]) // distance between nearby cells at processor boundaries } } } Jun |
|
Tags |
globalmeshdata |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about symmetry in Autodesk Cfd 2016 | ecto | Autodesk Simulation CFD | 0 | October 20, 2015 05:16 |
small question about the functionalities of topological changes in OpenFoam | ngj | OpenFOAM Running, Solving & CFD | 2 | February 28, 2013 11:02 |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 14:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 05:37 |