*RIGID BODY with collinear nodes: the manual says "an error will occur", but ccx gives no error or warning, exits 0 and returns wrong displacements

Summary

Section 7.113 (*RIGID BODY) of the 2.23 manual says: “If the participating nodes in a rigid body definition lie on a straight line, the rigid body rotation about the line is not defined and an error will occur.” It then tells the user to remove that rotation with an *EQUATION a·u_R = 0 on the ROT NODE.

So input without that equation is a user error. But the error the manual announces does not occur. In a *STATIC step without NLGEOM, ccx 2.23 runs such a rigid body without an error or a warning, spooles.out stays empty, and the job ends with exit 0. Nothing tells the user that the input is incomplete.

The run is not harmless. The rotation about the line moves no node of the body, so every valid solution has the same nodal displacements. ccx’s displacements are not those. In the test below the manual’s remedy and an equivalent model without a rigid body agree to all printed digits, but ccx moves the two nodes of the body identically: node 5’s components are 0.22 to 0.56 of the remedy’s, and node 7’s z and node 11’s x have the wrong sign. The singular stiffness goes straight to SPOOLES, whose own check (spooles.c, “matrix found to be singular”) is not triggered.

This asks for the missing check: an *ERROR (or at least a *WARNING) when the members of a rigid body are collinear, or a manual sentence saying that the user gets no message.

Version

ccx 2.23 (macOS arm64). Source: master 9ba5d76 (16 Oct 2026).

Already reported or fixed?

Not reported: I found no matching GitHub issue (open or closed) or pull request in Dhondtguido/CalculiX, and no calculix.discourse.group topic (searched 21 Oct 2026). Not fixed: rigidbodys.f and rigidmpc.f are unchanged on master (9ba5d76) and still do not check for collinear nodes.

Related:

  • *BUCKLE step with prescribed displacements - #6 by JuanP74 quotes the same manual sentence as the cause of a model with offset shells that did not converge under NLGEOM. There, too, ccx did not name the cause; a forum member found it in the manual. A linear run is not discussed.
  • Error executing the attached files · Issue #81 · Dhondtguido/CalculiX · GitHub (closed issue): with unrestrained rigid-body motion, SPOOLES “sometimes solves, sometimes doesn’t”. That is the general behaviour this check would guard against.
  • A related case, reported separately: a *KINEMATIC coupling of one global DOF (e.g. 3) without ORIENTATION leaves a reference rotation undefined. Its trigger and code path differ (couplings.f, not rigidbodys.f).

Minimal input

rb_line.inp:

** two C3D8 in a column, bottom held; nodes 5 and 7 (a diagonal of the
** middle face) form a rigid body with reference node 100 at their midpoint;
** node 100 carries a force (1, 2, 3)
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
3, 1., 1., 0.
4, 0., 1., 0.
5, 0., 0., 1.
6, 1., 0., 1.
7, 1., 1., 1.
8, 0., 1., 1.
9, 0., 0., 2.
10, 1., 0., 2.
11, 1., 1., 2.
12, 0., 1., 2.
100, 0.5, 0.5, 1.
101, 0.5, 0.5, 1.
*ELEMENT, TYPE=C3D8, ELSET=EALL
1, 1, 2, 3, 4, 5, 6, 7, 8
2, 5, 6, 7, 8, 9, 10, 11, 12
*NSET, NSET=BAR
5, 7
*NSET, NSET=NOUT
5, 7, 11
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=M
*RIGID BODY, NSET=BAR, REF NODE=100, ROT NODE=101
*BOUNDARY
1, 1, 3
2, 1, 3
3, 1, 3
4, 1, 3
*STEP
*STATIC
*CLOAD
100, 1, 1.
100, 2, 2.
100, 3, 3.
*NODE PRINT, NSET=NOUT
U
*END STEP

Variants of this deck:

  • rb_line_eq.inp, the manual’s remedy (the line’s direction is (1, 1, 0)/√2): these lines inserted before the *BOUNDARY card:

    *EQUATION
    2
    101, 1, 1., 101, 2, 1.
    
  • bar_ref.inp, no rigid body: nodes 100 and 101 removed, the *RIGID BODY card replaced by the *EQUATION below, and the step’s *CLOAD lines on node 100 replaced by the *CLOAD below (... stands for the unchanged lines in between):

    *EQUATION
    4
    7, 1, 1., 7, 2, 1., 5, 1, -1., 5, 2, -1.
    ...
    *CLOAD
    BAR, 1, 0.5
    BAR, 2, 1.
    BAR, 3, 1.5
    

    (the force acts at the midpoint of the two nodes, so each node takes half of it and there is no moment; the equation keeps their distance).

How to run

ccx rb_line
ccx rb_line_eq
ccx bar_ref

Expected

Per the manual, an error for rb_line. Failing that, the displacements of every valid solution, which rb_line_eq and bar_ref give to all printed digits:

         5  6.088704E-03  1.074120E-02  1.174742E-02
         7  6.088704E-03  1.074120E-02 -5.675333E-04
        11  8.998610E-03  1.604175E-02 -3.980019E-03

Actual

rb_line: exit 0, no error or warning on stdout, spooles.out empty, and

         5  1.338175E-03  5.990667E-03  3.906250E-03
         7  1.338175E-03  5.990667E-03  3.906250E-03
        11 -3.680503E-03  3.362636E-03  4.900700E-03

Nodes 5 and 7 move identically. Node 5: x 0.22, y 0.56, z 0.33 of the values above; node 7’s z and node 11’s x have the wrong sign.

The same deck with *STATIC, SOLVER=ITERATIVE SCALING gives the values above within 0.07 %, also without a message. With *STEP, NLGEOM and *STATIC / 0.25, 1., the first increment converges at 0.0039 only after three cutbacks, then ccx cuts back until “*ERROR: increment size smaller than minimum” (exit 201), which does not name the rigid body.

Where it goes wrong

src/rigidbodys.f reads the node or element set and calls rigidmpc for each member node (lines 317-340 for NSET, 343-400 for ELSET). Neither routine looks at the member positions as a whole. src/rigidmpc.f (lines 85-103) writes the rotation terms of each node’s three MPCs with coefficients e(j,k,l)·(x_ref − x_node). For nodes 5 and 7, x_ref − x_node is ±(0.5, 0.5, 0), so the ROT NODE’s DOFs 1 and 2 enter every equation only as θ_x − θ_y, and the stiffness block of θ_x + θ_y is exactly zero.

The only singularity check on this path is SPOOLES’s own (src/spooles.c lines 224-227, and 378-381 in factor_MT):

		if (rootchv != NULL) {
			fprintf(pfi->msgFile, "\n\n matrix found to be singular\n");
			exit(-1);
		}

Rounding leaves a small nonzero pivot, so it does not fire. How SPOOLES then arrives at no body rotation at all was not traced.

Fix

Possible fix (not built or tested): in rigidbodys.f, after the members are known, check the rank of their offsets from the reference node (for instance the smallest eigenvalue of Σ(x_i − x_ref)(x_i − x_ref)^T relative to the largest). When the members are collinear, stop with the *ERROR the manual describes and name the line’s direction, so the user can add the *EQUATION. Adding a·u_R = 0 automatically, with a *WARNING, would also work. If neither is wanted, the manual could say that ccx does not detect the case and that the result is then undefined.

Workaround: the manual’s *EQUATION a·u_R = 0 on the ROT NODE, as in rb_line_eq.inp.

Confirmed with official build of ccx 2.23 on Windows, needs a GitHub ticket.

Related: FEM: Unidentified CalculiX error when applying a rigid body constraint to an edge/vertex · Issue #14130 · FreeCAD/FreeCAD · GitHub

I got this with PaStiX for rb_line:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set NOUT and time  0.1000000E+01

         5  6.088704E-03  1.074120E-02  1.174742E-02
         7  6.088704E-03  1.074120E-02 -5.675333E-04
        11  8.998610E-03  1.604175E-02 -3.980019E-03

Spooles:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set NOUT and time  0.1000000E+01

         5  1.338175E-03  5.990667E-03  3.906250E-03
         7  1.338175E-03  5.990667E-03  3.906250E-03
        11 -3.680503E-03  3.362636E-03  4.900700E-03
1 Like

Posted: *RIGID BODY with collinear nodes: the manual says "an error will occur", but ccx gives no error or warning, exits 0 and returns wrong displacements · Issue #230 · Dhondtguido/CalculiX · GitHub

1 Like