*DYNAMIC: a moment (*CLOAD on DOF 4-6) on a beam node stops ccx with exit 255 and no message (NaN in explicit), because the new knot's rotation starts at 0/0

Summary

In an implicit *DYNAMIC step, a *CLOAD on DOF 4, 5 or 6 of a beam node (B31, B32R) that is not a knot yet stops ccx with exit status 255. Nothing on stdout or stderr says why. The only trace is the line “matrix found to be singular” in spooles.out. Any value does it (0. too), with or without NLGEOM, for a torque as well as a bending moment. In *DYNAMIC, EXPLICIT the same load gives NaN displacements and exit 0.

The manual describes this load as supported. Section 6.2.33 (Three-node 3D beam element (B32 and B32R)) of the 2.23 manual, to which section 6.2.32 (B31 and B31R) refers: “Concentrated bending moments or torques are defined as point loads (*CLOAD) acting on degree four to six in the node. Their use generates a knot in the node.” Section 6.2.14 (Eight-node shell element (S8 and S8R)) says that a moment still creates a knot “for dynamic calculations”.

The cause is in gen3dforc.f, where ccx creates that knot. It estimates the knot’s initial rotation from the displacements of the section nodes. When these are zero (always in the first step), the estimate divides 0 by 0, and the knot’s rotation node starts at NaN. gen3dboun.f creates the same knot for a rotational boundary condition, but skips the estimate when the displacements are zero. So a prescribed rotation runs, and so does the same moment on a knot that a boundary condition created in an earlier step (knot_from_bc.inp).

Version

ccx 2.23 (macOS arm64), SPOOLES solver. 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: the knot set-up in gen3dforc.f is unchanged on master (9ba5d76).

Related:

Minimal input

moment_dynamic.inp: one B31 cantilever, clamped at node 1, moment about y at node 2.

** One B31 cantilever along x, moment about y at the free end, implicit *DYNAMIC
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
*ELEMENT, TYPE=B31, ELSET=B
1, 1, 2
*BEAM SECTION, ELSET=B, MATERIAL=M, SECTION=RECT
0.05, 0.05
0., 0., 1.
*MATERIAL, NAME=M
*ELASTIC
1.e5, 0.3
*DENSITY
1.e-3
*BOUNDARY
1, 1, 6
*STEP
*DYNAMIC, SOLVER=SPOOLES
0.001, 0.01
*CLOAD
2, 5, 0.01
*NODE PRINT, NSET=NALL
U
*END STEP

Variants of this deck (one change each):

deck change exit result
moment_zero.inp 2, 5, 0. 255 “matrix found to be singular” in spooles.out
torque.inp 2, 4, 0.01 255 same
moment_nlgeom.inp *STEP, NLGEOM 255 same
b32r.inp one B32R: node 2 at (0.5, 0, 0), node 3 at (1, 0, 0), 1, 1, 2, 3, load 3, 5, 0.01 255 same
force.inp 2, 3, 0.01 0 tip u3 = 9.977565E-03
rotation_bc.inp *BOUNDARY and 2, 5, 5, 0.001 in place of the *CLOAD lines 0 tip u3 = -5.414010E-04
moment_explicit.inp *DYNAMIC, EXPLICIT and 1.e-7, 1.e-6 0 NaN at both nodes in all 4 increments
force_explicit.inp explicit as above, and 2, 3, 0.01 0 tip u3 = 6.204987E-09, no NaN
knot_from_bc.inp: the same moment on a knot made by a boundary condition (runs)

The tip rotation is held in a first *DYNAMIC step, so gen3dboun creates the knot. The second step releases it with *BOUNDARY, OP=NEW and applies the same moment, from rest.

knot_from_bc.inp:

** Same beam; the tip rotation is held in a first *DYNAMIC step, then released and the moment applied
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
*ELEMENT, TYPE=B31, ELSET=B
1, 1, 2
*BEAM SECTION, ELSET=B, MATERIAL=M, SECTION=RECT
0.05, 0.05
0., 0., 1.
*MATERIAL, NAME=M
*ELASTIC
1.e5, 0.3
*DENSITY
1.e-3
*BOUNDARY
1, 1, 6
*STEP
*DYNAMIC, SOLVER=SPOOLES
0.001, 0.01
*BOUNDARY
2, 5, 5, 0.
*END STEP
*STEP
*DYNAMIC, SOLVER=SPOOLES
0.001, 0.01
*BOUNDARY, OP=NEW
1, 1, 6
*CLOAD
2, 5, 0.01
*NODE PRINT, NSET=NALL
U
*END STEP

How to run

ccx moment_dynamic
echo $?
cat spooles.out

Expected

The step runs, as it does when the knot already exists. knot_from_bc.inp applies the same moment from rest and finishes with exit 0; at the end of its second step the tip has u3 = -5.755496E-02. The force and rotation-BC variants run too. If ccx could not take the load, an *ERROR naming it would be expected, not exit 255.

Actual

moment_dynamic.inp: exit status 255, every run (10 of 10). stdout ends with

 Dynamic analysis was selected

 Newton-Raphson iterative procedure is active

The .dat file holds only the step header. spooles.out contains

 matrix found to be singular

and the .12d file says “a KNOT was generated in node 2”. The C part of stdout ends with “Factoring the system of equations using the symmetric spooles solver” before any “increment 1”, so it stops at the first factorization of the step. That is the start-of-step acceleration solve (nonlingeo.c:1342-1359).

moment_explicit.inp: exit 0 and “Job finished”. The first increment in the .dat file reads as follows, and the other three are NaN as well:

 displacements (vx,vy,vz) for set NALL and time  0.3177761E-06

         1           NaN           NaN           NaN
         2           NaN           NaN           NaN

Where it goes wrong

  1. In a *DYNAMIC step (nmethod 4, iperturb(1) > 1), a moment on a beam or shell node that is not a knot creates a knot (gen3dforc.f:158). For a beam, its dependent nodes are the 8 section nodes (lines 170-175).

  2. The knot’s initial state is estimated from the section nodes’ displacements vold. The test for zero displacements has an empty else (gen3dforc.f:264-272):

                  dd=dsqrt(w(1)*w(1)+w(2)*w(2)+w(3)*w(3))
                  if(dd.lt.1.d-20) then
                    do l=1,3
                      vold(l,irefnode)=0.d0
                      vold(l,irotnode)=0.d0
                      vold(l,iexpnode)=0.d0
                    enddo
                  else
                  endif
    

    This test came with commit 09f436b (“made some corrections in gen3dforc.f for knots”, 17 Sep 2024, after 2.22). In gen3dboun.f the same test has the estimate in its else; here the else was left empty, which looks like an unfinished edit. So the estimate in lines 274-486 also runs at rest. Its right-hand side xn is then zero, dgesv (line 345) returns xn = 0, and lines 356-358 divide by its zero length:

                  dd=dsqrt(dd)
                  do l=1,3
                    xn(l)=dasin(dd/alpha)*xn(l)/dd
    

    0*0/0 is NaN. Line 391 stores it as the rotation of the knot’s rotation node: vold(l,irotnode)=xn(l).

  3. nonlinmpc.f builds the knot MPCs from that rotation (w(1)=vold(1,irotnode), lines 265-267, then the rotation matrix and its derivatives). The coefficients become NaN (lines 448-460). SPOOLES then stops at spooles.c:224-226, which writes to spooles.out only:

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

    The explicit solver does not factor a matrix, so the NaN goes into the displacements.

  4. gen3dboun.f creates the same knot for a rotational SPC, but keeps the estimate in the else branch (lines 248-255, else at 255). A knot made at rest by a boundary condition therefore starts at zero, which is why rotation_bc.inp and knot_from_bc.inp run. For shells (3 dependent nodes), gen3dforc’s estimate sits in the else of if(ndepnodes.eq.3) (line 237) and is skipped. A moment on an S4 node in the same kind of step runs (s4_moment_dynamic.inp below: exit 0, tip node 6 U3 = -1.619305E-02 at t = 0.01).

    s4_moment_dynamic.inp: an S4 strip of two elements, clamped at x = 0, a moment about y at tip node 6 in a *DYNAMIC step
    *NODE, NSET=NALL
    1, 0., 0., 0.
    2, 1., 0., 0.
    3, 2., 0., 0.
    4, 0., 1., 0.
    5, 1., 1., 0.
    6, 2., 1., 0.
    *ELEMENT, TYPE=S4, ELSET=P
    1, 1, 2, 5, 4
    2, 2, 3, 6, 5
    *SHELL SECTION, ELSET=P, MATERIAL=M
    0.05
    *MATERIAL, NAME=M
    *ELASTIC
    1.e5, 0.3
    *DENSITY
    1.e-3
    *BOUNDARY
    1, 1, 6
    4, 1, 6
    *STEP
    *DYNAMIC
    0.001, 0.01
    *CLOAD
    6, 5, 0.01
    *NODE PRINT, NSET=NALL
    U
    *END STEP
    

The block is the same in the source of the 2.23 era (only the names iponoel/inoel differ).

Workaround / fix

Fix: in gen3dforc.f, give the zero-displacement test the same structure as in gen3dboun.f. Move lines 274-486 into the else branch at line 271, so that a knot created at rest starts with zero rotation and expansion. A guard if(dd.gt.0.d0) before the division at line 358, in both files, would also cover a section that has moved without turning. An *ERROR line on stdout next to the spooles.out message would make such stops visible.

Workaround: let a rotational boundary condition create the knot in an earlier *DYNAMIC step, then release it with *BOUNDARY, OP=NEW and apply the moment (knot_from_bc.inp).

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

moment_dynamic:

STEP            1

 *INFO reading *DYNAMIC: for implicit calculations
       the calculation of the internal energy
       is activated.

 Dynamic analysis was selected

 Newton-Raphson iterative procedure is active

 Decascading the MPC's

 Determining the structure of the matrix:
 Using up to 16 cpu(s) for setting up the structure of the matrix.
 number of equations
 17
 number of nonzero lower triangular matrix elements
 136

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 16 cpu(s) for spooles.
1 Like

posted: *DYNAMIC: a moment (*CLOAD on DOF 4-6) on a beam node stops ccx with exit 255 and no message (NaN in explicit), because the new knot's rotation starts at 0/0 · Issue #289 · Dhondtguido/CalculiX · GitHub

1 Like