*TEMPERATURE, OP=NEW resets shell and beam temperatures to the initial values but keeps the last gradient (the shell stays bent, exit 0)

Summary

The manual, *TEMPERATURE (section 7.132 of the 2.23 manual), says: “OP=NEW implies that the temperatures are reinitialised to the initial values.” For shells and beams the same card also carries the gradients (“For shell elements a temperature gradient can be defined in addition to a temperature”), and *INITIAL CONDITIONS defines initial gradients (section 7.77). ccx resets the temperatures but keeps the gradients of the previous step.

Test: a free S8R plate with initial temperature 0 (no gradient). Step 1 gives T = 20 with a gradient of 100: the plate stretches (U1 = 0.04 at x = 2) and bends (U3 = -0.1). Step 2 is *TEMPERATURE, OP=NEW without data lines. The plate should return to its initial state. Instead the stretch goes back to 0, but the bending stays at -0.1. Exit 0, no warning.

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: temperatures.f is unchanged on master (9ba5d76).

Minimal input

op_new.inp:

*NODE, NSET=NALL
1, 0, 0, 0.
2, 0.5, 0, 0.
3, 1, 0, 0.
4, 1.5, 0, 0.
5, 2, 0, 0.
6, 0, 0.5, 0.
7, 1, 0.5, 0.
8, 2, 0.5, 0.
9, 0, 1, 0.
10, 0.5, 1, 0.
11, 1, 1, 0.
12, 1.5, 1, 0.
13, 2, 1, 0.
*ELEMENT, TYPE=S8R, ELSET=EALL
1, 1, 3, 11, 9, 2, 7, 10, 6
2, 3, 5, 13, 11, 4, 8, 12, 7
*MATERIAL, NAME=M
*ELASTIC
1000., 0.
*EXPANSION
1.E-3
*SHELL SECTION, ELSET=EALL, MATERIAL=M
0.1
*BOUNDARY
1, 1, 3
3, 2, 3
9, 3, 3
*INITIAL CONDITIONS, TYPE=TEMPERATURE
NALL, 0.
*STEP
*STATIC
*TEMPERATURE
NALL, 20., 100.
*NODE PRINT, NSET=NALL
U
*END STEP
*STEP
*STATIC
*TEMPERATURE, OP=NEW
*NODE PRINT, NSET=NALL
U
*END STEP

op_new_explicit.inp: step 2’s card also has the line NALL, 0., i.e. the initial values written out.

How to run

ccx op_new
ccx op_new_explicit

Expected

In step 2 all temperatures and gradients are back at their initial values (0, no gradient), so the plate is back in its initial shape: U = 0. That is what op_new_explicit.inp gives.

Actual

Node 5 (x = 2, y = 0), exit 0, no warning:

deck step 1 U1, U3 step 2 U1, U3
op_new 4.000000E-02, -1.000000E-01 4.8E-16, -1.000000E-01
op_new_explicit 4.000000E-02, -1.000000E-01 0, 0

The mean temperature is reset; the gradient of step 1 is kept. With a data line for a single node (1, 0.), the gradient is reset for that node only: U3 = -1.041667E-01.

Where it goes wrong

temperatures.f lines 98-101:

        if((textpart(i).eq.'OP=NEW').and.(.not.temp_flag)) then
          do j=1,nk
            t1(j)=t0(j)
          enddo

t1 is reset to the initial temperatures t0. The gradients t1g are not reset to the initial gradients t0g (set by initialconditionss.f). gen3dtemp.f (lines 214-262) then builds the expanded nodes’ temperatures from the reset t1 and the old t1g.

Fix

Also reset the gradients for OP=NEW, where the gradient arrays exist:

          do j=1,nk
            t1(j)=t0(j)
            t1g(1,j)=t0g(1,j)
            t1g(2,j)=t0g(2,j)
          enddo

temperatures.f does not receive t0g today, so it would have to be passed in. Otherwise the manual should say that OP=NEW keeps the gradients.

Workaround: repeat the initial temperatures (with their gradients) as data lines under *TEMPERATURE, OP=NEW.

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

op_new.dat:

step 1:

5 4.000000E-02 -4.404002E-15 -1.000000E-01

step 2:

5 1.288032E-16 2.593412E-16 -1.000000E-01

op_new_explicit.dat:

step 1:

5 4.000000E-02 -4.404002E-15 -1.000000E-01

step 2:

5 0.000000E+00 0.000000E+00 0.000000E+00

1 Like

Posted: *TEMPERATURE, OP=NEW resets shell and beam temperatures to the initial values but keeps the last gradient (the shell stays bent, exit 0) · Issue #262 · Dhondtguido/CalculiX · GitHub