On this page:
4.11.1 Entity IDs
4.11.2 Entity Names
4.11.3 Persistent Attributes
4.11.3.1 Attribute Behavior
4.11.3.2 Attribute Commands
4.11.3.3 Attribute Types
4.11.3.4 Using Cubit Attributes
8.5

4.11 Geometry Attributes

Each geometric topological entity has specific information attached to it. These attributes specify aspects of the entity such as the color that entity is drawn in and the meshing scheme to be used when meshing that entity. This section describes those geometry attributes that are not described elsewhere in this manual.

4.11.1 Entity IDs

Topological entities (including groups) are assigned integer identification numbers or ids in Cubit in ascending order, starting with 1 (one). Each new entity created within Cubit receives a unique id within the topological entity type.This id can be used for specifying the entity in Cubit commands, for example "draw volume 3".

There is a separate id space for each type of topological entity. For example, all mesh nodes are given ids from 1 to n, where n is an integer greater than or equal to the number of nodes in the model. Likewise, all hexahedra are given ids from 1 to m, where m is an integer greater than or equal to the number of hexahedra in the model.

4.11.1.1 Element Ids

Each mesh entity (hex, tet, face, tri, edge, node, etc.) may also have a Global Element ID from an id space which is used for all mesh entities. A mesh entity is only assigned a Global Element ID if it is in a block, and is the global id that will be assigned to the element during Exodus export. The Global Element ID provides a single id space across all the different element types.

4.11.1.2 Gaps in ID space

After working with a model for some time, various operations will cause gaps to be left in the numbering of the geometric & mesh entities. The compress ids command can be used to eliminate these gaps:

Compress [Ids] [All] [Group|Body|Volume|Surface|Curve|Vertex|Element|Hex|Tet|Face|Edge|Node] [Retainmax] [Sort]

Typing compress with no options or compress all will compress the ids of all entities; otherwise, the entity type for which ids should be compressed can be specified. The retainmax argument will retain the maximum id for each entity type, so that entities created subsequent to this command will receive ids greater than that value. If the sort qualifier is included, the new id of each entity will be determined by its size and location. Small entities are given a lower id than large entities. Entities that are the same size are sorted by their location, with lower x, y, and z coordinates leading to a lower id. If two entities are found to have the same size and location, they are sorted according to their previous ids. This option can be used to restore ids in translated models in a manner which leads to more persistence than purely random id assignment.

4.11.1.3 Renumbering IDs

The renumber command can be used to change the id numbers assigned to meshed entities.

Renumber {Node|Edge|Tri|Face|Hex|Tet|Wedge} <id_range> Start_id <id> [Uniqueids]

Any valid range specification can be used to specify the source ids. There is no requirement that the ids being renumbered are consecutively numbered. The new id numbers will be consecutive beginning at the specified start id. For the command to be successful there can be no existing ids within the effective range of the start id. If the resultant destination range is not free of id numbers, the command will fail with an appropriate error.

Using the uniqueids keyword will result in the elements to be renumbered such that no element shares the same ID.

For convenience, all elements and nodes in a block can be renumbered with a single command: Renumber block <id_range> [node_start_id <id>] [elem_start_id <id>] [localids] By default, the Global Element ID is renumbered with the renumber block command. If localids is specified, the hex, tet, face, tri, or edge id is renumbered instead.

4.11.1.4 Volume ID

The volume id command is used to renumber a single volume.

Volume <old_id> Id <new_id>

This command replaces the volume’s old_id with the new_id if no other is using the new_id number. Entity renaming only works for volumes; it does not work for nodes, curves or surfaces.

4.11.2 Entity Names

By default, geometric entities in CUBIT are referenced using an entity type (e.g. Surface, Volume) and an id, for example "draw surface 1". However, geometric entities can also be assigned names, to simplify working with specific entities. Once a name is assigned to an entity, that name can be used in any CUBIT command in place of the entity type and number.For example, if surface 1 were named ’mysurf1’, the command above would be equivalent to "draw mysurf1".Also, since entity names are saved with the geometry, this also provides a means for persistent identifiers for geometric entities. Names can be added or removed using the following commands.

{Group|Body|Volume|Surface|Curve|Vertex} {Name | Rename} {‘<entity_name>’| Default}

{Group|Body|Volume|Surface|Curve|Vertex} Remove Name {‘<entity_name>’| All | Default}

The name of each topological entity appears in the output of the List command. In addition, topological entities can be labeled with their names (see label command). A list of all names currently assigned and their corresponding entity type and id (optionally filtered by entity type) can be obtained with the command

List Names [{Group|Body|Volume|Surface|Curve|Vertex|All}]

Notes:

4.11.2.1 Case-Insensitive Names

Entity names in CUBIT are case-insensitive. This means that there is no difference between the name ’mysurf1’ and MySurf1’. The case of names will be preserved as assigned. For example, a volume named ’MyVolume’ will display the name ’MyVolume’ but can be referenced by any case version of the name, ’MYVOLUME’, ’mYvOlume’, etc.

4.11.2.2 Valid and Invalid Names

Although any string may be used as an entity name, only valid names may be used directly in commands. A name is valid if it begins with a letter or underscore ("_"), followed by any combination of zero or more letters, digits, or the characters ".", "_", or "@". If an attempt is made to assign an invalid name to an entity, CUBIT will generate a valid version of the invalid name by replacing invalid characters with an underscore. Then both the valid and invalid versions of the name are assigned to the entity. For example, assigning the name "123#" to a volume will result in the volume having two names, "123#" and "_23_". The valid name can be used directly in commands (mesh _23_), while the invalid name can only be referenced using a longer, less direct syntax (mesh volume with name "123#").

4.11.2.3 Reconciling Duplicate Names

When an attempt is made to assign the same name to two different entities, a suffix is added to the name of the second entity to make it unique. The suffix consists of the "@" character followed by one or more letters or numbers. For example, the following commands will result in volumes 1 to 3 having the names "hinge", "hinge@A", and "hinge@B", respectively:

volume 1 name "hinge" volume 2 name "hinge" volume 3 name "hinge"

To prevent this automatic "fixing" of names, the fix duplicate names flag may be switched to off. If the user attempts to assign a duplicate name while the flag is set to off, the name will remain unchanged.

Set Fix Duplicate Names [ON|Off]

4.11.2.4 Automatic Name Creation

CUBIT provides an option for automatically assigning names to entities upon entity creation.This option is controlled with the command:

Set Default Names {On|OFF}

When this option is on, entities are assigned default names consisting of a geometry type concatenated with the entity id, for example ’cur1’, ’surf26’, or ’vol62’.

4.11.2.5 Automatic Name Propagation

CUBIT automatically propagates names through webcuts. If an entity that has been assigned the name "Gear" is split through webcuts, the resulting bodies are named "Gear" and "Gear@A". Try the following example.

br x 10 volume 1 name "Cube" webcut volume 1 xplane webcut volume 1 2 yplane webcut volume 1 2 3 4 zplane label volume name

Figure 209: Name Propagation through Webcuts

You can operate on these propagated names using wildcards such as:

mesh volume with name ’cube*’

block 1 volume with name ’cube*’

4.11.2.6 Naming Merged Entities

When entities that have the same base name, such as "platform" and "platform@A", are merged, the resulting entities is assigned both names. The set merge base names on command tells Cubit that in this situation, it should merge the names too. The command syntax is:

Set Merge Base Names [On|OFF]

For example:

brick x 10 vol 1 copy move 10 surf 6 name ’platform’ surf 10 name ’platform’

Surface 10 actually is named platform@A, since we don’t want duplicate names

merge all list surf 6

You see that surface 6 has both ’platform’ and ’platform@A’ as names. Now, for the contrasting example

brick x 10 vol 1 copy move 10 surf 6 name ’platform’ surf 10 name ’platform’

set merge base names on merge all list surf 6

You see that surface 6 has only ’platform’ as its name.

4.11.3 Persistent Attributes

 

Typical data assigned to topological entities during a meshing session might include intervals, mesh schemes, group assignments, etc. By default, most of this data is lost between Cubit sessions, and must be restored using the original Cubit commands. Using Cubit’ persistent attributes capability, some of this data can be saved with the solid model and restored automatically when the model is imported into Cubit.

4.11.3.1 Attribute Behavior

In this context, attributes are defined as data associated directly with a particular geometry entity. In Cubit’ implementation of attributes, these data can occupy one of three "states" at any given time: they can be stored in data fields on Cubit’ geometry entities; they can be stored in an intermediate representation, using Cubit’ attribute objects; or they can exist only on the ACIS objects. When they are stored on ACIS objects, those attributes are written to and read from disk files with the geometry. This mechanism allows Cubit-specific information to be stored and retrieved with the geometry data. By default, attribute data is not stored with geometry.To enable the use of attributes, use the commands described in the following sections.

4.11.3.2 Attribute Commands

Most non-Cubit-developer uses of attributes will be to use all or none of the attributes.Therefore, the most common command to enable and disable the use of attributes is:

Set Attribute {On|Off}

When this option is on, all defined attributes will be saved with the geometry when the user enters the Export Acis command.

When a geometry is imported into Cubit, any attributes defined on that geometry and recognized as Cubit attributes are imported and put into an intermediate representation (that is, this information is not assigned directly to the geometry entities).To find out which attributes are defined on a given set of entities, use the following command: list [<entity_list>] attributes [type <attribute type>] [all] [print] If no entities are entered, attribute information for all the geometric entities defined in Cubit is printed.

The type option can be used to list information about a specific attribute type; values for are the same as those in the previous table.

If the all option is entered, information about all attribute types will be printed, even if there are none of those attributes defined for the specified entities.

If the print option is entered, the information stored in each attribute will be printed; this command is usually used only by Cubit developers.

4.11.3.2.1 Control By Attribute Type or Geometric Entity

Attributes can be enabled or disabled by attribute type, to allow the use of only user-specified attribute types.To turn on or off specific attributes, use the command: Set Attribute <attribute type> {On|Off} where <attribute type> is one of the types shown in the previous table.

Attributes can also be controlled to automatically write (update) and read (actuate) to/from solid model files automatically, using the command: Set Attribute <attribute_type> Auto{Actuate|Update} {On|Off} Finally, attributes can be manually written to and read from the geometric entities, and removed from Cubit entities, using the command {geom_list} Attribute {All|Attribute_type} {Actuate|Remove|Update|Read|Write} where geom_list is a list of geometry entities.This command is recommended only for developers’ use.

4.11.3.3 Attribute Types

The attribute types currently implemented in Cubit are shown below.

attribute types

description

Color

Entity Color

Composite vg

Used to restore composite virtual topology

Genesis entity

Membership in boundary conditions (block, sideset, nodeset)

Id

Entity Id

Mesh container

Handle to mesh defined for the owner

Mesh scheme

Meshing scheme (e.g. paving, sweeping, etc.)

Name

Entity name

Partition vg

Used to restore partition virtual topology

Smooth scheme

Smoothing scheme (e.g. Laplacian, Condition Number)

Unique Id

Unique entity id, used to cross-reference other entities

Vertex type

Used to define mesh topology at vertex for mapping/submapping

Virtual vg

Used to store virtual geometry entity(ies) defined on an entity

4.11.3.4 Using Cubit Attributes

A typical scenario for using Cubit attributes would be as follows.

Construct geometry, merge, assign intervals, groups, etc. (i.e. normal Cubit session)

Enable automatic use of attributes using the command:

Set Attribute On

Export ACIS file (see Export Acis command).

Subsequent runs:

Enable automatic reading and actuating of attributes:

set attribute on

Import ACIS file (see Import Acis command)

Used in this manner, geometry attributes allow the user to store some data directly with the geometry, and have that data be assigned to the corresponding Cubit objects without entering any additional commands.