*CREEP, LAW=NORTON and *CREEP, LAW=USER giving slightly different results

Hey CalculiX-community,

I would like to implement a creep model as a creep suborutine in CalculiX. Before writing my actual model as creep subroutine, I implemented the Norton law as mentioned in the ccx 2.23 manual (Section 7.29, Equation 886, page 453) as a creep subroutine, just to test my implementation. I have compared the results of both simulations (*CREEP, LAW=NORTON and CREEP, LAW=USER) for similar conditions and here is what I found:

*CREEP, LAW = NORTON

*CREEP, LAW = USER

Both the simulations were computed for 100000 seconds, with parameters A=1.0e-15, n=3.0, and t=-0.5 for a 3D-cube (1x1x1 mm) with one face fixed in x-direction, one face fixed in y-direction, and one face fixed in z-direction. The other 3 faces are free, with one face in being pulled with 420 MPa.

The final accumulated creep for the *CREEP, LAW=NORTON simulation using the internal implementation of ccx, I get 4.36e-05 creep strain whereas with my implementation, I get 4.69e-5 strain.

Below is my implementaion of the Norton creep law (creep.f):

      subroutine creep(decra,deswa,statev,serd,ec,esw,p,qtild,
     &  temp,dtemp,predef,dpred,time,dtime,cmname,leximp,lend,
     &  coords,nstatv,noel,npt,layer,kspt,kstep,kinc)

      implicit none

      character*80 cmname

      integer leximp,lend,nstatv,noel,npt,layer,kspt,kstep,kinc

      real*8 decra(5),deswa(5),statev(*),serd,ec(2),esw(2),p,
     &  qtild,temp,dtemp,predef(*),dpred(*),time(2),dtime,
     &  coords(*)

      real*8 aa,nn,mm,tend,tstart,fac

C     Norton-Bailey material parameters

      aa = 1.d-15
      nn = 3.d0
      mm = -0.5d0

C     Initialize output arrays

      decra(1) = 0.d0
      decra(2) = 0.d0
      decra(3) = 0.d0
      decra(4) = 0.d0
      decra(5) = 0.d0

      deswa(1) = 0.d0
      deswa(2) = 0.d0
      deswa(3) = 0.d0
      deswa(4) = 0.d0
      deswa(5) = 0.d0

C     Isotropic elastic material

      if(lend.eq.2) then

        if(qtild.gt.0.d0 .and. dtime.gt.0.d0) then

C         Total time at end and start of increment

          tend = max(time(2),0.d0)
          tstart = max(tend-dtime,0.d0)

          if(tend.gt.0.d0) then

C           Integrate A*sigma**n*t**m over the increment

            fac = (tend**(mm+1.d0)
     &            -tstart**(mm+1.d0))/(mm+1.d0)

C           Equivalent creep strain increment

            decra(1) = aa*qtild**nn*fac

C           Derivative with respect to von Mises stress

            decra(5) = aa*nn*qtild**(nn-1.d0)*fac

          endif

        endif

      endif

      return
      end

What’s interesting is that when I solve the analytical solution for above conditions, I get:

### Calculation Summary

**The accumulated strain (\(\epsilon\)) after \(100,000\text{ seconds}\) is \(4.686 \times 10^{-5}\) (or \(0.00469\%\))**.

---

### Step-by-Step Breakdown

* Calculate the stress term (\(A \sigma^n\))**
  \[A \sigma^n = 10^{-15} \times 420^3 = 7.4088 \times 10^{-8}\]

* Integrate across the time horizon (\(\frac{t^{m+1}}{m+1}\))**
  \[\frac{100,000^{-0.5 + 1}}{-0.5 + 1} = \frac{100,000^{0.5}}{0.5} = \frac{\sqrt{100,000}}{0.5} \approx \frac{316.2277}{0.5} = 632.4555\]

* Combine the terms**
  \[\epsilon = (7.4088 \times 10^{-8}) \times 632.4555 \approx 4.69 \times 10^{-5}\]

This analytical solution is similar to what I get in the *CREEP, LAW=USER method, where I implemented the above-mentioned creep subroutine.

Here’s my platform / system: ccx 2.23 / cgx 2.23, Ubuntu 26.04 LTS, solving using pardiso MT solver.

Here is the fbd script to create the model (cube.fbd):

# Corner points at Z=0
pnt p1 0 0 0
pnt p2 1 0 0
pnt p3 1 1 0
pnt p4 0 1 0

# Four boundary lines: two divisions per edge
line l1 p1 p2 2
line l2 p2 p3 2
line l3 p3 p4 2
line l4 p4 p1 2

# Create the base surface
surf base blend l1 l2 l3 l4

# Sweep surface through 1 mm in Z
seta base_set s base
swep base_set cube_set tra 0 0 1 2


# Mesh the cube
elty all he20
mesh all

# Select all mesh nodes
seta all_nodes n all

# Separate nodes by X coordinate
enq all_nodes nodes1 rec 0.5 _ _ 0.50001 a
enq all_nodes nodes2 rec 2.5 _ _ 0.50001 a

# Boundary sets
enq nodes1 bottom rec _ 0 _ 0.00001 a
enq nodes1 zfix   rec _ _ 0 0.00001 a
enq nodes1 xfix   rec 0 _ _ 0.00001 a
enq nodes1 top    rec _ 1 _ 0.00001 a

# Top surface of cube 1 at Y=1
enq nodes1 topsurf1 rec _ 1 _ 0.00001 a
comp topsurf1 do

# Export element-face surface definitions
send topsurf1 abq sur

# Export mesh and node sets for ccx
send all abq

send bottom abq nam
send zfix abq nam
send xfix abq nam
send top abq nam

# Display mesh
plot f all
plot n all

Here is the input file for the *CREEP, LAW=NORTON model (cube_ccx.inp):

*HEADING
1x1x1 mm cube - single C3D20 element
** Units: mm, N, tonne, s
**
*INCLUDE, INPUT=all.msh
*INCLUDE, INPUT=bottom.nam
*INCLUDE, INPUT=zfix.nam
*INCLUDE, INPUT=xfix.nam
*INCLUDE, INPUT=top.nam
*INCLUDE, INPUT=topsurf1.sur
**
*MATERIAL, NAME=STEEL
*ELASTIC
210000., 0.3, 20.
*CREEP, LAW=NORTON
1.0e-15, 3.0, -0.5, 20.
**
*SOLID SECTION, ELSET=Eall, MATERIAL=STEEL
**
*INITIAL CONDITIONS, TYPE=TEMPERATURE
Nall, 20.0
**
*STEP, NLGEOM
*VISCO,CETOL=0.00001
0.1, 100000., 1.e-6, 10000.
**
*BOUNDARY
Nbottom, 2, 2, 0.
Nzfix,   3, 3, 0.
Nxfix,   1, 1, 0.
*DSLOAD
Stopsurf1, P, -420.
**
*NODE FILE
U, RF
*EL FILE
S, E, CEEQ, PE
*EL PRINT, ELSET=Eall
CEEQ
**
*END STEP

and here is the input file for the *CREEP, LAW=USER model (cube_user.inp):

*HEADING
1x1x1 mm cube - single C3D20 element
** Units: mm, N, tonne, s
**
*INCLUDE, INPUT=all.msh
*INCLUDE, INPUT=bottom.nam
*INCLUDE, INPUT=zfix.nam
*INCLUDE, INPUT=xfix.nam
*INCLUDE, INPUT=top.nam
*INCLUDE, INPUT=topsurf1.sur
**
*MATERIAL, NAME=STEEL
*ELASTIC
210000., 0.3, 20.
*CREEP, LAW=USER
**
*SOLID SECTION, ELSET=Eall, MATERIAL=STEEL
**
*INITIAL CONDITIONS, TYPE=TEMPERATURE
Nall, 20.0
**
*STEP, NLGEOM
*VISCO,CETOL=0.00001
0.1, 100000., 1.e-6, 10000.
**
*BOUNDARY
Nbottom, 2, 2, 0.
Nzfix,   3, 3, 0.
Nxfix,   1, 1, 0.
*DSLOAD
Stopsurf1, P, -420.
**
*NODE FILE
U, RF
*EL FILE
S, E, CEEQ, PE
*EL PRINT, ELSET=Eall
CEEQ
**
*END STEP

Here is the fbd script to visualize the result (post_pe.fbd):

# Read CalculiX results and model sets
read cube_user.frd # For the user method
read cube_user.inp inp nom # For the user method
# read cube_ccx.frd  # For the ccx method
# read cube_ccx.inp inp nom  # For the ccx method

# Isometric view with Y-axis vertical
rot z
rot r 45
rot u 35.264

# Plot von Mises stress
cmap turbo
ds 227 e 1

# Show element edges
view elem

# Fit model to the view
frame
zoom 0.7

Note: Make sure to comment / comment out the corresponding file when running this visualization script.

How to run:

cgx -b cube.fbd
ccx -i cube_user
ccx -i cube_ccx
cgx -b plot_pe.fbd

My question: I dont understand why the result of the norton law implemented within CalculiX is showing slightly different result to my implementation of the same model and to the analytical solution? Am I missing something here?

The discrepancy is rather small (~ 7%), maybe it’s caused, e.g., by the difference in time integration approaches.

I also think that this might be due to a difference in the time integration approaches.

For reference, here is a plot of current results:

But my concern is that discrepancy may increase if we are, for example, simulating stress relaxation behavior using creep model for alternating / cyclic loads or where we have a temperature profile with temperature interpolation? Or will this discrepancy will remain in the same order?

Well, it depends on what approach you want to use for your actual user creep model and what time integration algorithm it will use. But the discrepancy may indeed increase in such cases.

I don’t know if it will cause any effect, but have you considered that you can risk missing some minor significant digits in your time calculation ?
your time variables are real*8 but the max() function returns real*4

  tend = max(time(2),0.d0)
  tstart = max(tend-dtime,0.d0)

so you could try to use dmax1() instead of
see also MAX (The GNU Fortran Compiler)

1 Like

Thanks for the hint! but incorporating this change hasnt changed the results, because still the analytical solution and the user creep implementation produce similar results. The CalculiX implementation is still producing creep strain 7% less than the user creep and analytical solution.

I think I understand the problem now. This was due to the fact that i was selecting a large maximum time increment, when I reduced it, both the results are now approximately same. Here is the current result:

It strongly suggests that the discrepancy comes from numerical time integration differences, rather than from a difference in the underlying creep constitutive law.

3 Likes