Summary
The hourglass forces of a C3D8R element are elas(1)*a*Γ Γᵀ u, where u is the total displacement of the element’s nodes and elas(1) is the first entry of the material stiffness that the material routine returns at the integration point (hgforce.f; hgstiffness.f uses the same factor for the stiffness). What that entry is depends on how the material is written:
- an isotropic
*ELASTICmaterial returns (E, ν), so the hourglass modulus is E; - every other material returns the tangent matrix, so the modulus is its C1111. For an elastic state that is λ + 2μ, which is 1.346 E for ν = 0.3. This holds for
*ELASTIC, TYPE=ENGINEERING CONSTANTSwith isotropic values, for*ELASTICplus a*PLASTICcard that is never reached, and for user materials; - once an elastoplastic point yields, C1111 drops to the elastoplastic tangent, and it jumps back when the point unloads.
This has two consequences:
- Equivalent inputs disagree. The same elastic body gives different results depending on how the material card is written. On one C3D8R element moved in a pure hourglass mode, the reaction forces are 0.6 with
*ELASTICand 0.8076923 (×1.346154) with the same*ELASTICplus*PLASTIC 1.E9, 0., or with the same constants asTYPE=ENGINEERING CONSTANTS. Even the unchanged*ELASTICcard gives 0.8076923 once an NLGEOM step and*EXPANSION, TYPE=ORTHOwith three equal coefficients are added (with*EXPANSIONand one coefficient: 0.6), because the (E, ν) form is only a storage shortcut for that one case. A 2 x 1 x 2 C3D8R cantilever with a prescribed tip displacement gives a tip reaction of 2987.897 or 3162.996 (+5.9 %). S4R shells are expanded into C3D8R elements (section 6.2.12), so they are affected in the same way. - Plastic C3D8R models can stop. Because the force is (current tangent C1111) × (total hourglass displacement), the residual jumps whenever the single integration point of an element yields or unloads. The jump does not shrink with the increment. The same cantilever with elastic-perfectly plastic steel stops with “too many cutbacks” at 64 % of the prescribed tip displacement (exit 201). With linear hardening it stops too. Each cutback starts with a larger residual than the last (67, 82, 92, 95, 96 at increments from 1.25e-2 down to 4.9e-5), and the displacement corrections grow to 1e12 and more. A diagnostic build in which
hgforce.fandhgstiffness.fuse a fixed modulus instead ofelas(1)runs the same deck to the end, and makes the elastic variants of item 1 agree.
Section 6.2.2 (C3D8R) of the 2.23 manual says hourglass control is “automatically activated for this element (using the theory in [Flanagan and Belytschko])”. It does not say that the hourglass stiffness depends on the material state or on how the material card is written.
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 22 Oct 2026). Not fixed: hgforce.f, hgstiffness.f and the C3D8R branches of resultsmech.f and e_c3d.f are unchanged on master (9ba5d76). The improved hourglass stabilization of October 2025 (the new shape8hr.f, already part of 2.23) changes the hourglass vectors and the scale a, not the modulus taken in hgforce.f.
Related:
- Issues · Dhondtguido/CalculiX · GitHub C3D8R in heat transfer has no hourglass control at all. A different case (thermal elements); this report is about the mechanical hourglass forces.
Minimal input
hg_mode.inp: one C3D8R unit cube. Every node is held in x and y and moved in z in the hourglass pattern u3 = 0.01·ξη. The strain at the integration point is zero, so the reaction forces are pure hourglass forces.
** One C3D8R unit cube. Every node is held in x and y and moved in z by
** +-0.01 in the hourglass pattern u3 = 0.01*xi*eta (zero strain at the
** integration point), so all reaction forces are hourglass forces.
*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.
*ELEMENT, TYPE=C3D8R, ELSET=EALL
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=PLUS
1, 3, 5, 7
*NSET, NSET=MINUS
2, 4, 6, 8
*MATERIAL, NAME=M
*ELASTIC
1000., 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=M
*STEP
*STATIC
*BOUNDARY
NALL, 1, 2
PLUS, 3, 3, 0.01
MINUS, 3, 3, -0.01
*NODE PRINT, NSET=PLUS
RF
*EL PRINT, ELSET=EALL
S
*END STEP
Variants of hg_mode.inp:
-
hg_mode_plastic.inp: the lines*PLASTIC/1.E9, 0.added after1000., 0.3(a yield stress that is never reached); -
hg_mode_eng.inp: the two material lines replaced by the same isotropic material as engineering constants:*ELASTIC, TYPE=ENGINEERING CONSTANTS 1000., 1000., 1000., 0.3, 0.3, 0.3, 384.6154, 384.6154, 384.6154 -
hg_mode_exp.inp: the material unchanged, with an NLGEOM step and an orthotropic expansion card whose three coefficients are equal (no temperature change): the lines*EXPANSION, TYPE=ORTHO/1.E-5, 1.E-5, 1.E-5added after1000., 0.3; the lines*INITIAL CONDITIONS, TYPE=TEMPERATURE/NALL, 0.added before*STEP;*STEP, NLGEOMinstead of*STEP; and the lines*TEMPERATURE/NALL, 0.added before*NODE PRINT, NSET=PLUS; -
hg_mode_exp_iso.inp: ashg_mode_exp.inpwith*EXPANSION/1.E-5instead of the two*EXPANSION, TYPE=ORTHOlines.
hg_cantilever.inp: a C3D8R cantilever, 2 x 1 x 2 elements, of elastic-perfectly plastic steel, clamped at x = 0. The tip is pushed down to 0.5 in z over the step.
** C3D8R cantilever, 2 x 1 x 2 elements (length 2, width 1, depth 1),
** elastic-perfectly plastic steel. The root is clamped and the tip
** is pushed down to 0.5 in z (linear ramp over the step).
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
3, 2., 0., 0.
4, 0., 1., 0.
5, 1., 1., 0.
6, 2., 1., 0.
7, 0., 0., 0.5
8, 1., 0., 0.5
9, 2., 0., 0.5
10, 0., 1., 0.5
11, 1., 1., 0.5
12, 2., 1., 0.5
13, 0., 0., 1.
14, 1., 0., 1.
15, 2., 0., 1.
16, 0., 1., 1.
17, 1., 1., 1.
18, 2., 1., 1.
*ELEMENT, TYPE=C3D8R, ELSET=EALL
1, 1, 2, 5, 4, 7, 8, 11, 10
2, 2, 3, 6, 5, 8, 9, 12, 11
3, 7, 8, 11, 10, 13, 14, 17, 16
4, 8, 9, 12, 11, 14, 15, 18, 17
*NSET, NSET=ROOT
1, 4, 7, 10, 13, 16
*NSET, NSET=TIP
3, 6, 9, 12, 15, 18
*MATERIAL, NAME=STEEL
*ELASTIC
210000., 0.3
*PLASTIC
235., 0.
*SOLID SECTION, ELSET=EALL, MATERIAL=STEEL
*BOUNDARY
ROOT, 1, 3
*STEP, INC=1000
*STATIC
0.01, 1., 1.E-6, 0.05
*BOUNDARY
TIP, 3, 3, 0.5
*NODE PRINT, NSET=TIP, TOTALS=ONLY
RF
*END STEP
Variants of hg_cantilever.inp:
cant_el.inp: the lines*PLASTIC/235., 0.removed (linear elastic);cant_el_plast.inp:1.E9, 0.instead of235., 0.(elastic in practice: the yield stress is never reached);cant_el_eng.inp:cant_el.inpwith the material written as engineering constants:*ELASTIC, TYPE=ENGINEERING CONSTANTS/210000., 210000., 210000., 0.3, 0.3, 0.3, 80769.23, 80769.23,/80769.23;cant_hard.inp: the line335., 0.1added after235., 0.(linear hardening);cant_c3d8i.inp:TYPE=C3D8Iinstead ofTYPE=C3D8R.
How to run
ccx <name>, then read <name>.dat.
Expected
hg_mode: the five variants describe the same elastic material, so they give the same reaction forces. For a unit cube the hourglass force of this mode is f = M · a · Σ(h_j u_j) · h_i, with a = 0.005 · Σ(∂N/∂x)² · V = 0.005 · 1.5 = 0.0075 (shape8hr.f), h = ±1 and Σ h_j u_j = 0.08, i.e. f = 0.0006 M for whatever modulus M is used. Which M the theory intends is not stated in the manual; the point is that it must not depend on how the same material is written.
cant_el, cant_el_plast, cant_el_eng: the same tip reaction.
hg_cantilever, cant_hard: the load-displacement curve to the end of the step, as for the C3D8I twin (which runs to the end, exit 0).
Actual
hg_mode (exit 0 for all five), RF3 at each of the nodes 1, 3, 5 and 7; the stresses at the integration point are 0 in all five:
| deck | RF3 | ratio |
|---|---|---|
hg_mode (*ELASTIC) |
6.000000E-01 | 1 (M = E) |
hg_mode_plastic (+ *PLASTIC 1.E9, 0.) |
8.076923E-01 | 1.346154 (M = λ + 2μ) |
hg_mode_eng (engineering constants) |
8.076923E-01 | 1.346154 |
hg_mode_exp_iso (NLGEOM, *EXPANSION) |
6.000000E-01 | 1 |
hg_mode_exp (NLGEOM, *EXPANSION, TYPE=ORTHO, equal coefficients) |
8.076923E-01 | 1.346154 |
Cantilever, total RF3 at the tip at time 1 (exit 0):
| deck | RF3 |
|---|---|
cant_el |
2.987897E+03 |
cant_el_plast |
3.162996E+03 (+5.86 %) |
cant_el_eng |
3.162996E+03 (+5.86 %) |
hg_cantilever.inp: “*ERROR: too many cutbacks”, exit 201. The last converged increment ends at t = 0.64125 (RF3 = 135.6766). Increment 17 is tried six times:
| attempt | increment | largest residual force, iteration 1 | largest correction to disp in the attempt |
|---|---|---|---|
| 1 | 5.0e-2 | 0.0426 (grows to 2.1 in 4 iterations) | 3.2e-3 |
| 2 | 1.25e-2 | 67.39 | 4.4e+12 |
| 3 | 3.125e-3 | 81.64 | 1.4e+13 |
| 4 | 7.8125e-4 | 91.73 | 4.7e+13 |
| 5 | 1.953e-4 | 95.32 | 4.4e+13 |
| 6 | 4.883e-5 | 96.31 | 3.1e+13 |
A smaller increment gives a larger starting residual, not a smaller one. cant_hard.inp stops the same way at t = 0.94125 (exit 201). cant_c3d8i.inp runs to the end (exit 0).
Where it goes wrong
resultsmech.f (lines 620-627) switches the material routine to the tangent for C3D8R elements, for the hourglass forces:
c Bernhardi start
if(lakonl(1:5).eq.'C3D8R') then
call shape8hr(xl,xsj,shp,gs,a)
icmdcpy=icmd
!
! tangent stiffness ds/de is needed in hgforce.f
!
icmd=0
and after the material call (lines 1195-1197):
if(lakonl(1:5).eq.'C3D8R') then
call hgforce(fn,stiff,a,gs,vl,mi,konl)
icmd=icmdcpy
hgforce.f (line 37) takes the first entry of that array as the modulus and multiplies it with the total nodal displacements vl (line 43, vl = v of the element’s nodes, resultsmech.f line 322):
ahr=elas(1)*a
For an isotropic linear elastic material (mattyp 1) stiff holds (E, ν), not a tangent matrix (resultsmech.f line 999 reads e=stiff(1)). For every other material it holds the entries of the tangent, so stiff(1) is C1111. linel.f uses the (E, ν) form only when the step is linear or the expansion is isotropic (lines 69-76); with *EXPANSION, TYPE=ORTHO in an NLGEOM step the same *ELASTIC card returns the orthotropic tangent with stiff(1) = λ + 2μ (lines 77-90). That is what hg_mode_exp.inp shows. The comment in resultsmech.f asks for ds/de; the E of the isotropic case is a side effect of the storage, not a different choice. e_c3d.f (lines 1198-1200) adds the hourglass stiffness with the stored value of the same entry (hgstiffness.f line 37, ahr=elas(1)*a), and the stiffness has no term for the change of the modulus with the displacement.
So the hourglass force is a total quantity, f = C1111(current state) · a · Γ Γᵀ u, with a modulus that depends on the state of the point. In the elastic range, the same material gives E or λ + 2μ depending on the card. In the plastic range, f jumps by ΔC1111 · a · Γ Γᵀ u when the point yields or unloads. That jump is proportional to the accumulated hourglass displacement, not to the increment, so cutting the increment cannot remove it. The tangent passed to hgstiffness does not describe that jump either.
Fix
Use one consistent modulus for the hourglass control: the same quantity for every way of writing the same material, taken from the elastic constants (at the current temperature) rather than from the current tangent. Whether that should be E or the ds/de that the comment in resultsmech.f asks for (λ + 2μ for an isotropic material), I can’t tell; what matters is that it no longer depends on the card format, the expansion card or the yield state. For materials without elastic constants (user materials), a value fixed at the start of the step would keep the force continuous. Another option is an incremental hourglass force, f(n+1) = f(n) + C · a · Γ Γᵀ Δu, which needs the force stored per element.
Tested only as a diagnosis: with hgforce.f and hgstiffness.f changed to ahr=hgmod*a, hgmod a fixed number, hg_cantilever.inp runs to t = 1 (RF3 = 135.6773) with hgmod = 210000 (E) and with hgmod = 282692.3 (λ + 2μ). With hgmod = 210000, cant_el.inp and cant_el_plast.inp both give 2.987897E+03.
Workaround: none on the input side for this model (smaller increments and hardening do not help); C3D8I elements, as in cant_c3d8i.inp, avoid the problem.