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:
- Issues · Dhondtguido/CalculiX · GitHub a different bug in the same kind of step. A beam rotation prescribed with
*BOUNDARYin*DYNAMICreaches the wrong angle; that run finishes, here a moment stops the run. - Issues · Dhondtguido/CalculiX · GitHub the same silent SPOOLES stop (“matrix found to be singular” in
spooles.outonly, exit 255), from a different cause (element deletion). - gen3dboun, gen3dforc: handle rotational DOFs on plane and axisymmetric nodes by oursland · Pull Request #200 · Dhondtguido/CalculiX · GitHub (open): changes
gen3dforc.fandgen3dboun.ffor moments and rotations on plane and axisymmetric nodes (the mean rotation branch). It does not touch the knot set-up described here.
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
-
In a
*DYNAMICstep (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). -
The knot’s initial state is estimated from the section nodes’ displacements
vold. The test for zero displacements has an emptyelse(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 endifThis test came with commit 09f436b (“made some corrections in gen3dforc.f for knots”, 17 Sep 2024, after 2.22). In
gen3dboun.fthe same test has the estimate in itselse; here theelsewas left empty, which looks like an unfinished edit. So the estimate in lines 274-486 also runs at rest. Its right-hand sidexnis then zero,dgesv(line 345) returnsxn= 0, and lines 356-358 divide by its zero length:dd=dsqrt(dd) do l=1,3 xn(l)=dasin(dd/alpha)*xn(l)/dd0*0/0 is NaN. Line 391 stores it as the rotation of the knot’s rotation node:
vold(l,irotnode)=xn(l). -
nonlinmpc.fbuilds 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 atspooles.c:224-226, which writes tospooles.outonly: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.
-
gen3dboun.fcreates the same knot for a rotational SPC, but keeps the estimate in theelsebranch (lines 248-255,elseat 255). A knot made at rest by a boundary condition therefore starts at zero, which is whyrotation_bc.inpandknot_from_bc.inprun. For shells (3 dependent nodes), gen3dforc’s estimate sits in theelseofif(ndepnodes.eq.3)(line 237) and is skipped. A moment on an S4 node in the same kind of step runs (s4_moment_dynamic.inpbelow: 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).