*CLOAD / *DLOAD with TIME DELAY: two cards with the same AMPLITUDE and delay on one node DOF or face stop ccx with "different amplitudes in one step"

Summary

Two *DLOAD cards in one step, both with AMPLITUDE=RAMP, TIME DELAY=0.5, loading the same element face, stop ccx with exit status 201:

*ERROR in loadadd:
        it is not allowed to 
        define two distributed
        loads/fluxes with
        different amplitudes 
        in one step

The amplitudes are the same, and so are the delays. Each card with TIME DELAY gets its own copy of the amplitude, and loadadd.f compares the copies’ index numbers, not what they do. The same two data lines on one card run and give the expected sum (variant B). So do the two cards without TIME DELAY (C). *CLOAD behaves the same way (forcadd.f, variant D). So splitting one card into two changes the outcome from a correct result to an *ERROR stop.

A second, smaller point is a manual inconsistency. The *ERROR above is deliberate for loads with really different amplitudes (variants E, F, G): the code says “it is not allowed”. But sections 7.15 (*CLOAD) and 7.44 (*DLOAD) of the 2.23 manual give a rule that reads as if it were allowed. For a load on the same node and direction (the same face and label): “if the previous application was in the same step the *CLOAD value is added, else it is replaced” and “the new amplitude (including none) overwrites the previous amplitude”. Section 7.15 also says “by using several *CLOAD cards, different amplitudes can be applied to the forces in different coordinate directions in one and the same node”, which fits the code. Nowhere does the manual say that two amplitudes on one node DOF or face in one step stop ccx. For GRAV, bodyadd.f has the same test, but it can never fire, so GRAV with two amplitudes runs (variant H).

Version

ccx 2.23 (macOS arm64). 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: loadadd.f, forcadd.f, bodyadd.f and the TIME DELAY handling in dloads.f / cloads.f are unchanged in this respect on master (9ba5d76).

Related:

  • https://calculix.discourse.group/t/1435/4: the use the TIME DELAY copies serve, without this stop. It suggests a moving heat source built from one *DFLUX card per face, each with its own amplitude or TIME DELAY; there each face has one card, so the stop does not occur.

Minimal input

delay.inp: one C3D8 cube (edge 1, E = 1000, nu = 0), face x = 0 held, two *DLOAD cards with the same amplitude and delay on face 4 (x = 1).

*HEADING
C3D8 cube, face x = 0 held; two *DLOAD cards, same AMPLITUDE and TIME DELAY, on face 4
*NODE
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.
*ELEMENT, TYPE=C3D8, ELSET=EALL
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=FIX
1, 4, 5, 8
*NSET, NSET=LOADED
2, 3, 6, 7
*MATERIAL, NAME=M
*ELASTIC
1000., 0.
*DENSITY
1.
*SOLID SECTION, ELSET=EALL, MATERIAL=M
*AMPLITUDE, NAME=RAMP
0., 0., 1., 1.
*AMPLITUDE, NAME=RAMP2
0., 0., 1., 0.5
*BOUNDARY
FIX, 1, 3
*STEP
*STATIC
*DLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5
1, P4, 1.
*DLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5
1, P4, 2.
*NODE PRINT, NSET=LOADED
U
*END STEP

Variants, each a change to the step’s load cards only. A to D are the TIME DELAY bug; E to H are the manual inconsistency.

load cards
A (as above) *DLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5 / 1, P4, 1. / *DLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5 / 1, P4, 2.
B A with the second *DLOAD line removed (one card, two data lines)
C A without , TIME DELAY=0.5 on both cards
D *CLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5 / LOADED, 1, -0.25 / *CLOAD, AMPLITUDE=RAMP, TIME DELAY=0.5 / LOADED, 1, -0.5
E *DLOAD, AMPLITUDE=RAMP / 1, P4, 1. / *DLOAD, AMPLITUDE=RAMP2 / 1, P4, 2.
F *DLOAD / 1, P4, 1. / *DLOAD, AMPLITUDE=RAMP / 1, P4, 2.
G *CLOAD, AMPLITUDE=RAMP / LOADED, 1, -0.25 / *CLOAD, AMPLITUDE=RAMP2 / LOADED, 1, -0.5
H *DLOAD, AMPLITUDE=RAMP / EALL, GRAV, 1., -1., 0., 0. / *DLOAD, AMPLITUDE=RAMP2 / EALL, GRAV, 2., -1., 0., 0.

How to run

OMP_NUM_THREADS=1 ccx delay

Expected

The linear step ends at t = 1, where RAMP(1 - 0.5) = 0.5, RAMP(1) = 1 and RAMP2(1) = 0.5. Under a total pressure p on face 4 the loaded face moves U1 = -p L / E.

  • A, B, D: p = (1 + 2) x 0.5 = 1.5, U1 = -1.5E-03. A and D use one amplitude and one delay, exactly like B.
  • C: p = 3, U1 = -3.0E-03.
  • E, F, G: the code’s error text says this is not allowed, so an *ERROR is the intended result. Read literally, the manual’s rule (values added, the new amplitude overwrites) would instead give U1 = -1.5E-03 for E and G (p = 3 x RAMP2(1)) and -3.0E-03 for F (p = 3 x RAMP(1)). The manual should say which applies.
  • H: bodyadd.f holds the same “not allowed” test for GRAV, so by the code’s intent an *ERROR as in E. By the manual’s rule: body force 3 x 0.5 = 1.5 per unit volume, U1 = -1.5 L^2 / (2 E) = -7.5E-04 at x = 1.

Actual

exit result
A 201 *ERROR in loadadd: ... different amplitudes in one step, element: 1 face:P4
B 0 U1 = -1.500000E-03
C 0 U1 = -3.000000E-03
D 201 *ERROR in forcadd: ... different amplitudes in one step, node: 2 dof: 1
E 201 *ERROR in loadadd, as A
F 201 *ERROR in loadadd, as A
G 201 *ERROR in forcadd, as D
H 0 U1 = -7.500000E-04: the summed value takes the last card’s amplitude; the “not allowed” test in bodyadd.f never fires

With the two GRAV cards in the other order (RAMP2 first, then RAMP), U1 = -1.500000E-03 = 3 x RAMP(1): again the last amplitude. Two GRAV cards with the same AMPLITUDE and TIME DELAY (as in A) run as well, U1 = -7.500000E-04.

Where it goes wrong

TIME DELAY makes a new amplitude entry for every card (dloads.f master lines 104-146, cloads.f lines 97-139):

          nam=nam+1
...
          namta(3,nam)=sign(iamplitude,namta(3,iamplitude))
          iamplitude=nam

loadadd.f (lines 52-63) and forcadd.f (lines 76-86) then stop as soon as the amplitude index of the second load on an entry differs from the first:

                        if(nam.gt.0) then
                           if(iamload(1,id).ne.iamplitude) then
                              write(*,*) '*ERROR in loadadd:'
...
                              call exit(201)

Two copies of the same amplitude with the same delay have different indices, so A and D stop. E, F and G stop by the same test, as the error text intends.

bodyadd.f has the same test for CENTRIF and GRAV (lines 120-126 and 140-146), but line 113 stores the new amplitude first:

                  ibody(2,id)=iamplitude
...
                        if(ibody(2,id).ne.iamplitude) then

so the test is always false: a dead check. GRAV loads with different amplitudes in one step run, with the last card’s amplitude, where face and node loads stop. By code reading the same holds for CENTRIF (not run).

Fix

Not tested (no build here):

  • TIME DELAY (A, D): compare what the amplitude does, not its index. For a TIME DELAY copy i, abs(namta(3,i)) is the base amplitude and amta(1,namta(1,i)) the delay (as tempload.f lines 84-87 read them). Alternatively, dloads.f and cloads.f could reuse an existing copy with the same base and delay instead of making a new one per card.
  • Manual (E, F, G): in sections 7.15 and 7.44, say that within one step all loads on one node DOF (one face and label) must share one amplitude, and that “the new amplitude overwrites the previous amplitude” applies to a load redefined in a later step. Or, if the rule as written is meant, implement it in loadadd.f and forcadd.f.
  • bodyadd.f (H): move the test before line 113 if the restriction is meant for GRAV and CENTRIF too (with the TIME DELAY comparison of the first point, or the GRAV analogue of A would then stop), or remove it and let the manual state the GRAV behaviour.

Workaround

Put data lines that share AMPLITUDE and TIME DELAY on one card (variant B). For two different amplitudes on one face or node DOF in one step, combine them into one amplitude curve.

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

delay:

 STEP            1

 *ERROR in loadadd:
        it is not allowed to
        define two distributed
        loads/fluxes with
        different amplitudes
        in one step
 element:            1  face:P4
1 Like

posted: *CLOAD / *DLOAD with TIME DELAY: two cards with the same AMPLITUDE and delay on one node DOF or face stop ccx with "different amplitudes in one step" · Issue #291 · Dhondtguido/CalculiX · GitHub

1 Like