MAPDL may terminate SOLVE without us having understood the model. In M06
we will convert the solution into a testable statement: the applied force and its moment
They must be exactly balanced by the fixed support.
Your mission
You will solve the prepared beam in M05, confirm that a result set exists, and You will generate a CSV that simultaneously closes the balance of forces and moments.
Guiding question: if SOLID185 has no nodal rotations, how can fixed support transmit a moment?
Objectives
By completing M06 you will be able to:
- Explicitly declare a linear static analysis.
- Distinguish load step, substep and result set.
- Explain what states it connects
SOLVE. - Programmatically check that a solution is available.
- Read nodal reactions using
*GET. - Reconstruct a moment from translational forces.
- Use
SPOINTandFSUMwith a conscious reference point. - Accept or reject the balance through quantitative tolerances.
Prerequisites and downloads
- Have completed M05: Beam must have audited loads and constraints.
- Recognize pattern selection → check → application → restore.
- Remember the global convention: X longitudinal, Y vertical, and Z transverse.
06_start.mac— starting point.06_static_linear.mac— audited solution.06_bug_hunt.mac— five errors of interpretation.06_challenge.mac— challenge of two linear states.06_expected_results.csv— self-checking contract.solution-lifecycle.svg— solution cycle.force-moment-balance.svg— balance of resultants.
How to use this lesson
| Track | Duration | Scope |
|---|---|---|
| Quick win | 30–35 min | Prediction, SOLVE and first reading of reactions with FSUM. |
| Complete | 65–70 min | Additionally, force and moment audit, false equilibrium hunting and linear challenge. |
Recommendation: Calculate RFY and RMZ on paper before SOLVE. Balance is the first physical validation after an apparently correct solution.
Session map
- Mission: goals, downloads and balance prediction.
- Mental model: four states, not a SOLVE button.
- Demo: solve, reactions, and equilibrium audit.
- Bug hunting: partial sums and incorrect sets.
- Challenge: two states with linear law in reactions.
- Mastery: final test that records demonstrated mastery and recommends M07.
Prediction — Solve first on paper
The total force is FY=-1000 N and acts one meter from the fixed support. Before
open MAPDL, the free body diagram requires:
ΣFY = 0 → RFY + (−1000) = 0 → RFY = +1000 N
ΣMZ = 0 → RMZ + 1·(−1000) = 0 → RMZ = +1000 N·mThese figures are a prediction, not a finite element result. The objective of macro will be to try to refute them by reading the real solution.
Mental model — Four states, not one button
Do not treat solving as merely flipping a switch. The process contains four different states:
- Prepared database: mesh, properties, constraints and loads.
- Solution definition: type of analysis, increments and results requested.
- Solution: MAPDL assembles and solves the system of equations.
- Active set: a specific state of the results file is loaded into memory.
SOLVE creates results; SET chooses which result set is active.
Physics — What does “linear static” mean?
The adjective contains three decisions:
- Structural: we seek displacements and forces that satisfy equilibrium and compatibility.
- Static: we do not include inertial terms or a physical time history.
- Linear: stiffness, geometry, and constitutive behavior do not change with the response.
The idealized system can be expressed as:
[K]{u} = {F}Therefore, if we double the load without changing the model, displacements, reactions, and stresses must double. The challenge will use that proportionality as a second check.
APDL — State the hypothesis
/SOLU
ANTYPE,STATIC
NLGEOM,OFF
KBC,1
NSUBST,1
OUTRES,ALL,LASTANTYPE,STATICselects a static analysis.NLGEOM,OFFmakes linear geometry explicit.KBC,1applies the load stepwise in the single substep.NSUBST,1defines a single substep for this linear case.OUTRES,ALL,LASTsaves the requested final state.
Some options match the defaults. Writing them here is not padding; it turns the lesson assumptions into reviewable text.
Load step, substep and set
- Load step
- The load state to solve. It may represent a physical phase or a different condition.
- Substep
- Numerical increment within a load step. In nonlinear analysis it will have a decisive role.
- Result set
- Snapshot stored in the results file and recoverable later.
They are not synonyms. A load step can contain many substeps and not all of them have to have been written as sets.
Before SOLVE — Restore the model
ALLSEL,ALL
SOLVE
FINISH
The active selection is part of the MAPDL state. If a tip selection carries over
from load application into the solution, the solved model may not be the one
you thought you had prepared. That is why ALLSEL,ALL is an explicit precondition.
SOLVE is not a quality seal
A finished solution may correspond to wrong units, a force multiplied by the number of nodes, or a poorly selected region. M06 checks equilibrium; M07 will also check the magnitude and distribution of the response.
Check that a result exists
Enter postprocessing, count the result sets, and only then attempt to activate the last one:
/POST1
*GET,n_sets,ACTIVE,0,SET,NSET
solution_available=0
*IF,n_sets,GE,1,THEN
SET,LAST
solution_available=1
*ENDIF
This sequence prevents the rest of the audit from operating on nonexistent results when
SOLVE has failed to generate a result set.
SET,LAST — Activating is not solving
SET,LAST does not recalculate the structure. It reads the latest available set and makes its
values active in the results database. If multiple states exist, choosing the set deliberately
is as important as choosing the nodes.
*GET,result_time,ACTIVE,0,SET,TIMESaving the time value also identifies which state was audited, even in a static analysis where that “time” works as a marker for the load step.
Reactions — Read the support response
Reactions are queried at constrained nodes. We do not need fixed IDs because the
physical region is stored in the fixed_nodes component.
CMSEL,S,fixed_nodes
node_id=0
*DO,j,1,n_fixed
node_id=NDNEXT(node_id)
*GET,rfx_node,NODE,node_id,RF,FX
*GET,rfy_node,NODE,node_id,RF,FY
*GET,rfz_node,NODE,node_id,RF,FZ
rfx=rfx+rfx_node
rfy=rfy+rfy_node
rfz=rfz+rfz_node
*ENDDO
RF returns reactions in the nodal coordinate system. In the working example, all
nodal systems remain aligned with the global Cartesian system.
The hidden moment in translational forces
SOLID185 has UX, UY and UZ, but not
ROTX, ROTY nor ROTZ. This does not prevent transmitting moment.
The reactions distributed over the support face form a force couple.
Each nodal reaction contributes:
{M} = {r} × {RF}
Mx = ry·RFz − rz·RFy
My = rz·RFx − rx·RFz
Mz = rx·RFy − ry·RFxAdding these contributions gives the reaction moment at the fixed support without introducing a rotational degree of freedom that the element does not possess.
Choose the sum point
We will use the center of the fixed-support face:
x_ref=0
y_ref=beam_h/2
z_ref=beam_b/2A moment is always referred to a point. Changing that point can change its components, although the force system remains physically equivalent. Choosing the support center eliminates artificial eccentricities associated with the block's geometric origin.
FSUM and SPOINT — An independent check
SPOINT,0,x_ref,y_ref,z_ref
CMSEL,S,fixed_nodes
FSUM
*GET,fsum_fy,FSUM,0,ITEM,FY
*GET,fsum_mz,FSUM,0,ITEM,MZ
FSUM sums the nodal contributions of elements connected to the selected
set. SPOINT defines the global point about which moments are calculated.
Do not assume that these internal contributions use the same sign convention as
RF.
FSUM limits
Its scope depends on the active selections, and special considerations apply to contact, surface loads, constraint equations, and large rotations. Here it is used with a simple linear solid and as a secondary check.
Force audit
force_error=ABS(rfy+tip_force)/ABS(tip_force)
force_parasitic=(ABS(rfx)+ABS(rfz))/ABS(tip_force)
The “plus” sign is not arbitrary: the load and its reaction must be opposite. The second
indicator detects unintended resultants in X or Z that would remain hidden if we examined
only RFY.
Moment audit
external_mz=(beam_l-x_ref)*tip_force
target_mz=-external_mz
moment_error=ABS(rmz+external_mz)/ABS(external_mz)
moment_parasitic=(ABS(rmx)+ABS(rmy))/ABS(external_mz)Checking force without checking moment leaves the free-body diagram incomplete. A load applied at the wrong position can retain exactly the same resultant and produce a different moment.
Acceptance contract
The base case is only approved when it simultaneously meets:
- 126 nodes, 40 elements, 6 fixed nodes and 6 loaded nodes.
- Exactly one set of results available.
- Force error less than
0.5 %. - Moment error less than
0.5 %. - Parasitic resultant force and moment less than
0.5 %. passes=1.
The threshold is much larger than the expected residual in this linear problem. Its pedagogical purpose is to clearly separate a passing case from a modeling error.
CSV — Reproducible evidence
The macro generates m06_equilibrium_audit.csv:
case,n_nodes,n_elements,n_fixed,n_tip,n_sets,result_time,target_fy,
rfx,rfy,rfz,rmx,rmy,rmz,target_mz,force_error,moment_error,
fsum_fy,fsum_mz,passesThe file preserves inputs, topology, active state, results, and decision. A screenshot of the deformed shape does not provide that traceability.
Guided practice
- Write the predictions
RFYandRMZwithout running MAPDL. - Run
06_start.macin blocks and review the selection beforeSOLVE. - Check the
.outfile to confirm that the solution completed. - Activate the last set and list the reactions of the fixed component.
- Reconstruct the moment about the center of the support.
- Compare your CSV with
06_expected_results.csv. - Run the entire solution only after justifying each sign.
Bug hunting — Five false balances
Open 06_bug_hunt.mac and diagnose each case:
- Spread selection: An attempt is made to solve without recovering the entire model.
- Missing set: reactions are queried without activating a result set.
- Wrong sign: reaction and charge are compared as if they had the same meaning.
- global FSUM: a sum close to zero is interpreted as absence of reaction.
- Non-existent moment: wanted
RF,MZin nodes without rotation and the force torque is ignored.
Don't fix the code first. For each error write: symptom, physical cause, state of MAPDL involved and minimal test that would confirm the diagnosis.
Challenge — Two states, one linear law
Modify the case to solve two load steps:
- Load step 1:
FY=-500 N,TIME=1. - Load step 2:
FY=-1000 N,TIME=2.
You must keep both sets and demonstrate:
RFY₂ / RFY₁ = 2
RMZ₂ / RMZ₁ = 2
Each state must close force and moment with an error less than 0.5 %.
The challenge is completed using a script, without selecting entities from the interface.
Predict before executing
If the reasons are not two, which hypothesis would you review first: linearity, substitution of the load, active set or support selection? Sort those checks before looking at the `.out`.
Self-assessment
- What is the difference between a load step and a result set?
- Why is it executed
ALLSEL,ALLbeforeSOLVE? - What shows that
n_sets>0and what doesn't it prove? - Why do
RFYandtip_forcehave opposite signs? - How does a face of nodes with only translational DOFs transmit a moment?
- Why should the sum point be declared?
- What error can be hidden if you only check forces?
See short answers
- The load step is a loading state; the set is a stored snapshot.
- To prevent a partial selection from contaminating the solved model.
- That there is a stored solution; not that the physical model is correct.
- Because together they must satisfy
ΣFY=0. - Through a distribution of forces that forms a couple.
- Because the moment components depend on the reference point.
- An incorrect loading position or eccentricity.
Evidence of learning
m06_equilibrium_audit.csvwithpasses=1.- Extract from
.outconfirming a finished solution. - Manual calculation of
RFYandRMZ. - Explanation of the sign convention relating
RFandFSUM. - CSV of the challenge with two states and ratios equal to two.
- Reasoned diagnosis of the five defects.
Exit checklist
- ☐ I declare the type of analysis and the geometric hypothesis.
- ☐ I restore all selections before solving.
- ☐ I check that a set exists before consulting results.
- ☐ I consciously activate the state I want to audit.
- ☐ I add reactions exclusively in the fixed component.
- ☐ I check force and moment with respect to the same point.
- ☐ I am not looking for non-existent rotational reactions in SOLID185.
- ☐ My CSV preserves inputs, results, errors and decision.
Technical traceability
The lesson uses Structural Analysis Guide and
Basic Analysis Guide for static solution flow. The syntax of
ANTYPE, NLGEOM, KBC, NSUBST,
OUTRES, SOLVE, SET, SPOINT,
FSUM, NDNEXT and *GET is contrasted with
Command Reference 2024 R1.
Next step: M07
We already know that the model solves and satisfies equilibrium. In M07 we will ask something else demanding: if its displacements and stresses correctly represent the physical beam, comparing them with an analytical solution.