9.3. Using Components and Assemblies

It is often convenient to assign a recognizable name to a given part of your model so that you can work with that part discretely.

For example, you can select entities from a portion of your model and group them into named components, then group those components into an assembly named WHEEL2. You can then apply boundary conditions to WHEEL2, mesh WHEEL2 with nodes and elements, or plot a graphic display of WHEEL2.

A named group of entities is called a component. A group of components is called an assembly.

9.3.1. Component Types

A component consists of one of the following types of entities: nodes, elements, keypoints, lines, areas, or volumes. A single component cannot have more than one entity type.

Most common are nodal components and element components.

9.3.2. Using the Component Manager

The Component Manager (Utility Menu> Select> Component Manager) provides convenient access to your component operations. The Component Manager provides a coordinated and integrated interface to the capabilities of the following commands:

You can access each command's capability via either the Component Manager or individual GUI paths. The following sections describe the individual component commands and the function that you can perform with each. See the appropriate command documentation for specific capabilities and limitations.

Using the Component Manager toolbar buttons (except Select Component/Assembly and Unselect Component/Assembly performs the specified operation on the highlighted component(s), but the select status of the entities in the database are not affected.

9.3.3. Creating Components

Issue the CM command to define a component. For example, you can select all elements that constitute the rotor portion of a motor model and group them into a component:

ESEL,,MAT,,2  ! Select rotor elements (material 2)
CM,ROTOR,ELEM ! Define component ROTOR using all selected elements

The Command Reference describes the ESEL and CM commands in more detail.

An assembly may consist of any number of components and other assemblies. Issue the CMGRP command to define an assembly. For example, you can group the components ROTOR and WINDINGS (both of which must have been previously defined) into an assembly ROTORASM:

NSEL,...                 ! Select appropriate nodes and
ESLN                     ! elements that constitute the windings
CM,WINDINGS,ELEM              ! Define component WINDINGS
CMGRP,ROTORASM,WINDINGS,ROTOR ! Define the assembly ROTORASM

The Command Reference describes the NSEL, ESLN, CM, and CMGRP commands in more detail.

9.3.4. Nesting Assemblies

You can nest assemblies up to five levels deep. For example, you can build an assembly named MOTOR from other assemblies and components as shown in the schematic below.

Figure 9.4: Nested Assembly Schematic

Nested Assembly Schematic

Assuming that the assembly ROTORASM and components STATOR, PERMMAG, and AIRGAP have been defined, the commands to define the assembly MOTOR would look like this:

CMGRP,STATASM,STATOR,PERMMAG
CMGRP,MOTOR,STATASM,ROTORASM,AIRGAP

See the Command Reference for more information about the CMGRP command.

9.3.5. Selecting Entities by Component or Assembly

The main advantage of defining a component or an assembly is that you can conveniently select items that belong to it using a combination of the CMSEL and ALLSEL commands. The CMSEL command selects all entities belonging to a component or assembly by its name. You can then issue ALLSEL,BELOW to select all attached lower entities. For example, you can select all elements belonging to the WINDINGS component, apply a current density loading to all of them, and then select all nodes attached to those elements:

CMSEL,,WINDINGS
BFE,ALL,JS,,-1000
ALLSEL,BELOW,ELEM

You can also use the picker to select components. By selecting Utility Menu> Select> Comp/Assembly> Pick Comp/Assembly, you can select a defined component and all of the items belonging to it. The item is displayed in the prompt window during the select process.

For more information about the CMSEL, BFE and ALLSEL commands, and the CMEDIT, CMDELE, and CMLIST commands mentioned below, see the Command Reference.

9.3.6. Adding or Removing Components

Issuing the CMEDIT command enables you to add components to or remove components from an assembly. For example, the following command removes AIRGAP from the assembly MOTOR:

CMEDIT,MOTOR,DELE,AIRGAP

Delete a component or assembly definition via the CMDELE command. List the entities that make up a particular component via the CMLIST command. To generate expanded, detailed listings of the entities that make up specific components, issue CMLIST along with CMSEL.

The CMSEL command also enables you to use components to narrow your selection or increase your selection criteria. Issuing CMSEL,ALL will select all defined components in addition to any items already selected.

9.3.7. Modifying Components or Assemblies

Modify the specification of a component via the CMMOD command.

If an entity is modified (via the KMODIF command, for example), that entity may be deleted and then redefined. The deletion may cause the entity to be removed from the component. If all of the entities are removed from the component, the component will also be deleted.

9.3.8. Viewing Hidden Element Components

When plotting element components during postprocessing, a given component may not be visible (or may be only partially visible) because it is obscured by other elements and/or components.

To examine a specific component of interest, a workaround is available via the /TRLCY, /SHRINK, and /GLINE commands.

Example 9.1: Viewing a Hidden Element Component

! Select all elements:
ESEL,ALL
!
! Set all elements to be almost completely translucent:
/TRLCY,ELEM,0.9
!
! Set the element component of interest to be completely opaque:
/TRLCY,CM,0.0,ComponentName
!
! Shrink elements so that all elements are visible:
/SHRINK,0.01
!
! Apply a dashed outline to each element for improved visibility:
/GLINE,,1
!
! Display elements:
EPLOT