esel#

Mapdl.esel(type_='', item='', comp='', vmin='', vmax='', vinc='', kabs='', **kwargs)#

Selects a subset of elements.

APDL Command: ESEL :rtype: Optional[str]

Note

Starting with PyMAPDL v0.66.0, you can use “P” as a second argument to select entities interactively. A window pops up allowing you to select, unselect, add or reselect entities depending on the first argument type_. An array with the ids of new selection is returned when the window is closed.

You can switch between selecting and unselecting pressing the keyboard key U.

Parameters:
type_

Label identifying the type of select:

S

Select a new set (default).

R

Reselect a set from the current set.

A

Additionally select a set and extend the current set.

U

Unselect a set from the current set.

ALL

Restore the full set.

NONE

Unselect the full set.

INVE

Invert the current set (selected becomes unselected and vice versa).

STAT

Display the current select status.

item

Label identifying data, see Table 110: ESEL - Valid Item and Component Labels. Some items also require a component label. Defaults to ELEM. If Item = STRA (straightened), elements are selected whose midside nodes do not conform to the curved line or non-flat area on which they should lie. (Such elements are sometimes formed during volume meshing (VMESH) in an attempt to avoid excessive element distortion.) You should graphically examine any such elements to evaluate their possible effect on solution accuracy.

comp

Component of the item (if required). Valid component labels are shown in Table 110: ESEL - Valid Item and Component Labels below.

vmin

Minimum value of item range. Ranges are element numbers, attribute numbers, load values, or result values as appropriate for the item. A component name (as specified via the CM command) can also be substituted for VMIN (in which case VMAX and VINC are ignored).

vmax

Maximum value of item range. VMAX defaults to VMIN for input values. For result values, VMAX defaults to infinity if VMIN is positive, or to zero if VMIN is negative.

vinc

Value increment within range. Used only with integer ranges (such as for element and attribute numbers). Defaults to 1. VINC cannot be negative.

kabs

Absolute value key:

kabs = 0

Check sign of value during selection.

kabs = 1

Use absolute value during selection (sign ignored).

Notes

The fields item, comp, vmin, vmax, vinc and kabs are used only with type_ = “S”, “R”, “A”, or “U”.

Selects elements based on values of a labeled item and component. For example, to select a new set of elements based on element numbers 1 through 7, use

>>> mapdl.esel('S', 'ELEM', '', 1, 7)

The subset is used when the ALL label is entered (or implied) on other commands, such as

>>> mapdl.elist('ALL')

Only data identified by element number are selected. Selected data are internally flagged; no actual removal of data from the database occurs. Different element subsets cannot be used for different load steps [SOLVE] in a /SOLU sequence. The subset used in the first load step will be used for all subsequent load steps regardless of subsequent ESEL specifications.

This command is valid in any processor.

Elements crossing the named path (see PATH command) will be selected. This option is only available in PREP7 and POST1. If no geometry data has been mapped to the path (i.e., via PMAP and PDEF commands), the path will assume the default mapping option (PMAP,UNIFORM) to map the geometry prior to selecting the elements. If an invalid path name is given, the ESEL command is ignored (status of selected elements is unchanged). If there are no elements crossing the path, the ESEL command will return zero elements selected.

For selections based on non-integer numbers (coordinates, results, etc.), items that are within the range VMIN -Toler and VMAX + Toler are selected. The default tolerance Toler is based on the relative values of VMIN and VMAX as follows:

If VMIN = VMAX, Toler = 0.005 x VMIN.

If VMIN = VMAX = 0.0, Toler = 1.0E-6.

If VMAX ≠ VMIN, Toler = 1.0E-8 x (VMAX - VMIN).

Use the SELTOL command to override this default and specify Toler explicitly.

Table: 133:: : ESEL - Valid Item and Component Labels

Examples

Select elements using material numbers 2, 4 and 6.

>>> mapdl.esel('S', 'MAT', '', 2, 6, 2)

Of these, reselect SOLID185 element types

>>> mapdl.esel('R', 'ENAME', '', 185)

Select elements assigned to material property 2

>>> mapdl.esel('S', 'MAT', '', 2)

Note, this command is equivalent to:

>>> mapdl.esel('S', 'MAT', vmin=2)