*HYPERELASTIC, OGDEN / *HYPERFOAM at 1e-5 to 1e-4 strain: the stretches lose most digits, so OGDEN alpha = 2 is 2.4 % off NEO HOOKE and small increments fail

Summary

With alpha_1 = 2 and mu_1 = 2·C10, the OGDEN potential of the manual (section 7.74 of the 2.23 manual) is the NEO HOOKE potential. The sum of the squared reduced principal stretches is the first reduced invariant, and the volumetric term is the same. So the two inputs must give the same results.

They do from strains of 1e-3 up, and at 1e-6. The agreement at 1e-6 says nothing about precision: up to a deviatoric strain |dev E| of 7.1e-6 (here an axial strain of about 6e-6) rubber.f treats the three stretches as equal (neig=1, see below), and that branch happens to be exact for alpha = 2. (For alpha ≠ 2 it is not: there the stiffness and the stress near the unstressed state use the shear modulus 2·mu/alpha instead of mu, reported separately.) Between that threshold and about 1e-3 the two inputs do not agree:

  • One C3D8 cube in uniaxial stress at strain 1e-5: OGDEN gives 2.4 % less force than NEO HOOKE, and 8 % more lateral contraction. At 3e-5 and 1e-4 the force differs by 0.18 % and 0.05 %.
  • A block of 2 x 2 x 1 C3D8 pulled to 0.1 % strain in increments of 0.1: NEO HOOKE converges in 2 iterations per increment. OGDEN with alpha = 2 does not converge and stops with “*ERROR: increment size smaller than minimum” (exit 201). HYPERFOAM with alpha = 2 does the same. With 1 % strain, or with the 0.1 % in a single increment, OGDEN converges. The single increment gives the NEO HOOKE force to 6 digits.

NEO HOOKE works with the invariants of C. OGDEN and HYPERFOAM need the principal stretches, which rubber.f gets from a closed-form solution of the characteristic cubic. When the stretches are nearly equal, as at small strains, that formula subtracts numbers of order 1 to get a result of order strain³. The error in the stretches then reaches several % of their spread (see below).

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 eigenvalue computation in rubber.f is unchanged on master (9ba5d76).

Related:

Minimal input

ogden_small.inp:

** Unit cube, uniaxial stress by u_x = 1e-5 on face X1, sides free.
** OGDEN N=1 with alpha1 = 2 is the NEO HOOKE potential with C10 = mu1/2:
** sum of the squared reduced stretches = the first reduced invariant.
*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., 2., 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-5
*NODE PRINT, NSET=X1, TOTALS=YES
U, RF
*END STEP

ogden_bar.inp:

** Block 0.1 x 0.1 x 0.1 of 2 x 2 x 1 C3D8, base held, top pulled by
** u_z = 1e-4 (0.1 % strain) in increments of 0.1.
** OGDEN N=1, alpha1 = 2: the potential of NEO HOOKE C10 = 1e6, same D1.
*NODE
1, 0., 0., 0.
2, 0.05, 0., 0.
3, 0.1, 0., 0.
4, 0., 0.05, 0.
5, 0.05, 0.05, 0.
6, 0.1, 0.05, 0.
7, 0., 0.1, 0.
8, 0.05, 0.1, 0.
9, 0.1, 0.1, 0.
10, 0., 0., 0.1
11, 0.05, 0., 0.1
12, 0.1, 0., 0.1
13, 0., 0.05, 0.1
14, 0.05, 0.05, 0.1
15, 0.1, 0.05, 0.1
16, 0., 0.1, 0.1
17, 0.05, 0.1, 0.1
18, 0.1, 0.1, 0.1
*ELEMENT, TYPE=C3D8, ELSET=E
1, 1, 2, 5, 4, 10, 11, 14, 13
2, 2, 3, 6, 5, 11, 12, 15, 14
3, 4, 5, 8, 7, 13, 14, 17, 16
4, 5, 6, 9, 8, 14, 15, 18, 17
*NSET, NSET=BASE
1, 2, 3, 4, 5, 6, 7, 8, 9
*NSET, NSET=TOP
10, 11, 12, 13, 14, 15, 16, 17, 18
*MATERIAL, NAME=M
*HYPERELASTIC, OGDEN, N=1
2.E6, 2., 1.0909091E-6
*SOLID SECTION, ELSET=E, MATERIAL=M
*BOUNDARY
BASE, 1, 3
*STEP, NLGEOM, INC=100
*STATIC
0.1, 1.
*BOUNDARY
TOP, 3, 3, 1.E-4
*NODE PRINT, NSET=TOP, TOTALS=ONLY
RF
*END STEP

How to run

ccx ogden_small
ccx ogden_bar

The NEO HOOKE twins replace the material lines by

*HYPERELASTIC, NEO HOOKE
1., 0.5

in ogden_small.inp and by

*HYPERELASTIC, NEO HOOKE
1.E6, 1.0909091E-6

in ogden_bar.inp. The strain is changed in the X1, 1, 1, 1.E-5 and TOP, 3, 3, 1.E-4 lines.

Expected

The NEO HOOKE results, which equal the small-strain closed form (E = 5.142857, nu = 0.2857143 for the cube):

  • ogden_small.inp: RF_x = 5.142804E-05, lateral U2 of node 3 = -2.857128E-06.
  • ogden_bar.inp: 6 increments of 2 iterations each, RF_z = 44.28072 at t = 1.

Actual

ogden_small.inp, total RF_x on X1 and U2 of node 3 (exit 0 in every run):

u_x OGDEN alpha = 2 NEO HOOKE OGDEN / NEO HOOKE (force)
1e-6 (stretches taken as equal, neig=1) 5.142852E-06, -2.857141E-07 5.142852E-06, -2.857141E-07 1.000000
1e-5 (as written) 5.021676E-05, -3.084241E-06 5.142804E-05, -2.857128E-06 0.976446
3e-5 1.545583E-04, -8.571299E-06 1.542809E-04, -8.571299E-06 1.001798
1e-4 5.144745E-04, -2.856999E-05 5.142322E-04, -2.856999E-05 1.000471
1e-3 5.137511E-03, -2.855700E-04 5.137511E-03, -2.855700E-04 1.000000
1e-2 5.089965E-02, -2.842725E-03 5.089965E-02, -2.842725E-03 1.000000

At u_x = 1e-5 the OGDEN run also ends with unbalanced lateral forces at nodes that are free laterally. The RF line of node 3 is

         3  1.255419E-05 -5.299376E-07  5.299376E-07

so its lateral forces are 4 % of its axial force. NEO HOOKE has 2.8E-16 there.

ogden_bar.inp as written: exit status 201 after 23 attempts. The last converged time is 7.8e-3, and stdout contains

 *ERROR: increment size smaller than minimum
 best solution and residuals are in the frd file

The force residuals of the first increment jump between 1 % and 19 % (ogden_bar.cvg), where NEO HOOKE converges in 2 iterations. Variants:

variant result
NEO HOOKE twin 6 increments, 12 iterations, RF_z = 44.28072
*HYPERFOAM, N=2 / 1.E6, 2., 1.E6, 2., 0.1, 0.1 (the same small-strain moduli) exit 201, increment size smaller than minimum
OGDEN, TOP, 3, 3, 1.E-3 (1 % strain) 6 increments, 12 iterations
OGDEN, 1., 1. (one increment) 1 increment, 2 iterations, RF_z = 44.28071

Where it goes wrong

src/rubber.f (master lines 272-312, the same in 2.23) gets the eigenvalues of C with the trigonometric solution of the characteristic cubic:

            bb=v2-v1*v1/3.d0
            cc=-2.d0*v1**3/27.d0+v1*v2/3.d0-v3
            if(dabs(bb).le.1.d-10) then
...
               cm=2.d0*dsqrt(-bb/3.d0)
               cn=3.d0*cc/(cm*bb)
...
               tt=datan2(dsqrt(1.d0-cn*cn),cn)/3.d0

v1, v2 and v3 are about 3, 3 and 1. At strain e, bb is of order e² and cc of order e³. At e = 1e-5, cc is about 1e-15, and the rounding error of the three O(1) terms that form it is of the same size. So cn, and with it the angle tt, is mostly rounding error. Below |bb| = 1e-10 (line 276; bb = -2·|dev E|² with E the Green-Lagrange strain) the cubic is skipped and the three stretches are taken as equal (neig=1); OGDEN with alpha = 2 is exact there, which is why 1e-6 agrees. The stretches derived from it, and their derivatives with respect to C (lines 316-353, divided by products of differences of the squared stretches), carry that error into the stress and the stiffness.

Evaluating lines 272-298 in double precision (Python, same formulas) for C = diag(1+2e, 1-2·nu·e·(1+d2), 1-2·nu·e·(1+d3)), nu = 0.2857, random d2 and d3 up to 1e-6 (two nearly equal stretches, as in uniaxial stress), 2000 samples each, gives the largest error in the eigenvalues, relative to their spread: 29 % at e = 1e-5, 9.9 % at 2e-5, 2.3 % at 5e-5, 0.96 % at 1e-4 and 0.03 % at 1e-3. That matches the window in the table. That this error alone causes the differences above was not confirmed inside ccx.

Fix

Form the cubic from the deviator s = C - (v1/3)·I, computed component by component: bb = -tr(s²)/2 and cc = -det(s). These are then sums of small terms with no cancellation between O(1) numbers. Alternatively, use an iterative symmetric 3x3 eigensolver (Jacobi) for nearly equal eigenvalues.

The absolute tests that switch to the equal-stretch branches have to be replaced too: dabs(bb).le.1.d-10 (line 276) and the 1e-5 test on the cosines (lines 302-304). Below them the stretches count as equal whatever their real spread, which is where the 1e-6 agreement comes from; above them the general formulas divide by the small differences of the squared stretches. A switch relative to round-off, with forms that are correct to first order for nearly equal stretches, would avoid both.

Workaround: start nonlinear steps with increments above about 1e-3 strain, or use NEO HOOKE / POLYNOMIAL laws where they fit.

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

ogden_small.dat:

                        S T E P       1


                                INCREMENT     1


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

         2  1.000000E-05  2.682309E-19 -2.307001E-19
         3  1.000000E-05 -2.567287E-06  2.679020E-19
         6  1.000000E-05 -6.224029E-20 -2.567287E-06
         7  1.000000E-05 -2.567287E-06 -2.567287E-06

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

         2  1.324347E-05 -6.763099E-07 -6.763099E-07
         3  1.324347E-05  6.763099E-07 -6.763099E-07
         6  1.324347E-05 -6.763099E-07  6.763099E-07
         7  1.324347E-05  6.763099E-07  6.763099E-07

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

        5.297387E-05  4.129286E-21  7.305659E-21

ogden_bar:

CSC Conversion Time: 0.000438
Init Time: 0.001223
Factorize Time: 0.003734
Solve Time: 0.013234
Clean up Time: 0.000000
---------------------------------
Sum: 0.018629

Total PaStiX Time: 1.614620
CCX without PaStiX Time: 2.016983
Share of PaStiX Time: 0.444603
Total Time: 3.631603
Reusability: 78 : 79
________________________________________

 Using up to 4 cpu(s) for the stress calculation.

 average force= 0.009440
 time avg. forc= 0.008009
 largest residual force= 0.016087 in node 14 and dof 1
 largest increment of disp= 1.222743e-07
 largest correction to disp= 1.033192e-07 in node 13 and dof 1

 divergence; the increment size is decreased to 4.073605e-07
 the increment is reattempted


 *ERROR: increment size smaller than minimum
 best solution and residuals are in the frd file
1 Like

Posted: *HYPERELASTIC, OGDEN / *HYPERFOAM at 1e-5 to 1e-4 strain: the stretches lose most digits, so OGDEN alpha = 2 is 2.4 % off NEO HOOKE and small increments fail · Issue #264 · Dhondtguido/CalculiX · GitHub

1 Like