sphereToCell

Description

A topoSetCellSource to select cells based on cell centres inside a given bounding sphere.

Operands

Operand Type Location
output cellSet $FOAM_CASE/constant/polyMesh/sets/<set>

Description

Example of the sphereToCell topoSet by using actions sub-dictionary in system/topoSetDict file:

{
    // Mandatory (inherited) entries
    name        <name>;
    type        cellSet;
    action      <action>;

    // Mandatory entries
    source      sphereToCell;
    origin      (0 0 0);
    radius      0.5;

    // Optional entries
    innerRadius 0;
}

where the entries mean:

Property Description Type Required Default
name Name of cellSet word yes -
type Type name: cellSet word yes -
action Action applied on cells - see below word yes -
source Source name: sphereToCell word yes -
origin The origin (centre) of the sphere vector yes -
radius The (outer) radius of sphere scalar yes -
innerRadius The inner radius of sphere scalar no 0

Options for the action entry:

new      | Create a new cellSet from selected cells
add      | Add selected cells into this cellSet
subtract | Remove selected cells from this cellSet

Further information

Tutorial:

Source code:

History

  • Introduced in version v1812

Would you like to suggest an improvement to this page? Create an issue

Copyright © 2020 OpenCFD Ltd.

Licensed under the Creative Commons License BY-NC-ND Creative Commons License