Vous êtes sur la page 1sur 49

Dortmund, Technische Universit

at
Institute of Mechanics
Dortmund, Germany

April 16, 2010

On the development of a triangular,


multi-field user-element for Abaqus
Author:

M. van Dijk, 0625286

Supervisors:

Dipl. Ing. C. Hortig


dr. ir. R.H.J. Peerlings

Document number:

MT 10.13

Contents
1 Introduction
2 Weak form and linearization
2.1 Momentum balance . . . . . . . . . . . . . . . . . . . . . . .
2.2 Heat balance equation . . . . . . . . . . . . . . . . . . . . .
2.3 Nonlocal balance equation . . . . . . . . . . . . . . . . . . .
2.4 Linearization of balance momentum . . . . . . . . . . . . .
2.5 Linearization of heat balance equation and nonlocal balance
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.

4
4
5
5
6
8
10

3 Finite element framework


3.1 Finite element approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Assembling of global system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Algorithmic tangent for thermo-elasticity . . . . . . . . . . . . . . . . . . . . . . .

12
12
15
17

4 Abaqus User-element
4.1 UEL Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Input file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Obtaining Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20
20
21
21

5 Results
5.1 Test environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Thermo-elastic element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Thermo-viscoplastic element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23
23
23
25

6 Conclusions and Recommendations

27

A Special Tensor operations

29

B Matlab Script

31

C UEL Template

38

D Input file

41

E Convention DOFs in ABAQUS

42

F Python script

43

. . . . . .
. . . . . .
. . . . . .
. . . . . .
equation .
. . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

Chapter 1

Introduction
In order to predict the structural behavior of products, such as the response on thermal and
mechanical loads, Finite Element Method (FEM) programs are used more and more frequently. A
wide variety of elements and material formulations have been developed to ensure reliable results.
Beyond the formulations implemented in commercial codes, advanced users desire to implement
their own elements and routines to solve non standard problems. Some of the commercial FE
codes, such as Abaqus, offer user interfaces for that purpose.
Due to the flexibility, the Abaqus subroutine User-element (UEL) will be employed in this
work. With this subroutine a maximum number of 20 additional degrees of freedom (DOFs)1
becomes possible. The main purpose of a user-designed element is to provide the stiffness matrix
as well as the residual vector, as needed in a context of solving the nonlinear system of equations
using Newton-Rhapson. The User-element can be written in C-code or in Fortran. In this report
the User-element will partly be written in Matlab and then compiled to C-code, as developing
in Matlab is easier compared to C-code. In the following, we will derive a general algorithmic
background, allowing additional degrees of freedom such as temperature, damage etc. To keep
things simple, the final implementation will be restricted to a linear plane strain thermo-elastic
element. Thus, we work with the two standard DOFs, displacement u1,2 , and one additional
degree of freedom, the temperature .
The main part of this report focuses on the framework to calculate the stiffness matrix and the
right hand side vector. In chapter 2 we start with deriving the weak form of momentum balance,
the balance of heat equation and the nonlocal balance equation. As will be shown, both, the
balance of heat equation and the nonlocal balance equation can be expressed with a corresponding
general form. The next step is to express the derived equations in terms of a finite element
approximation. This will be discussed in chapter 3. Here, we also discuss the implementation in
Matlab. Because most of the formulas obtained are straight forward, they will not be discussed in
detail. In chapter 4 we discuss the implementation of the User-element into the user subroutine
UEL. We start with presenting the template file of such a UEL, as well as the input file, which
gives the model information to the Abaqus solver. Further, we will describe how to obtain the
results, calculated with the User-element. We end up with a demonstration of simulation results,
obtained with the developed User-elements. Some of these results will be compared with Abaqus
standard elements.

1 In

total there are 30 DOFs available, but the first 10 cannot be user defined. For further details see Chapter 4

Chapter 2

Weak form and linearization


In order to solve the linear system of equations, the stiffness matrix and right hand side vector are
needed. The first step, in order these quantities, is to calculation the weak form of the different
balance laws and to linearized them.

2.1

Momentum balance

The momentum balance is given by


~ + ~b = ~x

(2.1)

Here, is the stress tensor, ~b is the body force, and ~x


is the spatial acceleration. For deriving the
weak form of this equation the weighted residual form will be used. The weighted residual form
of equation (2.1) can be calculated by taking the scalar product with a vector-valued test function
~x, followed by integration over the domain V
Z 

~ + ~b ~x

~x dV = 0
(2.2)
V

Z 

Z 


~

~x dV
~x
~b ~x dV = 0

(2.3)

By application of the chain rule, it can be shown that




~ (
~ ~x + : ~
~ x
~x) =

(2.4)

Using this rule in (2.3) gives


Z
Z 

~ (
~ x} dV
~x) : ~
{
~x
~b ~x dV = 0

(2.5)

Additionally, the divergence theorem says


Z
Z
~ ~a dV =

~n ~a dS
V

(2.6)

where ~a is a smooth vector function on the domain V and ~n is the unit outward normal to the
boundary S of the domain V. Using the divergence theorem in (2.5) gives
Z
Z
Z
~ x dV + (~b ~x
~x) dS
~n (
: ~
) ~x dV = 0
(2.7)
S

Furthermore, the traction force ~t is defined as


~t = ~n

(2.8)

2.2 Heat balance equation

Using this relation in (2.7) will give


Z
Z
Z
~ x dV + (~x
: ~
~b) ~x dV ~t ~x dS = 0
V

2.2

(2.9)

Heat balance equation

The strong form of the heat balance equation is given by


~ ()
~ =r
c 0

(2.10)

Here, is the density, c the heat capacity at constant deformation, the rate of temperature, 0
the heat flux coefficient, the temperature, and r the radiation. The derivation of the weak form is
comparable with the derivation of the weak form for the balance momentum equation (2.9). First
the strong form is multiplied with a scaler-valued test function , followed by integration over the
domain V.
Z
Z
Z

~
~
c dV
0 () dV =
r dV
(2.11)
V

Applying the chain rule gives




 
~
~
~
~ () +
~
~

=
Z

c dV +

(2.12)

Z

o
n
~
~
~
~
0 () dV =
r dV

c dV +

~ ()dV
~
0

Z


~
~
0 dV =
r dV

(2.14)

Using the divergence theorem (2.6) again gives


Z
Z
Z
Z


~ ()dV
~
~
c dV +
0

0 ~n ( )
dS =
r dV
V

(2.13)

(2.15)

Defining
~
0

= ~qc

(2.16)

~qc ~n = ~qn

(2.17)

yields the final result


Z
Z
Z
Z
~ ()
~
c dV +
0
dV +
~qn dS =
r dV
V

2.3

(2.18)

Nonlocal balance equation

The nonlocal balance equation is formulated in strong form as


~ (
~ ) =

c(l)

(2.19)

With being the local variable,


being the nonlocal variable and c(l) being a constant term for
locality. Using the same strategy as before, multiplying the strong form with a test function

and then integrate over the volume, gives


Z
Z
Z
~
~


dV
c(l) (
)
dV =

dV
(2.20)
V

and using the following relations




~
~ =
~ (
~
~ (
~ )


) +

(2.21)

2.4 Linearization of balance momentum

~ ~a dV =

~n ~a dS

(2.22)

~ = ~qc
c(l)

(2.23)

~qc ~n = ~qn

(2.24)

Will lead to the weak formulation of the nonlocal balance equation


Z
Z
Z
Z

~
~


dV +
c(l)
(
) +
~qn
dS =

dV
V

2.4

(2.25)

Linearization of balance momentum

In general, the above set of equation requires the application of an iterative solution scheme (e.g.
Newton-Rhapson). Thus, the system of equations have to be linearized. Recall formula (2.9), the
weak form of the balance momentum equation
Z
Z
Z
~
~
~
R~u =
: (~x) dV + (x
b) ~x dV ~t ~x dS
(2.26)
V

Assuming that ~b and ~t, the body force and traction vector at the boundary, respectively, are
independent from ~x and neglecting the inertia forces, the linearization of the residual (2.26) with
respect to the increment of displacement is given by
Z

~ x) dV
~u R~u = ~u
: (~
(2.27)
V

which is best derived in quantities given in the referential configuration V0 . Here,


F) =
det(F
=
~
(~x) =
dV

(2.28)
1

J F S F
~ 0 (~x) F 1 = F T
~ 0 (~x)

(2.30)

J dV0

(2.31)

(2.29)

Using these relations in (2.27) gives


Z
~u R~u

~u

F S F

:F

~ 0 (~x) J dV0

V0

Z
=

~u

~ 0 (~x) dV0
F S :


(2.32)

V0

~ 0 (~x) is independent of ~u we get


Because
Z
~ 0 (~x) dV0
~u R~u =
(~uF S + F ~uS ) :

(2.33)

V0

Now, as
~ 0 (~u)
~uF =
with ~u the incremental displacement vector, relation (2.32) can be written as
Z 

~ 0 (~u) S + F ~uS :
~ 0 (~x) dV0
~u R~u =

V0

(2.34)

(2.35)

2.4 Linearization of balance momentum

When now making use of the following relations


~ 0 (~u) = (~
~ u) F

~ 0 (~x) = (~
~ x) F

S = F 1 F T
~ u)
~uF F 1 = (~

(2.36)
(2.37)
(2.38)
(2.39)

where is the Kirchoff stress tensor and using


A1
A

= A1 A A1
= A

A A

(2.40)

(2.41)

we can calculate F ~uS as follows


= F ~uF 1 F T + F 1 ~u F T + F 1 ~uF T

F ~uS

= F ~uF 1 F T + ~u F T + ~uF T
= ~u F T F F 1 ~uF F 1 F T F T ~uF T F T

T
~ u) F T (~
~ u) F T
= ~u F T (~

(2.42)

When plugging the above solution into (2.35) and combining it with equations (2.30), (2.31), (2.36)
and (2.38), we obtain

Z 

T
T
T
~
~ x) F J 1 dV
~u R~u =
~u F
(~u) F
: (~
(2.43)
V

Making use of the trace operation




A : B = tr A B T

(2.44)

we finally find
~u R~u

Z 
T 

~ u)
~ x) dV
: (~
J 1 ~u J 1 (~
V
Z 

T 
~ u)
~ x) dV
=
J 1 ~u (~
: (~

(2.45)

The linearization of the residual R~u with respect to an arbitrary scalar quantity (e.g., the
temperature) that does not infect the deformation gradient F , is derived as follows. Starting from
equation (2.27):
Z

~ 0 (~x) dV0
R~u =
F S :
(2.46)
V0

~ 0 (~x) is again independent from , so we get

Z
~ 0 (~x) dV0
R~u =
( F S + F S ) :

(2.47)

V0

As said before, does not infect F and will vanish from the formula
Z
~ 0 (~x) dV0
F S ) :
R~u =
(F

(2.48)

V0

Writing out F S will give


F S

=
=

F T F F 1 F T F T F T F T
F T

(2.49)

2.5 Linearization of heat balance equation and nonlocal balance equation

and combining these results with equation (2.47), will lead to


Z
~ 0 (~x) dV0
R~u =
F T :

(2.50)

V0

Which leads to the final result when making use of (2.30), (2.31) and (2.36) as follows
Z
~ x) dV
R~u =
J 1 : (~

(2.51)

2.5

Linearization of heat balance equation and nonlocal balance equation

To linearize the balance of heat equation together with the nonlocal formulation, we start with the
residuals of the weak forms, given by equation (2.18) and (2.25)
Z
Z
Z
Z
~
R =
c dV
~qc ()
dV
rc dV +
~qn dS
V
S
ZV
Z V
Z
Z
~ (
~
R =


dV +
c(l)
) dV

dV +
~qn
dS
V

The general form for both, the heat balance equation and the nonlocal formulation is given by
Z
Z
Z
Z
~
R =
f () dV
~qc ()
dV
rc dV +
qn
dS ,
(2.52)
V

with

~qc

n+1 n
=
t
~
0 ()

rc

(2.55)

f ()

(2.56)

~qc
rc

~
c(l) ()

(2.57)

(2.58)

f ()

(2.53)
(2.54)

, the linearization of R is, in terms of the current


Assuming now, that ~qn is independent from
configuration, given by
Z

Z
Z
~

R =
f () dV
~qc () dV
rc dV
(2.59)
V

Making use of
~qc
~
()
~
()

J 1F ~qr
~ 0 ()
= F T
T ~
= F
0 ()

(2.60)
(2.61)
(2.62)

we can write equation (2.59) in terms of the reference configuration


Z

Z
Z
~ 0 () dV0
R =
f () dV0
~qr
rr dV0
V0

V0

(2.63)

V0

Making use of (2.57) and of (2.62) we can write


~ 0 ()
~qc = c F T

(2.64)

2.5 Linearization of heat balance equation and nonlocal balance equation

The flux can be given in terms of the reference configurations as follows:


~qr

= J F 1 ~qc
~ 0 ()
= c J F 1 F T

(2.65)

or, applying the definition


~qs := F ~qr

(2.66)

as
~qr

~
F T )
= F 1 (cJF
1

= F ~qs

(2.67)

Where the subscript s is a temporary state which will be used for simplicity reasons. Now, the
linearization of R can be reformulated as
Z

Z
Z
~
F 1 ~qs ) ()
R =
f () dV0
(F
dV0
rr dV0
(2.68)
V0

V0

V0

The next step is calculating the linearization of R with respect to the increment of displacement
Z
Z

1

~
~u F ~qs + F ~u ~qs 0 () dV0
~u rr dV0
(2.69)
~u R =
V0

V0

Because
F F 1 ) = ~uF F 1 + F ~uF 1 = 0
~u (F

(2.70)

we find
~uF 1

=
=

F 1 ~uF F 1
F
~ 0 (~u ) F 1
F 1
F

(2.71)

Now, the linearization of ~qs with respect to the incremental displacement is given by
~ 0 ()
~u ~qs = c ~u (J F T )

(2.72)

When making use of


J

FT
J F T : F

and using equation (2.41) we can write


~u (J F T )

~u J F T + J ~uF T
F T J F T ~uF T F T
= (J F T : ~u F T )F
F T : ~u F T ) J F T F T ~u F T J F T
= (F


=
J F T F T F T J F T [~u F ]
=

(2.73)

where we use the function defined as follows (for proof see appendix A)
A C } [B
B]
A B T C = {A

(2.74)

A : B ) C = {C
C A } : [B
BT ]
(A

(2.75)

and of

Combined this will be




~u ~qs =
~qs F T F T ~qs ~uF


~ 0 (~u)
=
~qs F T F T ~qs

(2.76)

10

2.6 Summary

Finally, the linearization of R with respect to the incremental displacement in terms of the
reference configuration will be
Z 



~ 0 (~u)
~ 0 () dV0
~u R =
F 1 II 2 F 1 ~qs + ~qs F T F T ~qs
V0
Z

~u rr dV0
(2.77)
V0

Or in terms of the current configuration


Z 

~ u) ()
~
~u R =
{II 2 ~qc + ~qc I I ~qc } (~
dV
V
Z

~u rc dV

(2.78)

Where 2 is a special function (see appendix A)


A B C =
A B ~c =

A 2 C} B
{A
A 2 ~c} B
{A

(2.79)
(2.80)

To derive the linearization of R with respect to we start with equation (2.68)


Z
Z
Z
1

~
F
R =
f () dV0
(F ~qs ) 0 () dV0
rr dV0
V0

V0

(2.81)

V0

The linearization of ~qs to is given by


~ 0 ()
~qs = c J F T

(2.82)

When using this result in equation (2.80) we get the linearization of R with respect to in the
reference configuration
Z
Z
~ 0 ())
~ 0 () dV0
F 1 F T
R =
f () dV0
(c J)(F
V0
V0
Z

rr dV0
(2.83)
V0

or in terms of the current configuration as


Z
Z
Z
~
~
R =
f () dV +
c () () dV
rc dV
V

2.6

(2.84)

Summary

We started with the weak form of the momentum balance (2.9)


Z
Z
Z
~
~
~
R~u =
: ~x dV + (x
b) ~x dV ~t ~x dS = 0
V

(2.85)

The linearization to ~u is given by


Z 

T 
1
~
~ x) dV
~u R~u =
J ~u (~u)
: (~

(2.86)

Now, making use of the function , we can write


)
Z (

1
~ u)] : ((~
~ x) dV
I [(~
~u R~u =
J
~ u)
(~
V

(2.87)

2.6 Summary

11

The linearization to is given by




Z

~ x) dV
R~u =
: (~
J 1

(2.88)

For the general nonlocal balance equation, we started with the weak form of it
Z
Z
Z
Z
~

R =
f () dV
~qc () dV
rc dV +
qn
dS
V

(2.89)

Then, the linearization of it with respect to ~u is given by


Z 

~ u) : ()
~
~u R =
{II 2 ~qc + ~qc I I ~qc } (~
dV
V
Z
rc
~ u) dV
: (~

~ u)
V (~
and the linearization with respect to by
Z
Z
Z
f ()
rc
~
~
R =
dV +
dV
c () () dV

V
V
V

(2.90)

(2.91)

Chapter 3

Finite element framework


In this chapter the implementation of the finite element framework will be discussed. We continue
from Chapter 2, where we derived the linearization of the momentum balance and the general
nonlocal balance equation.

3.1

Finite element approximation

For simplicity, only linear two dimensional triangular elements in plain-strain condition will be
treated. The shape functions of the element shall be given as

1 1 2
~ = 1
~ ()

N
(3.1)
2
With i being the local coordinates of the master element (see Fig. 3.1)

Figure 3.1: Linear triangular master element with one integration point

Furthermore we have
~ =
~
~ ()
i ()
~ Ei N
~ = xE N
~
~ ()
~x()
~ = XE N
~
~ )
~ ()
X(
~ = u
~
~ ()
uE N
~u()
~
~x()

~
~ ()
xE N
= x

(3.2)

3.1 Finite element approximation

13

and
~ ei =
i ()e
~

~ ei
~ ())
(~
Ei N
~
~ ()
= (eei
~ Ei ) N
~
~ ()
= E N

(3.3)

In case of linear triangular elements, we actually have




x1 x2 x3
xE =
y1 y2 y3

XE

=


uE
u

=


xE
x

X1
Y1

X2
Y2

ux1
uy1
x1
y1

X3
Y3

ux2
uy2

x2
y2

(3.4)

x3
y3

(3.5)
ux3
uy3


(3.6)


(3.7)

~ Ei

i1
= i2
i3

(3.8)

and

i1
= i2
i3

~
Ei

(3.9)

With the above formulations it is possible to derive the finite element approximation of the gradient, which is needed for equations (2.85)-(2.91) from chapter 2.
In general we have
d~

= dx1

+ dx2
+ dx3
x1
x2
x3

~ ) d~x
= (~

(3.10)

Making use of
~ d~ ,
d~x = ~x

(3.11)

we can write equation (3.10) as


~ d~
d~
=
~

(3.12)

~ ) as follows
Now we can write (~
~ )
(~

~ ) (~x
~ )1
(~

~
~ ) (~x
~ )1
= E (N
= E g
=

(3.13)

and consequently
~ u)
(~
~ x)
(~

uE g
u

xE g
= x

(3.14)

14

3.1 Finite element approximation

For scalar quantities we have


d

~ d~x
=
~
= d~

(3.15)

Now we can show that


~ )T
d~ (~x
~ )T
(~x

~
~ d~
()
=
~
~
~ )T
()
= (N
~E
T
~
()
= g
~E

(3.16)

The last formulation we need is the deformation gradient tensor F . Therefore we start with deriving
the gradient operator with respect to the reference configuration
~ 0 (~

~ ) (X
~
~ x )1
(~

~
~ ) (X
~
~ )1
= E (N
= E G
=

(3.17)

Then F will be
F = xE G

(3.18)

Now we can continue by rewriting the residuals and the variations of it, given in equations (2.85) (2.91). Neglecting the inertia terms, we get the following simplification of equation (2.85)
Z
Z
ext
~b ~x dV + ~t ~x dS = f~uS
~xS
(3.19)
V

ext
is the nodal force vector and ~xS the vector of virtual nodal displacement. Now we
where f~uS
have for the residual of the momentum balance equation
XZ
ext
xE g ) dV f~uS
R~u =
: (x
~xS
V

XZ
E

~u R~u

=
=
=
=

~ u)
(~

uE g ] : (x
xE g ) dV
[u

uE g ] g T : x
xE dV
C : [u

2] g T
C [2


2 g ] [u
uE ] : x
xE dV
[2

J 1

XZ

~ x) dV
: (~

xE g ) dV
: (x

V
E


XZ

xE dV
J 1
g T : x

V
E



X Z

~ ~
xE dV
J 1
gT N
E : x

V
E

(3.21)

XZ
E

uE g ] : (x
xE g ) dV
C : [u

X Z 
E

R~u

(3.20)

XZ
E

XZ
E

XZ
E

ext
xE dV f~uS
g T : x
~xS

J 1

(3.22)

3.2 Assembling of global system

15

and for the general nonlocal heat balance equation


Z
Z
Z
XZ
R =
f () dV +
~qc () dV
rc dV +
qn
dS
V

~ ) ~qc g T ~
~ ) dV +
f () (~
E N
E rc (~
E N

~ ) dS
qn (~
E N

X Z

~ g ~q r N
~ dV +
f () N
c
c

~u R

XZ

qn

~ dS
N


~
E

(3.23)

Z 


~ u) ()
~
{II 2 ~qc + ~qc I I ~qc } (~
dV

!
rc
~ u) dV
: (~

~ u)
V (~
XZ

uE g ) g T ~

({II 2 ~qc + ~qc I I ~qc } u


E dV




uE g T ~
II 2 g ~qc + ~qc g T g T ~qc u
E dV

rc
uE
g T : u
~ u)
(~

XZ
E

!


rc
~ dV
uE g
: u
~
E N
~ u)
(~

XZ
E

XZ

=
=
=
=

~
~
E N

dV


uE dV
gg 2 g ~qc + g ~qc g T g g T ~qc u

~ rc
N
gT
~ u)
(~

!
uE dV
u

~
E

(3.24)

X Z f ()
r
~
~
dV + c ()
: ()
c dV

V
E
Z
X
r
f ()
~ ) + c g ()
~
~ ) dV
(~
E N
~
E c (~
E N

V
E

X Z f ()
r
~)N
~ + c g g T ~
~)N
~ ~
(~
E N
E c (~
E N
E dV

V
E



X Z  f ()
~ N
~ + c g g T rc N
~ N
~ ~
N
E ~
E dV
(3.25)

V
E

3.2

Assembling of global system

For the final assembling of the linear system of equations a transformation of the derived tensor
expressions to the corresponding row-array notation is needed. The equations (3.20)-(3.25) will
change to.
!
XZ

T R
R
x
R~u =
g
dV : x
f~ext ~xS
(3.26)
E

uS

16

3.2 Assembling of global system

~u R~u

X Z 

X Z

X Z

uR
xR
[u
E ] : x
E

(3.27)

~
gT N

R
dV

xR
~
E : x
E
Z

qn

~ dS
N

(3.28)


~
E

(3.29)

X Z 

gg 2 g

~qc

+g

~qc

g g g

R
~qc


dV

uR
u
E
E ~

(
X Z
E

~ g ~qc rc N
~ dV +
f () N

R
2 g ] dV
[2

~u R

R~u

2] g T
C [2

~
N

rc
~ u)
(~

)R
gT

dV

uR
u
E
E ~

(3.30)

X Z f ()
~ N
~ + c g g T rc N
~ N
~ dV ~
N
E ~
E

(3.31)

Where the subscript R represents row notation. The linear system of equation can now be formulated as followed
! 

 
 


K ~u~u K ~u
~u
~x
f~u
~x

(3.32)
K ~u K
~

f~
In what follows we use instead of , because we are restricting to thermo-elasticity. As we are
dealing here with constant strain elements, the element volume can be expressed as
1
J)
t det(J
2
Where J is the Jacobian tensor, defined as
V

(3.33)

~ N
~T
J = XE

(3.34)

Thus, the element stiffness matrixes are given as




R
1
J ) C [2
2] g T [2
2 g]
K ~E
t det(J
u~
u =
2
K ~E
u =

1
J ) J 1
t det(J
2

T
~
g N

(3.35)

R
(3.36)

KE
~
u

(
)R

1
r

T
T

T
~
J ) gg 2 g ~q + g ~q g g g ~q + N
g
= t det(J
~ u)
2
(~

KE

1
J)
= t det(J
2

f () ~
~ + c g g T r N
~ N
~
N N

(3.37)


(3.38)

Our framework is completed by obtaining the Right Hand Side. We derive these terms from
equation (3.26) and (3.29) with making use of the row convention.
f~~uE

f~E

R
1
J ) gT
t det(J
2


1
~ g ~q r N
~
J ) f ()N
t det(J
2

(3.39)
(3.40)

3.3 Algorithmic tangent for thermo-elasticity

3.3

17

Algorithmic tangent for thermo-elasticity

Above we derived the general framework for calculating the stiffness matrix K and the right
hand side f~int . Now, the last step is to derive the algorithmic tangent for our specific material
formulation
Starting with the constitutive law for the kirchhoff stress as
V ) (3 0 + 2 0 ) 0 ( 0 ) I
= ({0 I I + 2 0 I 2 I } lnV

(3.41)

with
0

V
lnV

E
(1 + )(1 2 )
E
2 (1 + )
3
X

ln(di ) ~vi ~vi

(3.42)

i=0

where
E

Youngs modulus

Poisson ratio

Left stretch tensor =

di

Eigenvalue

~vi

Eigenvector

Expansion coefficient

Current temperature

Initial temperature

B = F FT

The derivation of with respect to is simply given by

= (3 0 + 2 0 ) 0 I

(3.43)

The derivation of with respect to F can be calculated as

F
F

{0 I I + 2 0 I 2 I }

V
lnV
F
F

(3.44)

Knowing that

V = B
1
ln V = ln B
2

(3.45)
(3.46)

we can write equation (3.44) as follows

F
F

{0 I I + 2 0 I 2 I }

B
1 lnB
F
2 F

(3.47)

were we can write


B
ln B
ln B B
=
F
B F
F
F
B
Now, the first term can be writen as described by Silhavy [10]


ln B
= Hij e i e j e i e j
B
B

(3.48)

(3.49)

18

3.3 Algorithmic tangent for thermo-elasticity

with
(
Hij =

ln(bi )ln(bj )
bi bj
1
bi

if bi 6= bj
if bi = bj

(3.50)

and
B = bi e i e i

(3.51)

and the second term as


F
FT
F
F
FT +F
F
F
F
F


F
F
=
I 2FT +F I
F
F


T
=
I 2F +F I

B
B
F
F

(3.52)

This will lead to the final equation

1
= {0 I I + 2 0 I 2 I }
F
F
2

B
lnB
B
B



I 2 FT +F I

Next, we calculate the elasticity tensor C. From equation (3.21) we know


(
)

C = J 1
I
~ u)
(~

(3.53)

(3.54)

As
~ ~x )F
~ ~u ) F
F = (
F = (

(3.55)

and thus
~ u) F
F = (~
F

(3.56)

we can write

=
=
=

F
F
F
F
~
(~u) F
F
F

~ u)]
{II 2 F } [(~
F
F

(3.57)

Now, we can write the Kirchhoff stress as

= n +

~ u)]
= n +
{II 2 F } [(~
F
F

(3.58)

~ u)
When now taking the derivative of with respect to (~

~ u)
(~

{II 2 F }
F
F

we can write



C = J 1
{II 2 F } I
F
F

(3.59)

(3.60)

3.3 Algorithmic tangent for thermo-elasticity

Furthermore, we assume that




n+1 n
f () =
0 c0
t
f ()
0 c0
=

dt

19

(3.61)

with
0

Initial density

c0

Initial isochoric heat capacity

dt

Time increment

The Matlab script containing the above formulas is given in appendix B. Because these formulas
are rather straight forward, no futher explanation is necessary.

Chapter 4

Abaqus User-element
In the previous chapters, the stiffness matrix and right hand side vector were determined. This
chapter will deal with the implementation of these formulas in the UEL subroutine. The input file,
which will call the subroutine, will also be discussed.

4.1

UEL Template

The User-element Template can either be written in C-code or in Fortran. Here we discuss the
C-code version. In order to run the script, include statements are necessary. Besides the standard
include statement, the files created by transforming the Matlab code into C-code should also be
included.
#include
#include
#include
#include

"uelement.c"
"rtwtypes.h"
"rt nonfinite.h"
"rt nonfinite.c"

The UEL template is given as follows


UEL(RHS, AMATRX, SVARS, ENERGY, NDOFEL, NRHS, NSVARS,
1 PROPS, NPROPS, COORDS, MCRD, NNODE, U, DU, V, A, JTYPE, TIME, DTIME,
2 KSTEP, KINC, JELEM, PARAMS, NDLOAD, JDLTYP, ADLMAG, PREDEF, NPREDF,
3 LFLAGS, MLVARX, DDLMAG, MDLOAD, PNEWDT, JPROPS, NJPROP, PERIOD)
The important parameters, which are used to calculate the linear system of equations as derived
in chapter 3, are given as:
COORDS, Array in which the original coordinates of the elements are stored
U, Array that contains the total values of all variables (DOFs)
DU, Incremental values of all variables
DTIME, Increment of time
PROPS, Material properties like Youngs Modulus, and temperature related properties
The stiffness matrix K of the complete system, and the residual vector f~ should be returned
to Abaqus in AMATRX and RHS, respectively. In SVARS, user-defined variables like stresses,
temperature, damage, etc., can be stored and returned to Abaqus
The user-defined routine should be called as follows:

4.2 Input file

21

uelement(U, DU, *DTIME, COORDS, PROPS, SVARS, RHS, AMATRX);


The complete template with explanation of all statements is given in appendix C

4.2

Input file

The input file is used to give the model information to the Abaqus solver. This file should contain
information about which elements should be used, what kind of boundary conditions will be applied
and how the geometry of the model is defined. The differences for a User-element job will be
discussed here. A copy of a complete input file is given in appendix D.
By the "*USER ELEMENT" statement the first parameter to set is the "TYPE". This parameter
is the name of the element. The only condition the name must satisfy, is that it has to start with
the letter u. Next, the "COORDINATES" need to be set. This number represents the amount of
degrees of freedom. The third setting is the "PROPERTIES" setting. This number is the amount
of properties used in the User-element. Finally, the "VARIABLES" should be set. This number
depends on the user-defined variables, which are saved in SVARS.
With the next example, the above settings will be clarified.
*USER ELEMENT, TYPE=u3, COORDINATES=3, PROPERTIES=10, VARIABLES=6
Here, there are three degrees of freedom, e.g. x, y, , 10 properties (e.g. Paisson ratio, Youngs
modulus, heat capacity, etc.) and 6 variables (e.g. 11 , 22 , 33 , 12 , 13 , V M ).
The above settings can be completed with assigning the order of receiving and sending the variables
of the degrees of freedom. This could be best explained with the above example. There are three
conceptual differences possible listed below
*User element, ...
Variables=9
1,
1, 2
1, 11

*User element, ...


Variables=9
1, 2, 11

*User element, ...


Variables=7
1, 1, 2, 11
2, 11
3, 1, 2, 11

In Abaqus, the degrees of freedom have different numbers, here 1 represents displacement x, 2
displacement y and 11 temperature . For a complete overview of the convention of degrees of
freedom in Abaqus, see appendix E. The stiffness matrix and residual vector should be calculated
in the same order as mentioned in table (4.1)
The equations for calculating the stiffness matrix and residual vector are in this report done by
the first call, so first all x components, than y and finally .
Abaqus does not support User-element visualizations. Therefore we write out the result data
in a file which we later use to create visual results. The output that will be saved in this file
can be set by "*EL PRINT, ELSET=ALL, POSITION=INTEGRATION POINT" and "*Node
print". Here we can assign stresses, temperatures, displacements, forces, etc. to be written out.

4.3

Obtaining Results

As said before, Abaqus does not support User-element visualizations. An example of a results
directly opened from a User-element job is given in figure 4.1

22

4.3 Obtaining Results

DOF
call 1
x1
x2
x3
y1
y2
y3
1
2
3

DOF
call 2
x1
y1
1
x2
y2
2
x3
y3
3

DOF
call 3
x1
y1
1
2
x3
y3
3

Table 4.1: Results of different formulations for degrees of freedom

Figure 4.1: Result of a job with User-elements directly opened

Displacements can be visualized, but only with pointers as can be seen above. The other
variables like temperature or stresses can not be displayed. In the user manual of Abaqus is written
that plotting User-elements is not supported, but, if the User-element contain displacement degrees
of freedom, they can be overlaid with standard elements with no stiffness. With this method,
only the displacements can be visualized. In order to visualize also stresses, temperatures, etc.,
use is made of a Python script. This script first reads the input file (*.inp) and extracts there
the information of the node-locations and which node-series form elements. Secondly it reads
the result file (*.dat) and extracts here the values for the different variables e.g. displacements,
stresses, temperatures, etc. The third step is to create a standard Abaqus result file containing
the values of the User-element job. This new *.odb file will be created with standard, in this case,
linear-triangular elements. The corresponding Python script is given in appendix F.

Chapter 5

Results
In this chapter, the results of the thermo-elastic User-element will be discussed first. Later, we
also take a look at a thermo-viscoplastic element, with an additional damage formulation.

5.1

Test environment

To test the User-element performance, we calculate a tension specimen, as introduced by Sievert


et al.[9]. The specimen contains two notches of 0.4 mm by 0.4 mm, see figure 5.1. If the one end is
forced to move, stresses will concentrate at the two notches. Later, when also considering softening
effects (e.g. thermal softening, damage), shear-bands will spread from the two notches under 45 .
Sievert et al. determined empirically, that when the notches are under 17 and the displacement
is high enough, the shear-bands from both sides will coincide.
15. mm
9. x 3. mm

17

Figure 5.1: Model of Sievert

5.2

Thermo-elastic element

To show results of the thermo-elastic User-element, we first take a look at the purely thermal
performance of the element. Thus, displacements will be set to zero and the left side of the
specimen will be heated with a constant temperature of 350 K. The rest of the nodes will have
an initial temperature of 300 K. Now, during the course of the process, the overall temperature of

24

5.2 Thermo-elastic element

the specimen will increase. This is depicted in figure 5.2. The two parameters that are important

DOF1
+3.500e+02
+3.458e+02
+3.417e+02
+3.375e+02
+3.333e+02
+3.292e+02
+3.250e+02
+3.208e+02
+3.167e+02
+3.125e+02
+3.083e+02
+3.042e+02
+3.000e+02

DOF1
+3.500e+02
+3.458e+02
+3.417e+02
+3.375e+02
+3.333e+02
+3.292e+02
+3.250e+02
+3.208e+02
+3.167e+02
+3.125e+02
+3.083e+02
+3.042e+02
+3.000e+02

(a) 5 seconds

(b) 10 seconds

Figure 5.2: 5 and 10 seconds exposure time

for the thermal property of this element are the isochoric heat capacity cv0 , and the density .
In the formulas derived in chapter 3, these parameters are connected multiplicative to each other,
therefore only the heat capacity will be varied. By increasing this parameter, more energy is
needed to increase the temperature. In figure 5.3 the average temperature on the right side of the
specimen, with varying heat capacity cv0 , is depicted.

Varying the heat capacity


360

350

Temperature [K]

340

330

Low
Middle
High

320

310

300

290
0

Time [-]

Figure 5.3: Varying the heat capacity

5.3 Thermo-viscoplastic element

25

Next, the Abaqus-element and the User-element will be compared. In figure 5.4, the equivalent
Von Mises stress is plotted for both elements. The displacement is set to 0.1 mm, the initial
temperature to 300 K.
These results are almost identical, when keeping deformations small. When calculations are done

SDV6
(Avg: 75%)
+3.720e+03
+3.410e+03
+3.100e+03
+2.790e+03
+2.480e+03
+2.170e+03
+1.860e+03
+1.550e+03
+1.240e+03
+9.300e+02
+6.200e+02
+3.100e+02
+0.000e+00

S, Mises
(Avg: 75%)
+3.720e+03
+3.410e+03
+3.100e+03
+2.790e+03
+2.480e+03
+2.170e+03
+1.860e+03
+1.550e+03
+1.240e+03
+9.300e+02
+6.200e+02
+3.100e+02
+0.000e+00

(a) V M User-element

(b) V M Abaqus-element

Figure 5.4: V M for User- and standard-element

outside this region (for metals, generally inside the plastic region), the results will not exactly be
equal. This is visualized in figure 5.5, where the average reaction force (on the right side) is plotted
versus the displacement.

Force vs. Displacement

Force vs. Displacement

14

600

12

500

10

User-element
Abaqus

Force [kN]

Force [kN]

400
8

User-element
Abaqus

300

200
4
100
2
0

0
0

0.02

0.04

0.06

0.08

0.1

0.12

Displacement [mm]

(a) Elastic deformation

0.5

1.5

2.5

3.5

4.5

Displacement [mm]

(b) Plastic deformation

Figure 5.5: Force vs. displacement with different displacements

5.3

Thermo-viscoplastic element

In this report a general framework is given for implementing User-elements. In succession of this
work, C. Hortig [5] implemented a User-element that contains four degrees of freedom, displacements u1,2 , temperature and damage d. With this element, calculations can be done within the

26

5.3 Thermo-viscoplastic element

plastic region. The material model is based on the Johson-Cook model. To give a small insight
into the possibilities of User-elements, some results of this element will be shown.
First, we take a look at the damage quantity. In figure 5.6 two stages of a developing crack are
shown. In order to visualize the crack development, elements showing damage greater than 95%
are not depicted.

DOF2
+1.000e+00
+9.167e01
+8.333e01
+7.500e01
+6.667e01
+5.833e01
+5.000e01
+4.167e01
+3.333e01
+2.500e01
+1.667e01
+8.333e02
+0.000e+00

DOF2
+1.000e+00
+9.167e01
+8.333e01
+7.500e01
+6.667e01
+5.833e01
+5.000e01
+4.167e01
+3.333e01
+2.500e01
+1.667e01
+8.333e02
+0.000e+00

(a) Crack half way

(b) Crack complete trough

Figure 5.6: Crack growth in damage model

The damage can be controlled by varying the nonlocal parameter l. By increasing this parameter,
the damage will spread out wider and will result in a overall more ductile behavior. In figure 5.7
the force on the right side is plotted versus displacement, for different values of the internal length
parameter.

Varying internal length parameter


9
8
7

Force [kN]

6
Int. l. 0.025
Int. l. 0.05
Int. l. 0.1
Int. l. 0.2
Int. l. 0.4

5
4
3
2
1
0
0

Displacement [mm]

Figure 5.7: Varying the internal length

10

Chapter 6

Conclusions and
Recommendations
In order to predict the structural behavior of products, such as the response on thermal and
mechanical loads, Finite Element Method (FEM) programs are used. Advanced users implement
their own elements more frequently, in order to solve non-standard problems. Abaqus, one of the
commercial FE codes, offers an interface for that.
This report constructs a general framework for creating User-elements, using a thermo-elastic
element as an example. Therefore the constitutive framework for this thermo-elastic element is
derived and implemented in the general framework. This framework is mainly written in Matlab
and then compiled to C-code, as developing in Matlab is more user-friendly than in C-code.
The results of a comparison between a standard Abaqus-element and a User-element, given in
chapter 5.2, show good comparable results in the elastic region. However, due to differences in
their constitutive material formulation, these results will never be exactly the same.
Additionally, the results of a thermo-viscoplastic element (chapter 5.3) are investigated. These
results show the trend that special details of material formulations can be implemented in a fairly
straight forward fashion.
In order to increase the functionality, the Python script, which is used to create a visual result
file, should be expanded. This means, that the script should recognize different (standard) elements
and that more user variables can be included. Now, the Python script can read linear triangular
and quadratic elements and the maximum number of user variables is eight.

Bibliography
[1] Abaqus, 2009. Online documentation version 6.9
[2] Chadwick, P., 1999. Continuum mechanics. Concise theory and problems. ISBN 0-486-40180-4
[3] Feih, S., 2005. Development of a user element in ABAQUS for modelling of cohesive laws in
composite structures. ISBN 87-550-3410-1
[4] Geers, M.G.D., Baaijens, F.P.T., Schreurs, P.J.G. Continuum Mechanics for Advanced Manufacturing Technologies, lecture notes - course 4C600
[5] Hortig, C., Svendsen, B., 2009. Local and non-local FE-simulations of high-speed cutting
proccesses
[6] Kouznetsova, V. Non-linear Finite Element Method for Solids, lecture notes for the course
4K440
[7] Peerlings, R.H.J. Finite Element Method,
elementenmethode 4A4700

lecture notes for the course Eindige-

[8] Peerlings, R.H.J., Geers, M.G.D., de Borst, R., Brekelmans, W.A.M., 2001. A critical comparison of nonlocal and gradient-enhaced softening continua.
[9] Sievert, R., Noack, H.-D., Clos, R., Schreppel, U., Veit, P., Hamann, A. and Klingbeil, D.,
2003. Simulation of failure under dynamic leading at different states of triaxiality for a nickelbase superalloy
[10] Silhavy, M., 1997. The mechanics and thermodynamics of continuous media
[11] Smith, I.M., Griffiths, D.V., 2006. Programming the Finite Element Method, 4th edition.
ISBN 0-470-84970-3
[12] Wriggers, P., 2001. Nichtlineare Finite-Element-Methoden. ISBN 3-540-67747-X

Appendix A

Special Tensor operations


A B

Aij Bkl (~ei ~ej ) (~ek ~el )

Aij Bjl (~ei ~el )

Aik Bkj (~ei ~ej )

A BT

A : B

Aij Bkl (~ei ~ej ) (~el ~ek )

Aij Bkj (~ei ~ek )

Aik Bjk (~ei ~ej )

(A.1)

(A.2)

= Aij Bkl (~ei ~ej ) : (~ek ~el )


= Aij Bij

A B C

(A.3)

= Aij Bkl Cmn (~ei ~ej ) (~ek ~el ) (~em ~en )


= Aij Bkl Cln (~ei ~ej ) (~ek ~en )
= Aij Bjl Cln (~ei ~en )
= Aij Cln (~ei ~en ~ej ~el )Bjl (~ej ~el )
= Aik Clj (~ei ~ej ~ek ~el )Bkl (~ek ~el )
A 2 C} B
= {A

A BT C

(A.4)

= Aij Bkl Cmn (~ei ~ej ) (~el ~ek ) (~em ~en )


= Aij Bkl Ckn (~ei ~ej ) (~el ~en )
= Aij Bkj Ckn (~ei ~en )
= Aij Ckn (~ei ~en ~ek ~ej )Bkj (~ek ~ej )
= Ail Ckj (~ei ~ej ~ek ~el )Bkl (~ek ~el )
A C} B
= {A

B C]
A : [B

(A.5)

= Aijkl Bmn Cop (~ei ~ej ~ek ~el ) : [(~em ~en ) (~eo ~ep )]
= Aijkl Bmn Cnp (~ei ~ej ~ek ~el ) : [(~em ~ep )]
= Aijkl Bkn Cnl (~ei ~ej )
= Aijkl Cnl (~ei ~ej ~ek ~en )Bkl (~ek ~en )
= Aijkm Clm (~ei ~ej ~ek ~el )Bkl (~ek ~el )
2 C ]} [B
B]
= {A [2

(A.6)

30

B C]
A : [B

Aijkl Bmn Cop (~ei ~ej ~ek ~el ) : [(~em ~en ) (~eo ~ep )]

Aijkl Bmn Cnp (~ei ~ej ~ek ~el ) : [(~em ~ep )]

Aijkl Bkn Cnl (~ei ~ej )

Aijkl Bkn (~ei ~ej ~en ~el )Cnl (~en ~el )

Aijml Bmk (~ei ~ej ~ek ~el )Ckl (~ek ~el )


B 2 ]} [C
C]
= {A [B

(A.7)

A B ~c = Aij Bkl cm (~ei ~ej ) (~ek ~el ) ~em


= Aij Bkl cl (~ei ~ej ) e~k
= Aij Bjl cl (~ei )
= Aij cl (~ei ~ej ~el )Bjl (~ej ~el )
= Aij ck (~ei ~ej ~ek )Bjk (~ej ~ek )
A 2 ~c} [B
B]
= {A
A B T ~c =

Aij Bklcm (~ei ~ej ) (~el ~ek ) ~em

Aij Bkl ck (~ei ~ej ) e~l

Aij Bkj ck (~ei )

Aij ck (~ei ~ek ~ej )Bkj (ek ~ej )

Aik cj (~ei ~ej ~ek )Bjk (~ej ~ek )


A ~c} [B
B]
{A

(A.8)

(A.9)

Appendix B

Matlab Script
1

%#eml

2
3

function [SVARS, RHS, K] = uelement(U, DU, DTIME, COORDS, PROPS)

4
5

DRPLDEten = zeros(2,2);

6
7

= [1 0 0; 0 1 0; 0 0 1];

8
9
10
11
12
13
14
15
16
17
18

Emodulus
nu
alpha0
theta0
t
rpl
DThetarpl
rho0
cv0
k0

=
=
=
=
=
=
=
=
=
=

PROPS(1);
PROPS(2);
PROPS(3);
PROPS(4);
PROPS(5);
PROPS(6);
PROPS(7);
PROPS(8);
PROPS(9);
PROPS(10);

19
20
21
22
23
24

if DTIME == 0;
Dt = 1;
else
Dt = DTIME;
end

25
26
27
28
29

xi1
xi2
N
DN

=
=
=
=

1/3;
1/3;
[ 1 - xi1 - xi2 ; xi1 ; xi2 ];
[-1 -1
; 1
0; 0
1];

30
31
32

lambda0
mu0

= (Emodulus*nu)/((1+nu)*(1-2*nu));
= Emodulus/(2*(1+nu));

33
34
35

j = [ -(COORDS(1)+U(1))+(COORDS(4)+U(2)) -(COORDS(1)+U(1))+(COORDS(7)+U(3))
-(COORDS(2)+U(4))+(COORDS(5)+U(5)) -(COORDS(2)+U(4))+(COORDS(8)+U(6)) ];

36
37
38

J = [ -COORDS(1)+COORDS(4)
-COORDS(2)+COORDS(5)

-COORDS(1)+COORDS(7)
-COORDS(2)+COORDS(8) ];

39
40
41
42

F
= zeros(3,3);
F(1:2,1:2) = j * inv(J);
F(3,3)
= 1;

43
44
45
46
47

Thetan
Theta
Thetap
g

=
=
=
=

(transpose([ U(7);
U(8);
U(9) ])
* N);
(transpose([ U(7)-DU(7); U(8)-DU(8); U(9)-DU(9) ])* N);
(Thetan-Theta)/Dt;
DN * inv(j);

32

48
49

= F * transpose(F);

[v, d]

= eigenvalues(B);

50
51
52
53
54
55
56
57
58
59
60
61
62

lnV
= 1/2 * LnDyadicEig(d(1,1),d(2,2),d(3,3),v(:,1),v(:,2),v(:,3));
if abs(lnV(1,1)) 1e-12
lnV(1,1) = 0;
end
if abs(lnV(2,2)) 1e-12
lnV(2,2) = 0;
end
if abs(lnV(3,3)) 1e-12
lnV(3,3) = 0;
end

63
64

TAU

65

= T4dotT2((lambda0*DyadicT4(I,I)+2*mu0*T2BoxT2(I,I,3,3,3,3)),lnV,3,3,3,3)- ...
((3 * lambda0 + 2*mu0)*alpha0 * (Thetan - theta0) * I );

66
67
68
69
70

Sigmar = Sigmarow(1/det(F) * TAU);


Sigma
= 1/det(F) * TAU;
Sigmavm = sqrt(1/2*(Sigmar(1)-Sigmar(5))2+(Sigmar(5)-Sigmar(9))2 + ...
(Sigmar(9)-Sigmar(1))2+6*(Sigmar(2)2));

71
72

dTAUdtheta = PlaneStrain(-(3*lambda0 + 2*mu0) * alpha0 * I);

73
74
75
76
77

dlnBdB = caldlnBdB(v,d);
dBdF
= T2BoxT2(I,transpose(F),3,3,3,3)+T2DeltaT2((F),I, 3,3,3,3);
dTAUdF = T4dotT4((lambda0 * DyadicT4(I,I) + ...
2*mu0 * T2BoxT2(I,I,3,3,3,3)),1/2 * T4dotT4(dlnBdB,dBdF));

78
79

CTen = T4dotT4(dTAUdF,T2BoxT2(I,F,3,3,3,3));

80
81

detj = det(j);

82
83

qcvec = -k0 * transpose(g) * [ U(7); U(8); U(9) ];

84
85

fuint

= (1/2*t*detj*T2toT1row(PlaneStrain(Sigma)*transpose(g)));

Kuu

= (T4toT2row(1/2 * t * detj * ...


T4IBoxT2I(T4IBoxIT2(CTen,transpose(g),2,2,2,3,2,2),g,2,3,2,2,3,2)));

Kutheta

= (T21toT2row(1/2 * t * detj * DyadicT2T1(1/det(F)*dTAUdtheta * ...


transpose(g),N,2,3,3)));

fthetaint

= (1/2 * t * detj * (rho0 * cv0 * Thetap * N - g * qcvec - rpl * N));

Kthetau

= (T12toT2row(-1/2 * t * detj * ...


(-T2BoxT1(g,g*qcvec, 3, 2, 3) + ...
DyadicT1T2(g * qcvec, transpose(g), 3 , 2, 3) - ...
T2DeltaT1(g*transpose(g), qcvec, 3, 3, 2) + ...
DyadicT1T2(N, DRPLDEten * transpose(g), 3, 2, 3) ) ) );

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

Kthetatheta = (1/2 * t * detj * (rho0 * cv0 / Dt * DyadicT2(N,N) + ...


k0 * g * transpose(g) - DThetarpl * DyadicT2(N,N)));

103
104
105
106
107
108
109

Kmatrix = [ Kuu
Kutheta
Kthetau Kthetatheta ];
RHS
= -transpose([ fuint ; fthetaint ]);
K
= transpose(Kmatrixtorow(Kmatrix));
SVARS
= transpose([Sigmar(1),Sigmar(5),Sigmar(9),Sigmar(2),Sigmar(3),Sigmavm]);
end

110
111
112
113
114

function [v, d] = eigenvalues(A)


if abs(A(1,2)) 1e-12
v = [1 0 0;0 1 0;0 0 1];
d = A;

33

115
116

else
d = [ 1/2*A(2,2)+1/2*A(1,1)+1/2*(A(2,2)2-2*A(1,1)*A(2,2)+A(1,1)2+4*A(1,2)2)(1/2)
0
0
1/2*A(2,2)+1/2*A(1,1)-1/2*(A(2,2)2-2*A(1,1)*A(2,2)+A(1,1)2+4*A(1,2)2)(1/2) 0
0
0
1 ];
v1 = -(-1/2*A(2,2)+1/2*A(1,1)-1/2*(A(2,2)2-2*A(1,1)*A(2,2)+A(1,1)2+4*A(1,2)2)(1/2))/A(1,2);
v2 = -(-1/2*A(2,2)+1/2*A(1,1)+1/2*(A(2,2)2-2*A(1,1)*A(2,2)+A(1,1)2+4*A(1,2)2)(1/2))/A(1,2);

0
117

118

119
120
121

122
123
124
125
126

= [

1/sqrt(v12+1) 1/sqrt(v22+1)
v1/sqrt(v12+1) v2/sqrt(v22+1)
0
0

0
0
1 ];

end
end

127
128
129
130
131
132
133
134
135

function [output] = PlaneStrain(A)


output=zeros(2,2);
for i = 1:2
for j = 1:2
output(i,j) = A(i,j);
end
end
end

136
137
138
139

function [output] = LnDyadicEig(a,b,c,D,E,F)


output = log(a)*DyadicT2(D,D)+log(b)*DyadicT2(E,E)+log(c)*DyadicT2(F,F);
end

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

function [output] = T4dotT2(A,B,I,J,K,L)


r=1;
output = zeros(3,3);
c
= zeros(1,9);
for j = 1:J
for i = 1:I
for l = 1:L
for k = 1:K
c(r) = A(k,l,i,j)*B(k,l);
r=r+1;
end
end
r=1;
output(i,j) = sum(c);
end
end
end

158
159
160
161
162
163
164
165
166
167
168
169
170

function [output] = DyadicT4(A,B)


output = zeros(3,3,3,3);
for i = 1:3
for j = 1:3
for k = 1:3
for l = 1:3
output(k,l,i,j) = A(i,j)*B(k,l);
end
end
end
end
end

171
172
173
174
175
176
177
178

function [output] = T2BoxT2(A,B,I,L,K,J)


output = zeros(3,3,3,3);
for i = 1:I
for j = 1:J
for k = 1:K
for l = 1:L
output(k,l,i,j) = A(i,k)*B(l,j);

34

end

179

end

180

end

181
182
183

end
end

184
185
186
187
188
189
190
191
192
193
194

function [output] = Sigmarow(A)


output = zeros(1,9);
r = 1;
for j = 1:3
for i = 1:3
output(1,r) = A(i,j);
r = r+1;
end
end
end

195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

function [output] = caldlnBdB(v,d)


output = zeros(3,3,3,3);
H
= zeros(3,3);
Z
= zeros(3,3,3,3);
for i=1:3;
for j=1:3
if abs((abs(d(i,i))-abs(d(j,j)))) 1e-12
H(i,j) = 1/d(i,i);
else
H(i,j) = ( log(d(i,i)) - log(d(j,j)) ) / ( d(i,i) - d(j,j) );
end
end
end
for i=1:3
for j = 1:3
Z = H(i,j) * DyadicT4(DyadicT2(v(:,i),v(:,j)),DyadicT2(v(:,i),v(:,j)));
output = output + Z;
end
end
end

216
217
218
219
220
221
222
223
224
225
226
227
228

function [output] = T2DeltaT2(A,B,I,L,K,J)


output = zeros(3,3,3,3);
for i=1:I
for j=1:J
for k=1:K
for l=1:L
output(k,l,i,j) = A(i,l)*B(k,j);
end
end
end
end
end

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245

function [output] = T4dotT4(A,B)


r=1;
output = zeros(3,3,3,3);
c
= zeros(1,9);
for i=1:3
for j=1:3
for o=1:3
for p=1:3
for k=1:3
for l=1:3
c(r) = A(k,l,i,j)*B(o,p,k,l);
r=r+1;
end
end
output(o,p,i,j) = sum(c);
r=1;

35

end

246

end

247

end

248
249
250

end
end

251
252
253
254
255
256
257
258
259
260
261

function [output] = T2toT1row(A)


output = zeros(6,1);
r = 1;
for i = 1:2
for j = 1:3
output(r,1) = A(i,j);
r = r+1;
end
end
end

262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

function [output] = T4toT2row(A)


output = zeros(6,6);
r=1;
q=1;
for k = 1:2
for l = 1:3
for i = 1:2
for j = 1:3
output(q,r) = A(i,j,k,l);
r=r+1;
end
end
r=1;
q=q+1;
end
end
end

280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

function [output] = T4IBoxT2I(A,B,K,L,I,M,J,M2)


c = zeros(1,2);
output = zeros(2,3,2,3);
for k=1:K
for l=1:L
for i=1:I
for j=1:J
for m=1:M
c(m) = A(i,m,k,l)*B(j,m);
end
output(i,j,k,l) = sum(c);
end
end
end
end
end

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

function [output] = T4IBoxIT2(A,B,I,M,K,L,M2,J)


c = zeros(1,2);
output = zeros(2,2,2,3);
for k=1:K
for l=1:L
for i=1:I
for j=1:J
for m=1:M
c(m) = A(i,j,k,m)*B(m,l);
end
output(i,j,k,l) = sum(c);
end
end
end
end

36

313

end

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

function [output] = T21toT2row(A)


output = zeros(6,3);
r=1;
q=1;
for k = 1:2
for l = 1:3
for j = 1:3
output(q,r) = A(1,j,k,l);
r=r+1;
end
r=1;
q=q+1;
end
end
end

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

function [output] = DyadicT2T1(A,b,I,J,K)


r = 1;
output = zeros(1,3,2,3);
for i = 1:I
for j = 1:J
for k = 1:K
output(1,r,i,j) = A(i,j)*b(k);
r=r+1;
end
r=1;
end
r=1;
end
end

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

function [output] = T12toT2row(A)


output = zeros(3,6);
r=1;
q=1;
for i = 1:3
for k = 1:2
for l = 1:3
output(q,r) = A(k,l,i);
r=r+1;
end
end
q=q+1;
r=1;
end
end

361
362
363
364
365
366
367
368
369
370
371

function [output] = T2BoxT1(A,b,I,J,K)


output = zeros(2,3,3);
for i = 1:I
for j = 1:J
for k = 1:K
output(j,k,i,1) = A(i,j)*b(k);
end
end
end
end

372
373
374
375
376
377
378
379

function [output] = DyadicT1T2(a,B,I,J,K)


output = zeros(2,3,3);
r = 1;
for i = 1:I
for j = 1:J
for k = 1:K
output(r,k,i,1) = a(i) * B(j,k);

37

end
r=r+1;

380
381

end
r=1;

382
383
384
385

end
end

386
387
388
389
390
391
392
393
394
395
396
397
398
399

function [output] = T2DeltaT1(A,b,I,K,J)


output = zeros(2,3,3);
r = 1;
for i = 1:I
for j = 1:J
for k = 1:K
output(r,k,i,1) = A(i,k)*b(j);
end
r=r+1;
end
r=1;
end
end

400
401
402
403
404
405
406
407
408

function [output] = DyadicT2(a,b)


output = zeros(3,3);
for k=1:3
for l=1:3
output(k,l)=a(k)*b(l);
end
end
end

409
410
411
412
413
414
415
416
417
418
419

function [output] = Kmatrixtorow(A)


output = zeros(1,81);
r=1;
for i=1:9
for j=1:9
output(r) = A(j,i);
r=r+1;
end
end
end

Appendix C

UEL Template
#include
#include
#include
#include
#include
#include
#include
#include
#include

<stdio.h>
<stddef.h>
<stdlib.h>
<math.h>
<float.h>
"uelement.c"
"rtwtypes.h"
"rt nonfinite.h"
"rt nonfinite.c"

extern "C" void stdcall UEL(


double RHS[ ],
An array in which the components of the residual
are stored.
double AMATRX[ ], An array containing the stiffness matrix or other
matrix of the overall system of equations.
double SVARS[ ],
An array containing the values of the solutiondependent state variables. This can be used to
store, for example, the stresses and the damage.
(The only output from Abaqus self, will be the
displacement U and the reaction forces RF).
double ENERGY[ ], For non-linear steps array ENERGY contains the
values of the energy quantities.
ENERGY[1] Kinetic energy.
ENERGY[2] Elastic strain energy.
ENERGY[3] Creep dissipation.
ENERGY[4] Plastic dissipation.
ENERGY[5] Viscous dissipation.
ENERGY[6] "Artificial strain energy" associated
with such effects as artificial stiffness
introduced to control hourglassing or
other singular modes in the element.
ENERGY[7] Electrostatic energy.
ENERGY[8] Incremental work done by loads applied
within the user element.
int *NDOFEL,
Number of degrees of freedom.
int *NRHS,
Number of load vectors. NRHS is 1 in most nonlinear problems.

39

int *NSVARS,
double PROPS[ ],

int *NPROPS,
double COORDS[ ],
int *MCRD,
int *NNODE,
double U[ ],
double DU[ ],
double V[ ],
double A[ ],
int *JTYPE,

double TIME[ ],
double *DTIME,
int *KSTEP,
int *KINC,
int *JELEM,
double PARAMS[ ],
int *NDLOAD,
int JDLTYP[ ],
double ADLMAG[ ],

double PREDEF[ ],

int *NPREDF,

int LFLAGS[ ],

User-defined number of solution-dependent state


variables.
User defined (material) properties. These can be
set in the input file as *UEL PROPERTY.(see
chapter 4)
User-defined number of real property values.
Array containing the coordinates of the element
being calculated. This can be for example x,y,T,D
The maximum number of user-defined coordinates
being used by Abaqus.
User-defined number of nodes on the current element.
Total values of the variables.
Incremental values of the variables for the current
increment for the right-hand-side.
Time rate of change of the variables, defined for
implicit dynamics only.
Accelerations of the variables. Defined for
implicit dynamics only.
Integer defining the element type. This is the
user-defined integer value n in element type Un.
The element type key must be of the form Un in
Abaqus-Standard, for example, you can define
element types U1, U2, U3.
time[0] = step time at beginning of increment.
time[1] = total time at beginning of increment.
Time increment.
Current step number.
Current increment number.
User-assigned element number.
An array containing the parameters associated with
the solution procedure.
Identification number of the distributed load or
flux currently active on this element.
An array containing the integers used to define
distributed load types for the element.
For general nonlinear steps ADLMAG(K1) is the total
load magnitude of the K1th distributed load at the
end of the current increment for distributed loads
of type Un.
An array containing the values of predefined field
variables, such as temperature in an uncoupled
stress/displacement analysis, at the nodes of the
element.
Number of predefined field variables, including
temperature. For user elements Abaqus-Standard
uses one value for each field variable per node.
An array containing the flags that define the
current solution procedure and requirements
for element calculations
LFLAGS[1]
Defines the procedure type
LFLAGS[2] =0 Small-displacement analysis.
LFLAGS[2] =1 Large-displacement analysis
(non-linear geometric

40

int *MLVARX,
double DDLMAG[ ],

int *MDLOAD,
double *PNEWDT,
int JPROPS[ ],
int *NJPROP,
double *PERIOD
)

effects included in the


step).
LFLAGS[3]=1
Normal implicit time
incrementation procedure.
LFLAGS[3]=2
Define the current K matrix.
LFLAGS[3]=3
Define the current K matrix.
LFLAGS[3]=4
Define the current K matrix.
LFLAGS[3]=5
Define the current residual
or load vector (RHS=FN) only.
LFLAGS[3]=6
Define the current mass
matrix and the residual
vector for the initial
acceleration calculation
(or the calculation of
accelerations after impact).
LFLAGS[3]=100 Define perturbation
quantities for output
LFLAGS[4]=0
The step is a general step
LFLAGS[4]=1
The step is a linear
perturbation step.
LFLAGS[5]=0
The current approximations
to UN, etc. were based on
Newton corrections.
LFLAGS[5]=1
The current approximations
were found by extrapolation
from the previous increment.
Dimensioning parameter used when several
displacement or right-hand-side vectors are used.
or general nonlinear steps DDLMAG contains the
increments in the magnitudes of the distributed
loads that are currently active on this element for
distributed loads of type Un.
Total number of distributed loads and/or fluxes
defined on this element.
Ratio of suggested new time increment to the time
increment currently being used.
An integer array containing the NJPROP integer
property values defined for use with this element.
User-defined number of integer property values
associated with the element.
Time period of the current step.

{
user element(U, DU, COORDS, PROPS, SDV, SVARS, RHS, AMATRX);
}

Appendix D

Input file
*HEADING
*Node
1, 0., 0.
2, 0., 1.
3, 1., 0.
*User element, Type=U3, Nodes=3, Coordinates=3, Properties=14,
Variables=9
1
1, 2
1, 11
*Element, Type=U3, Elset=ALL
1, 1, 3, 2
*UEL Property, Elset=ALL
206400, 0.29, 1e-5, 300, 1, 0, 0, 8.19325e-9,
4.35e+8, 0.2227539844, 0, 2, 1
*Nset, nset=allnodes, generate
1, 27, 1
*Nset, nset=left
1, 2, 11
*Nset, nset=right
19, 23, 27
*Initial conditions, Type=Temperature
left, 3000
right, 100
*Step, Unsymm=YES, Nlgeom=YES, Extrapolation=NO
*STATIC
0.1, 1., 0.0, 0.1
*Boundary, Type=Displacement
left, 1, 1, 0
left, 2, 2, 0
right, 1, 1, 0
right, 2, 2, 4
*EL print, elset=ALL, position=integration point
SDV,
*Node print
U, NT11
*End Step

Appendix E

Convention DOFs in ABAQUS


The degrees of freedom are always referred to as follows:
Node
number
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Degree of
freedom
x-displacment
y-displacment
z-displacment
rotation about x-axis, in radians
rotation about y-axis, in radians
rotation about z-axis, in radians
Warping amplitude (for open-section beam elements)
Pore pressure, hydrostatic fluid pressure, or acoustic pressure
Electric potential
Connector material flow (units of length)
Temperature (or normalized concentration in mass diffusion analysis)
User defined
User defined
etc.

Appendix F

Python script
from abaqus import backwardCompatibility
backwardCompatibility.setValues(reportDeprecated=False)
import sys
from abaqus import *
import copy
from abaqusConstants import *
#import regionToolset
#import displayGroupMdbToolset as dgm
import part
#import materialg
import section
import assembly
import step
import load
import mesh
import job
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
from odbAccess import *
from string import *
from sys import exit
from symbolicConstants import FALSE,TRUE
#from adapt3 import*
from time import *
from random import *
from math import *
def user job start(jobname,userelement,pathtoabaqusworkingdirectory):
batchfile=open(ueljobstart.bat,w+)
batchfile.write(cd c:\temp+\n)
batchfile.write(CALL "C:\Program files\Intel\Compiler\Fortran\
9.1\IA32\Bin\IFortVars.bat" + \n)
batchfile.write(CALL "C:\Program files\Microsoft Visual Studio 8\
VC\bin\vcvars32.bat"+\n\n)

44

batchfile.write(del
batchfile.write(del
batchfile.write(del
batchfile.write(del
batchfile.write(del
batchfile.write(del
batchfile.write(del
batchfile.write(del

UEL.dat\n\n)
UEL.odb\n\n)
UEL.lck\n\n)
UEL.log\n\n)
UEL.msg\n\n)
UEL.prt\n\n)
UEL.sta\n\n)
UEL.com\n\n)

batchfile.write(copy+jobname+.inp UEL.inp \n\n)


batchfile.write(abaqus job=UEL user=+userelement+ interactive+\n)
batchfile.close()
os.spawnv(os.P WAIT,pathtofabaqusworkingdirectory+ueljobstart.bat,
[pathtofabaqusworkingdirectory +Start UEL.bat])
def read datfile(datfile):
inputfile= open(datfile, r)
list=[[[],[]]]
write=0
counter=0
for line in inputfile.readlines():
sentence = split(line)
if write==0 and len(sentence)!=0:
if sentence[0]==NOTE:
write=1
elif write==1 and len(sentence)!=0:
if sentence[0]!=MAXIMUM:
list[-1][counter].append([])
for word in sentence:
list[-1][counter][-1].append(float(word))
else:
write = 0
counter=counter+1
if counter==2:
counter=0
list.append([[],[]])
inputfile.close()
return list

def read inputfile(inpfile):


inputfile= open(datfile, r)
list=[ [], [] ]
write=0
counter=0
for line in inputfile.readlines():
sentence = split(line)

45

if write==0 and len(sentence)!=0:


if sentence[0]==*Node or sentence[0]==*Element,:
write=1
elif write==1 and len(sentence)!=0:
if sentence[0]!=*User or sentence[0]!=*UEL,:
list[counter].append([])
for word in sentence:
list[counter][-1].append(float(split(word,",")[0]))
else:
write = 0
counter=counter+1
if counter==2:
break
inputfile.close()
return list
def UEL read(datfile, inpfile):
listvalue = read datfile(datfile)
liststructure = read inputfile(inpfile)
Nodes=[]
for node in liststructure[0]:
Nodes.append([int(node[0]),float(node[1]),float(node[2])])
Elements=[]
for element in liststructure[1]:
Elements.append([int(element[0]),int(element[1]),int(element[2]),
int(element[3])])
Gausspointvalue=[]
for frame in listvalue[:-1]:
Gausspointvalue.append([])
for i in range(1,len(frame[0][0])-1):
Gausspointvalue[-1].append([SDV+str(i)])
for frame in Gausspointvalue:
for value in frame:
for gp in listvalue[-2][0]:
value.append([])
Nodevalues=[]
for frame in listvalue[:-1]:
Nodevalues.append([[U]])
for i in range(1,len(frame[1][0])-1):
Nodevalues[-1].append([DOF+str(i)])
for frame in Nodevalues:
for value in frame:
for n in listvalue[-2][1]:

46

value.append([])

f=0
for frame in listvalue:
for gp in frame[0]:
i=0
for gpv in gp[2:]:
Gausspointvalue[f][i][int(gp[0])]=[gpv]
i=i+1
f=f+1
f=0
for frame in listvalue:
for n in frame[1]:
for nw in n[1:3]:
Nodevalues[f][0][int(n[0])].append(nw)
i=1
for nw in n[3:]:
Nodevalues[f][i][int(n[0])]=[nw]
i=i+1
f=f+1
return [Nodes,Elements,Nodevalues,Gausspointvalue]

def Putvaluesinodb(odb name,Nodes,Elements,Nodevalues,


Gausspointvalue,Time,divider):
Newodb = Odb(name=odb name+.odb,
analysisTitle=,
description=artificial odb,
path=odb name+.odb)
print Nodes
part new = Newodb.DiscretePart(name=part, embeddedSpace=TWO D PLANAR,
type=DEFORMABLE BODY)
part new.addNodes(nodeData=Nodes, nodeSetName=nset)
if len(Elements[0])==4:
part new.addElements(elementData=Elements, type=CPE3,
elementSetName=eset)
print 2D Element with 3 nodes created
elif len(Elements[0])==5:
part new.addElements(elementData=Elements, type=CPE4R,
elementSetName=eset)
print 2D Element with 4 nodes created

instance new = Newodb.rootAssembly.Instance(name=part, object=part new)

47

step new = Newodb.Step(name=step, description=, domain=TIME,


timePeriod=Time)
partoi=upper(part)
for framenumber in range(len(Nodevalues)):
odb frame = step new.Frame(frameId=framenumber, frameValue=0.1,
description=)
for values in Nodevalues[framenumber]:
nnodes=[]
typ=values[0]
if len(values[1])==1:
n=1
for value in values[1:]:
nnodes.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=SCALAR)
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=NODAL,
instance=instance new,
labels=nodes, data=values[1:])

elif len(values[1])==2:
n=1
for value in values[1:]:
nodes.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=VECTOR)
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=NODAL,
instance=instance new,
labels=nnodes, data=values[1:])

elif len(values[1])==3:
n=1
for value in values[1:]:
nnodes.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=VECTOR)
else:

48

Field new = odb frame.fieldOutputs[typ]


Field new.addData(position=NODAL,
instance=instance new,
labels=nnodes, data=values[1:])

for values in Gausspointvalue[framenumber]:


Eelement=[]
typ=values[0]
if len(values[1])==1:
n=1
for value in values[1:]:
Eelement.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=SCALAR)
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=INTEGRATION POINT,
instance=instance new,
labels=Eelement, data=values[1:])

elif len(values[1])==2:
n=1
for value in values[1:]:
Eelement.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=VECTOR)
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=INTEGRATION POINT,
instance=instance new,
labels=Eelement, data=values[1:])

elif len(values[1])==3:
n=1
for value in values[1:]:
Eelement.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=VECTOR)
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=INTEGRATION POINT,
instance=instance new,

49

labels=Eelement, data=values[1:])

elif len(values[1])==4:
n=1
valuetable=[]
for value in values[1:]:
valuetable.append([(value[0]),(value[1]),(value[2]),
(value[3])])
Eelement.append(n)
n=n+1
if odb frame.fieldOutputs.keys().count(typ)==0:
Field new = odb frame.FieldOutput(name=typ,description=,
type=TENSOR 2D PLANAR,componentLabels=(S11, S22,
S33,S12),
validInvariants=(MISES,PRESS))
else:
Field new = odb frame.fieldOutputs[typ]
Field new.addData(position=INTEGRATION POINT,
instance=instance new,
labels=Eelement, data=valuetable)

Newodb.save()
Newodb.close()

user job start("4 jan","UEL marius 11 dec.obj","c:/temp/")


values=UEL read("UEL.dat","UEL.inp")
#session.odbs[C:/temp/UEL.odb].close()
Putvaluesinodb("UEL",values[0],values[1],values[2],values[3],1,1)
o1 = session.openOdb(name=C:/temp/UEL.odb)
session.viewports[Viewport: 1].setValues(displayedObject=o1)
odb = session.odbs[C:/temp/UEL.odb]
session.viewports[Viewport: 1].setValues(displayedObject=odb)
session.viewports[Viewport: 1].odbDisplay.display.setValues(plotState=
(CONTOURS ON DEF, ))

Vous aimerez peut-être aussi