openfoam/tutorials/mesh/foamyHexMesh/flange/system/topoSetDict-slices
Mark Olesen 5f556ffb4a ENH: make sourceInfo sub-dictionary optional for topoSet (#1060)
- helps reduce clutter in the topoSetDict files.

  Caveats when using this.

  The older specification styles using "name" will conflict with the
  set name. Eg,

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        sourceInfo
        {
            name   inlet;
        }
    }

    would flattened to the following
    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        name   inlet;
    }
    which overwrites the "name" used for the faceSet.

    The solution is to use the updated syntax:

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        patch   inlet;
    }
2018-11-07 10:33:36 +01:00

126 lines
2.5 KiB
C++

/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
zSlice -0.009;
ySlice 0.0;
xSlice 0.0;
actions
(
{
name z;
type cellSet;
action new;
source boxToCell;
box (-100 -100 $zSlice)(100 100 100);
}
{
name zf;
type faceSet;
action new;
source cellToFace;
set z;
option all;
}
{
name z;
type cellSet;
action invert;
}
{
name zf;
type faceSet;
action subset;
source cellToFace;
set z;
option all;
}
// ~~~~~~~~~~~~~~~~ //
{
name y;
type cellSet;
action new;
source boxToCell;
box (-100 $ySlice -100)(100 100 100);
}
{
name yf;
type faceSet;
action new;
source cellToFace;
set y;
option all;
}
{
name y;
type cellSet;
action invert;
}
{
name yf;
type faceSet;
action subset;
source cellToFace;
set y;
option all;
}
// ~~~~~~~~~~~~~~~~ //
{
name x;
type cellSet;
action new;
source boxToCell;
box ($xSlice -100 -100)(100 100 100);
}
{
name xf;
type faceSet;
action new;
source cellToFace;
set x;
option all;
}
{
name x;
type cellSet;
action invert;
}
{
name xf;
type faceSet;
action subset;
source cellToFace;
set x;
option all;
}
);
// ************************************************************************* //