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

[blockMesh] About owner and neighbour files created from blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By ce73stargazer
  • 1 Post By ce73stargazer
  • 1 Post By Nik P.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2016, 21:55
Default About owner and neighbour files created from blockMesh
  #1
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 10
ce73stargazer is on a distinguished road
Hi there

Just for my own study purpose I created a simple mesh with 2 cell in the x direction and 3 layers in y direction. (shown in the scratch).

The numbers written in the scratch show the face number in the face file, however when i checked the owner and neighbour file,I dont understand whats the number in the main body stayed for, anyone have some suggestion?

The owner file shows
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4.1 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
instance "constant";
local "polyMesh";
object owner;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


29
(
0
2
4
0
2
1
3
0
1
2
3
4
5
0
1
2
3
4
5
0
2
4
1
3
5
0
1
4
5
)


// ************************************************** *********************** //
and the neighbour shows

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4.1 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
instance "constant";
local "polyMesh";
object neighbour;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


29
(
1 //0
3 //1
5 //2
2 //3
4 //4
3 //5
5 //6
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
)


// ************************************************** *********************** //

Attached Files
File Type: pdf 4103_001.pdf (38.9 KB, 28 views)
ce73stargazer is offline   Reply With Quote

Old   May 31, 2016, 20:50
Default
  #2
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 10
ce73stargazer is on a distinguished road
For those who still interested in the answer.

I kind figured it out myself. So basically, the owner file, it's the cell ID file for those faces belongs to which cell.

For example the first face (face 0) in the face file (first value) belongs to cell 0 (first value in the owner file), the second face (face 1) belongs to cell 2 and so on.

Similarly for the neighbours are for these cells with a shared faced.
BSengupta and kaizer like this.
ce73stargazer is offline   Reply With Quote

Old   July 23, 2016, 15:14
Default How are does openfoam decide which cell is owner and which one is neighbor
  #3
Member
 
Pavan
Join Date: Jan 2016
Posts: 53
Rep Power: 10
pvpnrao is on a distinguished road
Hi

Do you know how OpenFOAM decides which cell is owner and which one is neighbor.

Or the logic with which the indices are decided?
pvpnrao is offline   Reply With Quote

Old   July 24, 2016, 20:17
Default
  #4
Member
 
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 10
ce73stargazer is on a distinguished road
Quote:
Originally Posted by pvpnrao View Post
Hi

Do you know how OpenFOAM decides which cell is owner and which one is neighbor.

Or the logic with which the indices are decided?
Hi there, if i am not mistaken, I believe that a face is belonging to the cell at the negative direction and neighbour for the cell at positive direction.
For example the case i have there, for face 0, is belong to cell 0 (top left cell)( negative x diretcion)and neighbour to cell 1 (top right cell) (positive x direction).
You can build a simple 2X2X2 cube to check, which should be right
koh likes this.
ce73stargazer is offline   Reply With Quote

Old   August 5, 2022, 09:19
Default
  #5
New Member
 
Join Date: Jun 2022
Posts: 1
Rep Power: 0
Nik P. is on a distinguished road
Hi,
OpenFOAM notation in polyMesh folder is obviously not meant to be human-readable I am dealing with the same subject. Although the thread is quite old, I add a few remarks:
Thank you for the explanation in second post, @ce73stargazer!

Quote:
Hi there, if i am not mistaken, I believe that a face is belonging to the cell at the negative direction and neighbour for the cell at positive direction.
For example the case i have there, for face 0, is belong to cell 0 (top left cell)( negative x diretcion)and neighbour to cell 1 (top right cell) (positive x direction).
You can build a simple 2X2X2 cube to check, which should be right
I did not check, but I think this cannot hold for arbitrary meshes, e.g. using tetrahedron. The sign of the direction is not unique if the face is not parallel to a coordinate plane. So the definition in code surely is more complicated than that.


This is probably a bit off-topic, but I was very glad to find the following utility which might also help to understanding polyMesh-information: https://www.openfoam.com/documentati...llCentres.html
koh likes this.
Nik P. is offline   Reply With Quote

Old   June 23, 2023, 16:23
Default
  #6
New Member
 
LyLy
Join Date: Jan 2019
Posts: 14
Rep Power: 7
harshabose is on a distinguished road
Yes. You are right . A face is shared by two cells and if the face vector is pointing away from, let say Cell A, then Cell A is the owner and the other is neighbour.
In more technical words, the cell which gets positive flux is neighbour and the one giving is the owner. I found a great image depicting this:
https://imgur.com/jb8sOs4

In few case, this might not hold true. Such as in boundary or "non-internal" faces, the owner cell is the cell which the face shares and the neighbour is just kept as "-1" (optional to include in the neighbour file). In boundary conditions such as periodic or symmetry, the neighbour cells are the appropriate ghosts cells.
harshabose is offline   Reply With Quote

Reply


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
Deleting files in /constant/polyMesh to reset and store OpenFOAM case sdfij6354 OpenFOAM Running, Solving & CFD 0 December 21, 2017 07:37
access the information of the neighbour cell across a processor boundary? sophie_l OpenFOAM Programming & Development 4 August 9, 2016 14:05
Access (parallel) face number, owner and neighbour of a face? saloo OpenFOAM Programming & Development 0 September 4, 2014 10:10
owner - neighbour relations for processor boundaries RoE OpenFOAM 2 October 4, 2011 08:49
Face orientation in blockMesh WiWo OpenFOAM 0 March 18, 2010 11:10


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