# \*HYPERELASTIC, OGDEN and \*HYPERFOAM with alpha ≠ 2: near the unstressed state stiffness and stress use shear modulus 2·mu/alpha, not mu (wrong frequencies)

**URL:** <https://calculix.discourse.group/t/hyperelastic-ogden-and-hyperfoam-with-alpha-2-near-the-unstressed-state-stiffness-and-stress-use-shear-modulus-2-mu-alpha-not-mu-wrong-frequencies/4214>\
**Category:** Analysis issues\
**Created:** [October 21, 2026, 7:07pm UTC](https://calculix.discourse.group/t/hyperelastic-ogden-and-hyperfoam-with-alpha-2-near-the-unstressed-state-stiffness-and-stress-use-shear-modulus-2-mu-alpha-not-mu-wrong-frequencies/4214 "2026-10-21T19:07:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandervdb](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Sandervdb](https://calculix.discourse.group/u/Sandervdb)\
**Post date:** [October 21, 2026, 7:07pm UTC](https://calculix.discourse.group/t/hyperelastic-ogden-and-hyperfoam-with-alpha-2-near-the-unstressed-state-stiffness-and-stress-use-shear-modulus-2-mu-alpha-not-mu-wrong-frequencies/4214/1 "2026-10-21T19:07:32Z")

</div>

## 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](https://github.com/Dhondtguido/CalculiX/issues/188) and its forum topic [HYPERFOAM Model Issue](https://calculix.discourse.group/t/4115:) a different cause in the same routine. In 2.23, `*HYPERFOAM, N=1` has no stiffness at all. Master fixed that in 0787781 by letting `kode=-15` into the foam branch of `rubber.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: the `ogden_freq.inp` cube with `*HYPERFOAM, N=2` / `1., 3., 1., 3., 0.2857142857, 0.2857142857` gives 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.f` gets 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`:

```auto
** 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)**
>
> ```auto
> ** 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

```auto
ccx ogden_freq
ccx ogden_uniax

```

For the comparison, replace the two `*HYPERELASTIC` lines by one of:

```auto
*ELASTIC
5.142857143, 0.2857142857

```

```auto
*HYPERELASTIC, NEO HOOKE
1., 0.5

```

```auto
*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):

```auto
      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:

```auto
      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):

```fortran
                        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.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [October 22, 2026, 9:09am UTC](https://calculix.discourse.group/t/hyperelastic-ogden-and-hyperfoam-with-alpha-2-near-the-unstressed-state-stiffness-and-stress-use-shear-modulus-2-mu-alpha-not-mu-wrong-frequencies/4214/2 "2026-10-22T09:09:21Z")

</div>

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

ogden\_freq.dat:

```auto
     E I G E N V A L U E O U T P U T

 MODE NO EIGENVALUE FREQUENCY   
                                     REAL PART IMAGINARY PART
                           (RAD/TIME) (CYCLES/TIME (RAD/TIME)

      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

```

ogden\_uniax.dat:

```auto
                        S T E P 1

                                INCREMENT 1

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

         2 1.000000E-03 1.222839E-16 -5.097101E-17
         3 1.000000E-03 -2.855021E-04 6.279156E-17
         6 1.000000E-03 -1.363233E-16 -2.855021E-04
         7 1.000000E-03 -2.855021E-04 -2.855021E-04

 forces (fx,fy,fz) for set X1 and time 0.1000000E+01

         2 1.284840E-03 8.054689E-08 4.604098E-08
         3 1.284837E-03 -8.054689E-08 7.344850E-08
         6 1.284839E-03 3.894251E-08 -4.604098E-08
         7 1.284836E-03 -3.894251E-08 -7.344850E-08

 total force (fx,fy,fz) for set X1 and time 0.1000000E+01

        5.139353E-03 -1.396583E-17 1.330133E-18

```

---

<div class="post-metadata">

**Author:** ![Sandervdb](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Sandervdb](https://calculix.discourse.group/u/Sandervdb)\
**Post date:** [October 22, 2026, 11:19am UTC](https://calculix.discourse.group/t/hyperelastic-ogden-and-hyperfoam-with-alpha-2-near-the-unstressed-state-stiffness-and-stress-use-shear-modulus-2-mu-alpha-not-mu-wrong-frequencies/4214/3 "2026-10-22T11:19:48Z")

</div>

posted: [\*HYPERELASTIC, OGDEN and \*HYPERFOAM with alpha ≠ 2: near the unstressed state stiffness and stress use shear modulus 2·mu/alpha, not mu (wrong frequencies) · Issue #263 · Dhondtguido/CalculiX · GitHub](https://github.com/Dhondtguido/CalculiX/issues/263)
