Skip to content
Marc & Structures
Index

Save your progress

Enter your email and we will send a secure sign-in link. There is no password and the first link creates your account.

Demonstration ~12 min · ~38 min remaining

Components and local systems

Create regions with CM, apply local rules, and combine sets through intersection.

Step 4 — Create fixed_nodes

We start in the global Cartesian system and select the face X=0:

CSYS,0
NSEL,S,LOC,X,0
*GET,n_fixed,NODE,0,COUNT
CM,fixed_nodes,NODE
ALLSEL,ALL

The pattern contains four decisions:

  1. NSEL,S starts a new nodal set.
  2. LOC,X,0 expresses the region by a geometric condition.
  3. *GET immediately checks that the selection exists.
  4. CM save a photo before restoring everything with ALLSEL.

Order is essential. If you were to execute ALLSEL before CM, fixed_nodes would contain all nodes.

Fixed_nodes component highlighted on face x=0
Figure 3 Component fixed_nodes (CMSEL,S,fixed_nodes + EPLOTregion x=0 Before you Apply D.

Step 5 — Define a local tolerance at the tip

LOCAL defines a coordinate system and CSYS decides which one is active. Local system numbers must be greater than 10; we will use the 11:

LOCAL,11,CART,beam_l,0,0
CSYS,11
NSEL,S,LOC,X,0
*GET,n_tip,NODE,0,COUNT
CM,tip_nodes,NODE

CSYS,0
ALLSEL,ALL

We have not rotated the shafts; we only translate the origin to X=beam_l. In the system global, the tip is in X=beam_l. In the 11 system, it is in X=0.

Mental Model: A Ruler Attached to the Part

If beam_l changes, the local origin moves with the tip. The condition LOC,X,0 remains identical. This idea will be very useful in assembled models, tilted regions and repetitive operations.

LOC interprets X, Y and Z in the active system. That's why CSYS,0 is not cosmetic cleanup: it prevents later selections from operating in the wrong coordinate system.

Tip_nodes component selected with local system 11 at tip
Figure 4. Component tip_nodes with local coordinate system 11 at the tip.

Step 6 — Create top_nodes and mid_elems

With the global system restored, the top face is defined by its height:

NSEL,S,LOC,Y,beam_h
*GET,n_top,NODE,0,COUNT
CM,top_nodes,NODE
ALLSEL,ALL

For the central band, we change the entity class. ESEL,CENT checks the coordinate of each element centroid:

ESEL,S,CENT,X,0.4*beam_l,0.6*beam_l
*GET,n_mid_elems,ELEM,0,COUNT
CM,mid_elems,ELEM
ALLSEL,ALL

The band must contain elements, but not all. That relationship is more stable than requiring a number exact count, because it may vary with the meshing strategy or version.

Top_nodes component on top face Y=beam_h
Figure 5. Component top_nodes on the upper face (Y=beam_h).
Mid_elems component in center band 0.4L to 0.6L
Figure 6. Component mid_elems (central band 0.4L–0.6L). This component is reused by the M03 EMODIF challenge.

MAPDL practice

Practice: an auditable selection

Create a component, use it, and prove the global selection is restored.

Execution cycle

  1. 1 Predict the entity count.
  2. 2 Create the component.
  3. 3 Count before and after CMSEL.
  4. 4 Run ALLSEL and prove n_restored=n_nodes.
Evidence to retain

Graduated hints

1 · Concept hint

Selections are persistent global state.

2 · Command hint

Pair CM/CMSEL with *GET counts and finish with ALLSEL,ALL.

3 · Explained solution

Prove expected entities, no overlap, and restoration.

Your reflection stays in this browser.