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

Size, shape, and mesh passport

Move from a nominal size to divisions, require mapped hexahedra, and create the quality passport.

Step 1 — From nominal size to divisions

For the base family, the dimensions are exact multiples of the three sizes:

div_x=beam_l/mesh_h
div_y=beam_h/mesh_h
div_z=beam_b/mesh_h

We don't call nx, ny and nz to these parameters: MAPDL reserves those names for intrinsic nodal coordinate functions.

mesh_hnx × ny × nzElementsNodes
0.0500m20 × 2 × 140126
0.0250m40 × 4 × 2320615
0.0125m80 × 8 × 425603645

For a structured block, the theoretical counts are:

n_elements = div_x*div_y*div_z
n_nodes    = (div_x+1)*(div_y+1)*(div_z+1)

These equations provide a strong check: if they do not match, the resulting mesh does not have the structure that the script claimed to build.

Coarse MAPDL mesh 20 by 2 divisions on the L by H face
Figure 2. Coarse mesh: 40 elements (20×2×1). Normal view of the face L×H; convergence is decided with CSV, not visual smoothness.
Medium MAPDL mesh 40 by 4 divisions on the L by H face
Figure 3. Average mesh: 320 elements (40×4×2).
Fine MAPDL mesh 80 by 8 divisions on the L by H face
Figure 4. Fine mesh: 2560 elements (80×8×4).

Step 2 — ESIZE vs LESIZE

ESIZE,mesh_size(i)

ESIZE declares the default global size. MAPDL calculates divisions from of that value, rounding them when necessary. However, a global control does not express alone how we want to distribute elements in each direction.

LSEL,S,LENGTH,,beam_l
LESIZE,ALL,,,div_x(i),,1

LSEL,S,LENGTH,,beam_h
LESIZE,ALL,,,div_y(i),,1

LSEL,S,LENGTH,,beam_b
LESIZE,ALL,,,div_z(i),,1
ALLSEL,ALL

LSEL groups lines by geometric meaning, not by ID. LESIZE,ALL applies integer divisions to selected lines. The argument KFORC=1 forces you to replace any previous division, something necessary after to clean one mesh and prepare the next.

Step 3 — Require mapped hexahedrons

MSHAPE,0,3D
MSHKEY,1
VMESH,ALL

MSHAPE,0,3D requests hexahedrons and MSHKEY,1 requires mapped meshing. We do not use MSHKEY,2, because allowing a free mesh as an alternative could hide a flaw in our preparation. The rectangular block is mappable and the edges opposites receive the same number of divisions.

A free mesh is not "bad." Here we use a regular structure to isolate the effect of the size. In an industrial geometry, the strategy must adapt to the form.