Step 7 — Clean without destroying the geometry
/PREP7
ALLSEL,ALL
DDELE,ALL,ALL
FDELE,ALL,ALL
CMDELE,fixed_nodes
CMDELE,tip_nodes
VCLEAR,ALL
VCLEAR,ALL removes the elements and nodes associated with the volume, but retains
the solid model and its attributes. Change ESIZE without cleaning and remeshing no
refines an existing mesh: only changes a preference for future operations.
Step 8 — Automate the family
*DIM,mesh_size,ARRAY,3
mesh_size(1)=0.0500
mesh_size(2)=0.0250
mesh_size(3)=0.0125
*DO,i,1,3
! divisions, meshing, audit, measurement, and cleanup
*ENDDOThe loop does not create three separate handwritten studies. It ensures that all cases follow exactly the same sequence and reduces the chances of changing a condition inadvertently.
Step 9 — Measure convergence
change_pct(1)=ABS(uy_tip(2)-uy_tip(1))/ABS(uy_tip(2))*100
change_pct(2)=ABS(uy_tip(3)-uy_tip(2))/ABS(uy_tip(3))*100
change_pct(3)=-1
Each mesh is compared to the next finest, used as an improved estimate. The last
it cannot be compared with itself; the value -1 means "without comparison",
not perfect convergence.
Step 10 — Make a defensible decision
The algorithm runs through the comparisons from the most economical mesh:
selected_case=0
! If change 1→2 < 2% and both meshes pass:
! selected_case=1
! Otherwise, test change 2→3.
! If that also fails:
! selected_case=0We never automatically choose mesh 3 because it is the finest available. If the last comparison exceeds the threshold, the study is inconclusive and needs another mesh.
Why don't we use maximum stress?
Ideal fixed support introduces an abrupt transition between fully constrained nodes and free material. A point stress next to that boundary can grow or move during refinement, even when the global displacement is already stable. Choosing it as the only criterion would confuse convergence of a global magnitude with potentially singular local behavior.
In M07 we will compare stresses in justifiable regions and separate nominal stress, physical concentration and numerical singularity.
The CSV as a record of the study
04_mesh_convergence.mac generates m04_mesh_study.csv:
case,mesh_h,nx,ny,nz,n_nodes,n_elements,n_type1,n_mat1,uy_tip,change_to_next_pct,mesh_pass,selected
It must contain three rows. Only one may have selected=1; it is also valid for
all are zero if no comparison satisfies. The CSV records intent, cost, audit,
response and decision in the same reproducible evidence.
Validated reference result
In MAPDL Student 2025 R2, variations of approximately
1.168 % and 0.501 %. With a threshold of 2%, the algorithm selects
case 1. The result is deliberately interesting: “first acceptable mesh” is not
means "finest mesh available."