CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Find face cells (https://www.cfd-online.com/Forums/openfoam/86748-find-face-cells.html)

Rafael March 31, 2011 20:22

Find face cells
 
Hi all,

Sorry my bad english :o

How can i find the cells that are after and before a face in an uniform mesh of blocks?
For a given face with index "faceI" what is the index of the cells in the face normal direction?

Thank's

kalle April 1, 2011 01:53

Hi,

have a look at, for instance,

$FOAM_SRC/meshTools/sets/cellSources/faceToCell/faceToCell.C

There you can see how to find a face's owner and neighbour (have a look in the user manual on how meshes are constructed):

label cellI = mesh_.faceOwner()[faceI];

and

label cellI = mesh_.faceNeighbour()[faceI];

Regards,
K

Rafael April 1, 2011 15:06

Thank you very much kalle!
:D


All times are GMT -4. The time now is 03:11.