Difference between revisions of "TopoSet"

From OpenFOAMWiki
(Created page with "{{VersionInfo}}{{Version2.1}} '''topoSet''' is a utility that collects points, faces and cells in sets, based on different criteria, for later usage with different other util...")
 
(Modify to be coherent with the new framework and update to OF21 - work in progress)
Line 1: Line 1:
 
{{VersionInfo}}{{Version2.1}}
 
{{VersionInfo}}{{Version2.1}}
  
'''topoSet''' is a utility that collects points, faces and cells in sets, based on different criteria, for later usage with different other utilities like [[subSetMesh]] and [[setSet]].
+
'''topoSet''' is a utility that collects points, faces and cells in sets, based on different criteria, for later usage with different other utilities like [[subsetMesh]] and [[setSet]].
  
 
==Dictionary==
 
==Dictionary==
Line 40: Line 40:
 
</div>
 
</div>
  
===List of sources===
+
==List of sources==
*pointToCell
+
===cell sources===
*boxToCell  
+
*boxToCell: Select all cells with cellCentre within bounding box
*zoneToPoint
+
<tt>boxToCell (MINX MINY MINZ) (MAXX MAXY MAXZ)</tt>
*surfaceToCell
+
*cellToCell: Select all cells in the cellSet
*nearestToCell  
+
<tt>cellToCell CELLSET</tt>
*zoneToCell  
+
*cylinderAnnulusToCell: Select all cells with cell centre within bounding cylinder annulus
 +
<tt>cylinderAnnulusToCell (p1X p1Y p1Z) (p2X p2Y p2Z) outerRadius innerRadius</tt>
 +
*cylinderToCell: Select all cells with cell centre within bounding cylinder
 +
<tt>cylinderToCell (p1X p1Y p1Z) (p2X p2Y p2Z) radius</tt>
 +
*faceToCell: Select cells that are the owner|neighbour|any of the faces in the faceSet or where all faces are in the faceSet
 +
<tt>faceToCell FACESET neighbour|owner|any|all</tt>
 +
*faceZoneToCell: Select master or slave side of the faceZone. Note:accepts wildcards for zone.
 +
<tt>faceZoneToCell ZONE master|slave</tt>
 +
*fieldToCell: Select all cells with field value >= min and <= max
 +
<tt>fieldToCell FIELD MIN MAX</tt>
 +
*labelToCell: Select cells by cellLabel
 +
<tt>labelToCell (I0 I1 .. In)</tt>
 +
*nbrToCell: Select all cells with only NNBR or less neighbouring cells
 +
<tt>nbrToCell NNBR</tt>
 +
*nearestToCell: Select the nearest cell for each of the points pt0 ..ptn
 +
<tt>nearestToCell (PT0 .. PTN)</tt>
 +
*pointToCell: Select all cells with any point in the pointSet
 +
<tt>pointToCell POINTSET any</tt>
 +
*regionToCell: Select all cells in the connected region containing point. If started inside the subCellSet keeps to it; if started outside stays outside.
 +
<tt>regionToCell SUBCELLSET (X Y Z)</tt>
 +
*rotatedBoxToCell: Select all cells with cellCentre within parallelopiped
 +
<tt>rotatedBoxToCell (ORIGINX ORIGINY ORIGINZ) (IX IY IZ) (JX JY JZ) (KX KY KZ)</tt>
 +
*shapeToCell: Select all cells of given cellShape (splitHex hardcoded with internal angle < 10 degrees).
 +
<tt>shapeToCell tet|pyr|prism|hex|tetWedge|wedge|splitHex</tt>
 +
*surfaceToCell
 +
<tt>surfaceToCell<surface> <outsidePoints> <cut> <inside> <outside> <near> <curvature></tt>
 +
:<surface> name of triSurface
 +
:<outsidePoints> list of points that define outside
 +
:<cut> boolean whether to include cells cut by surface
 +
:<inside>  ,,                ,,      inside surface
 +
:<outside>  ,,                ,,      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
 +
<tt>zoneToCell CELLZONE</tt>
 +
===cellZone sources===
 +
*setToCellZone
 +
===face sources===
 +
*boundaryToFace
 +
*boxToFace
 
*cellToFace  
 
*cellToFace  
*pointToFace
+
*faceToFace
 +
*labelToFace
 
*normalToFace  
 
*normalToFace  
*boxToFace
 
*rotatedBoxToCell
 
*fieldToCell
 
*cellToPoint
 
*zoneToFace
 
*nbrToCell
 
 
*patchToFace  
 
*patchToFace  
*labelToCell
+
*pointToFace
*pointToPoint
+
*zoneToFace
*faceToCell
+
===faceZone sources===
 +
*faceZoneToFaceZone
 +
*setsToFaceZone
 +
*setToFaceZone
 +
===point sources===
 
*boxToPoint  
 
*boxToPoint  
*labelToPoint
+
*cellToPoint
*boundaryToFace
+
 
*faceToPoint  
 
*faceToPoint  
*labelToFace
+
*labelToPoint
*shapeToCell
+
*nearestToPoint
*faceToFace
+
*pointToPoint
*cellToCell
+
 
*surfaceToPoint
 
*surfaceToPoint
 +
*zoneToPoint
 +
===pointZone sources===
 +
*setToPointZone
  
 
==Usage==
 
==Usage==

Revision as of 21:12, 5 September 2012

Valid versions: OF Version 21.png

topoSet is a utility that collects points, faces and cells in sets, based on different criteria, for later usage with different other utilities like subsetMesh and setSet.

1 Dictionary

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;
    }
  }
);

2 List of sources

2.1 cell 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

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> ,, ,, inside surface
<outside> ,, ,, 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

2.2 cellZone sources

  • setToCellZone

2.3 face sources

  • boundaryToFace
  • boxToFace
  • cellToFace
  • faceToFace
  • labelToFace
  • normalToFace
  • patchToFace
  • pointToFace
  • zoneToFace

2.4 faceZone sources

  • faceZoneToFaceZone
  • setsToFaceZone
  • setToFaceZone

2.5 point sources

  • boxToPoint
  • cellToPoint
  • faceToPoint
  • labelToPoint
  • nearestToPoint
  • pointToPoint
  • surfaceToPoint
  • zoneToPoint

2.6 pointZone sources

  • setToPointZone

3 Usage

topoSet

or

topoSet myTopoSet.topoSet

results in sets stored in

/constants/polyMesh/sets