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:
Identify face/cell zones closest to a specified location.
Identify zones/objects of a specific type or containing a particular text string. You can also identify zones belonging to a group or object.
Obtain object region and face zone label lists.
Obtain mesh setup information such as zones with prism mesh settings or prism controls defined
Use the utility functions to determine the zones created during a particular operation by performing Boolean operations on lists returned by specific functions.
Use the
eval-expr
function to evaluate the lists returned by the functions in order that they can be used as input in the text user interface commands.
Note: These functions are not supported in a distributed parallel environment.
Feature | Description | Utility Function | |
---|---|---|---|
Zone query | By location | Return face zone at or closest to a specified location. Note: This function is not applicable to polyhedra meshes. | (get-face-zone-at-location '( |
Return cell zone at or closest to a specified location | (get-cell-zone-at-location '( | ||
Zone lists | By zone type | Return a list of zones of the specified default zone type | (get-zones-of-type ' |
By default group | Return a list of zones of the specified default zone group or user-defined group | (get-zones-of-group ' | |
By filter string | Return a list of zones whose names contain the specified filter string | (get-face-zones-of-filter ' | |
(get-cell-zones-of-filter ' | |||
(get-edge-zones-of-filter ' | |||
(get-node-zones-of-filter ' | |||
By object | Return a list of face zones in the specified objects | (get-face-zones-of-objects
'( | |
Return a list of face zones by ID in the specified object | (tgapi-util-get-face-zone-id-list-of-object
' | ||
(tgapi-util-get-face-zone-id-list-of-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 ' | ||
(tgapi-util-get-face-zone-id-list-of-regions " | |||
Return a list of edge zones in the specified objects | (get-edge-zones-of-objects
'( | ||
Return a list of edge zones by ID in the specified object | (tgapi-util-get-edge-zone-id-list-of-object
' | ||
(tgapi-util-get-edge-zone-id-list-of-object
" | |||
Return a list of cell zones by ID in the specified object | (tgapi-util-get-cell-zone-id-list-of-object
' | ||
(tgapi-util-get-cell-zone-id-list-of-object
" | |||
Return a list of face zones in the specified face zone labels of the object specified | (get-face-zones-of-labels 'object
'( | ||
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 ' | ||
(tgapi-util-get-face-zone-id-list-of-labels " | |||
Return a list of face zones shared by regions of specified types in the mesh object
specified, where is
fluid-fluid , solid-solid , or
fluid-solid | (get-face-zones-shared-by-regions-of-type ' | ||
Return a list of face zones in the specified regions | (get-face-zones-of-regions ' | ||
By cell shape | Return a list of prism cell zones | (tgapi-util-get-prism-cell-zones
'( | |
(tgapi-util-get-prism-cell-zones
" | |||
Return a list of tet cell zones | (tgapi-util-get-tet-cell-zones
'( | ||
(tgapi-util-get-tet-cell-zones
" | |||
By connectivity | Return adjacent cell zones for given face zone | (tgapi-util-get-adjacent-cell-zones
| |
(tgapi-util-get-adjacent-cell-zones
' | |||
(tgapi-util-get-adjacent-cell-zones
" | |||
Return adjacent boundary face zones for given cell zones. | (tgapi-util-get-adjacent-face-zones
'( | ||
(tgapi-util-get-adjacent-face-zones
" | |||
Return adjacent interior and boundary face zones for given cell zones. | (tgapi-util-get-adjacent-interior-and-boundary-face-zones
'( | ||
(tgapi-util-get-adjacent-interior-and-boundary-face-zones
" | |||
Return adjacent zones based on edge connectivity | (tgapi-util-get-adjacent-zones-by-edge-connectivity
'( | ||
(tgapi-util-get-adjacent-zones-by-edge-connectivity
" | |||
Return adjacent zones based on node connectivity | (tgapi-util-get-adjacent-zones-by-node-connectivity
'( | ||
(tgapi-util-get-adjacent-zones-by-node-connectivity
" | |||
Returns the number of faces and the boundary face zones that are shared with the specified cell zones. | (tgapi-util-get-shared-boundary-zones
' | ||
(tgapi-util-get-shared-boundary-zones
'( | |||
(tgapi-util-get-shared-boundary-zones
" | |||
Returns interior face zones connected to given cell zones. | (tgapi-util-get-interior-zones-connected-to-cell-zones
'( | ||
(tgapi-util-get-interior-zones-connected-to-cell-zones
" | |||
Mesh setup | Return 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
" | ||
Return the baffle zones based on the face zone list specified | (tgapi-util-get-baffles
'( | ||
Return the embedded baffle zones | (tgapi-util-get-embedded-baffles) | ||
Wrapped zones | Return a list of wrapped face zones | (get-wrapped-zones) | |
Unreferenced zones | Return 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
' | ||
(get-unreferenced-face-zones-of-filter
' | |||
(get-unreferenced-cell-zones-of-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
" | ||
(tgapi-util-get-unreferenced-cell-zone-id-list-of-pattern
" | |||
(tgapi-util-get-unreferenced-edge-zone-id-list-of-pattern
" | |||
Mesh statistics | Return cell zone with maximum volume for given list or pattern of cell zones | (tgapi-util-get-maxsize-cell-zone-by-volume
" | |
(tgapi-util-get-maxsize-cell-zone-by-volume
'( | |||
Return cell zone with maximum count of elements for given list or pattern of cell zones | (tgapi-util-get-maxsize-cell-zone-by-count
" | ||
(tgapi-util-get-maxsize-cell-zone-by-count
'( | |||
Return face zone with minimum area for given list or pattern of face zones | (tgapi-util-get-minsize-face-zone-by-area
" | ||
(tgapi-util-get-minsize-face-zone-by-area
'( | |||
Return face zone with minimum count of elements for given list or pattern of face zones | (tgapi-util-get-minsize-face-zone-by-count
" | ||
(tgapi-util-get-minsize-face-zone-by-count
'( | |||
Return a list of face zones with a count below the maximum entity count
( ) specified. You can choose to
restrict the report to only boundary face zones, if required
( set to #t or
#f ). | (tgapi-util-get-face-zone-list-by-maximum-entity-count
| ||
Return a list of edge zones with a count below the maximum entity count
( ) specified. You can choose to
restrict the report to only boundary edge zones, if required
( set to #t or
#f ). | (tgapi-util-get-edge-zone-list-by-maximum-entity-count
| ||
Return a list of cell zones with a count below the maximum entity count
( ) specified. | (tgapi-util-get-cell-zone-list-by-maximum-entity-count
| ||
Return a list of face zones with a maximum zone area below the
specified. | (tgapi-util-get-face-zone-list-by-maximum-zone-area
| ||
Return a list of face zones with a minimum zone area above the
specified. | (tgapi-util-get-face-zone-list-by-minimum-zone-area
| ||
Mesh diagnostics | Return a list of zones with free faces for the face zones specified | (tgapi-util-get-zones-with-free-faces
'( | |
(tgapi-util-get-zones-with-free-faces
'( | |||
(tgapi-util-get-zones-with-free-faces
" | |||
Return a list of zones with multi-connected faces for the face zones specified | (tgapi-util-get-zones-with-multi-faces
'( | ||
(tgapi-util-get-zones-with-multi-faces
'( | |||
(tgapi-util-get-zones-with-multi-faces
" | |||
Return a list of overlapping face zones based on the
and
specified | (tgapi-util-get-overlapping-face-zones
" | ||
Return a list of zones with marked faces for the face zones specified | (tgapi-util-get-zones-with-marked-faces
'( | ||
(tgapi-util-get-zones-with-marked-faces
'( | |||
(tgapi-util-get-zones-with-marked-faces
" | |||
Object lists | By name | Return a list of all objects | (tgapi-util-get-all-object-name-list) |
By type | Return a list of objects of the specified type | (get-objects-of-type ' | |
(tgapi-util-get-object-name-list-of-type
' | |||
By filter | Return a list of objects whose names contain the specified filter string | (get-objects-of-filter ' | |
Region lists | By object | Return a list of regions in the specified object | (get-regions-of-object
' |
(tgapi-util-get-region-name-list-of-object
' | |||
(tgapi-util-get-region-name-list-of-object
" | |||
Returns a sorted list of volumetric regions by
volume for the object specified. Specify the
(ascending or
descending ). | (tgapi-util-sort-regions-by-volume
" | ||
Return the region volume for the specified region of an object | (tgapi-util-get-region-volume
' | ||
(tgapi-util-get-region-volume
" | |||
By filter | Return a list of regions in the specified object, whose names contain the specified filter string | (get-regions-of-filter ' | |
By name pattern | Return a list of regions in the specified object, whose names contain the specified name pattern | (tgapi-util-get-region-name-list-of-pattern ' | |
(tgapi-util-get-region-name-list-of-pattern " | |||
By face zones | Return a list of regions containing the face zones specified | (get-regions-of-face-zones
'( | |
(tgapi-util-get-region-name-list-of-face-zones
'( | |||
(tgapi-util-get-region-name-list-of-face-zones
" | |||
Overlapping zone pairs | Based on join tolerance and feature angle | Return the pairs of overlapping face
zones based on the join tolerance and feature angle.
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
'( |
(tgapi-util-find-join-pairs
'( | |||
(tgapi-util-find-join-pairs
" | |||
List operations | Convert | Convert a list of zone name symbols to a list of IDs | (tgapi-util-convert-zone-name-symbols-to-ids
'( |
Convert a list of zone name strings to a list IDs | (tgapi-util-convert-zone-name-strings-to-ids
'( | ||
Convert a list of zone IDs to a list of name strings | (tgapi-util-convert-zone-ids-to-name-strings
'( | ||
Convert a list of zone IDs to a list of name symbols | (tgapi-util-convert-zone-ids-to-name-symbols
'( | ||
Convert a list of symbols to strings | (tgapi-util-convert-symbol-list-to-string
'( | ||
Create a string from a list of symbols | (tgapi-util-create-string-from-symbol-list
'( | ||
Subtract | Returns the boolean subtraction of the lists | (tgapi-util-integer-list-subtract '( | |
Replace | Enables you to replace one element in a list by another | (tgapi-util-list-replace | |
Remove | Enables you to remove an element from a list | (tgapi-util-remove-element-from-list | |
Search | Enables you to search for an element in a list. | (tgapi-util-list-contains? |
You can perform Boolean operations on lists returned by the query functions:
Union of lists: (list-union list-1 list-2 ...)
Intersection of lists: (list-intersection list-1 list-2 ...)
Subtraction of lists: (list-subtract list-1 list-2)
Note: Only two lists can be used as arguments for the subtraction operation.
For example,
list-1 = '(1 2 3 4) list-2 = '(1 5 6) list-3 = '(1 4 7)
then:
(list-union list-1 list-2 list-3) = '(1 2 3 4 5 6 7) (list-intersection list-1 list-2 list-3) = '(1) (list-subtract list-1 list-2) = '(2 3 4)
Smoothing the prism-cap zone created during the prism creation operation:
Obtain a list of the zones named prism-cap*.
(define initial-zones(get-face-zones-of-filter 'prism-cap*))
Apply appropriate prism parameters and create prisms.
Obtain a list of the zones named prism-cap* after the prism creation operation.
(define final-zones(get-face-zones-of-filter 'prism-cap*))
Smooth the recently created prism-cap zone.
/boundary/improve/smooth(eval-expr '(list-subtract final-zones initial-zones))
Improving mesh object quality:
/objects/improve-object-quality (get-objects-of-type 'mesh) smooth-and-improve 1 no
Recovering periodic surfaces for mesh object face zones:
/boundary/recover-periodic-surfaces auto (get-face-zones-of-label '_fluid '(periodic-1))
Defining curvature sizing for all object face zones except symmetry planes:
/scoped-sizing/create control-curv curvature object-faces yes no "(eval-expr ’(list-subtract (get-objects-of-filter '*) (get-objects-of-filter 'sym*)))" 0.25 4 1.2 18