ANSYS_NeoHook_usermat

15
A large deformation Neo–Hookean user material in ANSYS. ANSYS, Inc. 275 Technology Drive, Canonsburg, PA 15317 December 2008 Abstract The development and implementation of a 3–dimensional, large deformation, hyperelastic user ma- terial routine for ANSYS is presented. The constitutive model development follows the well–known Neo–Hookean hyperelastic formulation which yields the stress and material tangent in the spatial config- uration. The model is recast in the corotated frame required by ANSYS. An algorithm for determination of the corotated frame rotation via the polar decomposition of the deformation gradient is also presented along with the conversion of the stress, material tangent and change of basis operations to Voigt nota- tion. The Fortran code listing for the user material routine and a sample input file simulating the simple shearing of a block are given. 1 Neo–Hookean hyperelastic material The strain energy potential for a nearly incompressible hyperelastic material is W Φ ( ¯ C ) + φ (J ) , (1-1) where ¯ C = ¯ F T ¯ F is the isochoric right Cauchy–Green deformation tensor, ¯ F = J -1/3 F is the isochoric deformation gradient, F is the deformation gradient and J = det (F ). The 2 nd Piola–Kirchhoff stress is S =2 ∂W C =2 Φ C + ∂φ ∂J J C -1 , (1-2) and material stiffness tensor is C =2 S C =4 2 Φ CC +2 C ∂φ ∂J J C -1 +2 ∂φ ∂J C ( J C -1 ) . (1-3) For a Neo–Hookean material Φ ( ¯ C ) = μ 2 ( ¯ I C - 3 ) , φ (J )= K 2 (J - 1) 2 , (1-4) where ¯ I C = trace ( ¯ C ) , and μ and K are the Neo–Hookean shear and bulk moduli. The 1 st order derivatives in Eqs. (1-2) and (1-3) are Φ C = μ 2 J -2/3 I - I C 3 C -1 , ∂φ ∂J = K (J - 1) , C ( J C -1 ) = J ( C -1 C -1 - 2I ) , (1-5) where I C = trace (C), I is the 2 nd order identity tensor, and I is a 4 th order tensor with components I ijkl = C -1 ik C -1 jl . The 2 nd order derivatives in Eqs. (1-2) and (1-3) are 2 Φ CC = μ 2 J -2/3 3 -C -1 I + I C 3 C -1 C -1 - I C -1 + I C I , C ∂φ ∂J = J 2 KC -1 . (1-6)

description

Neo hookean UMAT

Transcript of ANSYS_NeoHook_usermat

Page 1: ANSYS_NeoHook_usermat

A large deformation Neo–Hookean user material in ANSYS.

ANSYS, Inc.275 Technology Drive, Canonsburg, PA 15317

December 2008

Abstract

The development and implementation of a 3–dimensional, large deformation, hyperelastic user ma-terial routine for ANSYS is presented. The constitutive model development follows the well–knownNeo–Hookean hyperelastic formulation which yields the stress and material tangent in the spatial config-uration. The model is recast in the corotated frame required by ANSYS. An algorithm for determinationof the corotated frame rotation via the polar decomposition of the deformation gradient is also presentedalong with the conversion of the stress, material tangent and change of basis operations to Voigt nota-tion. The Fortran code listing for the user material routine and a sample input file simulating the simpleshearing of a block are given.

1 Neo–Hookean hyperelastic material

The strain energy potential for a nearly incompressible hyperelastic material is

W ≡ Φ(C

)+ φ (J) , (1-1)

where C = F T F is the isochoric right Cauchy–Green deformation tensor, F = J−1/3F is the isochoricdeformation gradient, F is the deformation gradient and J = det (F ). The 2nd Piola–Kirchhoff stress is

S = 2∂W

∂C= 2

∂Φ∂C

+∂φ

∂JJC−1, (1-2)

and material stiffness tensor is

C = 2∂S

∂C= 4

∂2Φ∂C∂C

+ 2∂

∂C

(∂φ

∂J

)⊗ JC−1 + 2

∂φ

∂J

∂C

(JC−1

). (1-3)

For a Neo–Hookean material

Φ(C

)=

µ

2(IC − 3

),

φ (J) =K

2(J − 1)2 , (1-4)

where IC = trace(C

), and µ and K are the Neo–Hookean shear and bulk moduli. The 1st order derivatives

in Eqs. (1-2) and (1-3) are

∂Φ∂C

2J−2/3

(I − IC

3C−1

),

∂φ

∂J= K (J − 1) ,

∂C

(JC−1

)= J

(C−1 ⊗C−1 − 2I

), (1-5)

where IC = trace (C), I is the 2nd order identity tensor, and I is a 4th order tensor with componentsIijkl = C−1

ik C−1jl . The 2nd order derivatives in Eqs. (1-2) and (1-3) are

∂2Φ∂C∂C

2J−2/3

3

[−C−1 ⊗ I +

IC

3C−1 ⊗C−1 − I ⊗C−1 + ICI

],

∂C

(∂φ

∂J

)=

J

2KC−1. (1-6)

Page 2: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

1.1 Stress

Substituting Eq. (1-5) into (1-2), the 2nd Piola–Kirchhoff stress is then

S = µJ−2/3

(I − IC

3C−1

)+ KJ (J − 1) C−1, (1-7)

and the Cauchy stress is

σ =1J

τ =1J

FSF T

=1J

(µJ−2/3

(b− IC

3I

)+ KJ (J − 1) I

),

=1J

µ

(b− IC

3I

)+ K (J − 1) I, (1-8)

where τ is the Kirchhoff stress, b = FF T is the left Cauchy–Green deformation tensor and b = F F T .

1.2 Tangent stiffness

Substituting Eqs. (1-5) and (1-6) into (1-3), the material tangent stiffness is

C =23µJ−2/3

[−C−1 ⊗ I − I ⊗C−1 + ICI +

IC

3C−1 ⊗C−1

]+

J2KC−1 ⊗C−1 + KJ (J − 1)(C−1 ⊗C−1 − 2I

)(1-9)

or, with some simplification,

C =23µJ−2/3

[−C−1 ⊗ I − I ⊗C−1 + ICI +

IC

3C−1 ⊗C−1

]+

KJ[(2J − 1) C−1 ⊗C−1 − 2 (J − 1) I

]. (1-10)

Using the Piola transform, the spatial tangent is

c =23µJ−1

[−b⊗ I − I ⊗ b + ICi +

IC

3I ⊗ I

]+ K [(2J − 1) I ⊗ I − 2 (J − 1) i] . (1-11)

where i is a 4th order identity tensor with components iijkl = IikIjl.

2 Corotational frame

Large deformation in ANSYS is formulated in a corotated frame given by the rotation, R, from the polardecomposition of the deformation gradient

F = RU , (2-1)

where U is the stretch tensor. The rotation of the corotated frame is then

R = FU−1. (2-2)

The stress and tangent stiffness tensors are returned to ANSYS in the corotated frame.

©2008 ANSYS, Inc. 2

Page 3: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

2.1 Polar decomposition

Given the deformation gradient, the frame rotation from Eq. (2-2) is determined from the closed–formsolution of the inverse stretch,

U−1 =1

IIIU[C − IUU + IIUI] , (2-3)

where IU , IIU , and IIIU are the principal invariants of U . The stretch tensor is given in closed form by

U =1

IUIIU − IIIU

[−C2 +

(I2U − IIU

)C + IUIIIUI

]. (2-4)

Noting the eigenvalues of U are the square root of the eigenvalues of C, the principal invariants of U interms of the eigenvalues of C are

IU =√

λ1 +√

λ2 +√

λ3,

IIU =√

λ1λ2 +√

λ2λ3 +√

λ1λ3,

IIIU =√

λ1λ2λ3, (2-5)

where λ1, λ2 and λ3 are the eigenvalues of C given by the roots of the characteristic polynomial,

P (λ) = −λ3 + ICλ2 − IICλ + IIIC , (2-6)

where the principal invariants are

IC = trace (C) ,

IIC =12

(I2C − trace

(C2

)),

IIIC = det (C) = J2. (2-7)

C is a symmetric, positive–definite, rank 3 matrix. Equation (2-6) then has 3 positive real roots given by

λi =13

(IC + 2

√I2C − 3IIC cos

(β + (i− 1) 2π

3

)), i = 1, 2, 3

β = arccos2I3

C − 9ICIIC + 27IIIC

2√

(I2C − 3IIC)3

. (2-8)

2.2 Stress

The constitutive model defined by the Neo–Hookean hyperelastic material in §1 gives the stress in the spatialconfiguration by direct evaluation of Eq. (1-8). No rate form is used and no integration is required. TheCauchy stress in the corotated frame is returned to ANSYS.

2.3 Tangent stiffness

The corotational rate relative to the corotated frame is the Green–Naghdi rate. However, the constitutiveresponse of the Neo–Hookean material from §1 is in terms of the Lie derivative, or Truesdell rate, of theKirchhoff stress

Lτ = Jcd, (2-9)

where c is the spatial tangent given by Eq. (1-11), and

Lτ = τ − lτ − τ lT = J◦σ,

l = F F−1 = d + w,

d =12

(l + lT

),

w =12

(l− lT

), (2-10)

©2008 ANSYS, Inc. 3

Page 4: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

where◦σ is the Truesdell rate of the Cauchy stress and the superposed dot indicates the time derivative in

the reference configuration. A convenient approximation of the Green–Naghdi rate is the Jaumann rate,

∇σ= σ + σw −wσ. (2-11)

Using the Jaumann rate, the constitutive response in the corotated frame is given by

∇σ=

∇c d, (2-12)

where∇c is the Jaumann tangent stiffness tensor and is implicitly defined by combining Eqs. (2-9) to (2-11),

giving∇σ= cd + dσ + σd. (2-13)

The Jaumann tangent stiffness in the corotated frame is the material stiffness returned to ANSYS.

3 Voigt notation

Voigt notation is a reduced order representation of tensors and is the form required for the stress and tangentstiffness tensors in ANSYS. In practice, Voigt notation is given by converting pairs of indices to a singleindex via {11 22 33 12 23 31} = {11 22 33 21 32 13} ⇒ {1 2 3 4 5 6} and redefining the rate of deformationtensor as

d ⇒

d1

d2

d3

d4

d5

d6

d11

d22

d33

2d12

2d23

2d31

. (3-1)

Then, in component form,∇σα=

∇cαβ dβ , α, β = 1, 2, . . . , 6, (3-2)

where,

∇σα =

∇σ11∇σ22∇σ33∇σ12∇σ23∇σ31

,

∇cαβ =

∇c1111

∇c1122

∇c1133

∇c1112

∇c1123

∇c1131

∇c2211

∇c2222

∇c2233

∇c2212

∇c2223

∇c2231

∇c3311

∇c3322

∇c3333

∇c3312

∇c3323

∇c3331

∇c1211

∇c1222

∇c1233

∇c1212

∇c1223

∇c1231

∇c2311

∇c2322

∇c2333

∇c2312

∇c2323

∇c2331

∇c3111

∇c3122

∇c3133

∇c3112

∇c3123

∇c3131

. (3-3)

Minor symmetry with respect to the index pairs is required for this conversion. The 4th order identity iand the Jaumann tangent stiffness lack minor symmetry. They are redefined to ensure minor symmetry as

iijkl ≡12

(IikIjl + IilIjk) ,

∇c ijkl ≡ cijkl +

12

(Iikσjl + σikIjl + Iilσjk + σilIjk) . (3-4)

©2008 ANSYS, Inc. 4

Page 5: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

Converting to Voigt notation,

I ⇒ {1 1 1 0 0 0} ,

i ⇒

1 0 0 0 0 00 1 0 0 0 00 0 1 0 0 00 0 0 1

2 0 00 0 0 0 1

2 00 0 0 0 0 1

2

,

I ⊗ I ⇒

1 1 1 0 0 01 1 1 0 0 01 1 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

. (3-5)

3.1 Stress

The Cauchy stress in Voigt notation is then

σ ⇒ µ

J

b1 − IC

3

b2 − IC

3

b3 − IC

3b4

b5

b6

+ K

J − 1J − 1J − 1

000

. (3-6)

3.2 Tangent stiffness

The terms b⊗ I and I ⊗ b in Voigt notation are

b⊗ I ⇒

b1 b2 b3 b4 b5 b6

b1 b2 b3 b4 b5 b6

b1 b2 b3 b4 b5 b6

0 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

,

I ⊗ b ⇒

b1 b1 b1 0 0 0b2 b2 b2 0 0 0b3 b3 b3 0 0 0b4 b4 b4 0 0 0b5 b5 b5 0 0 0b6 b6 b6 0 0 0

. (3-7)

©2008 ANSYS, Inc. 5

Page 6: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

The spatial tangent in Voigt notation is then

c ⇒ 23µJ−1

−2b1 + 43 IC −b2 − b1 + IC

3 −b3 − b1 + IC

3 −b4 −b5 −b6

−b1 − b2 + IC

3 −2b2 + 43 IC −b3 − b2 + IC

3 −b4 −b5 −b6

−b1 − b3 + IC

3 −b2 − b3 + IC

3 −2b3 + 43 IC −b4 −b5 −b6

−b4 −b4 −b4IC

2 0 0−b5 −b5 −b5 0 IC

2 0−b6 −b6 −b6 0 0 IC

2

+

K

1 2J − 1 2J − 1 0 0 0

2J − 1 1 2J − 1 0 0 02J − 1 2J − 1 1 0 0 0

0 0 0 −J + 1 0 00 0 0 0 −J + 1 00 0 0 0 0 −J + 1

. (3-8)

The stress terms in the Jaumann tangent stiffness are

12

(Iikσjl + σikIjl + Iilσjk + σilIjk) =12

(Iikσjl + σikIjl) +12

(Iilσjk + σilIjk)

⇒ 12

2σ1 0 0 σ4 0 σ6

0 2σ2 0 σ4 σ5 00 0 2σ3 0 σ5 σ6

σ4 σ4 0 σ2 + σ1 0 00 σ5 σ5 0 σ3 + σ2 0σ6 0 σ6 0 0 σ1 + σ3

+12

2σ1 0 0 σ4 0 σ6

0 2σ2 0 σ4 σ5 00 0 2σ3 0 σ5 σ6

σ4 σ4 0 0 σ6 σ5

0 σ5 σ5 σ6 0 σ4

σ6 0 σ6 σ5 σ4 0

=

2σ1 0 0 σ4 0 σ6

0 2σ2 0 σ4 σ5 00 0 2σ3 0 σ5 σ6

σ4 σ4 0 σ2+σ12

σ62

σ52

0 σ5 σ5σ62

σ3+σ22

σ42

σ6 0 σ6σ52

σ42

σ1+σ32

. (3-9)

After some simplification,

∇c⇒ 2

3µJ−1

b1 + IC

3 −b2 − b1 + IC

3 −b3 − b1 + IC

3b42 −b5

b62

−b1 − b2 + IC

3 −b2 + IC

3 −b3 − b2 + IC

3b42

b52 −b6

−b1 − b3 + IC

3 −b2 − b3 + IC

3 b3 + IC

3 −b4b52

b62

b42

b42 −b4

34 (b1 + b2) 3

4 b634 b5

−b5b52

b52

34 b6

34 (b2 + b3) 3

4 b4b62 −b6

b62

34 b5

34 b4

34 (b1 + b3)

+

K

2J − 1 2J − 1 2J − 1 0 0 02J − 1 2J − 1 2J − 1 0 0 02J − 1 2J − 1 2J − 1 0 0 0

0 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

.

(3-10)

©2008 ANSYS, Inc. 6

Page 7: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

3.3 Change of basis

For an arbitrary change of basis given by the orthogonal tensor T , the components of the 2nd order stresstensor and the 4th order tangent stiffness tensors transform as

σ′ij = TimσmnTjn,

∇′c ijkl = TimTjn

∇cmnop TkoTlp. (3-11)

And in Voigt notation,

σ′α = Qαξσξ,

∇′c αβ = Qαξ

∇c ξη Qβη. (3-12)

Comparing Eqs. (3-11) and (3-12), the change of basis tensor Q is given by

Q [T ] =[[P1] 2 [P2][P3] [P4]

], (3-13)

where

[P1] =

T 211 T 2

12 T 213

T 221 T 2

22 T 223

T 231 T 2

32 T 233

, [P2] =

T11T12 T12T13 T11T13

T21T22 T22T23 T21T23

T31T32 T32T33 T31T33

,

[P3] =

T11T21 T12T22 T13T23

T21T31 T22T32 T23T33

T31T11 T32T12 T33T13

, [P4] =

T11T22 + T12T21 T12T23 + T13T22 T11T23 + T13T21

T21T32 + T22T31 T22T33 + T23T32 T21T33 + T23T31

T31T12 + T32T11 T32T13 + T33T12 T31T13 + T33T11

.

(3-14)For a change of basis from the spatial frame to the corotated frame, T = RT .

©2008 ANSYS, Inc. 7

Page 8: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

APPENDIX

A Implementation

Shown below in §A.2 is the usermat3d() subroutine that implements the Neo–Hookean Cauchy stress andtangent stiffness calculations of Eqs. (1-8) and (3-10). Two auxiliary subroutines to perform the polardecomposition and form the 6–dimensional change of basis matrix are also given. The coding is done in fixedsource form modern Fortran and has favored clarity over computational efficiency.

The implementation is 3-dimensional and, as presented above, a displacement only formulation. Itrequires the Neo-Hookean Young’s Modulus and Poisson’s ratio as the first and second material propertiesrespectively and has no user state variables. The stored energy used by ANSYS as an output variable iscalculated as Eq. (1-1) with (1-4) and the dissipated energy is zero. The transverse shear stiffness terms arearbitrarily set to the (6, 6) component of the material tangent stiffness in the corotated frame.

A sample simulation input file and solution output are given below in §A.1. It simulates a cycle of simpleshear of a block that has the initial dimensions 1× 1× 1. The block is discretized with a 4× 4× 4 array ofSOLID185, 8–node, trilinear, hexahedral elements. The Neo–Hookean Young’s Modulus and Poisson’s ratioare 3× 107 and 0.3 respectively. The simulation uses a fixed 10 substeps for the loading and unloading stepsand it writes the time, effective stress and effective strain, for an element near the center of the block, to atext file named stressstrain usr.log.

A.1 Sample simulation

A.1.1 Input

!*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*! Sample input file to demonstrate the large deformation Neo-Hookean! user material implementation. Simulates a simple shear cycle of a! block with initial dimensions 1x1x1.!*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*!---------------------------------------------------------! Preprocessing!---------------------------------------------------------/PREP7

! Geometry and meshLx=1Ly=1Lz=1BLOCK,0,Lx,0,Ly,0,LzET,1,SOLID185ESIZE,Lx/4.MAT,1VMESH,1

! Material

! User material parametersE = 30E6 ! Young’s Modulusnu = 0.3 ! Poisson’s ratioTB,USER,1,1,2,TBDATA,1,E,nu

! Neo-hookean hyperelastic parameters!G = E/2/(1+nu) ! shear modulus

©2008 ANSYS, Inc. 8

Page 9: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

!K = E/3/(1-2*nu) ! bulk modulus!d = 2/K ! incompressibility parameter!TB,HYPER,1,1,,NEO!TBDATA,1,G,d!---------------------------------------------------------! Solution!---------------------------------------------------------/SOLANTYPE,STATICNLGEOM,ONNSUBST,10,10,10OUTRES,ALL,ALL

! Fix surfaces @ y=0 and z=0NSEL,S,LOC,Y,0.D,All,Ux,0.D,All,Uy,0.NSEL,S,LOC,Z,0.D,All,Uz,0.

!Simple shearNSEL,S,LOC,Y,LyD,All,Ux,LxD,All,Uy,0.TIME,1.0ALLSEL,ALLSOLVE

!Return to initial configurationNSEL,S,LOC,Y,LyD,All,Ux,0.D,All,Uy,0.TIME,2.0ALLSEL,ALLSOLVE!---------------------------------------------------------! postprocessing!---------------------------------------------------------/POST26NN=node(Lx/2,Ly/2,Lz/2)EN=enearn(NN)ESOL,5,EN,NN,EPEL,EQV,EEESOL,6,EN,NN,S,EQV,SE

NSUB=20*dim,timeo,array,NSUB*dim,stress2,array,NSUB*dim,strain2,array,NSUBVGET,timeo(1),1VGET,strain2(1),5VGET,stress2(1),6

*cfopen,stressstrain_usr,log*vwrite

©2008 ANSYS, Inc. 9

Page 10: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

(5x,’Time’,10x,’Stress eqv.’,5x,’Strain eqv.’)*vwrite,timeo(1),stress2(1),strain2(1)(2X,E14.6,2X,E14.8,2X,E14.8)*cfclos

A.1.2 Output

Time Stress eqv. Strain eqv.0.100000E+00 0.18511346E+07 0.53645216E-010.200000E+00 0.36665547E+07 0.10602121E+000.300000E+00 0.54384537E+07 0.15643180E+000.400000E+00 0.71593019E+07 0.20437866E+000.500000E+00 0.88222967E+07 0.24957578E+000.600000E+00 0.10422123E+08 0.29193486E+000.700000E+00 0.11955693E+08 0.33153319E+000.800000E+00 0.13422645E+08 0.36857480E+000.900000E+00 0.14825551E+08 0.40335214E+000.100000E+01 0.16169843E+08 0.43621175E+000.110000E+01 0.14825540E+08 0.40324373E+000.120000E+01 0.13422581E+08 0.36836731E+000.130000E+01 0.11955591E+08 0.33123410E+000.140000E+01 0.10422004E+08 0.29155654E+000.150000E+01 0.88221827E+07 0.24913378E+000.160000E+01 0.71592219E+07 0.20389315E+000.170000E+01 0.54384351E+07 0.15592898E+000.180000E+01 0.36666162E+07 0.10553450E+000.190000E+01 0.18512794E+07 0.53215926E-010.200000E+01 0.46409597E-08 0.66716967E-03

A.2 Code listing

*deck,usermat3d parallel user jmgerkensubroutine usermat3d(matId, elemId,kDomIntPt, kLayer, kSectPt,& ldstep,isubst,keycut,& nDirect,nShear,ncomp,nStatev,nProp,& Time,dTime,Temp,dTemp,& stress,ustatev,dsdePl,sedEl,sedPl,epseq,& Strain,dStrain, epsPl, prop, coords,& var0, F0, F1,& tsstif, epsZZ,& var1, var2, var3, var4, var5,& var6, var7, var8)

!----------------------------------------------------------------------!- user material constitutive routine!- - 3D Neo-Hookean hyperelastic material!----------------------------------------------------------------------

IMPLICIT NONEINTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind

! external proceduresEXTERNAL polarRU ! polar decomposition subroutineEXTERNAL trans_matrx_6 ! 6D voigt rotation matrix subroutine

! argumentsINTEGER,INTENT(IN) :: matID ! material ID numberINTEGER,INTENT(IN) :: elemID ! element ID number

©2008 ANSYS, Inc. 10

Page 11: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

INTEGER,INTENT(IN) :: kDomIntPt ! integration pointINTEGER,INTENT(IN) :: kLayer ! layer numberINTEGER,INTENT(IN) :: kSectPt ! section numberINTEGER,INTENT(IN) :: ldstep ! load step numberINTEGER,INTENT(IN) :: isubst ! substep numberINTEGER,INTENT(OUT) :: keycut ! time step reductionINTEGER,INTENT(IN) :: ncomp ! no. stress componentsINTEGER,INTENT(IN) :: nDirect ! no. direct stress componentsINTEGER,INTENT(IN) :: nShear ! no. shear stress componentsINTEGER,INTENT(IN) :: nStatev ! size of state variable arrayINTEGER,INTENT(IN) :: nProp ! size of property arrayREAL(RK),INTENT(IN) :: Time ! time at begining of incrementREAL(RK),INTENT(IN) :: dTime ! time incrementREAL(RK),INTENT(IN) :: Temp ! temperature at begining of incrementREAL(RK),INTENT(IN) :: dTemp ! temperature incrementREAL(RK),INTENT(INOUT) :: sedEl ! stored (elastic) energyREAL(RK),INTENT(INOUT) :: sedPl ! dissipated (plastic) energyREAL(RK),INTENT(INOUT) :: epseq ! equivalent plastic strainREAL(RK),INTENT(INOUT) :: epsZZ ! plane stress thickness strainREAL(RK),INTENT(INOUT) :: stress(ncomp) !stressREAL(RK),INTENT(INOUT) :: ustatev(nStatev) !state variablesREAL(RK),INTENT(OUT) :: dsdePl(ncomp,ncomp) !tangent stiffnessREAL(RK),INTENT(IN) :: Strain(ncomp) !strain at begining of incREAL(RK),INTENT(IN) :: dStrain(ncomp) !strain incrementREAL(RK),INTENT(IN) :: epsPl(ncomp) !work spaceREAL(RK),INTENT(IN) :: prop(nProp) ! mat props, user inputREAL(RK),INTENT(IN) :: coords(3) ! coordinates of material pointREAL(RK),INTENT(IN) :: F1(3,3) ! deformation gradient at t+dtREAL(RK),INTENT(IN) :: F0(3,3) ! deformation gradient at tREAL(RK),INTENT(OUT) :: tsstif(2) ! transverse shear stiffnessREAL(RK),INTENT(IN) :: var0(*),var1,var2,var3,var4 !place holderREAL(RK),INTENT(IN) :: var5,var6,var7,var8 !place holder

! localREAL(RK) :: R(3,3), Q(6,6) !rotationsREAL(RK) :: U(3,3) !stretchREAL(RK) :: Bbar(6) ! vector form isochoric left cauchy greenREAL(RK) :: tauiso(6),tauvol ! isochoric and volumetric stressREAL(RK) :: s(6) ! Cauchy stressREAL(RK) :: M(6,6) ! material jacobianREAL(RK) :: G,K ! shear & bulk modulusREAL(RK) :: I1bar3,detF,detF23 ! deformation invariantsREAL(RK) :: C1,C2 ! constants

!----------------------------------------------------------------------! deformation gradient determinant

detF = F1(1,1) * (F1(2,2)*F1(3,3) - F1(2,3)*F1(3,2))& + F1(1,2) * (F1(2,3)*F1(3,1) - F1(2,1)*F1(3,3))& + F1(1,3) * (F1(2,1)*F1(3,2) - F1(2,2)*F1(3,1))if(detF<=0._RK)thenkeycut=1return

elsedetF23 = detF**(-2._RK/3._RK)

endif

©2008 ANSYS, Inc. 11

Page 12: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

! isochoric left Cauchy GreenBbar(1)=(F1(1,1)*F1(1,1)+F1(1,2)*F1(1,2)+F1(1,3)*F1(1,3))*detF23Bbar(2)=(F1(2,1)*F1(2,1)+F1(2,2)*F1(2,2)+F1(2,3)*F1(2,3))*detF23Bbar(3)=(F1(3,1)*F1(3,1)+F1(3,2)*F1(3,2)+F1(3,3)*F1(3,3))*detF23Bbar(4)=(F1(2,1)*F1(1,1)+F1(2,2)*F1(1,2)+F1(2,3)*F1(1,3))*detF23Bbar(5)=(F1(3,1)*F1(2,1)+F1(3,2)*F1(2,2)+F1(3,3)*F1(2,3))*detF23Bbar(6)=(F1(3,1)*F1(1,1)+F1(3,2)*F1(1,2)+F1(3,3)*F1(1,3))*detF23

I1bar3 = (Bbar(1) + Bbar(2) + Bbar(3))/3._RK ! 1st invariant / 3

!stress update, spatial frameG = prop(1)/2._RK/(1._RK+prop(2)) ! Shear modulusK = prop(1)/3._RK/(1._RK-2._RK*prop(2)) ! Bulk modulus

!Cauchy stresss(1:3) = G*(Bbar(1:3)-I1bar3)/ detF + K*(detF-1._RK)s(4:6) = G*(Bbar(4:6)) / detF

!Jaumann tangent stiffness, spatial frameC1 = 2._RK/3._RK*G/detFC2 = 3._RK/4._RK*C1

! shear modulus termsM(1,1) = C1 * (Bbar(1) + I1bar3)M(2,1) =-C1 * (Bbar(1) + Bbar(2) - I1bar3)M(3,1) =-C1 * (Bbar(1) + Bbar(3) - I1bar3)M(4,1) = C1 * Bbar(4) / 2._RKM(5,1) =-C1 * Bbar(5)M(6,1) = C1 * Bbar(6) / 2._RK

M(1,2) = M(2,1)M(2,2) = C1 * (Bbar(2) + I1bar3)M(3,2) =-C1 * (Bbar(2) + Bbar(3) - I1bar3)M(4,2) = C1 * Bbar(4) / 2._RKM(5,2) = C1 * Bbar(5) / 2._RKM(6,2) =-C1 * Bbar(6)

M(1,3) = M(3,1)M(2,3) = M(3,2)M(3,3) = C1 * (Bbar(3) + I1bar3)M(4,3) =-C1 * Bbar(4)M(5,3) = C1 * Bbar(5) / 2._RKM(6,3) = C1 * Bbar(6) / 2._RK

M(1,4) = M(4,1)M(2,4) = M(4,2)M(3,4) = M(4,3)M(4,4) = C2 * (Bbar(1) + Bbar(2))M(5,4) = C2 * Bbar(6)M(6,4) = C2 * Bbar(5)

M(1,5) = M(5,1)M(2,5) = M(5,2)M(3,5) = M(5,3)

©2008 ANSYS, Inc. 12

Page 13: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

M(4,5) = M(5,4)M(5,5) = C2 * (Bbar(2) + Bbar(3))M(6,5) = C2 * Bbar(4)

M(1,6) = M(6,1)M(2,6) = M(6,2)M(3,6) = M(6,3)M(4,6) = M(6,4)M(5,6) = M(6,5)M(6,6) = C2 * (Bbar(1) + Bbar(3))

! bulk modulus termsM(1:3,1:3) = M(1:3,1:3) + K*(2._RK*detF - 1._RK)

!Change from spatial to corotated framecall polarRU(F1,R,U) ! rotation from polar decompositioncall trans_matrx_6(Q,transpose(R)) ! dim 6 rotation matrixstress(:) = matmul(Q,s)dsdePl(:,:) = matmul(Q,matmul(M,transpose(Q)))

!stored and dissipated energysedEl = G/2._RK*(I1bar3*3._RK-3._RK) + K/2._RK*(detF-1._RK)**2sedEl = sedEl/detFsedPl = 0._RK

! transverse shear stiffnesstsstif(:) = dsdePl(6,6)

end subroutine usermat3d!-------------------------------------------------------------------------------

subroutine polarRU(F,R,U)!----------------------------------------------------------------------!- Polar decomposition, F=RU! Reference:! JC Simo & TJR Hughes, Computational Inelasticity, 1998, Springer!----------------------------------------------------------------------

IMPLICIT NONEINTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind

! argumentsREAL(RK),INTENT(IN) :: F(3,3) ! matrix to decomposeREAL(RK),INTENT(OUT) :: R(3,3) !rotationREAL(RK),INTENT(OUT) :: U(3,3) !stretch

! localREAL(RK), PARAMETER :: pi = 3.14159265358979324_RKREAL(RK),PARAMETER ::I(3,3)=reshape((/1._RK,0._RK,0._RK,& 0._RK,1._RK,0._RK,& 0._RK,0._RK,1._RK/),(/3,3/))REAL(RK) :: C(3,3),CC(3,3) ! right Cauchy-Green, squaredREAL(RK) :: Ui(3,3) ! U inverseREAL(RK) :: IC, IIC, IIIC ! invariants of CREAL(RK) :: IU, IIU, IIIU ! invariants of UREAL(RK) :: l1,l2,l3 ! eigenvaluesREAL(RK) :: p,q,m,n,t,D ! constants

!----------------------------------------------------------------------

©2008 ANSYS, Inc. 13

Page 14: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

!right Cauchy-GreenC(:,:) = matmul(transpose(F),F)CC(:,:) = matmul(C,C)

!invariantsIC = C(1,1) + C(2,2) + C(3,3)IIC = 0.5_RK*(IC**2 - (CC(1,1) + CC(2,2) + CC(3,3)))IIIC = C(1,1) * (C(2,2)*C(3,3) - C(2,3)*C(3,2))& + C(1,2) * (C(2,3)*C(3,1) - C(2,1)*C(3,3))& + C(1,3) * (C(2,1)*C(3,2) - C(2,2)*C(3,1))

! eigenvalues of sqrt(C)p = IIC - (IC**2)/3._RKq = -(2._RK/27._RK)*IC**3+IC*IIC/3._RK-IIICif(abs(p)<epsilon(1._RK))thenl1 = sqrt( abs(-abs(q)**(1._RK/3._RK) + IC/3._RK) )l2 = l1l3 = l2

elsem = 2._RK*sqrt(abs(p)/3._RK)n = 3._RK*q/(m*p)if(abs(n)>1._RK) n = sign(1._RK, n)t = atan2(sqrt(1._RK-n**2),n)/3._RKl1 = sqrt( abs(m*cos(t) + IC/3._RK) )l2 = sqrt( abs(m*cos(t+2._RK/3._RK*pi) + IC/3._RK) )l3 = sqrt( abs(m*cos(t+4._RK/3._RK*pi) + IC/3._RK) )

endif

!stretch and inverse!invariantsIU = l1 + l2 + l3IIU = l1*l2 + l1*l3 + l2*l3IIIU = l1*l2*l3D = IU*IIU-IIIU

U(:,:) = (-CC(:,:) + (IU**2-IIU)*C(:,:) + IU*IIIU*I(:,:))/DUi(:,:) = (C(:,:) - IU*U(:,:) + IIU*I(:,:))/IIIU

! RotationR(:,:) = matmul(F,Ui)

end subroutine polarRU!----------------------------------------------------------------------

SUBROUTINE trans_matrx_6(Q,R)!----------------------------------------------------------------------! Construct the 6x6 Voigt rotation matrix!----------------------------------------------------------------------

IMPLICIT NONEINTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind

! argumentsREAL(RK), INTENT(OUT) :: Q(6,6)REAL(RK), INTENT(IN) :: R(3,3)

!----------------------------------------------------------------------Q(1,1) = R(1,1)**2

©2008 ANSYS, Inc. 14

Page 15: ANSYS_NeoHook_usermat

LARGE DEFORMATION USER MATERIAL IN ANSYS DECEMBER 2008

Q(2,1) = R(2,1)**2Q(3,1) = R(3,1)**2Q(4,1) = R(1,1)*R(2,1)Q(5,1) = R(2,1)*R(3,1)Q(6,1) = R(3,1)*R(1,1)

Q(1,2) = R(1,2)**2Q(2,2) = R(2,2)**2Q(3,2) = R(3,2)**2Q(4,2) = R(1,2)*R(2,2)Q(5,2) = R(2,2)*R(3,2)Q(6,2) = R(3,2)*R(1,2)

Q(1,3) = R(1,3)**2Q(2,3) = R(2,3)**2Q(3,3) = R(3,3)**2Q(4,3) = R(1,3)*R(2,3)Q(5,3) = R(2,3)*R(3,3)Q(6,3) = R(3,3)*R(1,3)

Q(1,4) = R(1,1)*R(1,2)*2._RKQ(2,4) = R(2,1)*R(2,2)*2._RKQ(3,4) = R(3,1)*R(3,2)*2._RKQ(4,4) = R(1,1)*R(2,2)+R(1,2)*R(2,1)Q(5,4) = R(2,1)*R(3,2)+R(2,2)*R(3,1)Q(6,4) = R(3,1)*R(1,2)+R(3,2)*R(1,1)

Q(1,5) = R(1,2)*R(1,3)*2._RKQ(2,5) = R(2,2)*R(2,3)*2._RKQ(3,5) = R(3,2)*R(3,3)*2._RKQ(4,5) = R(1,2)*R(2,3)+R(1,3)*R(2,2)Q(5,5) = R(2,2)*R(3,3)+R(2,3)*R(3,2)Q(6,5) = R(3,2)*R(1,3)+R(3,3)*R(1,2)

Q(1,6) = R(1,1)*R(1,3)*2._RKQ(2,6) = R(2,1)*R(2,3)*2._RKQ(3,6) = R(3,1)*R(3,3)*2._RKQ(4,6) = R(1,1)*R(2,3)+R(1,3)*R(2,1)Q(5,6) = R(2,1)*R(3,3)+R(2,3)*R(3,1)Q(6,6) = R(3,1)*R(1,3)+R(3,3)*R(1,1)END SUBROUTINE trans_matrx_6

!-------------------------------------------------------------------------------

©2008 ANSYS, Inc. 15