Proceedings of 8th GACM Colloquium on Computational Mechanics

4
Proceedings of the 8 th GACM Colloquium on Computational Mechanics for Young Scientists from Academia and Industry August 28–30, 2019 in Kassel, Germany User-defined material subroutines for FEM calculations based on automatic differentiation of strain energy func- tions Markus Hillga¨ rtner * 1 , Theron Guo 1 and Mikhail Itskov 1 1 Department of Continuum Mechanics, RWTH Aachen University, Kackertstr. 9, 52072 Aachen, Germany Abstract. The implementation of material models into the implicit finite element method (FEM) codes requires the calculation of a fourth order tangent tensor. In hyperelastic models this tensor can be obtained from the second derivative of the strain energy function with respect to the deformation gradient. Deriving and implementing this derivative manually can be tedious and error prone. This contribution presents an easy-to-use alternative based on automatic differentiation (AD) capable of efficiently evaluating accurate derivatives [3, 6]. This technique is applied to automatically derive a user-defined material subroutine (UMAT) for implicit FEM analysis of a hyperelastic anisotropic model of arterial layers [1] in ABAQUS. Additionally, a pseudo-elastic model for the Mullins effect in filled rubber [7] is implemented to evaluate the applicability of the discussed approach in cases where the material model exhibits inelastic behavior described by internal variables. 1 Introduction The implementation of material models into implicit finite element method (FEM) codes requires the calculation of a fourth order tangent tensor. In constitutive models given in terms of a strain energy function, this tensor can be obtained from the second derivative of tis function with respect to the deformation gradient. The manual derivation and implementation of this derivative can be tedious and error prone. In order to automatize this process, automatic differentiation of code can be a suitable tool to create user defined material models without the need of manual differentiation. While the concept has been used in the FEM context before [i.e. 10], we focus on its applicability inside the framework of commercial FEM programs like ABAQUS. 2 Materials and methods 2.1 Constitutive modeling Let us consider a material model using a multiplicative split of the deformation gradient F into an isochoric (volume preserving) part ¯ F and a volumetric (volume changing) part ˆ F as F = ˆ F ¯ F, J = det F, ˆ F = J 1/3 I, ¯ F = J -1/3 F, det ¯ F =1. (1) Accordingly, the right Cauchy-Green tensor C and its isochoric part ¯ C take the form C = F T F, ¯ C = ¯ F T ¯ F = J -2/3 C, (2) which leads to the invariants of ¯ C as ¯ I=I ¯ C = tr ¯ C, ¯ II = II ¯ C = 1 2 (tr ¯ C) 2 - tr ¯ C 2 , ¯ III = III ¯ C = det ¯ C. (3) * Corresponding author: [email protected] ORCID iD: 0000-0001-7974-2055 MS 20: Numerical methods in biomechanics 385

Transcript of Proceedings of 8th GACM Colloquium on Computational Mechanics

Page 1: Proceedings of 8th GACM Colloquium on Computational Mechanics

Proceedings of the 8th GACM Colloquium on Computational Mechanicsfor Young Scientists from Academia and Industry

August 28–30, 2019 in Kassel, Germany

User-defined material subroutines for FEM calculationsbased on automatic differentiation of strain energy func-tions

Markus Hillgartner ∗ 1, Theron Guo1 and Mikhail Itskov1

1Department of Continuum Mechanics, RWTH Aachen University, Kackertstr. 9, 52072 Aachen, Germany

Abstract. The implementation of material models into the implicit finite element method (FEM) codesrequires the calculation of a fourth order tangent tensor. In hyperelastic models this tensor can be obtainedfrom the second derivative of the strain energy function with respect to the deformation gradient. Derivingand implementing this derivative manually can be tedious and error prone.

This contribution presents an easy-to-use alternative based on automatic differentiation (AD) capable ofefficiently evaluating accurate derivatives [3, 6]. This technique is applied to automatically derive a user-definedmaterial subroutine (UMAT) for implicit FEM analysis of a hyperelastic anisotropic model of arterial layers[1] in ABAQUS. Additionally, a pseudo-elastic model for the Mullins effect in filled rubber [7] is implementedto evaluate the applicability of the discussed approach in cases where the material model exhibits inelasticbehavior described by internal variables.

1 Introduction

The implementation of material models into implicit finite element method (FEM) codes requires thecalculation of a fourth order tangent tensor. In constitutive models given in terms of a strain energyfunction, this tensor can be obtained from the second derivative of tis function with respect to thedeformation gradient. The manual derivation and implementation of this derivative can be tedious anderror prone. In order to automatize this process, automatic differentiation of code can be a suitable toolto create user defined material models without the need of manual differentiation. While the concepthas been used in the FEM context before [i.e. 10], we focus on its applicability inside the framework ofcommercial FEM programs like ABAQUS.

2 Materials and methods

2.1 Constitutive modeling

Let us consider a material model using a multiplicative split of the deformation gradient F into anisochoric (volume preserving) part F and a volumetric (volume changing) part F as

F = FF, J = det F, F = J1/3I, F = J−1/3F, det F = 1. (1)

Accordingly, the right Cauchy-Green tensor C and its isochoric part C take the form

C = FTF, C = FTF = J−2/3C, (2)

which leads to the invariants of C as

I = IC = tr C, II = IIC =1

2

[(tr C)2 − tr

(C

2)], ¯III = IIIC = det C. (3)

∗Corresponding author: [email protected] ORCID iD: 0000-0001-7974-2055

MS 20: Numerical methods in biomechanics

385

Page 2: Proceedings of 8th GACM Colloquium on Computational Mechanics

In terms of a strain energy function Ψ the first and second Piola-Kirchhoff stress tensors P and S, andthe Cauchy stress tensor σ can be expressed as

P =∂Ψ

∂F, S = 2

∂Ψ

∂C, σ =

1

JPFT =

1

J

∂Ψ

∂FFT. (4)

In order to obtain convergence during a FEM iteration step, the calculation of a tangent tensor isnecessary. A variety of different tangent tensors exist:

The material tangent tensor (or Lagrangian tangent tensor) is given as the derivative of the second Piola-Kirchhoff stress tensor S with respect to the Green-Lagrange strain E, which is its work conjugate strain[4, 8]

C =∂S

∂E= 2

∂S

∂C= 4

∂2Ψ

∂C∂C. (5)

The spatial tangent tensor c (or Eulerian tangent tensor) can be obtained from C using a push-forwardoperation given as

cijkl =1

JCIJKLFiIFjJFkKFlL. (6)

In addition to the tangent tensors in the spatial or material formulation, one can define a mixed tangenttensor using the first Piola-Kirchhoff stress P as [4]

A =∂P

∂F=

∂2Ψ

∂F∂F. (7)

A is particularly useful in the context of automatic differentiation, as it utilizes the strain energy functionof interest Ψ and the deformation gradient F, which is the primary input in a user-defined subroutine fora user material in the FE framework. The spatial tangent tensor c can be directly calculated for a givenA.

Differentiating Ψ with respect to the deformation gradient F is general, as it includes material modelsbased on the right Cauchy-Green tensor C = FTF or its invariants without additional effort. In lessgeneral cases derivatives directly with respect to C or its invariants can be numerically favorable. In thiscase, less general user subroutines such as UHYPER can be more suitable.

2.2 Automatic differentiation

The desired first (stress) and second (tangent) derivatives of the strain energy can be obtained in manyways: While a handcoded analytical derivative is exact and often the numerically fastest method, creatingthis code is time consuming and error prone. Subsequent minor changes in Ψ can lead to a huge amount ofoutdated code, which needs to be updated manually. Alternatively, finite differentiation can be utilized.This procedure, while easy to implement, only provides approximated results and often requires anextensive amount of computational time. Automatic differentiation on the other hand guarantees exactresults at a computational effort. [5]

We choose the tangent mode of automatic differentiation, which applies the chain rule in forward direction.To this end, Tapenade [3] is utilized twice: Once in order to obtain P = ∂Ψ

∂F and once again to obtainA = ∂2Ψ

∂F∂F = ∂P∂F . The specific stress and tangent tensors, required by the chosen FEM programm can

now be obtained based on P and A.

2.3 Implementation into an Abaqus/Standard user-defined material subroutine (UMAT)

The minimally required outputs of a UMAT subroutine in Abaqus/Standard are STRESS (Cauchy stressσ) and the Jacobian matrix of the constitutive model DDSDDE (cAbaqus). This tangent required by theUMAT relates the volume-normalized Jaumann rate of the Kirchhoff stress to the symmetric rate ofdeformation tensor [4, 8] and is given by

cAbaqus = c + c

′, (8)

MS 20: Numerical methods in biomechanics

386

Page 3: Proceedings of 8th GACM Colloquium on Computational Mechanics

where the fourth order tensor c′ can be expressed by Equation (6) as [4, 8]

c′ijkl =

1

2(δikσjl + δilσjk + δjkσil + δjlσik) , (9)

which possesses major and minor symmetries. δij denotes the Kronecker delta defined as

δij =

{1 for i = j

0 for i 6= j.(10)

While c needs to be calculated for each material model, the implementation of c′ is independent of thechosen material description.

3 Numerical examples

In this study, three different material models have been implemented into UMATs: The neo-Hookeanstrain energy (subsection 3.1) as the simplest case of an isotropic elastic model, the Ogden-Roxburghmodel (subsection 3.2) as extension of the neo-Hookean strain energy function to include the Mullinseffect and a model of arterial layers incorporating anisotropy (subsection 3.3). The models have beenimplemented in terms of strain energy functions and the corresponding derivatives for the stress and thetangent have been obtained using automatic differentiation.

3.1 Neo-Hookean strain energy

The neo-Hookean [9] hyperelastic material model can be represented as a strain energy function

ΨNH(I, J) = C10(I− 3) + U(J) (11)

where C10 denotes a material constant and U(J) enforces near-incompressibility [2].

3.2 Ogden-Roxburgh pseudo-elastic model

The Ogden-Roxburgh model [7] extends the neo-Hookean strain energy function, given in equation (11),to include the Mullins effect. This is achieved by scaling the elastic Cauchy stress σ0 with a softeningfunction η(Ψ,Ψmax), which depends on the current strain energy Ψ and the maximum strain energyΨmax in the load history. Accordingly,

σOR = η(Ψ,Ψmax)σ0. (12)

This pseudo-elastic model utilizes an internal variable, implemented as solution-dependent state vari-able STATEV, which needs to be correctly used and properly updated in the automatically differentiatedsubroutine.

3.3 Fiber reinforced hyperelastic model

A simple hyperelastic model of arterial layers [1] utilizes the neo-Hookean strain energy presented insubsection 3.1 for the fiber-reinforced ground substance. The n fiber families are modeled using

Ψfi(C) =

k1

2k2

[exp

(k2

[Ei(C)

]2)− 1], i = 1, ..., n, (13)

where k1 and k2 denote material parameters and Ei represent strain-like quantities in the preferreddirections of fibers (please refer to [1] for details). The complete strain energy for the composite can begiven as

ΨG(F) = ΨNH(I, J) +

n∑

i=1

Ψfi(C), I = I(C), C = C(F), J = J(F). (14)

MS 20: Numerical methods in biomechanics

387

Page 4: Proceedings of 8th GACM Colloquium on Computational Mechanics

4 Results and conclusion

All three investigated models have been successfully implemented in terms of the corresponding strainenergy Ψ and then derived automatically in order to create fully functional UMAT subroutines. Since theapplied automatic differentiation procedure grants exact derivatives, the results and convergence behaviordid not differ significantly from the manually programmed ones.

While the analysis of computational times for the different examples is still in progress, the difference inimplementation time in comparison to manual programming is enormous. Once a template is created,a strain energy function can be automatically turned into a subroutine without manual differentiation.This advantage in the implementation can save a considerable amount of time during the developmentand testing phases of new constitutive models.

References

[1] Thomas Christian Gasser, Ray W. Ogden, and Gerhard A. Holzapfel. Hyperelastic modelling ofarterial layers with distributed collagen fibre orientations. Journal of the Royal Society, Interface3.6 (2006), pp. 15–35.

[2] Stefan Hartmann and Patrizio Neff. Polyconvexity of generalized polynomial-type hyperelasticstrain energy functions for near-incompressibility. International Journal of Solids and Structures40.11 (2003), pp. 2767–2791.

[3] Laurent Hascoet and Valérie Pascual. The Tapenade automatic differentiation tool: Principles,model, and specification. ACM Transactions on Mathematical Software 39.3 (2013), pp. 1–43.

[4] Maria A. Holland. The Hitchhiker’s Guide to Abaqus. 2017.

[5] Charles C. Margossian. A Review of automatic differentiation and its efficient implementation.January (2018), pp. 1–19.

[6] Uwe Naumann. The Art of differentiating computer programs: an introduction to algorithmic dif-ferentiation. Society for Industrial and Applied Mathematics, 2012. isbn: 161197206X.

[7] Ray W. Ogden and David George Roxburgh. A pseudo–elastic model for the Mullins effect infilled rubber. Proceedings of the Royal Society of London. Series A: Mathematical, Physical andEngineering Sciences 455.1988 (1999), pp. 2861–2877.

[8] V. Prot and B. Skallerud. Nonlinear solid finite element analysis of mitral valves with heterogeneousleaflet layers. Computational Mechanics 43.3 (2009), pp. 353–368.

[9] R. S. Rivlin. Large Elastic Deformations of Isotropic Materials. IV. Further Developments of theGeneral Theory. Philosophical Transactions of the Royal Society A: Mathematical, Physical andEngineering Sciences 241.835 (1948), pp. 379–397.

[10] Florian Zwicke, Philipp Knechtges, Marek Behr, and Stefanie Elgeti. Automatic implementationof material laws: Jacobian calculation in a finite element code with TAPENADE. Computers &Mathematics with Applications 72.11 (2016), pp. 2808–2822.

MS 20: Numerical methods in biomechanics

388