Implicit *DYNAMIC (and transient *COUPLED TEMPERATURE-DISPLACEMENT) runs CPE4, CPS4, CAX4, CPE8R, CPS8R and CAX8R elements with half their mass

Summary

In an implicit *DYNAMIC step, the mass matrix of the plane stress, plane strain and axisymmetric elements CPE4, CPS4, CAX4, CPE8R, CPS8R and CAX8R holds only half of their mass. The response is that of a model with half the density, with no message (exit 0):

  • A free CPE4 block of mass 4, pushed by a total force of 8 for one time unit, moves 2.0 instead of F t² / (2 m) = 1.0. The same block as one C3D8 brick, as one CPE8, or with *DYNAMIC, EXPLICIT moves 1.0.
  • A one-element CPE4 bar whose *FREQUENCY step gives the right eigenvalue ω² = 3000 (by hand: axial stiffness 1000 over a generalised mass of 1/3) vibrates in *DYNAMIC with ω² = 6000: period 0.0811 instead of 0.1147, the frequency √2 too high.
  • Under gravity, a free CAX4 or CAX8R ring section falls 0.9527 in one time unit instead of g t² / 2 = 0.5; CAX8 falls 0.5 and CAX4R 0.499 to 0.501.

The same happens with NLGEOM and in a transient *COUPLED TEMPERATURE-DISPLACEMENT step, which builds its mass the same way. CPE4R, CPS4R, CAX4R, CPE8, CPS8, CAX8, the triangles, 3-D elements, *FREQUENCY and explicit dynamics are not affected.

Equivalent inputs disagree: the CPE4 block and its C3D8 twin are the same model, and implicit and explicit integration of a rigid-body motion under a constant force must agree.

Version

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

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 (checked 3 Nov 2026). Not fixed: the lines below are unchanged on master (537aa81).

Related:

Minimal input

free_cpe4.inp:

** A free 2 x 1 CPE4 block (thickness 1, density 2: mass 4), y held, pushed
** in x by 2 at each node (8 in total) for one time unit.
** Expected: u1 = F t^2 / (2 m) = 8 / 8 = 1.0 at every node.
*NODE, NSET=NALL
1, 0., 0.
2, 2., 0.
3, 2., 1.
4, 0., 1.
*ELEMENT, TYPE=CPE4, ELSET=E
1, 1, 2, 3, 4
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*DENSITY
2.
*SOLID SECTION, ELSET=E, MATERIAL=M
1.
*BOUNDARY
NALL, 2, 2
*STEP
*DYNAMIC, DIRECT
0.1, 1.
*CLOAD
NALL, 1, 2.
*NODE PRINT, NSET=NALL
U
*END STEP

free_c3d8.inp, the same block as one brick:

** The same block as one C3D8 brick of thickness 1 (y and z held),
** pushed by 1 at each of its 8 nodes. Expected: u1 = 1.0.
*NODE, NSET=NALL
1, 0., 0., -.5
2, 2., 0., -.5
3, 2., 1., -.5
4, 0., 1., -.5
5, 0., 0., .5
6, 2., 0., .5
7, 2., 1., .5
8, 0., 1., .5
*ELEMENT, TYPE=C3D8, ELSET=E
1, 1, 2, 3, 4, 5, 6, 7, 8
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*DENSITY
2.
*SOLID SECTION, ELSET=E, MATERIAL=M
*BOUNDARY
NALL, 2, 3
*STEP
*DYNAMIC, DIRECT
0.1, 1.
*CLOAD
NALL, 1, 1.
*NODE PRINT, NSET=NALL
U
*END STEP

Variants of free_cpe4.inp:

  • free_cpe4_explicit.inp: *STEP, INC=10000 / *DYNAMIC, EXPLICIT / 0.001, 1.
  • free_cpe4_nlgeom.inp: *STEP, NLGEOM
  • free_cpe4_coupled.inp: *CONDUCTIVITY / 1. and *SPECIFIC HEAT / 1. added to the material, *INITIAL CONDITIONS, TYPE=TEMPERATURE / NALL, 0. before *BOUNDARY, and *COUPLED TEMPERATURE-DISPLACEMENT, DIRECT instead of *DYNAMIC, DIRECT
  • free_cps4.inp, free_cpe4r.inp, free_cps4r.inp: TYPE=CPS4, CPE4R, CPS4R
free_cpe8r.inp: the block as one 8-node element (also run as CPS8R, CPE8 and CPS8)
** The same block as one 8-node element, pushed by the consistent nodal
** shares of 8: -2/3 at the corners, 8/3 at the midside nodes. Expected: u1 = 1.0.
*NODE, NSET=NALL
1, 0., 0.
2, 2., 0.
3, 2., 1.
4, 0., 1.
5, 1., 0.
6, 2., .5
7, 1., 1.
8, 0., .5
*NSET, NSET=CORNERS
1, 2, 3, 4
*NSET, NSET=MIDS
5, 6, 7, 8
*ELEMENT, TYPE=CPE8R, ELSET=E
1, 1, 2, 3, 4, 5, 6, 7, 8
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*DENSITY
2.
*SOLID SECTION, ELSET=E, MATERIAL=M
1.
*BOUNDARY
NALL, 2, 2
*STEP
*DYNAMIC, DIRECT
0.1, 1.
*CLOAD
CORNERS, 1, -0.666666666666667
MIDS, 1, 2.66666666666667
*NODE PRINT, NSET=NALL
U
*END STEP

bar_freq.inp:

** One CPE4 element 1 x 1 (E = 1000, nu = 0, density 1), y held everywhere,
** x held at nodes 1 and 4. One free mode: u1(2) = u1(3).
*NODE, NSET=NALL
1, 0., 0.
2, 1., 0.
3, 1., 1.
4, 0., 1.
*NSET, NSET=RIGHT
2, 3
*ELEMENT, TYPE=CPE4, ELSET=E
1, 1, 2, 3, 4
*MATERIAL, NAME=M
*ELASTIC
1000., 0.
*DENSITY
1.
*SOLID SECTION, ELSET=E, MATERIAL=M
1.
*BOUNDARY
NALL, 2, 2
1, 1, 1
4, 1, 1
*STEP
*FREQUENCY
1
*END STEP

bar_dyn.inp is bar_freq.inp with the step replaced by

*STEP, INC=1000
*DYNAMIC, DIRECT, ALPHA=0.
2.8679E-4, 0.057358
*CLOAD
RIGHT, 1, 1.
*NODE PRINT, NSET=RIGHT, FREQUENCY=20
U
*END STEP
fall_cax4.inp: an axisymmetric section under gravity (also run as CAX4R, and with 8 nodes as CAX8R and CAX8)
** A CAX4 ring section (r from 1 to 3, height 1, density 2), x (radial) held,
** under gravity g = 1 along the axis (y) for one time unit.
** Expected: u2 = g t^2 / 2 = 0.5 at every node.
*NODE, NSET=NALL
1, 1., 0.
2, 3., 0.
3, 3., 1.
4, 1., 1.
*ELEMENT, TYPE=CAX4, ELSET=E
1, 1, 2, 3, 4
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*DENSITY
2.
*SOLID SECTION, ELSET=E, MATERIAL=M
*BOUNDARY
NALL, 1, 1
*STEP
*DYNAMIC, DIRECT
0.1, 1.
*DLOAD
E, GRAV, 1., 0., 1., 0.
*NODE PRINT, NSET=NALL
U
*END STEP

For the 8-node variants the nodes 5, 2., 0., 6, 3., .5, 7, 2., 1. and 8, 1., .5 are added and the element is 1, 1, 2, 3, 4, 5, 6, 7, 8.

How to run

ccx free_cpe4 (and the other decks the same way)

Expected

  • free_cpe4: every node at u1 = 1.0 at t = 1, like free_c3d8 and the explicit variant.
  • bar_dyn: u1 = 0.002 (1 - cos ωt) with ω² = 3000 from bar_freq: 3.175609E-03 at t = 0.0401506 and the peak 4.0E-03 at t = 0.057358 (half the period 0.1147).
  • fall_cax4: u2 = 0.5.

Actual

free_cpe4.dat at t = 1:

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

         1  2.000000E+00  0.000000E+00  0.000000E+00
         2  2.000000E+00  0.000000E+00  0.000000E+00
         3  2.000000E+00  0.000000E+00  0.000000E+00
         4  2.000000E+00  0.000000E+00  0.000000E+00

u1 at t = 1 (expected 1.0 everywhere):

deck 2.23 master
free_cpe4 (CPE4) 2.000000 2.000000
free_cps4 (CPS4) 2.000000 2.000000
free_cpe4_nlgeom 2.000000 2.000000
free_cpe4_coupled 2.000000 2.000000
free_cpe8r with CPE8R / CPS8R 2.000000 2.000000
free_cpe4_explicit 1.000000 1.000000
free_c3d8 1.000000 1.000000
free_cpe4r, free_cps4r 1.000000 1.000000
free_cpe8r with CPE8 / CPS8 1.000000 1.000000

bar_freq.dat: 1 0.3000000E+04 0.5477226E+02 0.8717275E+01. bar_dyn.dat, node 2: 3.998997E-03 at t = 0.0401506 (the peak) and 2.532769E-03 at t = 0.057358. That is the response for ω² = 6000 (3.999005E-03 and 2.532417E-03 by the formula above), i.e. for half the mass.

fall_cax4: u2 = 9.527313E-01 at every node; CAX8R gives the same, CAX8 5.000000E-01, CAX4R 5.012126E-01 / 4.991339E-01. The CAX4 section moves u2 = 7.618438E-03, 3.273125E-02, 7.773125E-02, 1.427313E-01 at t = 0.1 to 0.4: from t = 0.2 on, each displacement increment is 0.02 larger than the one before, an acceleration of 2g.

Where it goes wrong

e_c3d.f integrates a 2-D element expanded to an 8-node brick ('8 ’ in lakonl(4:5)) or a 20-node brick with reduced integration (‘20R’), with lakonl(7:7) = A, S or E, over one half of the brick only (master lines 291-295, for both values of intscheme):

      elseif((lakonl(4:4).eq.'8').or.(lakonl(4:6).eq.'20R')) then
        if((lakonl(7:7).eq.'A').or.(lakonl(7:7).eq.'S').or.
     &       (lakonl(7:7).eq.'E')) then
          mint2d=2
          mint3d=4

The other half is added by mirroring s, ff and sm (lines 2218-2274, “for axially symmetric and plane stress/strain elements: complete s and sm”), but only for intscheme=0 (line 2220: if(intscheme.eq.0) then).

nonlingeo.c builds the mass matrix of an implicit dynamic step with intscheme=1 (line 1082: if((*iexpl<=1)||(*mortar==-1)){intscheme=1;}, reset at line 1104) and keeps it for the whole step (line 1535: mass[0]=0;). So the mass of these elements is the half integrated, while the stiffness and the forces of the later iterations (intscheme=0) are complete. Explicit steps (without massless contact) keep intscheme=0 and are right.

The header of e_c3d.f (lines 45-51) says that intscheme=1 changes the integration of C3D8R, C3D20R and C3D4 only: “for all other elements the integration scheme corresponding to the element type”. The guard at line 2220 was added on purpose (LOGBOOK, 21 June 2019: “for intscheme=1 the completion of the stiffness, mass and rhs for plane stress/strain/axi elements has to be removed, for e_c3d_th*f it has to be modified”). That is right only if intscheme=1 integrates these elements over the whole brick, and it seems it once did: the 2.23 e_c3d_th.f still holds its old intscheme=1 branch as comments (lines 837-858, “only 2-D scheme is reduced for intscheme=1”), which completes the face-load rhs only and leaves s and sm as integrated. Today the element’s scheme does not change with intscheme (lines 291-295 above), so removing the completion leaves out half of the element. e_c3d_th.f dropped its guard: it completes its matrices unconditionally (master lines 802-804; in 2.23 the guard is commented out there, line 782: c if(intscheme.eq.0) then). Only e_c3d.f kept it.

C3D8R-based 2-D elements (CPE4R, CPS4R, CAX4R) use lakonl(4:5)='8R', which is integrated over the whole brick, and CPE8, CPS8 and CAX8 ('20 ') use 27 points; that is why they are right.

Fix

Possible fix (not built or tested): in e_c3d.f, do the completion of s, ff and sm at line 2220 for intscheme=1 too, as e_c3d_th.f does; or keep the guard and integrate these elements over the whole brick when intscheme=1.

Workaround: use CPE4R / CPS4R / CAX4R or CPE8 / CPS8 / CAX8 in implicit dynamic steps, or *DYNAMIC, EXPLICIT.

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

free_cpe4.dat:

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

         1  2.000000E+00  0.000000E+00  0.000000E+00
         2  2.000000E+00  0.000000E+00  0.000000E+00
         3  2.000000E+00  0.000000E+00  0.000000E+00
         4  2.000000E+00  0.000000E+00  0.000000E+00
1 Like

Posted: Implicit *DYNAMIC (and transient *COUPLED TEMPERATURE-DISPLACEMENT) runs CPE4, CPS4, CAX4, CPE8R, CPS8R and CAX8R elements with half their mass · Issue #306 · Dhondtguido/CalculiX · GitHub

1 Like