Chapter 7: Selecting and Components

Go to the Next Chapter
Go to the Previous Chapter
Go to the Table of Contents for This Manual
Go to the Guides Master Index

Chapter 1 * Chapter 2 * Chapter 3 * Chapter 4 * Chapter 5 * Chapter 6 * Chapter 7 * Chapter 8 * Chapter 9 * Chapter 10 * Chapter 11 * Chapter 12 * Chapter 13 * Chapter 14 * Chapter 15 * Chapter 16 * Chapter 17 * Chapter 18 * Chapter 19


7.1 What Is Selecting?

If you have a large model, it is helpful to work with just a portion of the model data to apply loads, to speed up graphics displays, to review results selectively, and so on. Because all ANSYS data are in a database, you can conveniently choose subsets of the data by using selecting.

Selecting enables you to select subsets of nodes, elements, keypoints, lines, etc. so that you can work with just a handful of entities. The ANSYS program uses a database to store all the data that you define during an analysis. This database design allows you to select only a portion of the data without destroying other data.

Typically, you perform selecting when you specify loads. By selecting nodes on a surface, for example, you can conveniently apply a pressure on all nodes in the subset instead of applying it to each individual node.

Another useful feature of selecting is that you can select a subset of entities and name that subset. For example, you can select all elements that make up the fin portion of a heat exchanger model and call the resulting subset FIN. Such named subsets are called components. You can even group several components into an assembly.

7.2 Selecting Entities

You can select a subset of entities using a combination of seven basic select functions:

These functions are illustrated and described below.

Select - Selects items from the full set of data. This is shown schematically in the form of a Venn diagram below.

Reselect - Selects (again) from the selected subset.

Also Select - Adds a different subset to the current subset.

Unselect - Subtracts a portion of the current subset.

Select All - Restores the full set.

Select None - Deactivates the full set (opposite of Select All).

Invert - Switches between the active and inactive portions of the set.

These functions are available for all entities (nodes, elements, keypoints, lines, areas, and volumes) in the Utility Menu of the Graphical User Interface as well as by command.

Note-Picking is supported only for the global Cartesian coordinate system [DSYS,0].

For additional information on picking, see Chapter 5, "Graphical Picking," in the ANSYS Operations Guide.

7.2.1 Selecting Entities Using Commands

Table 7-1 shows a summary of commands available to select subsets of entities. Notice the "crossover" commands: commands that allow you to select one entity based on another entity. For example, you can select all keypoints attached to the current subset of lines. Here is a typical sequence of select commands:

LSEL,S,LOC,Y,2,6	! Select lines that have center locations between Y=2 and Y=6
LSEL,A,LOC,Y,9,10	! Add lines with center locations between Y=9 and Y=10
NSLL,S,1       	! Select all nodes on the selected lines
ESLN           	! Select all elements attached to selected nodes

See the LSEL, NSLL, and ESLN command descriptions in the ANSYS Commands Reference for further information.

Note-Crossover commands for selecting finite element model entities (nodes or elements) from solid model entities (keypoints, areas, etc.) are valid only if the finite element entities were generated by a meshing operation on a solid model that contains the associated solid-model entities.

Table 7-1 Select commands

Entity

Basic Commands

Crossover Command(s)

Nodes

NSEL

NSLE, NSLK, NSLL, NSLA, NSLV

Elements

ESEL

ESLN, ESLL, ESLA, ESLV

Keypoints

KSEL

KSLN, KSLL

Hard Points

KSEL, ASEL, LSEL

None

Lines

LSEL

LSLA, LSLK

Areas

ASEL

ASLL, ASLV

Volumes

VSEL

VSLA

Components

CMSEL

None

7.2.2 Selecting Entities Using the GUI

The GUI path equivalent to issuing most of the commands listed in Table 7-1 is Utility Menu>Select>Entities. This GUI choice displays the Select Entities dialog box, from which you choose, among other things, the type of entities you want to select and the criteria by which you will select them. For example, you can choose "Elements" and "By Num/Pick" to select elements by number or by picking. You can press the Help button from within the Select Entities dialog box for detailed information about selecting via the GUI; the help is context-sensitive and will reflect any choices you've made in the Select Entities dialog box.

GUI:

Utility Menu>Select>Comp/Assembly>Select All
Utility Menu>Select>Comp/Assembly>Select Comp/Assembly
Utility Menu>Select>Comp/Assembly>Select None

7.2.3 Selecting Lines to Repair CAD Geometry

When CAD geometry is imported into ANSYS, the transfer may define the display of short line elements, which are difficult to identify on screen.

By choosing the line selection option, you can find and display these short lines:

Command(s):

GUI:

Utility Menu>Select>Entities>Lines>By Length/Radius

Enter the minimum and maximum length or radius in the VMIN and VMAX fields. These fields, as they are used in this option, represent the range of values which corresponds to the length or radius of the short line elements. You should enter reasonable values in VMIN and VMAX to assure that the selected set only includes those short lines that you want to display. When the selected set appears on screen, you can pick individual lines within the set and repair the geometry as necessary.

Note-A line which is not an arc returns a zero radius. RADIUS is only valid for lines that are circular arcs.

7.2.4 Other Commands for Selecting

To restore all entities to their full sets, use one of the following:

Command(s):

GUI:

This one command has the same effect as issuing a series of NSEL,ALL; ESEL,ALL; KSEL,ALL; etc. commands.

You also can use ALLSEL or its GUI equivalents to select a set of related entities in a hierarchical fashion. For example, given a subset of areas, you can select all lines defining those areas, all keypoints defining those lines, all elements belonging to these areas, lines, and keypoints, and all nodes belonging to these elements, by simply issuing one command: ALLSEL,BELOW,AREA

To select a subset of degree of freedom and force labels, use one of the following:

Command(s):

GUI:

Main Menu>Preprocessor>Loads>Operate>-Scale FE Loads->Constraints
Main Menu>Preprocessor>Loads>Operate>Forces
Main Menu>Preprocessor>Loads>Settings>-Scale FE Loads->Constraints
Main Menu>Preprocessor>Loads>Settings>Forces
Main Menu>Solution>Operate>-Scale FE Loads->Constraints
Main Menu>Solution>Operate>Forces
Main Menu>Solution>Settings>-Scale FE Loads->Constraints
Main Menu>Solution>Settings>Forces

By selecting a subset of these labels, you can simply use ALL in the Label field of some commands to refer to the entire subset. For instance, the command DOFSEL,S,UX,UZ followed by the command D,ALL,ALL would put UX and UZ constraints on all selected nodes. DOFSEL does not affect the solution degrees of freedom.

7.3 Selecting for Meaningful Postprocessing

Selecting can also help you during postprocessing. For instance, in POST1, you can select just a portion of your model to display or list the results. You should always use selecting to obtain meaningful results in POST1 when the model has discontinuities.

When you request contour displays with the PLNSOL command (Utility Menu>Plot>Results>Contour Plot>Nodal Solution), the ANSYS program produces smooth, continuous contours by averaging the data at nodes. This averaging is acceptable as long as the model contains no discontinuities, such as:

When such discontinuities are present, be careful to process each side of the discontinuity separately by using selecting.

Figure 7-1 Shell model with different thicknesses

Figure 7-2 Layered shell (SHELL91 or SHELL99) with nodes located at midplane

Figure 7-3 Layered shell (SHELL91 or SHELL99) with nodes located at bottom surface

7.4 Grouping Geometry Items into Components and Assemblies

Sometimes it is convenient to group portions of the model and give them recognizable names, such as FLANGE, WHEEL2, FIN7, IRONCORE, STATOR, ROTOR, etc. You can then conveniently select all items belonging to, say, WHEEL2, and work with them: apply boundary conditions, mesh them with nodes and elements, produce graphics displays, and so forth.

The groupings may be components or assemblies. A component consists of one type of entity: nodes, elements, keypoints, lines, areas, or volumes. Use the CM command (Utility Menu>Select>Comp/Assembly>Create Component) 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 ANSYS Commands Reference describes the ESEL and CM commands in more detail.

An assembly may consist of any number of components and other assemblies. Use the CMGRP command (Utility Menu>Select>Comp/Assembly>Create Assembly) 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 ANSYS Commands Reference describes the NSEL, ESLN, CM, and CMGRP commands in more detail.

7.4.1 Nesting Assemblies

You can also 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 7-4 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 ANSYS Commands Reference for more information about the CMGRP command.

7.4.2 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
For more information about the CMSEL, BFE and ALLSEL commands, and the CMEDIT, CMDELE, and CMLIST commands mentioned below, see the ANSYS Commands Reference.

7.4.3 Adding or Removing Components

Issuing the CMEDIT command (Utility Menu>Select>Comp/Assembly>Edit Assembly) allows 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
You can delete a component or assembly definition, using the CMDELE command (Utility Menu>Select>Comp/Assembly>Delete Comp/Assembly). You can list the entities that make up a particular component with the CMLIST command (Utility Menu>Select>Comp/Assembly>List Comp/Assembly).

7.4.4 Automatic Update of Components or Assemblies

If an entity is modified (e.g. via the KMODIF command), 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.


Go to the beginning of this chapter