A topoSetCellSource to select cells based on cell centres inside a given parallopiped (i.e. rotated/skewed box).


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


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

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

    // Mandatory entries
    source      rotatedBoxToCell;
    origin      (<o1> <o2> <o3>);
    i           (<i1> <i2> <i3>);
    j           (<j1> <j2> <j3>);
    k           (<k1> <k2> <k3>);

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: rotatedBoxToCell word yes -
origin Origin of the box vector yes -
i x1-axis vector yes -
j x2-axis vector yes -
k x3-axis vector yes -

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

Notes on entries

Box defined as origin and i,j,k vectors. For example, box rotated 45 degrees around z-axis with sizes sqrt(0.2^2+0.2^2) (and extra large, 200 in z direction):

origin   ( 0.4 0.4 -100);
i        ( 0.2 0.2  0);
j        (-0.2 0.2  0);
k        ( 0.0 0.0  100);

Further information


Source code:


  • Introduced in version 1.5

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