create_zones_from_labels#

Mesh.create_zones_from_labels(label_expression=None, conversion_method=LabelToZoneMethod.SIMPLE)#

Create zones from labels.

When exporting to various solvers, zones play a very important role. Zones are where material properties and boundary conditions can be set in respective solvers.

Zones allow downstream setting of boundary conditions or material properties.

Zone names in PyPrimeMesh are translated into equivalent concepts in the solver. Currently, only one method is available to convert a zone to a label, and only face zones are created.

The create_zones_from_labels method finds the entities by labels and then adds them to zones with the same names as the labels.

If the label_expression parameter is not provided, all labels are flattened to create zones. If overlaps occur, label names are combined, and separate zones are created.

For example, if “LabelA” and “LabelB” have overlapping TopoFaces, these zones are created: "LabelA", "LabelB", and "LabelA_LabelB" for the overlap.

Parameters:
label_expressionstr, optional

Expression for the labels to convert to zones. The default is None.

conversion_methodLabelToZoneMethod, optional

Method for converting the labels to zones. The default is LabelToZoneMethod.SIMPLE.

Examples

>>> from ansys.meshing.prime import lucid
>>> mesh_util = lucid.Mesh(model)
>>> mesh_util.create_zones_from_labels()

Examples using Mesh.create_zones_from_labels#

Convert data when importing and exporting mesh and CAD formats

Convert data when importing and exporting mesh and CAD formats

Mesh a mixing elbow for a flow analysis

Mesh a mixing elbow for a flow analysis

Mesh a pipe T-section for structural thermal and fluid flow analysis

Mesh a pipe T-section for structural thermal and fluid flow analysis

Wrap a toy car for a flow analysis

Wrap a toy car for a flow analysis

Mesh a generic F1 car rear wing for external aero simulation

Mesh a generic F1 car rear wing for external aero simulation

Mesh a generic PCB geometry with multiple hexa layers

Mesh a generic PCB geometry with multiple hexa layers

Create a contact patch for wrapping between a wheel and ground interface

Create a contact patch for wrapping between a wheel and ground interface