mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: update dictionary documentation for topoSources (#1060)
This commit is contained in:
@ -14,8 +14,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// List of actions. Each action is a dictionary with e.g.
|
||||
// // name of set
|
||||
// The topoSetDict comprises a list of actions to perform on different
|
||||
// set types (cellSet, faceSet, pointSet, etc).
|
||||
//
|
||||
// Each action is a dictionary with e.g.
|
||||
// // Name of set
|
||||
// name c0;
|
||||
//
|
||||
// // type: pointSet/faceSet/cellSet/faceZoneSet/cellZoneSet
|
||||
@ -26,401 +29,23 @@ FoamFile
|
||||
// // clear : clears set or zone
|
||||
// // invert : select all currently non-selected elements
|
||||
// // remove : removes set or zone
|
||||
// // - require source : new/add/delete/subset
|
||||
// // - require source : new/add/subtract/subset
|
||||
// // new : create new set or zone from source
|
||||
// // add : add source to contents
|
||||
// // delete : deletes source from contents
|
||||
// // subtract : subtract source from contents
|
||||
// // subset : keeps elements both in contents and source
|
||||
// action new;
|
||||
//
|
||||
// The source entry varies according to the type of set:
|
||||
// The source entry varies according to the type of set.
|
||||
//
|
||||
// cellSet
|
||||
// ~~~~~~~
|
||||
// In OpenFOAM 1806 and earlier, it was compulsory to use a 'sourceInfo'
|
||||
// sub-dictionary to define the sources.
|
||||
// In OpenFOAM 1812 and later, this sub-directory is optional, unless
|
||||
// there would be a name class (Eg, 'name' appearing at both levels).
|
||||
// In most cases, the source definitions have been adjusted to avoid such
|
||||
// clashes.
|
||||
//
|
||||
// // Select by explicitly providing cell labels
|
||||
// source labelToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// value (12 13 56); // labels of cells
|
||||
// }
|
||||
//
|
||||
// // Copy elements from cellSet
|
||||
// source cellToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set c1;
|
||||
// }
|
||||
//
|
||||
// // Cells in cell zone
|
||||
// source zoneToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone"; // Name of cellZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Cells on master or slave side of faceZone
|
||||
// source faceZoneToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// zones (".*Zone"); // Name of faceZone, regular expressions allowed
|
||||
// // OR zone ".*Zone"; // Name of faceZone, regular expressions allowed
|
||||
// // OR name ".*Zone"; // Name of faceZone, regular expressions allowed
|
||||
// option master; // master/slave
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet
|
||||
// source faceToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set f0; // Name of faceSet
|
||||
//
|
||||
// //option neighbour; // cell with neighbour in faceSet
|
||||
// //option owner; // ,, owner
|
||||
// option any; // cell with any face in faceSet
|
||||
// //option all; // cell with all faces in faceSet
|
||||
// }
|
||||
//
|
||||
// // All cells on boundaries
|
||||
// source boundaryToCell;
|
||||
//
|
||||
// // Select cells associated with patch
|
||||
// source patchToCell;
|
||||
// patches ("patch.*")
|
||||
// patch somePatch;
|
||||
//
|
||||
// // Select based on pointSet
|
||||
// source pointToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set p0;
|
||||
// option any; // cell with any point in pointSet
|
||||
// //option edge; // cell with an edge with both points in pointSet
|
||||
// }
|
||||
//
|
||||
// // Select based on cellShape
|
||||
// source shapeToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
|
||||
// }
|
||||
//
|
||||
// // Cells with cell centre within box ('box') or multiple boxes ('boxes')
|
||||
// source boxToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// //boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// }
|
||||
//
|
||||
// // Cells with cell centre within box
|
||||
// // Is skewed, rotated box. Given as origin and three spanning vectors.
|
||||
// source rotatedBoxToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// origin (0.2 0.2 -10);
|
||||
// i (0.2 0.2 0);
|
||||
// j (-0.2 0.2 0);
|
||||
// k (10 10 10);
|
||||
// }
|
||||
//
|
||||
// // Cells with centre within cylinder
|
||||
// source cylinderToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
// p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
// radius 5.0;
|
||||
// }
|
||||
//
|
||||
// // Cells with centre within sphere
|
||||
// source sphereToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// origin (0.2 0.2 -10);
|
||||
// radius 5.0;
|
||||
// }
|
||||
//
|
||||
// // Cells with cellCentre nearest to coordinates
|
||||
// source nearestToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// points ((0 0 0) (1 1 1)(2 2 2));
|
||||
// }
|
||||
//
|
||||
// // Select based on surface
|
||||
// source surfaceToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// file "geometry.stl";
|
||||
// useSurfaceOrientation false; // use closed surface inside/outside
|
||||
// // test (ignores includeCut,
|
||||
// // outsidePoints)
|
||||
// outsidePoints ((-99 -99 -59)); // definition of outside
|
||||
// includeCut false; // cells cut by surface
|
||||
// includeInside false; // cells not on outside of surf
|
||||
// includeOutside false; // cells on outside of surf
|
||||
// nearDistance -1; // cells with centre near surf
|
||||
// // (set to -1 if not used)
|
||||
// curvature 0.9; // cells within nearDistance
|
||||
// // and near surf curvature
|
||||
// // (set to -100 if not used)
|
||||
// }
|
||||
//
|
||||
// // values of field within certain range
|
||||
// source fieldToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// field U; // Note: uses mag(U) since volVectorField
|
||||
// min 0.1;
|
||||
// max 0.5;
|
||||
// }
|
||||
//
|
||||
// // Mesh region (non-face connected part of (subset of)mesh)
|
||||
// source regionToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set c0; // optional name of cellSet giving mesh subset
|
||||
// insidePoints ((1 2 3)); // points inside region to select
|
||||
// nErode 0; // optional number of layers to erode
|
||||
// // selection
|
||||
// }
|
||||
//
|
||||
// // Cells underneath plane such that volume is reached. E.g. for use
|
||||
// // in setFields to set the level given a wanted volume.
|
||||
// source targetVolumeToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// volume 2e-05;
|
||||
// normal (0 1 0); // usually in direction of gravity
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// faceSet
|
||||
// ~~~~~~~
|
||||
//
|
||||
// // Copy elements from faceSet
|
||||
// source faceToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set f1;
|
||||
// }
|
||||
//
|
||||
// // Select based on cellSet
|
||||
// source cellToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set c0;
|
||||
// option all; // All faces of cells
|
||||
// //option both; // Only faces whose owner&neighbour are in cellSet
|
||||
// }
|
||||
//
|
||||
// // Select based on pointSet
|
||||
// source pointToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set p0;
|
||||
// option any; // Faces using any point in pointSet
|
||||
// //option all // Faces with all points in pointSet
|
||||
// //option edge // Faces with two consecutive points in pointSet
|
||||
// }
|
||||
//
|
||||
// // Select by explicitly providing face labels
|
||||
// source labelToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// value (12 13 56); // labels of faces
|
||||
// }
|
||||
//
|
||||
// // All faces of patch
|
||||
// source patchToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Wall"; // Name of patch or patch group,
|
||||
// // (regular expressions allowed)
|
||||
// }
|
||||
//
|
||||
// // All boundary faces
|
||||
// source boundaryToFace;
|
||||
//
|
||||
// // All faces of faceZone
|
||||
// source zoneToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone1"; // Name of faceZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Faces with face centre within box ('box') or multiple boxes ('boxes')
|
||||
// source boxToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// //boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// }
|
||||
//
|
||||
// // Faces with normal to within certain angle aligned with vector.
|
||||
// source normalToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// normal (0 0 1); // Vector
|
||||
// cos 0.01; // Tolerance (max cos of angle)
|
||||
// }
|
||||
//
|
||||
// // Walk on faces in faceSet, starting from face nearest given position
|
||||
// source regionToFace;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set f0;
|
||||
// nearPoint (0.1 0.1 0.005);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// pointSet
|
||||
// ~~~~~~~
|
||||
//
|
||||
// // Copy elements from pointSet
|
||||
// source pointToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set p1;
|
||||
// }
|
||||
//
|
||||
// // Select based on cellSet
|
||||
// source cellToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set c0;
|
||||
// option all; // all points of cell
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet
|
||||
// source faceToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set f0; // name of faceSet
|
||||
// option all; // all points of face
|
||||
// }
|
||||
//
|
||||
// // Select by explicitly providing point labels
|
||||
// source labelToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// value (12 13 56); // labels of points
|
||||
// }
|
||||
//
|
||||
// // All points in pointzone
|
||||
// source zoneToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone"; // name of pointZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Points nearest to coordinates
|
||||
// source nearestToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// points ((0 0 0) (1 1 1));
|
||||
// }
|
||||
//
|
||||
// // Points with coordinate within box ('box') or multiple boxes ('boxes')
|
||||
// source boxToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// //boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// }
|
||||
//
|
||||
// // Select based on surface
|
||||
// source surfaceToPoint;
|
||||
// sourceInfo
|
||||
// {
|
||||
// file "www.avl.com-geometry.stl";
|
||||
// nearDistance 0.1; // points near to surface
|
||||
// includeInside false; // points on inside of surface
|
||||
// // (requires closed surface with consistent
|
||||
// // normals)
|
||||
// includeOutside false; // ,, outside ,,
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// cellZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// Manipulates a cellZone (as well as a cellSet)
|
||||
// Takes any cellSet source. The difference with a cellSet is
|
||||
// - reads the cells from the cellZone, not the cellSet
|
||||
// - write to the cellZone as well as the cellSet
|
||||
//
|
||||
// For backwards compatibility:
|
||||
// // Select based on cellSet
|
||||
// source setToCellZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set c0; // name of cellSet
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// faceZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// Manipulates a faceZone (as well as a faceSet). It can only be used
|
||||
// with two special sources:
|
||||
//
|
||||
// // Select based on faceSet without orientation
|
||||
// source setToFaceZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// faceSet f0; // name of faceSet
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet, using cellSet to determine orientation
|
||||
// source setsToFaceZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// faceSet f0; // name of faceSet
|
||||
// cellSet c0; // name of cellSet of slave side
|
||||
// flip false; // optional: flip the faceZone (so now the cellSet
|
||||
// // is the master side)
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet, using supplied normal to determine orientation
|
||||
// source setAndNormalToFaceZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// faceSet f0; // name of faceSet
|
||||
// normal (1 0 0); // normal orientation
|
||||
// }
|
||||
//
|
||||
// // Select based on surface. Orientation from normals on surface
|
||||
// source searchableSurfaceToFaceZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// surface searchableSphere;
|
||||
// origin (0.05 0.05 0.005);
|
||||
// radius 0.025;
|
||||
// //name sphere.stl; // Optional name if surface triSurfaceMesh
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// pointZoneSet
|
||||
// ~~~~~~~~~~~~
|
||||
// Manipulates a pointZone (as well as a pointSet)
|
||||
// Takes any pointSet source. The difference with a pointSet is
|
||||
// - reads the cells from the pointZone, not the pointSet
|
||||
// - write to the pointZone as well as the pointSet
|
||||
//
|
||||
// For backwards compatibility:
|
||||
// // Select based on pointSet
|
||||
// source setToPointZone;
|
||||
// sourceInfo
|
||||
// {
|
||||
// set p0; // name of pointSet
|
||||
// }
|
||||
|
||||
// More detailed listing in the annotated topoSetSourcesDict
|
||||
|
||||
actions
|
||||
(
|
||||
@ -433,11 +58,8 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source labelToCell;
|
||||
sourceInfo
|
||||
{
|
||||
value (12 13 56);
|
||||
}
|
||||
}
|
||||
|
||||
// Get all faces in cellSet
|
||||
{
|
||||
@ -445,12 +67,9 @@ actions
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Determine inverse cellSet
|
||||
{
|
||||
@ -458,11 +77,8 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
}
|
||||
}
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
@ -475,13 +91,9 @@ actions
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set c1;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Example: create cellZone from geometric region
|
||||
{
|
||||
@ -489,11 +101,8 @@ actions
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.04 0 0)(0.06 100 100);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,607 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Information about topoSetSource types
|
||||
|
||||
cellSet_doc
|
||||
{
|
||||
//- Select all external (boundary) faces.
|
||||
{
|
||||
source boundaryToCell;
|
||||
}
|
||||
|
||||
|
||||
//- Cells with cell centre within multiple boxes or single box
|
||||
{
|
||||
source boxToCell;
|
||||
|
||||
boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// or
|
||||
box (0 0 0) (1 1 1);
|
||||
// or
|
||||
min (0 0 0);
|
||||
max (1 1 1);
|
||||
}
|
||||
|
||||
|
||||
//- Copy elements from one or more other cellSets
|
||||
{
|
||||
source cellToCell;
|
||||
sets (c1 c2);
|
||||
// or
|
||||
set c1;
|
||||
}
|
||||
|
||||
|
||||
//- Cells with centre within cylinder or cylinder annulus
|
||||
{
|
||||
source cylinderToCell;
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Cells with centre within cylinder annulus
|
||||
// Can also simply use cylinderToCell
|
||||
{
|
||||
source cylinderAnnulusToCell;
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
outerRadius 5.0;
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Select based on faceSet
|
||||
{
|
||||
source faceToCell;
|
||||
sets (f0 f1);
|
||||
// or
|
||||
set f0; // Name of faceSet
|
||||
|
||||
//- selection option (mandatory)
|
||||
option any; // cell with any face in faceSet
|
||||
// option all; // cell with all faces in faceSet
|
||||
// option neighbour; // cell with neighbour in faceSet
|
||||
// option owner; // cell with owner in faceSet
|
||||
}
|
||||
|
||||
|
||||
//- Cells on master or slave side of faceZone
|
||||
{
|
||||
source faceZoneToCell;
|
||||
zones (".*Zone"); // Names of faceZones, word or regex
|
||||
// OR zone ".*Zone"; // Name of faceZone, word or regex
|
||||
option master; // master/slave
|
||||
|
||||
//- Compat
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone";
|
||||
// option master;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
//- values of field within certain range
|
||||
{
|
||||
source fieldToCell;
|
||||
field U; // Note: uses mag(U) since volVectorField
|
||||
min 0.1;
|
||||
max 0.5;
|
||||
}
|
||||
|
||||
|
||||
//- Select by explicitly providing cell labels
|
||||
{
|
||||
source labelToCell;
|
||||
value (12 13 56); // labels of cells
|
||||
}
|
||||
|
||||
|
||||
//- Select based on number of neighbouring cells
|
||||
{
|
||||
source nbrToCell;
|
||||
neighbours 4; // min neighbours
|
||||
}
|
||||
|
||||
|
||||
//- Cells with cellCentre nearest to coordinates
|
||||
{
|
||||
source nearestToCell;
|
||||
points ((0 0 0) (1 1 1)(2 2 2));
|
||||
}
|
||||
|
||||
|
||||
//- Select cells associated with patch
|
||||
{
|
||||
source patchToCell;
|
||||
patches ("patch.*");
|
||||
// or
|
||||
patch somePatch;
|
||||
}
|
||||
|
||||
|
||||
//- Select based on pointSet
|
||||
{
|
||||
source pointToCell;
|
||||
sets (p0 p1);
|
||||
// or
|
||||
sets p0;
|
||||
|
||||
option any; // cell with any point in pointSet
|
||||
//option edge; // cell with an edge with both points in pointSet
|
||||
}
|
||||
|
||||
|
||||
//- Mesh region (non-face connected part of (subset of)mesh)
|
||||
{
|
||||
source regionToCell;
|
||||
insidePoints ((1 2 3)); // points inside region to select
|
||||
set c0; // optional name of cellSet giving mesh subset
|
||||
nErode 0; // optional number of layers to erode selection
|
||||
}
|
||||
|
||||
|
||||
//- Cells with cell centre within box
|
||||
// Is skewed, rotated box. Given as origin and three spanning vectors.
|
||||
{
|
||||
source rotatedBoxToCell;
|
||||
origin (0.2 0.2 -10);
|
||||
i (0.2 0.2 0);
|
||||
j (-0.2 0.2 0);
|
||||
k (10 10 10);
|
||||
}
|
||||
|
||||
|
||||
//- Select cells with centres within a searchableSurface
|
||||
{
|
||||
source searchableSurfaceToCell;
|
||||
surfaceType triSurfaceMesh; // The surface type
|
||||
surfaceName blob.obj; // Name for the IOobject
|
||||
// or
|
||||
surface triSurfaceMesh; // Same as surface type
|
||||
}
|
||||
|
||||
|
||||
//- Select based on cellShape
|
||||
{
|
||||
source shapeToCell;
|
||||
shape hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
|
||||
}
|
||||
|
||||
|
||||
//- Cells with centre within sphere
|
||||
{
|
||||
source sphereToCell;
|
||||
origin (0.2 0.2 -10);
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Select based on surface
|
||||
{
|
||||
source surfaceToCell;
|
||||
|
||||
file "geometry.stl";
|
||||
outsidePoints ((-99 -99 -59)); // definition of outside
|
||||
includeCut false; // cells cut by surface
|
||||
includeInside false; // cells not on outside of surf
|
||||
includeOutside false; // cells on outside of surf
|
||||
nearDistance -1; // cells with centre near surf
|
||||
// (set to -1 if not used)
|
||||
curvature 0.9; // cells within nearDistance
|
||||
// and near surf curvature
|
||||
// (set to -100 if not used)
|
||||
// optional
|
||||
useSurfaceOrientation false; // use closed surface inside/outside
|
||||
// test (ignores includeCut,
|
||||
// outsidePoints)
|
||||
}
|
||||
|
||||
|
||||
//- Cells underneath plane such that volume is reached.
|
||||
// E.g. for use in setFields to set the level given a wanted volume.
|
||||
{
|
||||
source targetVolumeToCell;
|
||||
volume 2e-05;
|
||||
normal (0 1 0); // usually in direction of gravity
|
||||
// optional
|
||||
set c0; // restrict to named cellSet
|
||||
}
|
||||
|
||||
|
||||
//- Cells in cell zone
|
||||
{
|
||||
source zoneToCell;
|
||||
zones (".*Zone"); // Names of cellZones, word or regex
|
||||
// OR zone ".*Zone"; // Name of cellZone, word or regex
|
||||
|
||||
//- Compat
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone";
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
faceSet_doc
|
||||
{
|
||||
//- All boundary faces
|
||||
{
|
||||
source boundaryToFace;
|
||||
}
|
||||
|
||||
|
||||
//- Faces with face centre within box ('box') or multiple boxes ('boxes')
|
||||
{
|
||||
source boxToFace;
|
||||
|
||||
boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// or
|
||||
box (0 0 0) (1 1 1);
|
||||
// or
|
||||
min (0 0 0);
|
||||
max (1 1 1);
|
||||
}
|
||||
|
||||
|
||||
//- Select based on cellSet
|
||||
{
|
||||
source cellToFace;
|
||||
source faceToCell;
|
||||
sets (c0 c1);
|
||||
// or
|
||||
set c0; // Name of cellSet
|
||||
|
||||
option all; // All faces of cells
|
||||
//option both; // Only faces with owner+neighbour in cellSet
|
||||
}
|
||||
|
||||
|
||||
//- Faces with centre within cylinder or cylinder annulus
|
||||
{
|
||||
source cylinderToFace;
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Faces with centre within cylinder annulus
|
||||
// Can also simply use cylinderToCell
|
||||
{
|
||||
source cylinderAnnulusToFace;
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
outerRadius 5.0;
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Copy elements from faceSet
|
||||
{
|
||||
source faceToFace;
|
||||
set f1;
|
||||
}
|
||||
|
||||
|
||||
//- Select by explicitly providing face labels
|
||||
{
|
||||
source labelToFace;
|
||||
value (12 13 56); // labels of faces
|
||||
}
|
||||
|
||||
|
||||
//- Faces with normal to within certain angle aligned with vector.
|
||||
{
|
||||
source normalToFace;
|
||||
normal (0 0 1); // Vector
|
||||
cos 0.01; // Tolerance (max cos of angle)
|
||||
}
|
||||
|
||||
|
||||
//- All faces of patch
|
||||
{
|
||||
source patchToFace;
|
||||
patches ("patch.*");
|
||||
// or
|
||||
patch somePatch;
|
||||
|
||||
// Compat
|
||||
sourceInfo
|
||||
{
|
||||
name ".*Wall"; // Name of patch or patch group,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//- Select based on pointSet
|
||||
{
|
||||
source pointToFace;
|
||||
sets (p0 p1);
|
||||
// or
|
||||
set p0; // Name of pointSet
|
||||
|
||||
option any; // Faces using any point in pointSet
|
||||
//option all // Faces with all points in pointSet
|
||||
//option edge // Faces with two consecutive points in pointSet
|
||||
}
|
||||
|
||||
|
||||
//- Walk on faces in faceSet, starting from face nearest given position
|
||||
{
|
||||
source regionToFace;
|
||||
set f0;
|
||||
nearPoint (0.1 0.1 0.005);
|
||||
}
|
||||
|
||||
|
||||
//- Select faces with centres within a searchableSurface
|
||||
{
|
||||
source searchableSurfaceToFace;
|
||||
surfaceType triSurfaceMesh; // The surface type
|
||||
surfaceName blob.obj; // Name for the IOobject
|
||||
// or
|
||||
surface triSurfaceMesh; // Same as surface type
|
||||
}
|
||||
|
||||
|
||||
//- Faces with centre within sphere
|
||||
{
|
||||
source sphereToFace;
|
||||
origin (0.2 0.2 -10);
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- All faces of faceZone
|
||||
{
|
||||
source zoneToFace;
|
||||
|
||||
zones (".*Zone"); // Names of faceZones, word or regex
|
||||
// OR zone ".*Zone"; // Name of faceZone, word or regex
|
||||
|
||||
// Compat
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone1";
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pointSet_doc
|
||||
{
|
||||
//- Points within multiple boxes or single box
|
||||
{
|
||||
source boxToPoint;
|
||||
|
||||
boxes ((0 0 0) (1 1 1) (10 10 10)(11 11 11));
|
||||
// or
|
||||
box (0 0 0) (1 1 1);
|
||||
// or
|
||||
min (0 0 0);
|
||||
max (1 1 1);
|
||||
}
|
||||
|
||||
|
||||
//- Points associated with cellSet
|
||||
{
|
||||
source cellToPoint;
|
||||
sets (c1 c2);
|
||||
// or
|
||||
set c1;
|
||||
|
||||
option all; // all points of cell
|
||||
}
|
||||
|
||||
|
||||
//- Points within cylinder or cylinder annulus
|
||||
{
|
||||
source cylinderToPoint;
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Points associated with faceSet
|
||||
{
|
||||
source faceToPoint;
|
||||
sets (f1 f2);
|
||||
// or
|
||||
set f1;
|
||||
|
||||
option all; // all points of face
|
||||
}
|
||||
|
||||
|
||||
//- Select by explicitly providing point labels
|
||||
{
|
||||
source labelToPoint;
|
||||
value (12 13 56); // labels of points
|
||||
}
|
||||
|
||||
|
||||
//- Points nearest to coordinates
|
||||
{
|
||||
source nearestToPoint;
|
||||
points ((0 0 0) (1 1 1));
|
||||
}
|
||||
|
||||
|
||||
//- Copy elements from pointSet
|
||||
{
|
||||
source pointToPoint;
|
||||
sets (p1 p2);
|
||||
// or
|
||||
set p1;
|
||||
}
|
||||
|
||||
|
||||
//- Points within a searchableSurface
|
||||
{
|
||||
source searchableSurfaceToCell;
|
||||
surfaceType triSurfaceMesh; // The surface type
|
||||
surfaceName blob.obj; // Name for the IOobject
|
||||
// or
|
||||
surface triSurfaceMesh; // Same as surface type
|
||||
}
|
||||
|
||||
|
||||
//- Points centre within sphere
|
||||
{
|
||||
source sphereToPoint;
|
||||
origin (0.2 0.2 -10);
|
||||
radius 5.0;
|
||||
// optional
|
||||
innerRadius 1.0;
|
||||
}
|
||||
|
||||
|
||||
//- Select based on surface
|
||||
{
|
||||
source surfaceToPoint;
|
||||
file "geometry.stl";
|
||||
nearDistance 0.1; // points near to surface
|
||||
includeInside false; // points on inside of surface
|
||||
// (requires closed surface with consistent
|
||||
// normals)
|
||||
includeOutside false; // ,, outside ,,
|
||||
}
|
||||
|
||||
|
||||
//- Points from pointZone
|
||||
{
|
||||
source zoneToPoint;
|
||||
zones (".*Zone"); // Names of pointZones, word or regex
|
||||
// OR zone ".*Zone"; // Name of pointZone, word or regex
|
||||
|
||||
//- Compat
|
||||
// sourceInfo
|
||||
// {
|
||||
// name ".*Zone";
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// cellZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// Manipulates a cellZone (as well as a cellSet)
|
||||
// Takes any cellSet source. The difference with a cellSet is
|
||||
// - reads the cells from the cellZone, not the cellSet
|
||||
// - write to the cellZone as well as the cellSet
|
||||
|
||||
cellZoneSet_doc
|
||||
{
|
||||
// For backwards compatibility:
|
||||
|
||||
//- Select based on cellSet
|
||||
{
|
||||
source setToCellZone;
|
||||
set c0; // name of cellSet
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// faceZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// Manipulates a faceZone (as well as a faceSet).
|
||||
// It can only be used with special sources.
|
||||
|
||||
faceZoneSet_doc
|
||||
{
|
||||
//- Select from another faceZone
|
||||
{
|
||||
source faceZoneToFaceZone;
|
||||
zone z1; // Zone name, no regex
|
||||
}
|
||||
|
||||
|
||||
//- Select based on surface. Orientation from normals on surface
|
||||
{
|
||||
source searchableSurfaceToFaceZone;
|
||||
surfaceType searchableSphere;
|
||||
surfaceName blob.obj; // Optional name if surface triSurfaceMesh
|
||||
|
||||
// or
|
||||
surface searchableSphere; // Same as 'surfaceType'
|
||||
|
||||
// Parameters for surface
|
||||
origin (0.05 0.05 0.005);
|
||||
radius 0.025;
|
||||
}
|
||||
|
||||
|
||||
//- Select based on faceSet, using supplied normal to determine orientation
|
||||
{
|
||||
source setAndNormalToFaceZone;
|
||||
faceSet f0; // name of faceSet
|
||||
normal (1 0 0); // normal orientation
|
||||
}
|
||||
|
||||
|
||||
//- Select based on faceSet without orientation
|
||||
{
|
||||
source setToFaceZone;
|
||||
faceSet f0; // name of faceSet
|
||||
}
|
||||
|
||||
|
||||
//- Select based on faceSet, using cellSet to determine orientation
|
||||
{
|
||||
source setsToFaceZone;
|
||||
faceSet f0; // name of faceSet
|
||||
cellSet c0; // name of cellSet of slave side
|
||||
flip false; // optional: flip the faceZone (so now the cellSet
|
||||
// is the master side)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// pointZoneSet
|
||||
// ~~~~~~~~~~~~
|
||||
// Manipulates a pointZone (as well as a pointSet)
|
||||
// Takes any pointSet source. The difference with a pointSet is
|
||||
// - reads the cells from the pointZone, not the pointSet
|
||||
// - write to the pointZone as well as the pointSet
|
||||
|
||||
pointZoneSet_doc
|
||||
{
|
||||
// For backwards compatibility
|
||||
//- Select based on pointSet
|
||||
{
|
||||
source setToPointZone;
|
||||
set p0; // name of pointSet
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -14,290 +14,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// List of actions. Each action is a dictionary with e.g.
|
||||
// // name of set
|
||||
// name c0;
|
||||
//
|
||||
// // type: pointSet/faceSet/cellSet/faceZoneSet/cellZoneSet
|
||||
// type cellSet;
|
||||
//
|
||||
// // action to perform on set. Two types:
|
||||
// // - require no source : clear/invert
|
||||
// // - require source : add/subtract/subset/new
|
||||
// action new;
|
||||
//
|
||||
// The source entry varies according to the type of set:
|
||||
//
|
||||
// cellSet
|
||||
// ~~~~~~~
|
||||
//
|
||||
// // Select by explicitly providing cell labels
|
||||
// source labelToCell;
|
||||
// {
|
||||
// value (12 13 56); // labels of cells
|
||||
// }
|
||||
//
|
||||
// // Copy elements from cellSet
|
||||
// source cellToCell;
|
||||
// {
|
||||
// set c1;
|
||||
// }
|
||||
//
|
||||
// // Cells in cell zone
|
||||
// source zoneToCell;
|
||||
// {
|
||||
// zones (".*Zone"); // Name of cellZones, regular expressions allowed
|
||||
// zone ".*Zone"; // Name of cellZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Cells on master or slave side of faceZone
|
||||
// source faceZoneToCell;
|
||||
// {
|
||||
// zones (".*Zone"); // Name of faceZones, regular expressions allowed
|
||||
// zone ".*Zone"; // Name of faceZone, regular expressions allowed
|
||||
// option master; // master/slave
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet
|
||||
// source faceToCell;
|
||||
// {
|
||||
// set f0; // Name of faceSet
|
||||
//
|
||||
// //option neighbour; // cell with neighbour in faceSet
|
||||
// //option owner; // ,, owner
|
||||
// option any; // cell with any face in faceSet
|
||||
// //option all; // cell with all faces in faceSet
|
||||
// }
|
||||
//
|
||||
// // Select based on pointSet
|
||||
// source pointToCell;
|
||||
// {
|
||||
// set p0;
|
||||
// option any; // cell with any point in pointSet
|
||||
// //option all; // cell with all points in pointSet
|
||||
// }
|
||||
//
|
||||
// // Select based on cellShape
|
||||
// source shapeToCell;
|
||||
// {
|
||||
// type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
|
||||
// }
|
||||
//
|
||||
// // Cells with cell centre within box
|
||||
// source boxToCell;
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// }
|
||||
//
|
||||
// // Cells with cell centre within box
|
||||
// // Is skewed, rotated box. Given as origin and three spanning vectors.
|
||||
// source rotatedBoxToCell;
|
||||
// {
|
||||
// origin (0.2 0.2 -10);
|
||||
// i (0.2 0.2 0);
|
||||
// j (-0.2 0.2 0);
|
||||
// k (10 10 10);
|
||||
// }
|
||||
//
|
||||
// // Cells with centre within cylinder
|
||||
// source cylinderToCell;
|
||||
// {
|
||||
// p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
// p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
// radius 5.0;
|
||||
// }
|
||||
//
|
||||
// // Cells with centre within sphere
|
||||
// source sphereToCell;
|
||||
// {
|
||||
// origin (0.2 0.2 -10);
|
||||
// radius 5.0;
|
||||
// }
|
||||
//
|
||||
// // Cells with cellCentre nearest to coordinates
|
||||
// source nearestToCell;
|
||||
// {
|
||||
// points ((0 0 0) (1 1 1)(2 2 2));
|
||||
// }
|
||||
//
|
||||
// // Select based on surface
|
||||
// source surfaceToCell;
|
||||
// {
|
||||
// file "www.avl.com-geometry.stl";
|
||||
// outsidePoints ((-99 -99 -59)); // definition of outside
|
||||
// includeCut false; // cells cut by surface
|
||||
// includeInside false; // cells not on outside of surf
|
||||
// includeOutside false; // cells on outside of surf
|
||||
// nearDistance -1; // cells with centre near surf
|
||||
// // (set to -1 if not used)
|
||||
// curvature 0.9; // cells within nearDistance
|
||||
// // and near surf curvature
|
||||
// // (set to -100 if not used)
|
||||
// }
|
||||
//
|
||||
// // values of field within certain range
|
||||
// source fieldToCell;
|
||||
// {
|
||||
// field U; // Note: uses mag(U) since volVectorField
|
||||
// min 0.1;
|
||||
// max 0.5;
|
||||
// }
|
||||
//
|
||||
// // Mesh region (non-face connected part of (subset of)mesh)
|
||||
// source regionToCell;
|
||||
// {
|
||||
// set c0; // name of cellSet giving mesh subset
|
||||
// insidePoint (1 2 3); // point inside region to select
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// faceSet
|
||||
// ~~~~~~~
|
||||
//
|
||||
// // Copy elements from faceSet
|
||||
// source faceToFace;
|
||||
// {
|
||||
// set f1;
|
||||
// }
|
||||
//
|
||||
// // Select based on cellSet
|
||||
// source cellToFace;
|
||||
// {
|
||||
// set c0;
|
||||
// option all; // All faces of cells
|
||||
// //option both; // Only faces whose owner&neighbour are in cellSet
|
||||
// }
|
||||
//
|
||||
// // Select based on pointSet
|
||||
// source pointToFace;
|
||||
// {
|
||||
// set p0;
|
||||
// option any; // Faces using any point in pointSet
|
||||
// //option all // Faces with all points in pointSet
|
||||
// }
|
||||
//
|
||||
// // Select by explicitly providing face labels
|
||||
// source labelToFace;
|
||||
// {
|
||||
// value (12 13 56); // labels of faces
|
||||
// }
|
||||
//
|
||||
// // All faces of patch
|
||||
// source patchToFace;
|
||||
// {
|
||||
// patch ".*Wall"; // Name of patch, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // All faces of faceZone
|
||||
// source zoneToFace;
|
||||
// {
|
||||
// zone ".*Zone1"; // Name of faceZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Faces with face centre within box
|
||||
// source boxToFace;
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// }
|
||||
//
|
||||
// // Faces with normal to within certain angle aligned with vector.
|
||||
// source normalToFace;
|
||||
// {
|
||||
// normal (0 0 1); // Vector
|
||||
// cos 0.01; // Tolerance (max cos of angle)
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// pointSet
|
||||
// ~~~~~~~
|
||||
//
|
||||
// // Copy elements from pointSet
|
||||
// source pointToPoint;
|
||||
// {
|
||||
// set p1;
|
||||
// }
|
||||
//
|
||||
// // Select based on cellSet
|
||||
// source cellToPoint;
|
||||
// {
|
||||
// set c0;
|
||||
// option all; // all points of cell
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet
|
||||
// source faceToPoint;
|
||||
// {
|
||||
// set f0; // name of faceSet
|
||||
// option all; // all points of face
|
||||
// }
|
||||
//
|
||||
// // Select by explicitly providing point labels
|
||||
// source labelToPoint;
|
||||
// {
|
||||
// value (12 13 56); // labels of points
|
||||
// }
|
||||
//
|
||||
// // All points in pointzone
|
||||
// source zoneToPoint;
|
||||
// {
|
||||
// zone ".*Zone"; // name of pointZone, regular expressions allowed
|
||||
// }
|
||||
//
|
||||
// // Points nearest to coordinates
|
||||
// source nearestToPoint;
|
||||
// {
|
||||
// points ((0 0 0) (1 1 1));
|
||||
// }
|
||||
//
|
||||
// // Points with coordinate within box
|
||||
// source boxToPoint;
|
||||
// {
|
||||
// box (0 0 0) (1 1 1);
|
||||
// }
|
||||
//
|
||||
// // Select based on surface
|
||||
// source surfaceToPoint;
|
||||
// {
|
||||
// file "www.avl.com-geometry.stl";
|
||||
// nearDistance 0.1; // points near to surface
|
||||
// includeInside false; // points on inside of surface
|
||||
// // (requires closed surface with consistent
|
||||
// // normals)
|
||||
// includeOutside false; // ,, outside ,,
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// cellZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// (mirrors operations on a cellSet into a cellZone)
|
||||
//
|
||||
// // Select based on cellSet
|
||||
// source setToCellZone;
|
||||
// {
|
||||
// set c0; // name of cellSet
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// faceZoneSet
|
||||
// ~~~~~~~~~~~
|
||||
// // Select based on faceSet without orientation
|
||||
// source setToFaceZone;
|
||||
// {
|
||||
// set f0; // name of faceSet
|
||||
// }
|
||||
//
|
||||
// // Select based on faceSet, using cellSet to determine orientation
|
||||
// source setsToFaceZone;
|
||||
// {
|
||||
// faceSet f0; // name of faceSet
|
||||
// cellSet c0; // name of cellSet of slave side
|
||||
// }
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user