SelectCells

From OpenFOAMWiki

1 Name

selectCells - Select cells in relation to surface.

Valid versions: OF Version 21.png

2 Synopsis

selectCells [OPTIONS]

3 Description

Select cells in relation to surface. The parameters are read from a dictionary system/selectCellsDict. The example shipped with the source code (in $FOAM_UTILITIES/mesh/advanced/selectCells/selectCellsDict) is reproduced below.

Divides cells into three sets:

  • cutCells: cells cut by surface or close to surface.
  • outside: cells not in cutCells and reachable from set of user-defined points (outsidePoints)
  • inside: same but not reachable.

Finally the wanted sets are combined into a cellSet 'selected'. Apart from straightforward adding the contents there are a few extra rules to make sure that the surface of the 'outside' of the mesh is singly connected.


-case DIR

Execute the command on the case directory DIR. If not provided, use the current directory

-noFunctionObjects

Skip the execution of the functionObjects

-help

Display the help and exit

4 selectCellsDict description

FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      selectCellsDict;
}

// Whether to use surface. If false no surface will be read and only
// outsidePoints/selectOutside will be used to determine cells to keep.
useSurface      false;

// Surface to keep to
surface         "plexi.obj";

// What is outside
outsidePoints   ((-1 -1 -1));

//
// Selection of final set 
//

// Select based on side of surface. Usually select inside cells and project
// outwards or select outside cells and project inwards.
selectCut       false;
selectInside    false;
selectOutside   true;
// Leave out cell closer than nearDistance to the surface. Usually
// 0.5*of the cell size. Set to <0 to disable.
nearDistance    -1;