Skip to content
Snippets Groups Projects
topoSetDict 3.47 KiB
Newer Older
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2412                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// 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
//     type    cellSet;
//
//     // action to perform on set. Two types:
//     // - require no source : clear/invert/remove
//     //       clear  : clears set or zone
//     //       invert : select all currently non-selected elements
//     //       remove : removes set or zone
//     // - require source    : new/add/subtract/subset
//     //       new    : create new set or zone from source
//     //       add    : add source to 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.
// 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
Mark OLESEN's avatar
Mark OLESEN committed
// there would be a name clash (Eg, 'type' or 'name' appearing at both levels).
// In most cases, the source definitions have been adjusted to avoid such
// clashes.
// More detailed listing in the annotated topoSetSourcesDict
Mark OLESEN's avatar
Mark OLESEN committed
    // Example: pick up internal faces on outside of cellSet
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
        name    c0;
        type    cellSet;
        action  new;
        name    f0;
        type    faceSet;
        action  new;
        source  cellToFace;
    }

    // Determine inverse cellSet
    {
        name    c1;
        type    cellSet;
        action  new;
        source  cellToCell;
        type    cellSet;
        action  invert;
    }

        name    f0;
        type    faceSet;
        action  subset;
        source  cellToFace;

    // Example: create cellZone from geometric region
    {
        name    c0;
        type    cellZoneSet;
        action  new;
        source  boxToCell;
        box     (0.04 0 0)(0.06 100 100);

    // Example: create faceZone from explicit contents. Assumes faceZone same
    //          orientation as face (flipMap is false)
    {
        name    f0;
        type    faceZoneSet;
        action  new;
        source  labelToFace;
        value   (2);
    }
);

// ************************************************************************* //