A.1. List Queries and Utility Functions

When performing a series of operations, you may want to list all the zones of a particular type, group, or containing a particular text string or name pattern. You can also query zones through the TUI based on a regular expression and a specified variable. You can:

FeatureDescriptionUtility Function
Zone queryBy locationReturn face zone at or closest to a specified location(get-face-zone-at-location '(x y z))
Return cell zone at or closest to a specified location(get-cell-zone-at-location '(x y z))
Zone listsBy zone typeReturn a list of zones of the specified default zone type(get-zones-of-type 'type)
By default groupReturn a list of zones of the specified default zone group or user-defined group(get-zones-of-group 'group)
By filter stringReturn a list of zones whose names contain the specified filter string(get-face-zones-of-filter 'filter)
(get-cell-zones-of-filter 'filter)
(get-edge-zones-of-filter 'filter)
(get-node-zones-of-filter 'filter)
By objectReturn a list of face zones in the specified objects(get-face-zones-of-objects '(object-list))
Return a list of face zones by ID in the specified object(tgapi-util-get-face-zone-id-list-of-object 'object)
(tgapi-util-get-face-zone-id-list-of-object "object")
Return a list of face zones by ID in the specified regions of an object(tgapi-util-get-face-zone-id-list-of-regions 'object '(region-list))
(tgapi-util-get-face-zone-id-list-of-regions "object" '(region-list))
Return a list of edge zones in the specified objects(get-edge-zones-of-objects '(object-list))
Return a list of edge zones by ID in the specified object(tgapi-util-get-edge-zone-id-list-of-object 'object)
(tgapi-util-get-edge-zone-id-list-of-object "object")
Return a list of cell zones by ID in the specified object(tgapi-util-get-cell-zone-id-list-of-object 'object)
(tgapi-util-get-cell-zone-id-list-of-object "object")
Return a list of face zones in the specified face zone labels of the object specified(get-face-zones-of-labels 'object '(list-of-label-names))
Return a list of face zones by ID in the specified face zone labels of an object(tgapi-util-get-face-zone-id-list-of-labels 'object '(face-zone-label-list))
(tgapi-util-get-face-zone-id-list-of-labels "object" '(face-zone-label-list))
Return a list of face zones shared by regions of specified types in the mesh object specified, where region-type is fluid-fluid, solid-solid, or fluid-solid(get-face-zones-shared-by-regions-of-type 'mesh-object 'region-type)
Return a list of face zones in the specified regions(get-face-zones-of-regions 'object '(list-of-region-names))
By cell shapeReturn a list of prism cell zones(tgapi-util-get-prism-cell-zones '(zone-list))
(tgapi-util-get-prism-cell-zones "zone-name-pattern*")
Return a list of tet cell zones(tgapi-util-get-tet-cell-zones '(zone-list))
(tgapi-util-get-tet-cell-zones "zone-name-pattern*")
By connectivityReturn adjacent cell zones for given face zone(tgapi-util-get-adjacent-cell-zones zone-id)
(tgapi-util-get-adjacent-cell-zones 'zone-name)
(tgapi-util-get-adjacent-cell-zones "zone-name")
Return adjacent boundary face zones for given cell zones.(tgapi-util-get-adjacent-face-zones '(cell-zone-list))
(tgapi-util-get-adjacent-face-zones "cell-zone-name-pattern*")
Return adjacent interior and boundary face zones for given cell zones.(tgapi-util-get-adjacent-interior-and-boundary-face-zones '(cell-zone-list))
(tgapi-util-get-adjacent-interior-and-boundary-face-zones "cell-zone-name-pattern*")
Return adjacent zones based on edge connectivity(tgapi-util-get-adjacent-zones-by-edge-connectivity '(zone-list))
(tgapi-util-get-adjacent-zones-by-edge-connectivity "zone-name-pattern*")
Return adjacent zones based on node connectivity(tgapi-util-get-adjacent-zones-by-node-connectivity '(zone-list))
(tgapi-util-get-adjacent-zones-by-node-connectivity "zone-name-pattern*")
Returns the number of faces and the boundary face zones that are shared with the specified cell zones.(tgapi-util-get-shared-boundary-zones 'cell-zone-name)
(tgapi-util-get-shared-boundary-zones '(cell-zone-list))
(tgapi-util-get-shared-boundary-zones "cell-zone-name-pattern*")
Mesh setupReturn a list of face zones with zone-specific prism settings applied(tgapi-util-get-face-zones-with-zone-specific-prisms-applied)
Return a list of face zones to which the specified prism controls apply(tgapi-util-get-face-zones-of-prism-controls "control-name")
Return the baffle zones based on the face zone list specified(tgapi-util-get-baffles '(face-zone-list))
Return the embedded baffle zones(tgapi-util-get-embedded-baffles)
Wrapped zonesReturn a list of wrapped face zones(get-wrapped-zones)
Unreferenced zonesReturn a list of unreferenced zones(get-unreferenced-edge-zones)
(get-unreferenced-face-zones)
(get-unreferenced-cell-zones)
Return a list of unreferenced zones whose names contain the specified filter string(get-unreferenced-edge-zones-of-filter 'filter)
(get-unreferenced-face-zones-of-filter 'filter)
(get-unreferenced-cell-zones-of-filter 'filter)
Return a list of unreferenced zones by ID, whose names contain the specified pattern(tgapi-util-get-unreferenced-face-zone-id-list-of-pattern "pattern*")
(tgapi-util-get-unreferenced-cell-zone-id-list-of-pattern "pattern*")
(tgapi-util-get-unreferenced-edge-zone-id-list-of-pattern "pattern*")
Mesh statisticsReturn cell zone with maximum volume for given list or pattern of cell zones(tgapi-util-get-maxsize-cell-zone-by-volume "pattern*")
(tgapi-util-get-maxsize-cell-zone-by-volume '(zone-list))
Return cell zone with maximum count of elements for given list or pattern of cell zones(tgapi-util-get-maxsize-cell-zone-by-count "pattern*")
(tgapi-util-get-maxsize-cell-zone-by-count '(zone-list))
Return face zone with minimum area for given list or pattern of face zones(tgapi-util-get-minsize-face-zone-by-area "pattern*")
(tgapi-util-get-minsize-face-zone-by-area '(zone-list))
Return face zone with minimum count of elements for given list or pattern of face zones(tgapi-util-get-minsize-face-zone-by-count "pattern*")
(tgapi-util-get-minsize-face-zone-by-count '(zone-list))
Return a list of face zones with a count below the maximum entity count (maximum-entity-count) specified. You can choose to restrict the report to only boundary face zones, if required (only-boundary? set to #t or #f).(tgapi-util-get-face-zone-list-by-maximum-entity-count maximum-entity-count only-boundary?)
Return a list of edge zones with a count below the maximum entity count (maximum-entity-count) specified. You can choose to restrict the report to only boundary edge zones, if required (only-boundary? set to #t or #f).(tgapi-util-get-edge-zone-list-by-maximum-entity-count maximum-entity-count only-boundary?)
Return a list of cell zones with a count below the maximum entity count (maximum-entity-count) specified. (tgapi-util-get-cell-zone-list-by-maximum-entity-count maximum-entity-count)
Return a list of face zones with a maximum zone area below the maximum-zone-area specified.(tgapi-util-get-face-zone-list-by-maximum-zone-area maximum-zone-area)
Return a list of face zones with a minimum zone area above the minimum-zone-area specified.(tgapi-util-get-face-zone-list-by-minimum-zone-area minimum-zone-area)
Mesh diagnosticsReturn a list of zones with free faces for the face zones specified(tgapi-util-get-zones-with-free-faces '(zone-id-list))
(tgapi-util-get-zones-with-free-faces '(zone-name-list))
(tgapi-util-get-zones-with-free-faces "zone-name-pattern*")
Return a list of zones with multi-connected faces for the face zones specified(tgapi-util-get-zones-with-multi-faces '(zone-id-list))
(tgapi-util-get-zones-with-multi-faces '(zone-name-list))
(tgapi-util-get-zones-with-multi-faces "zone-name-pattern*")
Return a list of overlapping face zones based on the area-tolerance and distance-tolerance specified(tgapi-util-get-overlapping-face-zones "face-zone-name-pattern*" area-tolerance distance-tolerance)
Return a list of zones with marked faces for the face zones specified(tgapi-util-get-zones-with-marked-faces '(zone-id-list))
(tgapi-util-get-zones-with-marked-faces '(zone-name-list))
(tgapi-util-get-zones-with-marked-faces "zone-name-pattern*")
Object listsBy nameReturn a list of all objects(tgapi-util-get-all-object-name-list)
By typeReturn a list of objects of the specified type(get-objects-of-type 'type)
(tgapi-util-get-object-name-list-of-type 'type)
By filterReturn a list of objects whose names contain the specified filter string(get-objects-of-filter 'filter)
Region listsBy objectReturn a list of regions in the specified object(get-regions-of-object 'object)
(tgapi-util-get-region-name-list-of-object 'object)
(tgapi-util-get-region-name-list-of-object "object")
By filterReturn a list of regions in the specified object, whose names contain the specified filter string(get-regions-of-filter 'object 'filter)
By name patternReturn a list of regions in the specified object, whose names contain the specified name pattern(tgapi-util-get-region-name-list-of-pattern 'object "region-name-pattern*")
(tgapi-util-get-region-name-list-of-pattern "object" "region-name-pattern*")
By face zonesReturn a list of regions containing the face zones specified(get-regions-of-face-zones '(list-of-face-zone-IDs))
(tgapi-util-get-region-name-list-of-face-zones '(list-of-face-zone-IDs))
(tgapi-util-get-region-name-list-of-face-zones "face-zone-name-pattern*")
Overlapping zone pairsBased on join tolerance and feature angleReturn the pairs of overlapping face zones based on the join tolerance and feature angle.
  • Specify the face zones using a face-zone-name-list, face-zone-ID-list, or face-zone-name-pattern*.

  • Specify the tolerance value for locating the overlapping faces (join-tolerance).

  • Choose to use an absolute tolerance value or relative to face edges (set absolute-tolerance to #t or #f).

  • Specify the feature angle to identify features in the overlap region (feature-angle). The default value is 40.

Each member in the list returned includes the zone IDs for the overlapping zone pair and the join region represented by the bounding box. The same pair of zones may appear multiple times (with different join region bounding box coordinates) in the returned list.

The returned list is of the format:

((pair1_zone-id1 pair1_zone-id2 (join-region-bounding-box-min x y z) (join-region-bounding-box-max x y z)) (pair2_zone-id1 pair2_zone-id2 (join-region-bounding-box-min x y z) (join-region-bounding-box-max x y z)) ...)

For example:

((2 5 (-211.40 -139.24 -165.17) (46.36 -101.69 -124.61)) (2 5 (-211.4 -204.94 -55.89) (46.29 -171.68 -12.16)) (7 8 (-170.82 140.79 -108.57) (5.83 162.47 -89.04)))
(tgapi-util-find-join-pairs '(face-zone-name-list) join-tolerance absolute-tolerance? join-angle)
(tgapi-util-find-join-pairs '(face-zone-id-list) join-tolerance absolute-tolerance? join-angle)
(tgapi-util-find-join-pairs "face-zone-name-pattern*" join-tolerance absolute-tolerance? join-angle)
List operationsConvertConvert a list of zone name symbols to a list of IDs(tgapi-util-convert-zone-name-symbols-to-ids '(zone-name-list))
Convert a list of zone name strings to a list IDs(tgapi-util-convert-zone-name-strings-to-ids '(zone-name-list))
Convert a list of zone IDs to a list of name strings(tgapi-util-convert-zone-ids-to-name-strings '(zone-id-list))
Convert a list of zone IDs to a list of name symbols(tgapi-util-convert-zone-ids-to-name-symbols '(zone-id-list))
Convert a list of symbols to strings(tgapi-util-convert-symbol-list-to-string '(symbol-list))
Create a string from a list of symbols(tgapi-util-create-string-from-symbol-list '(symbol-list))
SubtractReturns the boolean subtraction of the lists(tgapi-util-integer-list-subtract '(list-1) '(list-2))
ReplaceEnables you to replace one element in a list by another(tgapi-util-list-replace new-element old-element input-list)
RemoveEnables you to remove an element from a list(tgapi-util-remove-element-from-list input-list element)
SearchEnables you to search for an element in a list.(tgapi-util-list-contains? input-list element)

Release 18.2 - © ANSYS, Inc. All rights reserved.