*DYNAMIC, EXPLICIT: spring elements are left out of the stable time increment, so a stiff spring makes the solution grow without bound (exit 0, no message)

Summary

In an explicit dynamic step ccx chooses the time increment from the elements’ wave speeds and, separately, from the contact springs. Spring elements (SPRINGA here) take no part in it. A spring that is stiff compared with the masses it connects therefore makes the step unstable: in the deck below, two cubes joined by four SPRINGA of stiffness 1E+04 end up with displacements of 1E+26 and a total energy of 3.8E+58 from an initial 5.0E-04, with exit 0 and no warning. ccx prints the same “SELECTED time increment … 5.309225e-04” for every spring stiffness. It also discards the user’s initial increment of 1.E-4, which would have been stable, with the warning “the initial time increment defined by the user will not be used since the time increment is determined automatically by the dynamic procedure based on stability considerations”.

Section 6.9.7 (Direct integration dynamic analysis) of the 2.23 manual: “the explicit scheme is only conditionally stable”, with the maximum time step dictated by ω_max, “which is the highest natural frequency of an element”. It gives ω_max for volumetric elements and, for contact springs, “the idealization of a spring with spring constant k connecting two nodes with nodal masses M1 and M2 is used”. The same idealisation is not applied to spring elements: for a corner node of these cubes it gives Δt_cr ≈ 2/ω_max = 1.1E-04 (k = 1E+04, nodal masses 1.25E-04, so m = M/2 = 6.25E-05 and ω_max = 1.8E+04), below the 5.3E-04 that ccx uses. The spring does set the limit here: with a maximum increment of 1.4E-04 the deck runs (u1 = 5.357254E-03 at node 1), with 1.6E-04 it already grows (6.316749E-01), and with 2.0E-04 it blows up (1.303913E+25); the same on both versions.

Version

ccx 2.23 (macOS arm64) and current master (537aa81, built on macOS arm64): the same numbers. Source: master 537aa81.

Already reported or fixed?

Probably seen before, without the cause: in Dynamic , Explicit (Nov 2023, a pendulum hanging on a stiff SPRINGA in *DYNAMIC, EXPLICIT), posts 3-4 note that the stiffness of the massless spring changes the explicit run and that the model “fly away” unless the stiffness is lowered. The thread then put it down to the units of the spring stiffness and of the Courant number (Dynamic , Explicit. Material wave propagation & Courant number in mmgs units · Issue #60 · Dhondtguido/CalculiX · GitHub, closed). Nobody there looked at the stable increment. I found no GitHub issue or pull request about it (checked 3 Nov 2026). Not fixed: calcstabletimeincvol.f and calcstabletimeinccont.f are unchanged in this respect on master (537aa81).

Related:

Minimal input

springs.inp:

** two unit C3D8 cubes 1 apart along x, joined by four SPRINGA (stiffness k) between facing corners;
** cube A starts with velocity 1 in x. *DYNAMIC, EXPLICIT with the automatic increment.
*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, 2., 0., 0.
10, 3., 0., 0.
11, 3., 1., 0.
12, 2., 1., 0.
13, 2., 0., 1.
14, 3., 0., 1.
15, 3., 1., 1.
16, 2., 1., 1.
*ELEMENT, TYPE=C3D8, ELSET=EA
1, 1, 2, 3, 4, 5, 6, 7, 8
*ELEMENT, TYPE=C3D8, ELSET=EB
2, 9, 10, 11, 12, 13, 14, 15, 16
*NSET, NSET=NA
1, 2, 3, 4, 5, 6, 7, 8
*MATERIAL, NAME=M
*ELASTIC
1000., 0.
*DENSITY
1.E-3
*SOLID SECTION, ELSET=EA, MATERIAL=M
*SOLID SECTION, ELSET=EB, MATERIAL=M
*ELEMENT, TYPE=SPRINGA, ELSET=ES
3, 2, 9
4, 3, 12
5, 6, 13
6, 7, 16
*SPRING, ELSET=ES

1.E4
*INITIAL CONDITIONS, TYPE=VELOCITY
NA, 1, 1.
*BOUNDARY
NALL, 2, 3
*STEP, INC=1000000
*DYNAMIC, EXPLICIT
1.E-4, 0.01
*EL PRINT, ELSET=EA, TOTALS=ONLY, FREQUENCY=1000000
ELKE
*NODE PRINT, NSET=NALL, FREQUENCY=1000000
U
*END STEP

Variants:

  • springs_k100.inp: spring stiffness 100. instead of 1.E4.
  • springs_dtmax.inp: 1.E-4, 0.01, 1.E-8, 5.E-5 on the *DYNAMIC data line (a maximum increment of 5E-05). The threshold runs in the summary use 1.4E-4, 1.6E-4 and 2.0E-4 as the fourth value.

How to run

ccx springs (and the variants the same way)

Expected

The momentum of cube A (mass 1E-03, velocity 1) is shared by the two cubes, so at t = 0.01 both have moved about 0.005, as in springs_dtmax (u1 = 5.358906E-03 at node 1 and 5.009935E-03 at node 9). If ccx cannot find a stable increment, a message would be expected.

Actual

springs.out:

 Explicit time integration: Volumetric COURANT initial stable time increment:5.309225e-04

 SELECTED time increment (not considering penalty contact):5.309225e-04

and at the end of the step

 initial energy (at start of step) = 5.000000e-04
 ...
 internal energy = 3.471494e+58
 kinetic energy = 3.297181e+57
 ...
 total energy  = 3.801212e+58

with “Job finished” and exit 0. u1 at t = 0.01:

deck increment node 1 node 9
springs (k = 1E+04) 5.309225E-04 -8.180700E+24 -6.545582E+26
springs_k100 (k = 100) 5.309225E-04 5.696782E-03 4.575671E-03
springs_dtmax (k = 1E+04) 5.0E-05 5.358906E-03 5.009935E-03

ccx 2.23 and master give the same numbers.

Where it goes wrong

calcstabletimeincvol.f loops over the elements of the input deck and skips every element whose label starts with ES (master line 151, if(lakonl(1:2).ne.'ES') then), i.e. the spring and gap elements (labels ESPRNGA1, ESPRNG10, ESPRNG21, ESPGAPA1 for SPRINGA, SPRING1, SPRING2, GAPUNI), so their stiffness never enters dtvol. calcstabletimeinccont.f, which applies the two-mass formula of section 6.9.7, loops only over the contact elements that ccx generates (do nelem=ne0+1,ne, line 68). nonlingeo.c then takes dtvol as the increment (or the user’s maximum increment, if smaller).

Fix

Possible fix (not built or tested): for spring elements (SPRINGA, SPRING1, SPRING2) in calcstabletimeincvol.f, compute ω_max = sqrt(k (m1 + m2) / (m1 m2)) from the spring constant and the lumped masses of its nodes, as calcstabletimeinccont.f does for contact springs, and take the smaller increment. At the least, ccx could warn that spring elements are not taken into account.

Workaround: set a maximum time increment on the *DYNAMIC data line (fourth value), as in springs_dtmax.inp, or fix the increment with *DYNAMIC, EXPLICIT, DIRECT (with 1.E-4, 0.01 this deck gives 5.358152E-03 / 4.998994E-03).

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

springs.out:

 Calculating Material Wave Speeds...

 Wave Speed for mat.            1   1000.0000000000000
 Wave Speed for mat.            2  -1.0000000000000000

 Explicit time integration: Volumetric COURANT initial stable time increment:5.309225e-04

 SELECTED time increment (not considering penalty contact):5.309225e-04

 the increment size exceeds the remainder of the step and is decreased to 5.309225e-04

 the increment size exceeds the remainder of the step and is decreased to 4.433956e-04

 actual total time=1.000000e-02

 initial energy (at start of step) = 5.000000e-04

 since start of the step:
 external work = 0.000000e+00
 work performed by the damping forces = 0.000000e+00
 netto work = 0.000000e+00

 actual energy:
 internal energy = 3.471494e+58
 kinetic energy = 3.297181e+57
 elastic contact energy = 0.000000e+00
 energy lost due to friction = 0.000000e+00
 total energy  = 3.801212e+58

 energy increase = 3.801212e+58

 energy balance (absolute) = 3.801212e+58
 energy balance (relative) = 2189.957435 %


 Job finished

springs.dat:

 total kinetic energy for set EA and time  0.1000000E-01

        1.648590E+57

 displacements (vx,vy,vz) for set NALL and time  0.1000000E-01

         1 -8.180700E+24  0.000000E+00  0.000000E+00
         2  6.545582E+26  0.000000E+00  0.000000E+00
         3  6.545582E+26  0.000000E+00  0.000000E+00
         4 -8.180700E+24  0.000000E+00  0.000000E+00
         5 -8.180700E+24  0.000000E+00  0.000000E+00
         6  6.545582E+26  0.000000E+00  0.000000E+00
         7  6.545582E+26  0.000000E+00  0.000000E+00
         8 -8.180700E+24  0.000000E+00  0.000000E+00
         9 -6.545582E+26  0.000000E+00  0.000000E+00
        10  8.180700E+24  0.000000E+00  0.000000E+00
        11  8.180700E+24  0.000000E+00  0.000000E+00
        12 -6.545582E+26  0.000000E+00  0.000000E+00
        13 -6.545582E+26  0.000000E+00  0.000000E+00
        14  8.180700E+24  0.000000E+00  0.000000E+00
        15  8.180700E+24  0.000000E+00  0.000000E+00
        16 -6.545582E+26  0.000000E+00  0.000000E+00
1 Like

Posted: *DYNAMIC, EXPLICIT: spring elements are left out of the stable time increment, so a stiff spring makes the solution grow without bound (exit 0, no message) · Issue #307 · Dhondtguido/CalculiX · GitHub

1 Like