CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Order of faces of a cell (https://www.cfd-online.com/Forums/openfoam-programming-development/194297-order-faces-cell.html)

ullal October 12, 2017 19:35

Order of faces of a cell
 
Dear Foamers

Currently i can access the faces of a cell with mesh.cells()[cellnumber]. This would output the cell along with the faces. But i required to know the order of the faces.

For example mesh.cells()[0] gives 6(0 1 6 10 12 16). Can i somehow recognize which is the front, back, left, right, top, bottom face from this.

Thanks in advance

Best
Ankith

Marpole October 13, 2017 01:07

Hello Ankith,

There is no order for the faces. For a mesh cell, front, back, left... don't have meaning. Further, for a cell, it could be polyhedron, where it can have more than 6 faces. There is no way to use front, back...for the cell.

Cell face has function to compute face norm vector, which you may use if direction is important.

ullal October 13, 2017 14:17

Thanks Charles for the information.
As i am working on a mesh convertor from OpenFoam to KIVA 4 I required this information.


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