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

Audit constraints and loads

List and count constrained DOF, sum stored forces, and package the CSV contract.

Step 6 — Listing is not yet automating

DLIST,ALL,ALL
FLIST,ALL,ALL

Listings allow you to read nodes, labels and values in the file .out. They are essential for debugging, but a human review is not enough to run many cases. We will convert the same questions into approval parameters and conditions.

Step 7 — Audit the three prescribed displacements

CMSEL,S,fixed_nodes
node_id=0

*DO,j,1,n_fixed
  node_id=NDNEXT(node_id)
  *GET,dof_ux,NODE,node_id,D,UX
  *GET,dof_uy,NODE,node_id,D,UY
  *GET,dof_uz,NODE,node_id,D,UZ
  ! check all three values
*ENDDO

NDNEXT returns the next selected node. This lets us traverse the actual IDs without assuming that they are consecutive. Each of the six nodes must store three zero values: n_constrained_dof=18.

Checked Compatibility: MAPDL 2025 R2 may return zero when querying an unconstrained displacement. That is why the macro audits values on fixed_nodes and uses the global DLIST output to document that there are no constraints outside the component. It does not attempt to detect absence using a sentinel value.

Step 8 — Sum the forces stored in the model

ALLSEL,ALL
node_id=0
*DO,j,1,n_nodes
  node_id=NDNEXT(node_id)
  *GET,node_fx,NODE,node_id,F,FX
  *GET,node_fy,NODE,node_id,F,FY
  *GET,node_fz,NODE,node_id,F,FZ
  force_sum_x=force_sum_x+node_fx
  force_sum_y=force_sum_y+node_fy
  force_sum_z=force_sum_z+node_fz
*ENDDO

This sum runs through the entire model, not just tip_nodes. Therefore it can detect an accidental force outside the expected region or an unexpected component.

load_error=ABS(force_sum_y-tip_force)/ABS(tip_force)

The audit requires:

n_force_nodes = n_tip
force_sum_x   = 0
force_sum_y   = -1000
force_sum_z   = 0
load_error    < 0.001

CSV contract

05_loads_constraints.mac generates:

case,mesh_h,n_nodes,n_elements,n_fixed,n_tip,n_constrained_dof,n_force_nodes,force_per_node,force_sum_x,force_sum_y,force_sum_z,target_force,load_error,passes

The base row must contain 126 nodes, 40 elements, 18 constraints, 6 loaded nodes, and passes=1. In MAPDL 2025 R2 the validated sum is -1000 N with an error on the order of 10⁻¹⁶.

MAPDL practice

Practice: mesh-independent total load

Distribute −1000 N without hard-coding the node count and audit the applied sum.

Execution cycle

  1. 1 Select the loaded face.
  2. 2 Count nodes.
  3. 3 Calculate force per node.
  4. 4 Prove total FY is −1000 N.
Evidence to retain

Graduated hints

1 · Concept hint

The physical input is the resultant, not an accidental nodal force.

2 · Command hint

Use *GET for the count before F,ALL,FY.

3 · Explained solution

Require n_loaded>0 and a summed load within tolerance.

Your reflection stays in this browser.