1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4 | \\ / O peration | Version: 2.0.0 |
5 | \\ / A nd | Web: www.OpenFOAM.com |
6 | \\/ M anipulation | |
7 \*---------------------------------------------------------------------------*/
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 // List of actions. Each action is a dictionary with e.g.
21 // // type: pointSet/faceSet/cellSet/faceZoneSet/cellZoneSet
24 // // action to perform on set. Two types:
25 // // - require no source : clear/invert
26 // // - require source : new/add/delete/subset
29 // The source entry varies according to the type of set:
34 // // Select by explicitly providing cell labels
35 // source labelToCell;
37 // value (12 13 56); // labels of cells
40 // // Copy elements from cellSet
46 // // Cells in cell zone
49 // name ".*Zone"; // Name of cellZone, regular expressions allowed
52 // // Cells on master or slave side of faceZone
53 // source faceZoneToCell;
55 // name ".*Zone"; // Name of faceZone, regular expressions allowed
56 // option master; // master/slave
59 // // Select based on faceSet
62 // set f0; // Name of faceSet
64 // //option neighbour; // cell with neighbour in faceSet
65 // //option owner; // ,, owner
66 // option any; // cell with any face in faceSet
67 // //option all; // cell with all faces in faceSet
70 // // Select based on pointSet
71 // source pointToCell;
74 // option any; // cell with any point in pointSet
75 // //option all; // cell with all points in pointSet
78 // // Select based on cellShape
79 // source shapeToCell;
81 // type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
84 // // Cells with cell centre within box
87 // box (0 0 0) (1 1 1);
90 // // Cells with cell centre within box
91 // // Is skewed, rotated box. Given as origin and three spanning vectors.
92 // source rotatedBoxToCell;
94 // origin (0.2 0.2 -10);
100 // // Cells with centre within cylinder
101 // source cylinderToCell;
103 // p1 (0.2 0.2 -10); // start point on cylinder axis
104 // p2 (0.2 0.2 0); // end point on cylinder axis
108 // // Cells with centre within sphere
109 // source sphereToCell;
111 // centre (0.2 0.2 -10);
115 // // Cells with cellCentre nearest to coordinates
116 // source nearestToCell;
118 // points ((0 0 0) (1 1 1)(2 2 2));
121 // // Select based on surface
122 // source surfaceToCell;
124 // file "www.avl.com-geometry.stl";
125 // outsidePoints ((-99 -99 -59)); // definition of outside
126 // includeCut false; // cells cut by surface
127 // includeInside false; // cells not on outside of surf
128 // includeOutside false; // cells on outside of surf
129 // nearDistance -1; // cells with centre near surf
130 // // (set to -1 if not used)
131 // curvature 0.9; // cells within nearDistance
132 // // and near surf curvature
133 // // (set to -100 if not used)
136 // // values of field within certain range
137 // source fieldToCell;
139 // fieldName U; // Note: uses mag(U) since volVectorField
144 // // Mesh region (non-face connected part of (subset of)mesh)
145 // source regionToCell;
147 // set c0; // name of cellSet giving mesh subset
148 // insidePoint (1 2 3); // point inside region to select
156 // // Copy elements from faceSet
157 // source faceToFace;
162 // // Select based on cellSet
163 // source cellToFace;
166 // option all; // All faces of cells
167 // //option both; // Only faces whose owner&neighbour are in cellSet
170 // // Select based on pointSet
171 // source pointToFace;
174 // option any; // Faces using any point in pointSet
175 // //option all // Faces with all points in pointSet
178 // // Select by explicitly providing face labels
179 // source labelToFace;
181 // value (12 13 56); // labels of faces
184 // // All faces of patch
185 // source patchToFace;
187 // name ".*Wall"; // Name of patch, regular expressions allowed
190 // // All faces of faceZone
191 // source zoneToFace;
193 // name ".*Zone1"; // Name of faceZone, regular expressions allowed
196 // // Faces with face centre within box
199 // box (0 0 0) (1 1 1);
202 // // Faces with normal to within certain angle aligned with vector.
203 // source normalToFace;
205 // normal (0 0 1); // Vector
206 // cos 0.01; // Tolerance (max cos of angle)
214 // // Copy elements from pointSet
215 // source pointToPoint;
220 // // Select based on cellSet
221 // source cellToPoint;
224 // option all; // all points of cell
227 // // Select based on faceSet
228 // source faceToPoint;
230 // set f0; // name of faceSet
231 // option all; // all points of face
234 // // Select by explicitly providing point labels
235 // source labelToPoint;
237 // value (12 13 56); // labels of points
240 // // All points in pointzone
241 // source zoneToPoint;
243 // name ".*Zone"; // name of pointZone, regular expressions allowed
246 // // Points nearest to coordinates
247 // source nearestToPoint;
249 // points ((0 0 0) (1 1 1));
252 // // Points with coordinate within box
253 // source boxToPoint;
255 // box (0 0 0) (1 1 1);
258 // // Select based on surface
259 // source surfaceToPoint;
261 // file "www.avl.com-geometry.stl";
262 // nearDistance 0.1; // points near to surface
263 // includeInside false; // points on inside of surface
264 // // (requires closed surface with consistent
266 // includeOutside false; // ,, outside ,,
274 // (mirrors operations on a cellSet into a cellZone)
276 // // Select based on cellSet
277 // source setToCellZone;
279 // set c0; // name of cellSet
286 // // Select based on faceSet without orientation
287 // source setToFaceZone;
289 // set f0; // name of faceSet
292 // // Select based on faceSet, using cellSet to determine orientation
293 // source setsToFaceZone;
295 // faceSet f0; // name of faceSet
296 // cellSet c0; // name of cellSet of slave side
301 // Example:pick up internal faces on outside of cellSet
302 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304 // Load initial cellSet
316 // Get all faces in cellSet
329 // Determine inverse cellSet
346 // Keep in f0 all faces in c1
360 // ************************************************************************* //