CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to identify boundary cell and internal cell (http://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.


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