NLGEOM: an *EQUATION tied to a *RIGID BODY member is not satisfied after a large rotation (also why an identity ORIENTATION changes a *KINEMATIC coupling)

Summary

Section 7.56 (*EQUATION) of the 2.23 manual: “With this option, a linear equation constraint between arbitrary displacement components at any nodes where these components are active can be imposed.” In a step with NLGEOM, ccx’s results do not satisfy such an equation when its independent term is a DOF that a *RIGID BODY controls, once the body has turned by a finite angle.

Test: a *RIGID BODY of four element-less nodes 209-212 turns 0.5 rad about z. Three equations u(11) - u(211) = 0 (x, y, z) tie the top corner node 11 of a two-element column to node 211. At the end of the step:

node x y
211 (body member) -3.009215E-01 1.785041E-01
11 (tied to 211) -3.392520E-01 9.953926E-02

Node 211 is right: the exact rigid rotation of r = (0.5, 0.5, 0) about the reference node is (R - I) r = (-0.3009215, 0.1785041, 0). Node 11 should have the same displacement, but the equations are off by 0.038 in x and 0.079 in y. Exit 0. Apart from the usual NLGEOM and minimum-increment notes, the only messages are *INFO lines from cascade (“linear MPCs and nonlinear MPCs depend on each other”, “reallocating nodempc”).

Node 11’s value is exactly theta n x (R r) = 0.5 x (-0.6785040, 0.1990785, 0): the derivative of the rigid motion at the final rotation times the total rotation. It does not depend on the increments: one increment of 1.0, ten of 0.1 and fifty of 0.02 give the same digits. The same deck without NLGEOM gives -2.500000E-01, 2.500000E-01 for both nodes, as it should.

ccx builds this construct itself for a *KINEMATIC coupling with ORIENTATION (couplings.f, master lines 394-417 and 487-497: each coupling node is duplicated, the duplicate gets RIGID MPCs, and the original is tied to it by a linear MPC from mpcadd). So an identity ORIENTATION, which should change nothing, changes the result under NLGEOM:

top face of a column, coupled in DOFs 1-3, reference node turned 0.5 rad node 11 (x, y)
*KINEMATIC without ORIENTATION -3.009215E-01, 1.785041E-01 (rigid)
the same with an identity ORIENTATION -3.392520E-01, 9.953926E-02

With the identity ORIENTATION the face does not move rigidly: its corners end up 0.621 instead of 0.707 from the centre (12 % closer).

Version

ccx 2.23 (macOS arm64) and current master (537aa81), same numbers.

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 3 Nov 2026). Not fixed: resultsini.c, cascade.c and the RIGID branch of nonlinmpc.f are unchanged on master (537aa81).

Related:

Minimal input

rb_eq.inp:

** Two C3D8 in a column (z = 0 to 2), bottom face held. The element-less nodes
** 209-212 (at the places of the top-face nodes 9-12) form a *RIGID BODY with
** REF NODE 100 and ROT NODE 101, which turns 0.5 rad about z (NLGEOM).
** Three *EQUATIONs tie node 11 to node 211 in x, y and z.
*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, 2.
101, 0.5, 0.5, 2.
209, 0., 0., 2.
210, 1., 0., 2.
211, 1., 1., 2.
212, 0., 1., 2.
*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=BOT
1, 2, 3, 4
*NSET, NSET=P
11, 211
*NSET, NSET=COPY
209, 210, 211, 212
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=M
*RIGID BODY, NSET=COPY, REF NODE=100, ROT NODE=101
*EQUATION
2
11, 1, 1., 211, 1, -1.
2
11, 2, 1., 211, 2, -1.
2
11, 3, 1., 211, 3, -1.
*BOUNDARY
BOT, 1, 3
100, 1, 3
101, 1, 2
101, 3, 3, 0.5
*STEP, NLGEOM
*STATIC
0.1, 1.
*NODE PRINT, NSET=P, FREQUENCY=100
U
*END STEP

rb_eq_lin.inp: the same with *STEP instead of *STEP, NLGEOM.

kin_ident.inp: the oriented coupling (kin_plain.inp: the same without the two *ORIENTATION lines and without ", ORIENTATION=OR")
** Two C3D8 in a column (z = 0 to 2), bottom face held. The top face (element 2,
** face S2) is kinematically coupled (DOFs 1-3) to node 100 at its centre, with
** an identity ORIENTATION on the *COUPLING. Node 100 turns 0.5 rad about z (NLGEOM).
*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, 2.
*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=BOT
1, 2, 3, 4
*NSET, NSET=TOP
9, 10, 11, 12
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=M
*ORIENTATION, NAME=OR, SYSTEM=RECTANGULAR
1., 0., 0., 0., 1., 0.
*SURFACE, NAME=STOP
2, S2
*COUPLING, REF NODE=100, SURFACE=STOP, CONSTRAINT NAME=C1, ORIENTATION=OR
*KINEMATIC
1, 3
*BOUNDARY
BOT, 1, 3
100, 1, 5
100, 6, 6, 0.5
*STEP, NLGEOM
*STATIC
0.1, 1.
*NODE PRINT, NSET=TOP, FREQUENCY=100
U
*END STEP

kin_ident, nodes 9-12: (3.392520E-01, -9.953926E-02), (9.953926E-02, 3.392520E-01), (-3.392520E-01, 9.953926E-02), (-9.953926E-02, -3.392520E-01). kin_plain: (3.009215E-01, -1.785041E-01), (1.785041E-01, 3.009215E-01), (-3.009215E-01, 1.785041E-01), (-1.785041E-01, -3.009215E-01). z = 0 in both. Without NLGEOM both give 0.25 in each component, as theta x r.

How to run

ccx rb_eq, ccx rb_eq_lin; compare nodes 11 and 211 in the .dat files.

Expected

Nodes 11 and 211 with the same displacement, (-3.009215E-01, 1.785041E-01, 0), as the equations require.

Actual

rb_eq (exit 0):

        11 -3.392520E-01  9.953926E-02  0.000000E+00
       211 -3.009215E-01  1.785041E-01  0.000000E+00

rb_eq_lin: both nodes -2.500000E-01, 2.500000E-01, 0.

Where it goes wrong

As far as I can follow it (line numbers from master 537aa81):

  1. In the NLGEOM step cascade.c first keeps the *EQUATION undecascaded (lines 162-176, the *INFO above). remastruct.c then calls cascade with callfrommain=0 in each iteration, which substitutes the RIGID MPC of node 211 into the equation (lines 229 ff.). The substituted terms are the coefficients nonlinmpc.f computed for the current iteration: the derivative dc of the rotation matrix at the current rotation vector (lines 162-177), and an inhomogeneous term that is the remaining error of the current iteration (lines 179-190, with “old value of the nonhomogeneous term must be zero”). These coefficients are only valid for increments.
  2. The equation keeps its blank label. resultsini.c:233-244 computes the dependent DOF of an MPC with a blank label from the total displacements (incrementalmpc=0), and that of a RIGID MPC from the increments (incrementalmpc=1).
  3. So node 11 gets the derivative at the final rotation times the total rotation vector, theta n x (R r), while node 211 gets the correct rigid motion.

Fix

A suggestion, not tried: in a nonlinear step, compute the dependent DOF of every MPC from the increments, or at least of every MPC into which cascade.c substituted a nonlinear MPC (it could mark them, as it already relabels a substituted CYCLIC MPC as SUBCYCLIC, line 239). For an MPC with constant coefficients the two forms give the same result once the previous state satisfies it.

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

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

        11 -3.392520E-01  9.953926E-02  0.000000E+00
       211 -3.009215E-01  1.785041E-01  0.000000E+00

Posted: NLGEOM: an *EQUATION tied to a *RIGID BODY member is not satisfied after a large rotation (also why an identity ORIENTATION changes a *KINEMATIC coupling) · Issue #311 · Dhondtguido/CalculiX · GitHub

1 Like