Summary
The manual defines OGDEN and HYPERFOAM by their strain energy potential (sections 6.8.6, 7.74 and 7.75 of the 2.23 manual). The stiffness matrix should be its second derivative. rubber.f says so too (“tangent stiffness matrix / second derivative of U w.r.t. c(k,l) and c(m,n)”). At the unstressed state every such law reduces to linear elasticity with shear modulus mu0 = sum of mu_i and bulk modulus K0. So a law with the same mu0 and K0 as an *ELASTIC material must give the same frequencies there.
It does only for alpha = 2. For each term with alpha_i ≠ 2, the stiffness matrix ccx builds at the unstressed state has shear stiffness 2·mu_i/alpha_i instead of mu_i (negative for alpha_i < 0). The bulk stiffness is right. One C3D8 cube, *FREQUENCY from the unstressed state, against its *ELASTIC twin:
- OGDEN alpha = 4: torsion mode at 0.7071 = sqrt(1/2) of the twin’s frequency, the other modes 0.74-0.78.
- OGDEN alpha = 8: torsion mode at 0.5 = sqrt(1/4).
- OGDEN alpha = -2: three negative eigenvalues, so the shear stiffness is -mu. The frequencies are printed as 0.
- HYPERFOAM, N=2 with alpha = 4, 4 gives the same numbers as OGDEN alpha = 4. N=2 with alpha = 2, 4 gives 0.866 = sqrt(3/4).
- NEO HOOKE, OGDEN alpha = 2 and HYPERFOAM alpha = 2, 2 give the twin’s frequencies to all printed digits.
Not only the matrix: near the unstressed state the stress has the same shear modulus 2·mu_i/alpha_i. That holds while rubber.f treats the three stretches as equal, i.e. for a deviatoric Green-Lagrange strain |dev E| up to 7.1e-6 (see below). In a uniaxial test at strain 1e-6 (ogden_uniax.inp below with 1.E-6), OGDEN alpha = 4 gives 0.538 times the force of NEO HOOKE and a lateral contraction of nu = 0.385 instead of 0.286. These are exactly the small-strain moduli with shear modulus 2·mu/alpha. With alpha = -2 the cube pushes back against the pull. Strains of 3e-6 and 5e-6 give the same ratios.
Above that range the stresses are right: at strain 1e-3, OGDEN alpha = 4, 8 and -2 give the force of NEO HOOKE within 0.12 %. So the wrong results are frequencies and other eigenvalue results from the unstressed state, the first Newton iterations of any step that starts there, and stresses at very small strains. There is 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: the stretch derivatives in rubber.f are unchanged on master (9ba5d76).
Related:
- Hyperfoam material model showing incorrect deformation with no stresses · Issue #188 · Dhondtguido/CalculiX · GitHub and its forum topic HYPERFOAM Model Issue a different cause in the same routine. In 2.23,
*HYPERFOAM, N=1has no stiffness at all. Master fixed that in 0787781 by lettingkode=-15into the foam branch ofrubber.f. On master, N=1 therefore uses the code described below, and N=1 with alpha ≠ 2 (e.g. the alpha = 3 of #188) should get this shear stiffness too (from reading the code; master not run). In 2.23 HYPERFOAM shows this only with N ≥ 2. The 2.23 workaround suggested in #188 and t/4115, N=2 with the alpha = 3 term entered twice, is affected: theogden_freq.inpcube with*HYPERFOAM, N=2/1., 3., 1., 3., 0.2857142857, 0.2857142857gives the torsion eigenvalue 4.0 instead of 6.0 (shear modulus 2/3 of mu). - A different cause in the same routine: between strains of about 1e-5 and 1e-3, the principal stretches that
rubber.fgets from the characteristic cubic lose most of their digits, so even OGDEN with alpha = 2 is off from NEO HOOKE there (reported separately).
Minimal input
ogden_freq.inp:
** Unit cube, bottom held, *FREQUENCY from the unstressed state.
** OGDEN N=1: mu1 = 2, alpha1 = 4, D1 = 0.5, so mu0 = 2 and K0 = 2/D1 = 4.
** Every hyperelastic law with mu0 = 2, K0 = 4 has the small-strain moduli of
** *ELASTIC E = 9 K0 mu0 / (3 K0 + mu0) = 5.142857, nu = 0.2857143.
*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=E
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=BOT
1, 2, 3, 4
*MATERIAL, NAME=M
*HYPERELASTIC, OGDEN, N=1
2., 4., 0.5
*DENSITY
1.
*SOLID SECTION, ELSET=E, MATERIAL=M
*BOUNDARY
BOT, 1, 3
*STEP
*FREQUENCY
4
*END STEP
ogden_uniax.inp (static check of the stress)
** Unit cube, uniaxial stress by u_x = 1e-3 on face X1, sides free.
** OGDEN N=1: mu1 = 2, alpha1 = 4, D1 = 0.5 (mu0 = 2, K0 = 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=E
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=X0
1, 4, 5, 8
*NSET, NSET=X1
2, 3, 6, 7
*MATERIAL, NAME=M
*HYPERELASTIC, OGDEN, N=1
2., 4., 0.5
*SOLID SECTION, ELSET=E, MATERIAL=M
*BOUNDARY
X0, 1, 1
1, 2, 3
4, 3, 3
5, 2, 2
*STEP, NLGEOM
*STATIC
1., 1.
*BOUNDARY
X1, 1, 1, 1.E-3
*NODE PRINT, NSET=X1, TOTALS=YES
U, RF
*END STEP
How to run
ccx ogden_freq
ccx ogden_uniax
For the comparison, replace the two *HYPERELASTIC lines by one of:
*ELASTIC
5.142857143, 0.2857142857
*HYPERELASTIC, NEO HOOKE
1., 0.5
*HYPERFOAM, N=2
1., 4., 1., 4., 0.2857142857, 0.2857142857
or change the alpha in 2., 4., 0.5. For the small-strain stress, change X1, 1, 1, 1.E-3 in ogden_uniax.inp to X1, 1, 1, 1.E-6.
Expected
The frequencies of the *ELASTIC twin (E = 5.142857, nu = 0.2857143):
1 0.3228845E+01 0.1796899E+01 0.2859853E+00 0.0000000E+00
2 0.3228845E+01 0.1796899E+01 0.2859853E+00 0.0000000E+00
3 0.6000000E+01 0.2449490E+01 0.3898484E+00 0.0000000E+00
4 0.1622690E+02 0.4028263E+01 0.6411179E+00 0.0000000E+00
NEO HOOKE (C10 = 1, D1 = 0.5), OGDEN with alpha = 2 and HYPERFOAM N=2 with alpha = 2, 2 give these to all printed digits.
In ogden_uniax.inp every law with mu0 = 2 and K0 = 4 must give, at small strain, the force E·eps (5.142857E-06 at u_x = 1e-6) and the lateral contraction nu = 0.2857, as NEO HOOKE does.
Actual
ogden_freq.inp as written (alpha = 4), exit 0:
1 0.1790536E+01 0.1338109E+01 0.2129667E+00 0.0000000E+00
2 0.1790536E+01 0.1338109E+01 0.2129667E+00 0.0000000E+00
3 0.3000000E+01 0.1732051E+01 0.2756644E+00 0.0000000E+00
4 0.9825538E+01 0.3134571E+01 0.4988825E+00 0.0000000E+00
Mode 3 (torsion, pure shear) has eigenvalue 3.0 instead of 6.0: half the shear stiffness. Frequency ratios to the twin:
| material | modes 1, 2 | mode 3 (torsion) | mode 4 |
|---|---|---|---|
| OGDEN alpha = 2, NEO HOOKE, HYPERFOAM N=2 alpha 2, 2 | 1.0000 | 1.0000 | 1.0000 |
| OGDEN alpha = 4 (as written) | 0.7447 | 0.7071 | 0.7781 |
| OGDEN alpha = 8 | 0.5534 | 0.5000 | 0.6265 |
| OGDEN alpha = -2 | eigenvalue -7.10 | eigenvalue -6.00 | 0.9116 |
| HYPERFOAM N=2, alpha 4, 4 | 0.7447 | 0.7071 | 0.7781 |
| HYPERFOAM N=2, alpha 2, 4 | 0.8851 | 0.8660 | 0.8988 |
The torsion eigenvalue is exactly 6.0 · 2/alpha for one term. *STEP, NLGEOM gives the same numbers.
ogden_uniax.inp, total RF_x on X1 at u_x = 1e-3 (exit 0, 2 iterations each): OGDEN alpha = 4 5.139398E-03, alpha = 8 5.143311E-03, alpha = -2 5.135238E-03, alpha = 2 and NEO HOOKE 5.137511E-03. The twin’s E·eps is 5.142857E-03. A shear modulus of 2·mu/alpha = 1 would give E = 2.77 and about 2.77E-03 for alpha = 4. So at this strain the stress uses the right moduli, and the matrix at the unstressed state does not.
ogden_uniax.inp at u_x = 1e-6 (exit 0 each): total RF_x on X1, U2 of node 3, and the small-strain moduli they imply (E = RF_x / 1e-6, nu = -U2 / 1e-6). Linear elasticity with K0 = 4 and the shear modulus 2·mu/alpha predicts the last column.
| material | RF_x | U2 (node 3) | E, nu from the run | E, nu with shear modulus 2·mu/alpha |
|---|---|---|---|---|
| NEO HOOKE, OGDEN alpha = 2 | 5.142852E-06 | -2.857141E-07 | 5.1429, 0.2857 | 5.1429, 0.2857 |
| OGDEN alpha = 4 | 2.769228E-06 | -3.846151E-07 | 2.7692, 0.3846 | 2.7692, 0.3846 |
| OGDEN alpha = 8 | 1.439999E-06 | -4.399997E-07 | 1.4400, 0.4400 | 1.4400, 0.4400 |
| OGDEN alpha = -2 | -7.199996E-06 | -7.999998E-07 | -7.2000, 0.8000 | -7.2000, 0.8000 |
| HYPERFOAM N=2, alpha 4, 4 | 2.769229E-06 | -3.846152E-07 | 2.7692, 0.3846 | 2.7692, 0.3846 |
u_x = 3e-6 and 5e-6 give the same moduli (alpha = -2 at 5e-6 stops with exit 201). At 1e-5 the stretches no longer count as equal, and OGDEN alpha = 4 gives 5.128995E-05, close to NEO HOOKE’s 5.142804E-05.
Where it goes wrong
src/rubber.f computes the stress and the stiffness of both laws from derivatives of the principal stretches. At the unstressed state all three stretches are equal (neig=1), and each stretch gets one third of the derivative of the trace (lines 328-338 and 384-399):
dldc(k,l,i)=didc(k,l,1)/(6.d0*al(i))
...
d2ldc2(k,l,m,n,i)=(d2idc2(k,l,m,n,1)/6.d0
& -dldc(k,l,i)*dldc(m,n,i))/al(i)
With these, the sum over the stretches that forms the stiffness (term, lines 674-684 for OGDEN and 801-806 for HYPERFOAM), sum_i [(alpha-1) lambda^(alpha-2) dlambda_i dlambda_i + lambda^(alpha-1) d2lambda_i], is (alpha-2)/12 delta⊗delta at C = I. The exact second derivative of sum_i lambda_i^alpha = tr(C^(alpha/2)) at C = I is (alpha/2)(alpha/2-1) times the symmetric fourth-order identity. Divided by alpha, as in term, that is (alpha-2)/4 · I4. Both have the same volumetric part, but the code’s has no deviatoric part. The missing part, (alpha-2)/4 · I4_dev, vanishes only for alpha = 2. Without it the shear modulus of a term is mu_i - mu_i (alpha-2)/alpha = 2 mu_i/alpha, which is what the table shows.
The stress uses the same first derivatives (dudc, lines 636-645 for OGDEN and 763-771 for HYPERFOAM). With dldc = δ/(6λ), the stretch sum Σ_i λ_i^(α-1) dλ_i/dC is a multiple of δ and gives no deviatoric stress. What is left is the deviatoric part of the C⁻¹ terms: the J^(-1/3) factor of the reduced stretches for OGDEN (dlbdc, line 442), the volumetric term for HYPERFOAM (lines 770-771). It gives the deviatoric stress 2·(2 mu_i/alpha_i)·dev E instead of 2·mu_i·dev E, the same shear modulus as the matrix.
The neig=1 branch is taken when dabs(bb).le.1.d-10 (line 276), with bb = v2 - v1²/3 of C. That is bb = -2 |dev E|² (E the Green-Lagrange strain), so it covers |dev E| ≤ 7.1e-6: in uniaxial stress an axial strain up to about 6e-6.
States with two equal stretches (neig=2, lines 339-353 and 400-423, e.g. uniaxial stress) use a similar averaged derivative. Whether their stiffness is right was not checked.
Fix
At repeated stretches the derivatives of each stretch do not exist, but those of the sum do. For f = sum_i g(c_i), with c_i = lambda_i^2 the eigenvalues of C, near C = x·I: df/dC = g’(x) δ + g’‘(x) (C - x δ) + …, and d²f/dC² = g’‘(x) times the symmetric identity. The neig=1 branch keeps only the trace part of both, so the stress and the matrix both lose the g’'(x) dev C part. For two equal stretches the divided-difference form applies. Alternatively, the repeated stretches can be perturbed slightly before the derivatives are formed, a common remedy in stretch-based codes. Either would make the neig=1 (and probably neig=2) branches right in stress and stiffness. The absolute test dabs(bb).le.1.d-10 then only decides which exact form is used.
Workaround: for the unstressed state, use terms with alpha = 2, or NEO HOOKE / POLYNOMIAL laws, which are invariant-based.