Difference between revisions of "SetSet"

From OpenFOAMWiki
m
m
Line 2: Line 2:
  
 
Following is an example of the usage to fix an imported mesh that has small faults.
 
Following is an example of the usage to fix an imported mesh that has small faults.
[[File:DancingBalls.png]]
+
[[Image:DancingBalls.png|thumbnail|Figure 1. Domain overview]]
 +
Running checkMesh on this geometry:
 +
<div align=left>
 +
foamJob -s checkMesh -allTopology -allGeometry
 +
</div>
 +
generates some warnings and errors, but most important, several sets: cellZone_1, cellZone_2, concaveFaces, edgeFaces, nearPoints, nonOrthoFaces, skewFaces, undedeterminedCells, warpedFaces, wrongOrientedFaces.
 +
The next step is to collect all the cells that contain any of the concave faces, incorrect edge faces, warped faces, wrong oriented faces, or cells with a very small determinant:
 +
<div align=left>
 +
setSet -constant
 +
Command>list
 +
Command>cellSet bubu new cellToCell underdeterminedCells any
 +
Command>list
 +
Command>cellSet bubu add faceToCell concaveFaces any
 +
Command>cellSet bubu add faceToCell edgeFaces any
 +
Command>cellSet bubu add faceToCell warpedFaces any
 +
Command>cellSet bubu add faceToCell wrongOrientedFaces any
 +
Command>cellSet bubu invert
 +
Command>cellSet bubu subset
 +
Command>quit
 +
foamJob -s subsetMesh bubu
 +
</div>

Revision as of 12:00, 3 May 2010

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

Following is an example of the usage to fix an imported mesh that has small faults.

Figure 1. Domain overview

Running checkMesh on this geometry:

foamJob -s checkMesh -allTopology -allGeometry

generates some warnings and errors, but most important, several sets: cellZone_1, cellZone_2, concaveFaces, edgeFaces, nearPoints, nonOrthoFaces, skewFaces, undedeterminedCells, warpedFaces, wrongOrientedFaces. The next step is to collect all the cells that contain any of the concave faces, incorrect edge faces, warped faces, wrong oriented faces, or cells with a very small determinant:

setSet -constant
Command>list
Command>cellSet bubu new cellToCell underdeterminedCells any
Command>list
Command>cellSet bubu add faceToCell concaveFaces any
Command>cellSet bubu add faceToCell edgeFaces any
Command>cellSet bubu add faceToCell warpedFaces any
Command>cellSet bubu add faceToCell wrongOrientedFaces any
Command>cellSet bubu invert
Command>cellSet bubu subset
Command>quit
foamJob -s subsetMesh bubu