Summary
In a linear *STATIC step, ccx takes the effect of nonzero prescribed displacements into account by computing the internal forces they cause (the results call in linstatic.c before the matrix is set up) and subtracting them from the external forces. For SPRING1 and SPRING2 elements that force is computed but not added, so it never reaches the right-hand side:
- SPRING2 from a moved node. Node 1 is moved 0.01 in x by
*BOUNDARY. A SPRING2 (k = 100, DOF 1 to DOF 1) joins it to node 2, which sits on a SPRING1 (k = 100). Node 2 should move 0.005. ccx leaves it at 0, prints a reaction force of -1 at the free node 2, and exits 0 without a message. - SPRING1 on an
*EQUATION’s dependent DOF. u2y = 0.5 u2x + u3x, node 3 moved 0.01 in x, SPRING1 elements on u2x (k = 100) and u2y (k = 200). The answer is (u2x, u2y) = (-1/150, 1/150). ccx gives (0, 0.01).
The same decks with *STEP, NLGEOM give the exact answers. SPRING1 and SPRING2 have a fixed direction of action, so NLGEOM must not change anything here. The first deck with a SPRINGA in place of the SPRING2 gives the exact answer without NLGEOM as well.
The 2.23 manual allows what these decks do. Section 6.7.1 (Single point constraints): “The prescribed value can be zero or nonzero.” Section 6.7.2 (Multiple point constraints) describes the inhomogeneous equation of the second deck: “An inhomogeneous linear relationship can be defined by assigning the inhomogeneous term to one of the degrees of freedom (DOF) of a dummy node (using a SPC) and including this DOF in the MPC”. Sections 6.2.40 / 6.2.41 (SPRING1, SPRING2) give the spring force as K (u·n) n, with no restriction to a type of step.
Version
ccx 2.23 (macOS arm64) and current master (537aa81, 2 Nov 2026, built from source): the 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: the lines below are the same in 2.23 and on master (537aa81).
Related, different: Non-linear SPRING1 elements not identified · Issue #52 · Dhondtguido/CalculiX · GitHub (closed) was about nonlinear SPRING1 input. DASHPOTA in implicit *DYNAMIC ignores the velocity of an end moved by *BOUNDARY (also through an *EQUATION): the free end stays at rest (exit 0) · Issue #280 · Dhondtguido/CalculiX · GitHub (DASHPOTA in implicit *DYNAMIC ignores a prescribed velocity) is the same kind of effect for a dashpot in another procedure, with a different cause.
Minimal input
spring2_driven.inp:
** SPRING2 (k=100, DOF 1 to DOF 1) from node 1 to node 2; node 2 also on a
** SPRING1 (k=100, DOF 1). Node 1 is moved 0.01 in x by *BOUNDARY.
** exact: u2x = 0.005
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
*ELEMENT, TYPE=SPRING2, ELSET=S12
1, 1, 2
*ELEMENT, TYPE=SPRING1, ELSET=S2
2, 2
*SPRING, ELSET=S12
1, 1
100.
*SPRING, ELSET=S2
1
100.
*BOUNDARY
1, 2, 3
2, 2, 3
*STEP
*STATIC
*BOUNDARY
1, 1, 1, 0.01
*NODE PRINT, NSET=NALL
U, RF
*END STEP
dep_spring1.inp:
** node 2 carries two SPRING1 elements: k=100 in x, k=200 in y.
** *EQUATION: u2y = 0.5 u2x + u3x; node 3 (no element) is moved by 0.01 in x.
** exact: u2x = -1/150 = -6.666667E-03, u2y = 6.666667E-03
*NODE, NSET=NALL
2, 0., 0., 0.
3, 1., 0., 0.
*ELEMENT, TYPE=SPRING1, ELSET=S1
1, 2
*ELEMENT, TYPE=SPRING1, ELSET=S2
2, 2
*SPRING, ELSET=S1
1
100.
*SPRING, ELSET=S2
2
200.
*EQUATION
3
2, 2, 1., 2, 1, -0.5, 3, 1, -1.
*BOUNDARY
2, 3, 3
3, 1, 1, 0.01
*STEP
*STATIC
*NODE PRINT, NSET=NALL
U
*END STEP
Twins:
-
spring2_driven_nlgeom.inp,dep_spring1_nlgeom.inp:*STEP, NLGEOMinstead of*STEP. -
spring2_driven_springa.inp: the SPRING2 replaced by a SPRINGA between the same nodes (they lie on the x axis, so its direction is x):-*ELEMENT, TYPE=SPRING2, ELSET=S12 +*ELEMENT, TYPE=SPRINGA, ELSET=S12 1, 1, 2 ... *SPRING, ELSET=S12 -1, 1 + 100.
How to run
ccx spring2_driven
ccx spring2_driven_nlgeom
ccx spring2_driven_springa
ccx dep_spring1
ccx dep_spring1_nlgeom
Expected
spring2_driven: two springs of 100 in series between u = 0.01 and the ground, so u2x = 0.005; RF = 0.5 at node 1 and 0 at the free node 2. The NLGEOM twin and the SPRINGA twin give exactly that:
1 1.000000E-02 0.000000E+00 0.000000E+00
2 5.000000E-03 0.000000E+00 0.000000E+00
...
1 5.000000E-01 0.000000E+00 0.000000E+00
2 0.000000E+00 0.000000E+00 0.000000E+00
(the SPRINGA twin prints -1.110223E-14 for RF at node 2).
dep_spring1: minimise 50 u2x² + 100 (0.5 u2x + 0.01)², so u2x = -1/150 and u2y = 1/150. The NLGEOM twin gives
2 -6.666667E-03 6.666667E-03 0.000000E+00
Actual
spring2_driven, ccx 2.23 and master, exit 0, no warning:
displacements (vx,vy,vz) for set NALL and time 0.1000000E+01
1 1.000000E-02 0.000000E+00 0.000000E+00
2 0.000000E+00 0.000000E+00 0.000000E+00
forces (fx,fy,fz) for set NALL and time 0.1000000E+01
1 1.000000E+00 0.000000E+00 0.000000E+00
2 -1.000000E+00 0.000000E+00 0.000000E+00
Node 2 does not move, and the “reaction force” of -1 at node 2, which has no boundary condition, is the unbalanced spring force.
dep_spring1, ccx 2.23 and master, exit 0:
2 0.000000E+00 1.000000E-02 0.000000E+00
Where it goes wrong
linstatic.c calls results once before setting up the matrix (line 351, with iout=-1) to get the internal forces f caused by the prescribed displacements, and later uses b = fext - f (line 484). In resultsmech.f (master and 2.23, same line numbers) the spring force is computed for SPRINGA, SPRING1 and SPRING2 alike in that call (lines 394-397):
if((lakonl(7:7).eq.'A').or.(lakonl(7:7).eq.'1').or.
& (lakonl(7:7).eq.'2').or.((mortar.eq.0).and.
& ((nmethod.ne.1).or.(iperturb(1).ge.2).or.
& (iout.ne.-1)))) then
but it is added to fn only for SPRINGA (lines 444-456):
! next lines are not executed in linstatic.c before the
! setup of the stiffness matrix (i.e. nmethod=1 and
! iperturb(1)<1 and iout=-1).
!
if((lakonl(7:7).eq.'A').or.
& ((nmethod.ne.1).or.(iperturb(1).ge.2).or.(iout.ne.-1)))
& then
do j=1,nope
do k=1,3
fn(k,konl(j))=fn(k,konl(j))+fnl(k,j)
So in a linear static step the force that a prescribed displacement causes in a SPRING1 or SPRING2 is dropped, and the free DOFs the spring is attached to (directly or through an *EQUATION) do not feel it. The stiffness matrix is right: with node 1 held at 0 and a force of 1 on node 2 instead, ccx gives u2x = 5.000000E-03 (= 1/200).
Fix
Add SPRING1 and SPRING2 to the second condition, as in the first:
if((lakonl(7:7).eq.'A').or.(lakonl(7:7).eq.'1').or.
& (lakonl(7:7).eq.'2').or.
& ((nmethod.ne.1).or.(iperturb(1).ge.2).or.(iout.ne.-1)))
& then
A master (537aa81) build with only this change gives the exact answers for both decks (5.000000E-03 with RF 5.000000E-01 / 0.000000E+00, and -6.666667E-03 / 6.666667E-03). The test decks with SPRING1 / SPRING2 elements (spring6, spring7) give byte-identical .dat files with and without the change; I have not run the whole test suite.