CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to identify boundary cell and internal cell (https://www.cfd-online.com/Forums/openfoam-solving/58612-how-identify-boundary-cell-internal-cell.html)

dbxmcf August 25, 2008 20:30

Hi, I have a cubic mesh whi
 
Hi,

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))
cellWeigh[mI]=0;
else
cellWeigh[mI]=1;
}

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.

tiancaidushen November 6, 2016 09:11

Quote:

Originally Posted by deepsterblue (Post 179362)
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.

Hello Menon,

Since this post has passed so long time, I am not sure are you still available to answer my question.

I want to identify cells belonging to a solid zone adjacent to boundary faces. Could you please show me how can I do this?

Best wishes,

Shen


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