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 ~10 min · ~50 min remaining

Geometry and set algebra

Build the geometry, treat selections as set operations, and control the tolerance.

Step 1 — Build the parametric geometry

The M01 block remains:

/PREP7
ET,1,SOLID185
MP,EX,1,young
MP,PRXY,1,nu
TYPE,1
MAT,1

BLOCK,0,beam_l,0,beam_h,0,beam_b
ESIZE,mesh_h
VMESH,ALL

A BLOCK isolated creates a volume delimited by six areas, twelve lines and eight keypoints. VMESH adds elements and nodes. Your IDs may change even though the solid represent the exact same beam.

M02 limit: We use very ET, MP, ESIZE and VMESH as legacy infrastructure. The choice of element and material is will be justified in M03; the meshing strategy will be studied in M04.

Before reducing any selection, we save the full size of the model:

ALLSEL,ALL
*GET,n_nodes,NODE,0,COUNT
*GET,n_elements,ELEM,0,COUNT

These two values are our baseline. At the end they should reappear exactly.

Step 2 — Think of selections as set algebra

The second command argument xSEL indicates how the new condition is combined with the active set:

Selection operations APDL: S substitutes, A adds, R intersects and U removes
The word “current” matters: A, R, and U operate on the previous selection state.
OperationReadingResult
SSelectReplace the active set with a new one.
AAdditionally selectAdd entities: union.
RReselectKeep the intersection.
UUnselectWithdraw entities: difference.

That is why a selection sequence must be read from top to bottom. If an operation leaves the set empty, a subsequent reselection cannot retrieve entities that were no longer active.

Step 3 — Control geometric tolerance

A calculated coordinate and a stored coordinate can differ by tiny fractions. MAPDL uses a tolerance on non-integer value selections. Its automatic logic depends of VMIN and VMAX; for example, if both are equal and not null, you can take the 0.5 % requested value

A global selection at X=1.0 m could include a much wider band of the expected when the mesh is very fine. In a reproducible script it is convenient to declare the criterion:

select_tol=MIN(beam_h,beam_b)*1E-5
SELTOL,select_tol

For the base case, select_tol=5E-7 m. It is small compared to the geometry and sufficient to absorb numerical noise. Tolerance remains active until redefined, so in the end we will restore it:

SELTOL,

A Tolerance Must Not Equal the Element Size

If you wrote SELTOL,mesh_h, a face selection could also capture the next node layer. The command would work; the physical region would be incorrect.