CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to identify boundary cell and internal cell (

dbxmcf August 25, 2008 20:30

Hi, I have a cubic mesh whi

I have a cubic mesh which needs a special weigh treatment of boundary cell and internal cell. My intention is like this:

forAll(cellWeigh, mI)
if (cellIsBoundary(mI))

Is there any way to identify whether the cell is a boundary cell or internal cell? Is it a simple function or should I do some field calculation?

Thanks a lot!

deepsterblue August 25, 2008 21:59

I'm assuming that by "boundary
I'm assuming that by "boundary cells", you want to identify cells adjacent to boundary faces. If so, then it's not too difficult to obtain - loop through boundaryMesh (boundary patches), and obtain the owner cell from the allOwner list. All other cells are internal.

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