TopoSet

From OpenFOAMWiki

1 Name

topoSet - Operates on cellSets/faceSets/pointSets through a dictionary.

Valid versions: OF Version 21.png

2 Synopsis

topoSet [OPTIONS]

3 Description

Operates on cellSets/faceSets/pointSets through a dictionary (by default system/topoSetDict). The results are stored in constant/polyMesh/sets

-dict FILE

Specify an alternative dictionary for the topoSet dictionary

-noSync

Do not synchronise selection across coupled patches

-noZero

Exclude the 0 directory from the times list

-time RANGES

Select time steps. RANGES follows the time selection rules

-latestTime

Apply only on the latest time available

-constant

Include the constant directory in the times list

-parallel

Run the utility in parallel

-roots "(DIR1 [...DIRN])"

Directories through which the data are distributed

-region NAME

Specify a mesh region by its NAME

-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

This utility is used in the following tutorials:

  • combustion/fireFoam/les/oppositeBurningPanels
  • combustion/fireFoam/les/smallPoolFire2D
  • combustion/fireFoam/les/smallPoolFire3D
  • combustion/PDRFoam/flamePropagationWithObstacles
  • heatTransfer/buoyantSimpleFoam/circuitBoardCooling
  • heatTransfer/chtMultiRegionFoam/multiRegionHeater
  • heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater
  • heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater
  • heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation
  • incompressible/pimpleFoam/elipsekkLOmega
  • incompressible/pimpleFoam/TJunctionFan
  • incompressible/pimpleDyMFoam/mixerVesselAMI2D
  • incompressible/pimpleDyMFoam/propeller
  • incompressible/potentialFreeSurfaceFoam/oscillatingBox
  • incompressible/simpleFoam/turbineSiting
  • incompressible/simpleFoam/pipeCyclic
  • lagrangian/coalChemistryFoam/simplifiedSiwek
  • lagrangian/porousExplicitSourceReactingParcelFoam/filter
  • lagrangian/reactingParcelFilmFoam/cylinder
  • lagrangian/reactingParcelFilmFoam/hotBoxes
  • lagrangian/reactingParcelFilmFoam/rivuletPanel
  • lagrangian/reactingParcelFilmFoam/splashPanel
  • mesh/moveDynamicMesh/simpleHarmonicMotion
  • multiphase/cavitatingFoam/les/throttle
  • multiphase/cavitatingFoam/les/throttle3D
  • multiphase/cavitatingFoam/ras/throttle
  • multiphase/interDyMFoam/ras/damBreakWithObstacle
  • multiphase/interDyMFoam/ras/floatingObject
  • multiphase/interFoam/les/nozzleFlow2D
  • multiphase/interFoam/ras/damBreakPorousBaffle
  • multiphase/MRFInterFoam/mixerVessel2D
  • multiphase/MRFMultiphaseInterFoam/mixerVessel2D
  • multiphase/multiphaseEulerFoam/mixerVessel2D

4 topoSetDict description

The default dictionary is located in

/system/topoSetDict

Usually dictionaries created elsewhere have the extension .topoSet (i.e. myTopoSet.topoSet).


The dictionary looks like:

actions
(
  {
    name    selectedCells;
    type    cellSet;
    action  new;
    source  boxToCell;
    sourceInfo
    {
      box (x0 y0 z0) (x1 y1 z1);
    }
  }
  {
    name    selectedFaces;
    type    faceSet;
    action  new;
    source  patchToFace;
    sourceInfo
    {
      name bottomWall;
    }
  }
);

5 List of sources

5.1 cellSet sources

  • boxToCell: Select all cells with cellCentre within bounding box

boxToCell (MINX MINY MINZ) (MAXX MAXY MAXZ)

  • cellToCell: Select all cells in the cellSet

cellToCell CELLSET

  • cylinderAnnulusToCell: Select all cells with cell centre within bounding cylinder annulus

cylinderAnnulusToCell (P1X P1Y P1Z) (P2X P2Y P2Z) OUTERRADIUS INNERRADIUS

  • cylinderToCell: Select all cells with cell centre within bounding cylinder

cylinderToCell (P1X P1Y P1Z) (P2X P2Y P2Z) RADIUS

  • faceToCell: Select cells that are the owner|neighbour|any of the faces in the faceSet or where all faces are in the faceSet

faceToCell FACESET neighbour|owner|any|all

  • faceZoneToCell: Select master or slave side of the faceZone. Note:accepts wildcards for zone.

faceZoneToCell ZONE master|slave

  • fieldToCell: Select all cells with field value >= min and <= max

fieldToCell FIELD MIN MAX

  • labelToCell: Select cells by cellLabel

labelToCell (I0 I1 .. In)

  • nbrToCell: Select all cells with only NNBR or less neighbouring cells

nbrToCell NNBR

  • nearestToCell: Select the nearest cell for each of the points PT0 .. PTN

nearestToCell (PT0 .. PTN)

  • pointToCell: Select all cells with any point in the pointSet

pointToCell POINTSET any

  • regionToCell: Select all cells in the connected region containing point. If started inside the subCellSet keeps to it; if started outside stays outside.

regionToCell SUBCELLSET (X Y Z)

  • rotatedBoxToCell: Select all cells with cellCentre within parallelopiped

rotatedBoxToCell (ORIGINX ORIGINY ORIGINZ) (IX IY IZ) (JX JY JZ) (KX KY KZ)

  • shapeToCell: Select all cells of given cellShape (splitHex hardcoded with internal angle < 10 degrees).

shapeToCell tet|pyr|prism|hex|tetWedge|wedge|splitHex

  • surfaceToCell: Select cells using a surface

surfaceToCell SURFACE OUTSIDEPOINTS CUT INSIDE OUTSIDE NEAR CURVATURE

SURFACE name of triSurface
OUTSIDEPOINTS list of points that define outside
CUT boolean whether to include cells cut by surface
INSIDE boolean whether to include cells inside surface
OUTSIDE boolean whether to include cells outside surface
NEAR scalar; include cells with centre <= near to surface
CURVATURE scalar; include cells close to strong curvature on surface (curvature defined as difference in surface normal at nearest point on surface for each vertex of cell)
  • zoneToCell: Select all cells of CELLZONE

zoneToCell CELLZONE

5.2 cellZoneSet sources

  • setToCellZone: Select all cells in the cellSet.

setToCellZone CELLSET

5.3 faceSet sources

  • boundaryToFace: Select all boundary faces

boundaryToFace

  • boxToFace: Select all face with faceCentre within bounding box

boxToFace ((MINX MINY MINZ) (MAXX MAXY MAXZ))

  • cellToFace: Select all faces of cells in the cellSet (all) or faces where both neighbours are in the cellSet (both)

cellToFace CELLSET all|both

  • faceToFace: Select all faces in the faceSet

faceToFace FACESET

  • labelToFace: Select faces by label

labelToFace (I0 I1 .. IN)

  • normalToFace: Select faces with normal aligned to unit vector (NX NY NZ) to within TOL

normalToFace (NX NY NZ) TOL

  • patchToFace: Select faces of the PATCH

patchToFace PATCH

  • pointToFace: Select faces with any point in the pointSet (any) or all points in the pointSet (all)

pointToFace POINTSET any|all

  • zoneToFace: Select all faces of FACEZONE

zoneToFace FACEZONE

5.4 faceZoneSet sources

  • faceZoneToFaceZone: Select all faces of FACEZONE

faceZoneToFaceZone FACEZONE

  • setsToFaceZone: Select all faces in the faceSet. Orientated so slave side is in cellSet.

setsToFaceZone FACESET SLAVECELLSET

  • setToFaceZone: Select all faces in the faceSet. Sets flipMap.

setToFaceZone FACESET

5.5 pointSet sources

  • boxToPoint: Select all points with coordinate within bounding box

boxToPoint ((MINX MINY MINZ) (MAXX MAXY MAXZ))

  • cellToPoint: Select all points of cells in the cellSet

cellToPoint CELLSET all

  • faceToPoint: Select all points of faces in the faceSet

faceToPoint FACESET all

  • labelToPoint: Select points by label

labelToPoint (I0 I1 .. IN)

  • nearestToPoint: Select the nearest point for each of the points PT0 ..PTN

nearestToPoint (PT0 .. PTN)

  • pointToPoint: Select all points in the pointSet

pointToPoint POINTSET

  • surfaceToPoint: Select point using a surface

surfaceToPoint SURFACE NEAR INSIDE OUTSIDE

SURFACE name of triSurface
NEAR scalar; include points with coordinate <= near to surface
INSIDE boolean whether to include points on the opposite side of surface normal
OUTSIDE boolean whether to include points on this side of the surface normal
  • zoneToPoint: Select all points of POINTZONE

zoneToPoint POINTZONE

5.6 pointZoneSet sources

  • setToPointZone: Select all points in the pointSet.

setToPointZone POINTSET