CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Question about globalindex

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mykkujinu2201

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2021, 06:49
Default Question about globalindex
  #1
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
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
mykkujinu2201 is offline   Reply With Quote

Old   July 8, 2021, 04:35
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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.
simrego is offline   Reply With Quote

Old   July 8, 2021, 21:31
Default
  #3
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
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
mykkujinu2201 is offline   Reply With Quote

Old   July 9, 2021, 12:25
Default It is solved
  #4
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
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

        }
    }
}
Best,
Jun
applekiller likes this.
mykkujinu2201 is offline   Reply With Quote

Reply

Tags
globalmeshdata


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
Question about symmetry in Autodesk Cfd 2016 ecto Autodesk Simulation CFD 0 October 20, 2015 04:16
small question about the functionalities of topological changes in OpenFoam ngj OpenFOAM Running, Solving & CFD 2 February 28, 2013 10:02
Question Re Engineering Data Source imnull ANSYS 0 March 5, 2012 13:51
internal field question - PitzDaily Case atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 15:26
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 04:37


All times are GMT -4. The time now is 07:47.