Вы находитесь на странице: 1из 15

A large deformation NeoHookean user material in ANSYS.

ANSYS, Inc.
275 Technology Drive, Canonsburg, PA 15317
December 2008
Abstract
The development and implementation of a 3dimensional, large deformation, hyperelastic user material routine for ANSYS is presented. The constitutive model development follows the wellknown
NeoHookean hyperelastic formulation which yields the stress and material tangent in the spatial configuration. 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 notation. The Fortran code listing for the user material routine and a sample input file simulating the simple
shearing of a block are given.

NeoHookean hyperelastic material

The strain energy potential for a nearly incompressible hyperelastic material is



+ (J) ,
W C

(1-1)

= F T F is the isochoric right CauchyGreen deformation tensor, F = J 1/3 F is the isochoric


where C
deformation gradient, F is the deformation gradient and J = det (F ). The 2nd PiolaKirchhoff stress is
S=2

=2
+
JC 1 ,
C
C
J

(1-2)

and material stiffness tensor is


C=2

S
=4
+2
C
CC
C

JC 1 + 2



JC 1 .
J C

(1-3)

For a NeoHookean material




= IC 3 ,
C
2
K
2
(J) =
(J 1) ,
2

(1-4)


, and and K are the NeoHookean shear and bulk moduli. The 1st order derivatives
where IC = trace C
in Eqs. (1-2) and (1-3) are



IC 1
= J 2/3 I
C
,
C
2
3

= K (J 1) ,
J



JC 1 = J C 1 C 1 2I ,
(1-5)
C
where IC = trace (C), I is the 2nd order identity tensor, and I is a 4th order tensor with components
1 1
Iijkl = Cik
Cjl . The 2nd order derivatives in Eqs. (1-2) and (1-3) are


2
J 2/3
IC 1
=
C 1 I +
C C 1 I C 1 + IC I ,
CC
2 3
3
 

J
(1-6)
= KC 1 .
C J
2

LARGE DEFORMATION USER MATERIAL IN ANSYS

1.1

DECEMBER 2008

Stress

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


IC 1
2/3
S = J
I
C
+ KJ (J 1) C 1 ,
3

(1-7)

and the Cauchy stress is


1
1
= F SF T
J J



IC
1
J 2/3 b
I + KJ (J 1) I ,
=
J
3



IC
1
b
=
I + K (J 1) I,
J
3

(1-8)

where is the Kirchhoff stress, b = F F T is the left CauchyGreen 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=



IC 1
2 2/3
J
C 1 I I C 1 + IC I +
C C 1 +
3
3
J 2 KC 1 C 1 + KJ (J 1) C 1 C 1 2I

(1-9)

or, with some simplification,




2 2/3
IC 1
1
1
1
C = J
C I I C + IC I +
C C
+
3
3


KJ (2J 1) C 1 C 1 2 (J 1) I . (1-10)
Using the Piola transform, the spatial tangent is


IC
2 1

b I I b + IC i +
I I + K [(2J 1) I I 2 (J 1) i] .
c = J
3
3

(1-11)

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

Corotational frame

Large deformation in ANSYS is formulated in a corotated frame given by the rotation, R, from the polar
decomposition of the deformation gradient
F = RU ,
(2-1)
where U is the stretch tensor. The rotation of the corotated frame is then
R = F U 1 .

(2-2)

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

2008 ANSYS, Inc.

LARGE DEFORMATION USER MATERIAL IN ANSYS

2.1

DECEMBER 2008

Polar decomposition

Given the deformation gradient, the frame rotation from Eq. (2-2) is determined from the closedform
solution of the inverse stretch,
1
[C IU U + IIU I] ,
(2-3)
U 1 =
IIIU
where IU , IIU , and IIIU are the principal invariants of U . The stretch tensor is given in closed form by
U=




1
C 2 + IU2 IIU C + IU IIIU I .
IU IIU IIIU

(2-4)

Noting the eigenvalues of U are the square root of the eigenvalues of C, the principal invariants of U in
terms of the eigenvalues of C are
p
p
p
IU = 1 + 2 + 3 ,
p
p
p
IIU = 1 2 + 2 3 + 1 3 ,
p
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)

IC = trace (C) ,

1 2
IC trace C 2 ,
IIC =
2
IIIC = det (C) = J 2 .

(2-7)

where the principal invariants are

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



q
+ (i 1) 2
1
i =
IC + 2 IC2 3IIC cos
, i = 1, 2, 3
3
3
2I 3 9IC IIC + 27IIIC
= arccos C q
.
(2-8)
3
2 (IC2 3IIC )

2.2

Stress

The constitutive model defined by the NeoHookean hyperelastic material in 1 gives the stress in the spatial
configuration by direct evaluation of Eq. (1-8). No rate form is used and no integration is required. The
Cauchy stress in the corotated frame is returned to ANSYS.

2.3

Tangent stiffness

The corotational rate relative to the corotated frame is the GreenNaghdi rate. However, the constitutive
response of the NeoHookean material from 1 is in terms of the Lie derivative, or Truesdell rate, of the
Kirchhoff 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,

1
l + lT ,
2

1
w=
l lT ,
2
d=

2008 ANSYS, Inc.

(2-10)

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 GreenNaghdi 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.

Voigt notation

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

d1
d11

d2
d22

d3
d33
d

.
(3-1)
d4
2d12

d5

2d23

d6
2d31
Then, in component form,

= c

d ,

, = 1, 2, . . . , 6,

(3-2)

where,

11

22

33
=
,

12

23


31

c
c
1111 1122
c
2211 c 2222

c 3311

c 3322
c =

c 1211 c 1222

c
2311 c 2322

c 3111 c 3122

c 1133
c 2233

c 3333

c 1233
c 2333

c 3133

c 1112

c 2212

c 3312
c 1212

c 2312

c 3112

c 1123

c 2223

c 3323
c 1223

c 2323

c 3123

c 1131

c 2231

c 3331
.

c 1231

c 2331

c 3131

(3-3)

Minor symmetry with respect to the index pairs is required for this conversion. The 4th order identity i
and the Jaumann tangent stiffness lack minor symmetry. They are redefined to ensure minor symmetry as
1
(Iik Ijl + Iil Ijk ) ,
2
1
cijkl + (Iik jl + ik Ijl + Iil jk + il Ijk ) .
2

iijkl

c ijkl

2008 ANSYS, Inc.

(3-4)

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

Converting to Voigt notation,


I {1 1 1 0 0 0} ,

1 0 0 0
0 1 0 0

0 0 1 0
i
0 0 0 1
2

0 0 0 0
0 0 0 0

1 1 1 0
1 1 1 0

1 1 1 0
I I
0 0 0 0

0 0 0 0
0 0 0 0

3.1

0
0

0
,
0

0
0
0
0
1
2

1
2

0
0
0
0
0
0

0
0

0
.
0

0
0

(3-5)

1
.
0

(3-6)

Stress

The Cauchy stress in Voigt notation is then

IC

b1 3

b2 IC
J

b3 IC
J
3
+K

J
b

b5

b6

3.2

Tangent stiffness

The terms
b I and I
b in Voigt notation are

b1
b1

b1

bI
0

0
0

b1
b2

b3
I
b
b4

b5
b6

2008 ANSYS, Inc.

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

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

b4
b4
b4
0
0
0
0
0
0
0
0
0

b5
b5
b5
0
0
0
0
0
0
0
0
0

b6
b6

b6
,
0

0
0

0
0

0
.
0

0
0

(3-7)

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

The spatial tangent in Voigt notation is then


2b1 + 43 IC
b b + IC
2
1
3
IC

2 1

b
1
3+ 3
c J

3
b4

b5
b6

b2 b1 + I3C
2b2 + 34 IC

b2 b3 + I3C
b4
b5
b6

b3 b1 + I3C

b3 b2 + I3C
4
2b3 + 3 IC
b4
b5
b6

b4
b4
b4
IC
2

b5
b5
b5
0

0
0

IC
2

1
2J 1 2J 1
2J 1
1
2J 1

2J 1 2J 1
1
K
0
0
0

0
0
0
0
0
0

b6
b6

b6
+
0

0
IC
2

0
0
0
J + 1
0
0

0
0
0
0
J + 1
0

0
0

0
. (3-8)
0

0
J + 1

The stress terms in the Jaumann tangent stiffness are


1
1
1
(Iik jl + ik Ijl + Iil jk + il Ijk ) = (Iik jl + ik Ijl ) + (Iil jk + il Ijk )
2
2

21
0
0
4
0
6
21
0
0
4
0
0

2
0

0
2
0

2
4
5
2
4

1 0
1
0
0
2
0

0
2
0
3
5
6
3
+

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

21
0
0
4
0
6
0
2
0

0
2
4
5

0
0
23
0
5
6

=
6
5 .
2 +1
4
4
0
2
2
2

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

0
5
5
6
0
4

6
0

4
0

(3-9)

After some simplification,


b1 + IC
3
b b +
2
1

2

b b +
c J 1 1 b43

3
2

b5

b6
2

2008 ANSYS, Inc.

IC
3
IC
3

b2 b1 + I3C

I
b2 + 3C

b2 b3 + I3C

b4
2

b5
2

b6

b3 b1 +
b3 b2 +
b3 + IC
3
b4

b5
2

b6
2

IC
3
IC
3

b4
2

b4
2

b4
3

(
b
4 1 + b2 )
3
4 b6
3
4 b5

b5

b5
2

b5
2
3
4 b6

4 (b2 + b3 )
3
4 b4

b6
2

b6

b6
2
3
4 b5
3
4 b4

4 (b1 + b3 )

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

2J 1 2J 1 2J 1 0 0 0
.
K
0
0
0
0 0 0

0
0
0
0 0 0
0
0
0
0 0 0
(3-10)

LARGE DEFORMATION USER MATERIAL IN ANSYS

3.3

DECEMBER 2008

Change of basis

For an arbitrary change of basis given by the orthogonal tensor T , the components of the 2nd order stress
tensor and the 4th order tangent stiffness tensors transform as
0
ij
= Tim mn Tjn ,
0

c ijkl = Tim Tjn c mnop Tko Tlp .

(3-11)

And in Voigt notation,


0 = Q ,
0

c = Q c Q .

(3-12)

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


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

T11 T21
[P3 ] = T21 T31
T31 T11

2
T11
2
[P1 ] = T21
2
T31
T12 T22
T22 T32
T32 T12

2
T12
2
T22
2
T32

T13 T23
T23 T33 ,
T33 T13

2
T13
2
T23
,
2
T33

T11 T12
[P2 ] = T21 T22
T31 T32

T11 T22 + T12 T21


[P4 ] = T21 T32 + T22 T31
T31 T12 + T32 T11

T12 T13
T22 T23
T32 T33

(3-13)

T11 T13
T21 T23 ,
T31 T33

T12 T23 + T13 T22


T22 T33 + T23 T32
T32 T13 + T33 T12

T11 T23 + T13 T21


T21 T33 + T23 T31 .
T31 T13 + T33 T11
(3-14)

For a change of basis from the spatial frame to the corotated frame, T = RT .

2008 ANSYS, Inc.

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

APPENDIX
A

Implementation

Shown below in A.2 is the usermat3d() subroutine that implements the NeoHookean Cauchy stress and
tangent stiffness calculations of Eqs. (1-8) and (3-10). Two auxiliary subroutines to perform the polar
decomposition and form the 6dimensional change of basis matrix are also given. The coding is done in fixed
source form modern Fortran and has favored clarity over computational efficiency.
The implementation is 3-dimensional and, as presented above, a displacement only formulation. It
requires the Neo-Hookean Youngs Modulus and Poissons ratio as the first and second material properties
respectively and has no user state variables. The stored energy used by ANSYS as an output variable is
calculated as Eq. (1-1) with (1-4) and the dissipated energy is zero. The transverse shear stiffness terms are
arbitrarily 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 simple
shear of a block that has the initial dimensions 1 1 1. The block is discretized with a 4 4 4 array of
SOLID185, 8node, trilinear, hexahedral elements. The NeoHookean Youngs Modulus and Poissons ratio
are 3 107 and 0.3 respectively. The simulation uses a fixed 10 substeps for the loading and unloading steps
and it writes the time, effective stress and effective strain, for an element near the center of the block, to a
text file named stressstrain usr.log.

A.1
A.1.1

Sample simulation
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 mesh
Lx=1
Ly=1
Lz=1
BLOCK,0,Lx,0,Ly,0,Lz
ET,1,SOLID185
ESIZE,Lx/4.
MAT,1
VMESH,1
! Material
! User material parameters
E = 30E6
! Youngs Modulus
nu = 0.3
! Poissons ratio
TB,USER,1,1,2,
TBDATA,1,E,nu
! Neo-hookean hyperelastic parameters
!G = E/2/(1+nu)
! shear modulus
2008 ANSYS, Inc.

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
!--------------------------------------------------------/SOL
ANTYPE,STATIC
NLGEOM,ON
NSUBST,10,10,10
OUTRES,ALL,ALL
! Fix surfaces @ y=0 and z=0
NSEL,S,LOC,Y,0.
D,All,Ux,0.
D,All,Uy,0.
NSEL,S,LOC,Z,0.
D,All,Uz,0.
!Simple shear
NSEL,S,LOC,Y,Ly
D,All,Ux,Lx
D,All,Uy,0.
TIME,1.0
ALLSEL,ALL
SOLVE
!Return to initial configuration
NSEL,S,LOC,Y,Ly
D,All,Ux,0.
D,All,Uy,0.
TIME,2.0
ALLSEL,ALL
SOLVE
!--------------------------------------------------------! postprocessing
!--------------------------------------------------------/POST26
NN=node(Lx/2,Ly/2,Lz/2)
EN=enearn(NN)
ESOL,5,EN,NN,EPEL,EQV,EE
ESOL,6,EN,NN,S,EQV,SE
NSUB=20
*dim,timeo,array,NSUB
*dim,stress2,array,NSUB
*dim,strain2,array,NSUB
VGET,timeo(1),1
VGET,strain2(1),5
VGET,stress2(1),6
*cfopen,stressstrain_usr,log
*vwrite
2008 ANSYS, Inc.

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
0.100000E+00
0.200000E+00
0.300000E+00
0.400000E+00
0.500000E+00
0.600000E+00
0.700000E+00
0.800000E+00
0.900000E+00
0.100000E+01
0.110000E+01
0.120000E+01
0.130000E+01
0.140000E+01
0.150000E+01
0.160000E+01
0.170000E+01
0.180000E+01
0.190000E+01
0.200000E+01

A.2

Stress eqv.
0.18511346E+07
0.36665547E+07
0.54384537E+07
0.71593019E+07
0.88222967E+07
0.10422123E+08
0.11955693E+08
0.13422645E+08
0.14825551E+08
0.16169843E+08
0.14825540E+08
0.13422581E+08
0.11955591E+08
0.10422004E+08
0.88221827E+07
0.71592219E+07
0.54384351E+07
0.36666162E+07
0.18512794E+07
0.46409597E-08

Strain eqv.
0.53645216E-01
0.10602121E+00
0.15643180E+00
0.20437866E+00
0.24957578E+00
0.29193486E+00
0.33153319E+00
0.36857480E+00
0.40335214E+00
0.43621175E+00
0.40324373E+00
0.36836731E+00
0.33123410E+00
0.29155654E+00
0.24913378E+00
0.20389315E+00
0.15592898E+00
0.10553450E+00
0.53215926E-01
0.66716967E-03

Code listing

*deck,usermat3d parallel
user
jmgerken
subroutine 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 NONE
INTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind
! external procedures
EXTERNAL polarRU ! polar decomposition subroutine
EXTERNAL trans_matrx_6 ! 6D voigt rotation matrix subroutine
! arguments
INTEGER,INTENT(IN) :: matID
! material ID number
INTEGER,INTENT(IN) :: elemID
! element ID number

2008 ANSYS, Inc.

10

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

INTEGER,INTENT(IN) :: kDomIntPt
! integration point
INTEGER,INTENT(IN) :: kLayer
! layer number
INTEGER,INTENT(IN) :: kSectPt
! section number
INTEGER,INTENT(IN) :: ldstep
! load step number
INTEGER,INTENT(IN) :: isubst
! substep number
INTEGER,INTENT(OUT) :: keycut
! time step reduction
INTEGER,INTENT(IN) :: ncomp
! no. stress components
INTEGER,INTENT(IN) :: nDirect
! no. direct stress components
INTEGER,INTENT(IN) :: nShear
! no. shear stress components
INTEGER,INTENT(IN) :: nStatev
! size of state variable array
INTEGER,INTENT(IN) :: nProp
! size of property array
REAL(RK),INTENT(IN) :: Time ! time at begining of increment
REAL(RK),INTENT(IN) :: dTime ! time increment
REAL(RK),INTENT(IN) :: Temp ! temperature at begining of increment
REAL(RK),INTENT(IN) :: dTemp ! temperature increment
REAL(RK),INTENT(INOUT) :: sedEl ! stored (elastic) energy
REAL(RK),INTENT(INOUT) :: sedPl ! dissipated (plastic) energy
REAL(RK),INTENT(INOUT) :: epseq ! equivalent plastic strain
REAL(RK),INTENT(INOUT) :: epsZZ ! plane stress thickness strain
REAL(RK),INTENT(INOUT) :: stress(ncomp) !stress
REAL(RK),INTENT(INOUT) :: ustatev(nStatev) !state variables
REAL(RK),INTENT(OUT) :: dsdePl(ncomp,ncomp) !tangent stiffness
REAL(RK),INTENT(IN) :: Strain(ncomp) !strain at begining of inc
REAL(RK),INTENT(IN) :: dStrain(ncomp) !strain increment
REAL(RK),INTENT(IN) :: epsPl(ncomp) !work space
REAL(RK),INTENT(IN) :: prop(nProp) ! mat props, user input
REAL(RK),INTENT(IN) :: coords(3) ! coordinates of material point
REAL(RK),INTENT(IN) :: F1(3,3) ! deformation gradient at t+dt
REAL(RK),INTENT(IN) :: F0(3,3) ! deformation gradient at t
REAL(RK),INTENT(OUT) :: tsstif(2) ! transverse shear stiffness
REAL(RK),INTENT(IN) :: var0(*),var1,var2,var3,var4 !place holder
REAL(RK),INTENT(IN) :: var5,var6,var7,var8 !place holder
! local
REAL(RK) :: R(3,3), Q(6,6) !rotations
REAL(RK) :: U(3,3) !stretch
REAL(RK) :: Bbar(6) ! vector form isochoric left cauchy green
REAL(RK) :: tauiso(6),tauvol ! isochoric and volumetric stress
REAL(RK) :: s(6) ! Cauchy stress
REAL(RK) :: M(6,6) ! material jacobian
REAL(RK) :: G,K ! shear & bulk modulus
REAL(RK) :: I1bar3,detF,detF23 ! deformation invariants
REAL(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)then
keycut=1
return
else
detF23 = detF**(-2._RK/3._RK)
endif

2008 ANSYS, Inc.

11

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

! isochoric left Cauchy Green


Bbar(1)=(F1(1,1)*F1(1,1)+F1(1,2)*F1(1,2)+F1(1,3)*F1(1,3))*detF23
Bbar(2)=(F1(2,1)*F1(2,1)+F1(2,2)*F1(2,2)+F1(2,3)*F1(2,3))*detF23
Bbar(3)=(F1(3,1)*F1(3,1)+F1(3,2)*F1(3,2)+F1(3,3)*F1(3,3))*detF23
Bbar(4)=(F1(2,1)*F1(1,1)+F1(2,2)*F1(1,2)+F1(2,3)*F1(1,3))*detF23
Bbar(5)=(F1(3,1)*F1(2,1)+F1(3,2)*F1(2,2)+F1(3,3)*F1(2,3))*detF23
Bbar(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 frame
G = prop(1)/2._RK/(1._RK+prop(2))
! Shear modulus
K = prop(1)/3._RK/(1._RK-2._RK*prop(2)) ! Bulk modulus
!Cauchy stress
s(1:3) = G*(Bbar(1:3)-I1bar3)/ detF + K*(detF-1._RK)
s(4:6) = G*(Bbar(4:6)) / detF
!Jaumann tangent stiffness, spatial frame
C1 = 2._RK/3._RK*G/detF
C2 = 3._RK/4._RK*C1
! shear modulus terms
M(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._RK
M(5,1) =-C1 * Bbar(5)
M(6,1) = C1 * Bbar(6) / 2._RK
M(1,2)
M(2,2)
M(3,2)
M(4,2)
M(5,2)
M(6,2)

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

M(1,3)
M(2,3)
M(3,3)
M(4,3)
M(5,3)
M(6,3)

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

M(1,4)
M(2,4)
M(3,4)
M(4,4)
M(5,4)
M(6,4)

=
=
=
=
=
=

M(4,1)
M(4,2)
M(4,3)
C2 * (Bbar(1) + Bbar(2))
C2 * Bbar(6)
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

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(2,6)
M(3,6)
M(4,6)
M(5,6)
M(6,6)

=
=
=
=
=
=

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

! bulk modulus terms


M(1:3,1:3) = M(1:3,1:3) + K*(2._RK*detF - 1._RK)
!Change from spatial to corotated frame
call polarRU(F1,R,U) ! rotation from polar decomposition
call trans_matrx_6(Q,transpose(R)) ! dim 6 rotation matrix
stress(:) = matmul(Q,s)
dsdePl(:,:) = matmul(Q,matmul(M,transpose(Q)))
!stored and
sedEl
sedEl
sedPl

dissipated energy
= G/2._RK*(I1bar3*3._RK-3._RK) + K/2._RK*(detF-1._RK)**2
= sedEl/detF
= 0._RK

! transverse shear stiffness


tsstif(:) = 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 NONE
INTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind
! arguments
REAL(RK),INTENT(IN) :: F(3,3) ! matrix to decompose
REAL(RK),INTENT(OUT) :: R(3,3) !rotation
REAL(RK),INTENT(OUT) :: U(3,3) !stretch
! local
REAL(RK), PARAMETER :: pi
= 3.14159265358979324_RK
REAL(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, squared
REAL(RK) :: Ui(3,3) ! U inverse
REAL(RK) :: IC, IIC, IIIC ! invariants of C
REAL(RK) :: IU, IIU, IIIU ! invariants of U
REAL(RK) :: l1,l2,l3 ! eigenvalues
REAL(RK) :: p,q,m,n,t,D ! constants
!---------------------------------------------------------------------2008 ANSYS, Inc.

13

LARGE DEFORMATION USER MATERIAL IN ANSYS

DECEMBER 2008

!right Cauchy-Green
C(:,:) = matmul(transpose(F),F)
CC(:,:) = matmul(C,C)
!invariants
IC = 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._RK
q = -(2._RK/27._RK)*IC**3+IC*IIC/3._RK-IIIC
if(abs(p)<epsilon(1._RK))then
l1 = sqrt( abs(-abs(q)**(1._RK/3._RK) + IC/3._RK) )
l2 = l1
l3 = l2
else
m = 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._RK
l1 = 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
!invariants
IU = l1 + l2 + l3
IIU = l1*l2 + l1*l3 + l2*l3
IIIU = l1*l2*l3
D = IU*IIU-IIIU
U(:,:) = (-CC(:,:) + (IU**2-IIU)*C(:,:) + IU*IIIU*I(:,:))/D
Ui(:,:) = (C(:,:) - IU*U(:,:) + IIU*I(:,:))/IIIU
! Rotation
R(:,:) = matmul(F,Ui)
end subroutine polarRU
!---------------------------------------------------------------------SUBROUTINE trans_matrx_6(Q,R)
!---------------------------------------------------------------------! Construct the 6x6 Voigt rotation matrix
!---------------------------------------------------------------------IMPLICIT NONE
INTEGER,PARAMETER :: RK=KIND(1.D0) ! real kind
! arguments
REAL(RK), INTENT(OUT) :: Q(6,6)
REAL(RK), INTENT(IN) :: R(3,3)
!---------------------------------------------------------------------Q(1,1) = R(1,1)**2
2008 ANSYS, Inc.

14

LARGE DEFORMATION USER MATERIAL IN ANSYS

Q(2,1)
Q(3,1)
Q(4,1)
Q(5,1)
Q(6,1)

=
=
=
=
=

R(2,1)**2
R(3,1)**2
R(1,1)*R(2,1)
R(2,1)*R(3,1)
R(3,1)*R(1,1)

Q(1,2)
Q(2,2)
Q(3,2)
Q(4,2)
Q(5,2)
Q(6,2)

=
=
=
=
=
=

R(1,2)**2
R(2,2)**2
R(3,2)**2
R(1,2)*R(2,2)
R(2,2)*R(3,2)
R(3,2)*R(1,2)

Q(1,3)
Q(2,3)
Q(3,3)
Q(4,3)
Q(5,3)
Q(6,3)

=
=
=
=
=
=

R(1,3)**2
R(2,3)**2
R(3,3)**2
R(1,3)*R(2,3)
R(2,3)*R(3,3)
R(3,3)*R(1,3)

Q(1,4)
Q(2,4)
Q(3,4)
Q(4,4)
Q(5,4)
Q(6,4)

=
=
=
=
=
=

R(1,1)*R(1,2)*2._RK
R(2,1)*R(2,2)*2._RK
R(3,1)*R(3,2)*2._RK
R(1,1)*R(2,2)+R(1,2)*R(2,1)
R(2,1)*R(3,2)+R(2,2)*R(3,1)
R(3,1)*R(1,2)+R(3,2)*R(1,1)

Q(1,5)
Q(2,5)
Q(3,5)
Q(4,5)
Q(5,5)
Q(6,5)

=
=
=
=
=
=

R(1,2)*R(1,3)*2._RK
R(2,2)*R(2,3)*2._RK
R(3,2)*R(3,3)*2._RK
R(1,2)*R(2,3)+R(1,3)*R(2,2)
R(2,2)*R(3,3)+R(2,3)*R(3,2)
R(3,2)*R(1,3)+R(3,3)*R(1,2)

DECEMBER 2008

Q(1,6) = R(1,1)*R(1,3)*2._RK
Q(2,6) = R(2,1)*R(2,3)*2._RK
Q(3,6) = R(3,1)*R(3,3)*2._RK
Q(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

Оценить