subset by expression

subset by expression

The subset by expression module creates a subset of the input grid with the same dimensionality. What this means, in other words, is that plume can receive a field (blue port) model with cells which are points, lines, surfaces and/or volumes and its output will be a subset of the same type of cells.

subset by expression is different from plume in that it outputs entire cells making its output lego-like.

It uses a mathematical expression allowing you to do complex subsetting calculations on coordinates and MULTIPLE data components with a single module, which can dramatically simplify your network and reduce memory usage. It has 2 floating point variables (N1,N2) which are setup with ports so they can be easily animated.

Subset By: You can specify whether the subsetting is based on either Nodal data or Cell data.

Expression Cells to Include: Is a Python expression where you can specify whether the subsetting of cells requires all nodes to match the criteria for a cell to be included or if ANY nodes match, then the cell will be included. The second option includes more cells.

Operators:

  • == Equal to
  • < Less than
  • Greater Than

  • <= Less than or Equal to
  • = Greater Than or Equal to

  • or
  • and
  • in (as in list)

Example Expressions:

  • If Nodal data is selected:
    • D0 >= N1 All nodes with the first analyte greater than or equal to N1 will be used for inclusion determination.
    • (D0 < N1) or (D1 < N2) All nodes with the first analyte less than or equal to N1 OR the second analyte less than or equal to N2 will be used for inclusion determination.
  • If Cell data is selected:
    • D1 in [0, 2] where D1 is Layer will give you the uppermost and third layers.
    • D1 in [1] where D1 is Layer will give you the middle layer.
    • D1 == 0 where D1 is Layer will give you the uppermost layer
    • D1 >= 1 where D1 is Layer will give you all but the uppermost layer

Module Input Ports

  • Input Field [Field] Accepts a data field.

Module Output Ports

  • Output Field [Field] Outputs the subsetted field as a volume.
  • Status [String / minor] Outputs a string containing a description of the operation being performed (e.g. TCE plume above 4.00 mg/kg)
  • Isolevel [Number] Outputs the subsetting level.
  • Plume [Renderable]: Outputs to the viewer.