A.2. Label Utility Functions

The following label utility functions are available:

FeatureDescriptionFunction
Add labelsOn face zonesAdd labels on the specified face zones.
  • Specify the face zones using a face-zone-name-list, face-zone-ID-list, or face-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-add-labels-on-face-zones '(face-zone-name-list) '(label-name-list))
(tgapi-util-add-labels-on-face-zones '(face-zone-ID-list) '(label-name-list))
(tgapi-util-add-labels-on-face-zones "face-zone-name-pattern*" '(label-name-list))
On cell zonesAdd labels on the specified cell zones.
  • Specify the cell zones using a cell-zone-name-list, cell-zone-ID-list, or cell-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-add-labels-on-cell-zones '(cell-zone-name-list) '(label-name-list))
(tgapi-util-add-labels-on-cell-zones '(cell-zone-ID-list) '(label-name-list))
(tgapi-util-add-labels-on-cell-zones "cell-zone-name-pattern*" '(label-name-list))
On edge zonesAdd labels on the specified edge zones.
  • Specify the edge zones using an edge-zone-name-list, edge-zone-ID-list, or edge-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-add-labels-on-edge-zones '(edge-zone-name-list) '(label-name-list))
(tgapi-util-add-labels-on-edge-zones '(edge-zone-ID-list) '(label-name-list))
(tgapi-util-add-labels-on-edge-zones "edge-zone-name-pattern*" '(label-name-list))
Return list of labelsOn face zonesReturns the list of labels for the specified face zones. Specify the face zones using a face-zone-name-list, face-zone-ID-list, or face-zone-name-pattern*.(tgapi-util-get-labels-on-face-zones '(face-zone-name-list))
(tgapi-util-get-labels-on-face-zones '(face-zone-ID-list))
(tgapi-util-get-labels-on-face-zones "face-zone-name-pattern*")
On cell zoneReturns the list of labels for the specified cell zones. Specify the cell zones using a cell-zone-name-list, cell-zone-ID-list, or cell-zone-name-pattern*.(tgapi-util-get-labels-on-cell-zones '(cell-zone-name-list))
(tgapi-util-get-labels-on-cell-zones '(cell-zone-ID-list))
(tgapi-util-get-labels-on-cell-zones "cell-zone-name-pattern*")
On edge zoneReturns the list of labels for the specified edge zones. Specify the edge zones using an edge-zone-name-list, edge-zone-ID-list, or edge-zone-name-pattern*.(tgapi-util-get-labels-on-edge-zones '(edge-zone-name-list))
(tgapi-util-get-labels-on-edge-zones '(edge-zone-ID-list))
(tgapi-util-get-labels-on-edge-zones "edge-zone-name-pattern*")
Face Zone Label lists by objectReturn a list of face zone labels in the specified object.(get-labels-of-object 'object)
(get-labels-of-object "object")
(tgapi-util-get-all-label-name-list 'object)
(tgapi-util-get-all-label-name-list "object")
Return a list of face zone labels in the specified object, whose names contain the specified filter/pattern string.(get-labels-of-filter 'object 'filter)
(tgapi-util-get-label-name-list-of-pattern 'object "label-name-pattern*")
(tgapi-util-get-label-name-list-of-pattern "object" "label-name-pattern*")
Face Zone Label lists by face zonesReturn a list of face zone labels containing the face zones specified.(get-labels-of-face-zones '(list-of-face-zone-IDs))
Return list of zones with labelsFace zonesReturns the list of face zones (by ID) containing the labels specified.
  • Specify the face zones using a face-zone-name-list, face-zone-ID-list, or face-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-get-face-zone-id-list-with-labels '(face-zone-name-list) '(label-name-list))
(tgapi-util-get-face-zone-id-list-with-labels '(face-zone-ID-list) '(label-name-list))
(tgapi-util-get-face-zone-id-list-with-labels "face-zone-name-pattern* '(label-name-list))
Cell ZonesReturns the list of cell zones (by ID) containing the labels specified.
  • Specify the cell zones using a cell-zone-name-list, cell-zone-ID-list, or cell-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-get-cell-zone-id-list-with-labels '(cell-zone-name-list) '(label-name-list))
(tgapi-util-get-cell-zone-id-list-with-labels '(cell-zone-ID-list) '(label-name-list))
(tgapi-util-get-cell-zone-id-list-with-labels "cell-zone-name-pattern* '(label-name-list))
Edge zonesReturns the list of edge zones (by ID) containing the labels specified.
  • Specify the face zones using an edge-zone-name-list, edge-zone-ID-list, or edge-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-get-edge-zone-id-list-with-labels '(edge-zone-name-list) '(label-name-list))
(tgapi-util-get-edge-zone-id-list-with-labels '(edge-zone-ID-list) '(label-name-list))
(tgapi-util-get-edge-zone-id-list-with-labels "edge-zone-name-pattern* '(label-name-list))
Remove labels from zonesFrom face zonesRemoves the specified labels from the face zones.
  • Specify the face zones using a face-zone-name-list, face-zone-ID-list, or face-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-remove-labels-on-face-zones '(face-zone-name-list) '(label-name-list))
(tgapi-util-remove-labels-on-face-zones '(face-zone-ID-list) '(label-name-list))
(tgapi-util-remove-labels-on-face-zones "face-zone-name-pattern*" '(label-name-list))
From cell zonesRemoves the specified labels from the cell zones.
  • Specify the cell zones using a cell-zone-name-list, cell-zone-ID-list, or cell-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-remove-labels-on-cell-zones '(cell-zone-name-list) '(label-name-list))
(tgapi-util-remove-labels-on-cell-zones '(cell-zone-ID-list) '(label-name-list))
(tgapi-util-remove-labels-on-cell-zones "cell-zone-name-pattern*" '(label-name-list))
From edge zonesRemoves the specified labels from the edge zones.
  • Specify the edge zones using an edge-zone-name-list, edge-zone-ID-list, or edge-zone-name-pattern*.

  • Specify the labels using a label-name-list (for example '(label1 label2)).

(tgapi-util-remove-labels-on-edge-zones '(edge-zone-name-list) '(label-name-list))
(tgapi-util-remove-labels-on-edge-zones '(edge-zone-ID-list) '(label-name-list))
(tgapi-util-remove-labels-on-edge-zones "edge-zone-name-pattern*" '(label-name-list))

A.2.1. Examples

Consider a model with face zones part1, part2, part3, inlet1, inlet2, and outlet.

  • Add labels on the specified face zones.

    (tgapi-util-add-labels-on-face-zones '(inlet1 inlet2) '(inlet))

    (tgapi-util-add-labels-on-face-zones "part*" '(wall solid))

  • Return the list of labels on the specified face zone.

    (tgapi-util-get-labels-on-face-zones '(12 34))

    Returns list of labels: (inlet)

    (tgapi-util-get-labels-on-face-zones "part*")

    Returns list of labels: (wall solid)

  • Remove labels from the specified face zones.

    (tgapi-util-remove-labels-on-face-zones "part*" '(solid))

  • Return the list of face zones (by ID) containing the labels specified.

    (tgapi-util-get-face-zone-id-list-with-labels "inlet*" '(inlet))

    Returns face zone ID list: (12 34)