Upload
hanif
View
24
Download
1
Embed Size (px)
DESCRIPTION
On the Development of a Triangular Multi-field User-element for Abaqus
Citation preview
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
Dortmund, Technische UniversitatInstitute of Mechanics
Dortmund, Germany
April 16, 2010
Contents
1 Introduction 3
2 Weak form and linearization 42.1 Momentum balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Heat balance equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Nonlocal balance equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 Linearization of balance momentum . . . . . . . . . . . . . . . . . . . . . . . . . . 62.5 Linearization of heat balance equation and nonlocal balance equation . . . . . . . . 82.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Finite element framework 123.1 Finite element approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Assembling of global system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3 Algorithmic tangent for thermo-elasticity . . . . . . . . . . . . . . . . . . . . . . . 17
4 Abaqus User-element 204.1 UEL Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Input file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3 Obtaining Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 Results 235.1 Test environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 Thermo-elastic element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3 Thermo-viscoplastic element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
Chapter 1
Introduction
In order to predict the structural behavior of products, such as the response on thermal andmechanical loads, Finite Element Method (FEM) programs are used more and more frequently. Awide variety of elements and material formulations have been developed to ensure reliable results.Beyond the formulations implemented in commercial codes, advanced users desire to implementtheir own elements and routines to solve non standard problems. Some of the commercial FEcodes, such as Abaqus, offer user interfaces for that purpose.
Due to the flexibility, the Abaqus subroutine User-element (UEL) will be employed in thiswork. With this subroutine a maximum number of 20 additional degrees of freedom (DOF’s)1
becomes possible. The main purpose of a user-designed element is to provide the stiffness matrixas well as the residual vector, as needed in a context of solving the nonlinear system of equationsusing Newton-Rhapson. The User-element can be written in C-code or in Fortran. In this reportthe User-element will partly be written in Matlab and then compiled to C-code, as developingin Matlab is easier compared to C-code. In the following, we will derive a general algorithmicbackground, allowing additional degrees of freedom such as temperature, damage etc. To keepthings simple, the final implementation will be restricted to a linear plane strain thermo-elasticelement. Thus, we work with the two standard DOF’s, displacement u1,2, and one additionaldegree of freedom, the temperature θ.
The main part of this report focuses on the framework to calculate the stiffness matrix and theright 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, thebalance of heat equation and the nonlocal balance equation can be expressed with a correspondinggeneral form. The next step is to express the derived equations in terms of a finite elementapproximation. This will be discussed in chapter 3. Here, we also discuss the implementation inMatlab. Because most of the formulas obtained are straight forward, they will not be discussed indetail. In chapter 4 we discuss the implementation of the User-element into the user subroutineUEL. We start with presenting the template file of such a UEL, as well as the input file, whichgives the model information to the Abaqus solver. Further, we will describe how to obtain theresults, 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 Abaqusstandard elements.
1In total there are 30 DOF’s 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 areneeded. The first step, in order these quantities, is to calculation the weak form of the differentbalance 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 theweak form of this equation the weighted residual form will be used. The weighted residual formof 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∫
V
(~∇ · σσσ + ρ~b− ρ~x
)· δ~x dV = 0 (2.2)
∫V
(~∇ · σσσ
)· δ~x dV −
∫V
(ρ~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∫V
{~∇ · (σσσ · δ~x)− σσσ : ~∇δ~x} dV −∫V
(ρ~x− ρ~b
)· δ~x dV = 0 (2.5)
Additionally, the divergence theorem says∫V
~∇ · ~a dV =∫S
~n · ~a dS (2.6)
where ~a is a smooth vector function on the domain V and ~n is the unit outward normal to theboundary S of the domain V. Using the divergence theorem in (2.5) gives∫
S
~n · (σσσ · δ~x) dS −∫V
σσσ : ~∇δ~x dV +∫V
(ρ~b− ρ~x) · δ~x dV = 0 (2.7)
Furthermore, the traction force ~t is defined as
~t = ~n · σσσ (2.8)
2.2 Heat balance equation 5
Using this relation in (2.7) will give∫V
σσσ : ~∇δ~x dV +∫V
(ρ~x− ρ~b) · δ~x dV −∫S
~t · δ~x dS = 0 (2.9)
2.2 Heat balance equation
The strong form of the heat balance equation is given by
ρ c θ − κ0~∇ · (~∇θ) = r (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 iscomparable with the derivation of the weak form for the balance momentum equation (2.9). Firstthe strong form is multiplied with a scaler-valued test function δθ, followed by integration over thedomain V.∫
V
ρ c θ δθ dV −∫V
κ0~∇ · (~∇θ) δθ dV =
∫V
r δθ dV (2.11)
Applying the chain rule gives
~∇ ·(δθ ~∇θ
)= ~∇θ · ~∇ (δθ) + δθ ~∇
(~∇θ)
(2.12)∫V
ρ c θ δθ dV +∫V
κ0
{~∇θ · ~∇(δθ)− ~∇ ·
(δθ ~∇θ
)}dV =
∫V
r δθ dV (2.13)
∫V
ρ c θ δθ dV +∫V
κ0~∇θ · ~∇(δθ)dV −
∫V
κ0~∇ ·(δθ ~∇θ
)dV =
∫V
r δθ dV (2.14)
Using the divergence theorem (2.6) again gives∫V
ρ c θ δθdV +∫V
κ0~∇θ · ~∇(δθ)dV −
∫S
κ0
(~n · (δθ ~∇θ)
)dS =
∫V
r δθ dV (2.15)
Defining
κ0~∇θ = −~qc (2.16)
~qc · ~n = ~qn (2.17)
yields the final result∫V
ρ c θ δθ dV +∫V
κ0~∇θ · ~∇(δθ) dV +
∫S
~qn δθ dS =∫V
r δθ dV (2.18)
2.3 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 forlocality. Using the same strategy as before, multiplying the strong form with a test function δαand then integrate over the volume, gives∫
V
α δα dV −∫V
c(l)~∇ · (~∇α) δα dV =∫V
α δα dV (2.20)
and using the following relations
~∇ ·(δα ~∇α
)= ~∇α · ~∇(δα) + δα ~∇ · (~∇α) (2.21)
6 2.4 Linearization of balance momentum
∫V
~∇ · ~a dV =∫S
~n · ~a dS (2.22)
c(l) ~∇α = −~qαc (2.23)
~qαc · ~n = ~qαn (2.24)
Will lead to the weak formulation of the nonlocal balance equation∫V
α δα dV +∫V
c(l) ~∇α · ~∇(δα) +∫S
~qαn δα dS =∫V
α δα dV (2.25)
2.4 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), theweak form of the balance momentum equation
R~u =∫V
σσσ : ~∇(δ~x) dV +∫V
(ρ~x− ρ~b) · δ~x dV −∫S
~t · δ~x dS (2.26)
Assuming that ~b and ~t, the body force and traction vector at the boundary, respectively, areindependent from ~x and neglecting the inertia forces, the linearization of the residual (2.26) withrespect to the increment of displacement is given by
∆~uR~u = ∆~u
{∫V
σσσ : ~∇(δ~x) dV}
(2.27)
which is best derived in quantities given in the referential configuration V0. Here,
det(FFF ) = J (2.28)σσσ = J−1FFF ·SSS ·FFFT (2.29)
~∇(δ~x) = ~∇0(δ~x) ·FFF−1 = FFF−T · ~∇0(δ~x) (2.30)dV = J dV0 (2.31)
Using these relations in (2.27) gives
∆~uR~u = ∆~u
{∫V0
J−1FFF ·SSS ·FFFT : FFF−T · ~∇0(δ~x) J dV0
}= ∆~u
{∫V0
FFF ·SSS : ~∇0(δ~x) dV0
}(2.32)
Because ~∇0(δ~x) is independent of ∆~u we get
∆~uR~u =∫V0
(∆~uFFF ·SSS +FFF ·∆~uSSS) : ~∇0(δ~x) dV0 (2.33)
Now, as
∆~uFFF = ~∇0(∆~u) (2.34)
with ∆~u the incremental displacement vector, relation (2.32) can be written as
∆~uR~u =∫V0
(~∇0(∆~u) ·SSS +FFF ·∆~uSSS
): ~∇0(δ~x) dV0 (2.35)
2.4 Linearization of balance momentum 7
When now making use of the following relations
~∇0(∆~u) = ~∇(∆~u) ·FFF (2.36)~∇0(δ~x) = ~∇(δ~x) ·FFF (2.37)
SSS = FFF−1 · τττ ·FFF−T (2.38)
∆~uFFF ·FFF−1 = ~∇(∆~u) (2.39)
where τττ is the Kirchoff stress tensor and using
∆A−1 = −A−1 ·∆A ·A−1 (2.40)∆A−T = −A−T ·∆AT ·A−T (2.41)
we can calculate FFF ·∆~uSSS as follows
FFF ·∆~uSSS = FFF ·(∆~uFFF
−1 · τττ ·FFF−T +FFF−1 ·∆~u τττ ·FFF−T +FFF−1 · τττ ·∆~uFFF−T )
= FFF ·∆~uFFF−1 · τττ ·FFF−T + ∆~u τττ ·FFF−T + τττ ·∆~uFFF
−T
= ∆~u τττ ·FFF−T −FFF ·FFF−1 ·∆~uFFF ·FFF−1 · τττ ·FFF−T − τττ ·FFF−T ·∆~uFFFT ·FFF−T
= ∆~u τττ ·FFF−T − ~∇(∆~u) · τττ ·FFF−T − τττ ·(~∇(∆~u)
)T·FFF−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
∆~uR~u =∫V
(∆~u τττ ·FFF−T − τττ ·
(~∇(∆~u)
)T·FFF−T
): ~∇(δ~x) ·FFF J−1dV (2.43)
Making use of the trace operation
A : B = tr(A ·BT
)(2.44)
we finally find
∆~uR~u =∫V
(J−1∆~u τττ − J−1 τττ ·
(~∇(∆~u)
)T): ~∇(δ~x) dV
=∫V
(J−1∆~u τττ − σσσ ·
(~∇(∆~u)
)T): ~∇(δ~x) dV (2.45)
The linearization of the residual R~u with respect to an arbitrary scalar quantity α (e.g., thetemperature) that does not infect the deformation gradient FFF , is derived as follows. Starting fromequation (2.27):
∆αR~u = ∆α
{∫V0
FFF ·SSS : ~∇0(δ~x) dV0
}(2.46)
~∇0(δ~x) is again independent from ∆α, so we get
∆αR~u =∫V0
(∆α FFF ·SSS +FFF ·∆α SSS) : ~∇0(δ~x) dV0 (2.47)
As said before, α does not infect FFF and will vanish from the formula
∆αR~u =∫V0
(FFF ·∆α SSS) : ~∇0(δ~x) dV0 (2.48)
Writing out FFF ·∆αSSS will give
FFF ·∆αSSS = ∆ατττ ·FFF−T −∆αFFF ·FFF−1 · τττ ·FFF−T − τττ ·FFF−T ·∆αFFFT ·FFF−T
= ∆ατττ ·FFF−T (2.49)
8 2.5 Linearization of heat balance equation and nonlocal balance equation
and combining these results with equation (2.47), will lead to
∆αR~u =∫V0
∆ατττ ·FFF−T : ~∇0(δ~x) dV0 (2.50)
Which leads to the final result when making use of (2.30), (2.31) and (2.36) as follows
∆αR~u =∫V
J−1∆ατττ : ~∇(δ~x) dV (2.51)
2.5 Linearization of heat balance equation and nonlocal bal-ance equation
To linearize the balance of heat equation together with the nonlocal formulation, we start with theresiduals of the weak forms, given by equation (2.18) and (2.25)
Rθ =∫V
ρ c θ δθ dV −∫V
~qc · ~∇(δθ) dV −∫V
rθc δθ dV +∫S
~qn δθ dS
Rα =∫V
α δα dV +∫V
c(l) ~∇α · ~∇(δα) dV −∫V
α δα dV +∫S
~qαn δα dS
The general form for both, the heat balance equation and the nonlocal formulation is given by
Rα =∫V
f(α) δα dV −∫V
~qαc · ~∇(δα) dV −∫V
rαc δα dV +∫S
qαn δα dS , (2.52)
with
f(θ) = θ =θn+1 − θn
∆t(2.53)
~qθc = −κ0~∇(θ)α (2.54)
rθc = r (2.55)f(α) = α (2.56)
~qαc = −c(l) ~∇(α) (2.57)rαc = r (2.58)
Assuming now, that ~qαn is independent from α, the linearization of Rα is, in terms of the currentconfiguration, given by
∆Rα = ∆{∫
V
f(α) δα dV −∫V
~qαc · ~∇(δα) dV −∫V
rαc δα dV
}(2.59)
Making use of
~qαc = J−1FFF · ~qαr (2.60)~∇(δα) = FFF−T · ~∇0(δα) (2.61)~∇(α) = FFF−T · ~∇0(α) (2.62)
we can write equation (2.59) in terms of the reference configuration
∆Rα = ∆{∫
V0
f(α) δα dV0 −∫V0
~qαr · ~∇0(δα) dV0 −∫V0
rαr δα dV0
}(2.63)
Making use of (2.57) and of (2.62) we can write
~qαc = −c FFF−T · ~∇0(α) (2.64)
2.5 Linearization of heat balance equation and nonlocal balance equation 9
The flux can be given in terms of the reference configurations as follows:
~qαr = J FFF−1 · ~qαc= −c J FFF−1 ·FFF−T · ~∇0(α) (2.65)
or, applying the definition
~qαs := FFF · ~qαr (2.66)
as
~qαr = FFF−1 · (−cJFFF−T · ~∇α)= FFF−1 · ~qαs (2.67)
Where the subscript s is a temporary state which will be used for simplicity reasons. Now, thelinearization of Rα can be reformulated as
∆Rα = ∆{∫
V0
f(α) δα dV0 −∫V0
(FFF−1 · ~qαs ) · ~∇(δα) dV0 −∫V0
rαr δα dV0
}(2.68)
The next step is calculating the linearization of Rα with respect to the increment of displacement
∆~uRα = −∫V0
(∆~u FFF
−1 · ~qαs +FFF−1 ·∆~u ~qαs
)· ~∇0(δα) dV0 −
∫V0
∆~u rαr δα dV0 (2.69)
Because
∆~u(FFF ·FFF−1) = ∆~uFFF ·FFF−1 +FFF ·∆~uFFF−1 = 0 (2.70)
we find
∆~uFFF−1 = −FFF−1 ·∆~uFFF ·FFF−1
= −FFF−1 · ~∇0(∆~u) ·FFF−1 (2.71)
Now, the linearization of ~qαs with respect to the incremental displacement is given by
∆~u ~qαs = −c∆~u (J FFF−T ) · ~∇0(α) (2.72)
When making use of
∆J = J FFF−T : ∆FFFT
and using equation (2.41) we can write
∆~u(J FFF−T ) = ∆~uJ FFF−T + J ∆~uFFF
−T
= (J FFF−T : ∆~u FFFT )FFF−T − J FFF−T ·∆~uFFF
T ·FFF−T
= (FFF−T : ∆~u FFFT ) J FFF−T −FFF−T ·∆~u FFF
T · J FFF−T
={J FFF−T ⊗FFF−T −FFF−T ∆∆∆ J FFF−T
}[∆~u FFF ] (2.73)
where we use the function ∆∆∆ defined as follows (for proof see appendix A)
AAA ·BBBT ·CCC = {AAA∆∆∆CCC} [BBB] (2.74)
and of
(AAA : BBB)CCC = {CCC ⊗AAA} : [BBBT ] (2.75)
Combined this will be
∆~u~qαs =
{~qαs ⊗FFF−T −FFF−T∆∆∆ ~qαs
}∆~uFFF
={~qαs ⊗FFF−T −FFF−T∆∆∆ ~qαs
}~∇0(∆~u) (2.76)
10 2.6 Summary
Finally, the linearization of Rα with respect to the incremental displacement in terms of thereference configuration will be
∆~uRα = −∫V0
(FFF−1
{−III 222FFF−1 · ~qαs + ~qαs ⊗FFF−T −FFF−T∆∆∆ ~qαs
}~∇0(∆~u)
)· ~∇0(δα) dV0
−∫V0
∆~u rαr δα dV0 (2.77)
Or in terms of the current configuration
∆~uRα = −∫V
({−III 222 ~qαc + ~qαc ⊗ III − III ∆∆∆ ~qαc } ~∇(∆~u)
)· ~∇(δα) dV
−∫V
∆~u rαc δα dV (2.78)
Where 222 is a special function (see appendix A)
AAA ·BBB ·CCC = {AAA222CCC} BBB (2.79)AAA ·BBB · ~c = {AAA222 ~c} BBB (2.80)
To derive the linearization of Rα with respect to α we start with equation (2.68)
∆αRα =∫V0
∆α f(α) δα dV0 −∫V0
(FFF−1 ·∆α~qαs ) · ~∇0(δα) dV0 −
∫V0
∆α rαr δα dV0 (2.81)
The linearization of ~qαs to α is given by
∆α~qαs = −c J FFF−T · ~∇0(∆α) (2.82)
When using this result in equation (2.80) we get the linearization of Rα with respect to α in thereference configuration
∆αRα =∫V0
∆α f(α) δα dV0 −∫V0
(−c J)(FFF−1 ·FFF−T · ~∇0(∆α)) · ~∇0(δα) dV0
−∫V0
∆α rαr δα dV0 (2.83)
or in terms of the current configuration as
∆αRα =∫V
∆α f(α) δα dV +∫V
c ~∇(∆α) · ~∇(δα) dV −∫V
∆α rαc δα dV (2.84)
2.6 Summary
We started with the weak form of the momentum balance (2.9)
R~u =∫V
σσσ : ~∇δ~x dV +∫V
(ρ~x− ρ~b) · δ~x dV −∫S
~t · δ~x dS = 0 (2.85)
The linearization to ~u is given by
∆~uR~u =∫V
(J−1∆~u τττ − σσσ ·
(~∇(∆~u)
)T): ~∇(δ~x) dV (2.86)
Now, making use of the function ∆∆∆, we can write
∆~uR~u =∫V
{J−1 ∂τττ
∂~∇(∆~u)− σσσ∆∆∆ III
}[~∇(∆~u)] : (~∇(δ~x) dV (2.87)
2.6 Summary 11
The linearization to α is given by
∆αR~u =∫V
J−1
(∂τττ
∂α∆α)
: ~∇(δ~x) dV (2.88)
For the general nonlocal balance equation, we started with the weak form of it
Rα =∫V
f(α) δα dV −∫V
~qαc · ~∇(δα) dV −∫V
rαc δα dV +∫S
qαn δα dS (2.89)
Then, the linearization of it with respect to ~u is given by
∆~uRα = −∫V
({−III 222 ~qαc + ~qαc ⊗ III − III ∆∆∆ ~qαc } ~∇(∆~u)
): ~∇(δα) dV
−∫V
∂rαc
∂~∇(∆~u): ~∇(∆~u) δα dV (2.90)
and the linearization with respect to α by
∆αRα =∫V
∂f(α)∂α
∆α δα dV +∫V
c ~∇(∆α) · ~∇(δα) dV −∫V
∂rαc∂α
∆α δα dV (2.91)
Chapter 3
Finite element framework
In this chapter the implementation of the finite element framework will be discussed. We continuefrom Chapter 2, where we derived the linearization of the momentum balance and the generalnonlocal balance equation.
3.1 Finite element approximation
For simplicity, only linear two dimensional triangular elements in plain-strain condition will betreated. The shape functions of the element shall be given as
~N(~ξ) =
1− ξ1 − ξ2ξ1ξ2
(3.1)
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(~ξ)
~x(~ξ) = xxxE · ~N(~ξ)~X(~ξ) = XXXE · ~N(~ξ)
∆~u(~ξ) = ∆uuuE · ~N(~ξ)
δ~x(~ξ) = δxxxE · ~N(~ξ) (3.2)
3.1 Finite element approximation 13
and
αi(~ξ)eeei = ~α = (~αEi · ~N(~ξ)) eeei= (eeei ⊗ ~αEi
) · ~N(~ξ)
= αααE · ~N(~ξ) (3.3)
In case of linear triangular elements, we actually have
xxxE =(x1 x2 x3
y1 y2 y3
)(3.4)
XXXE =(X1 X2 X3
Y1 Y2 Y3
)(3.5)
∆uuuE =(
∆ux1 ∆ux2 ∆ux3
∆uy1 ∆uy2 ∆uy3
)(3.6)
δxxxE =(δx1 δx2 δx3
δy1 δy2 δy3
)(3.7)
~αEi=
αi1αi2αi3
(3.8)
and
δ~αEi=
δαi1δαi2δαi3
(3.9)
With the above formulations it is possible to derive the finite element approximation of the gradi-ent, which is needed for equations (2.85)-(2.91) from chapter 2.
In general we have
d~α = dx1∂~α
∂x1+ dx2
∂~α
∂x2+ dx3
∂~α
∂x3
= ~∇(~α) · d~x (3.10)
Making use of
d~x = ~x⊗ ~∇ξ · d~ξ , (3.11)
we can write equation (3.10) as
d~α = ~α⊗ ~∇ξ · d~ξ (3.12)
Now we can write ~∇(~α) as follows
~∇(~α) = (~α⊗ ~∇ξ) · (~x⊗ ~∇ξ)−1
= αααE · ( ~N ⊗ ~∇ξ) · (~x⊗ ~∇ξ)−1
= αααE · ggg (3.13)
and consequently
~∇(∆~u) = ∆uuuE · ggg~∇(δ~x) = δxxxE · ggg (3.14)
14 3.1 Finite element approximation
For scalar quantities we have
dα = ~∇α · d~x= ~∇ξα · d~ξ (3.15)
Now we can show that
d~ξ · (~x⊗ ~∇ξ)T · ~∇(α) = ~∇ξα · d~ξ(~x⊗ ~∇ξ)T · ~∇(α) = ( ~N ⊗ ~∇ξ)T · ~αE
~∇(α) = gggT · ~αE (3.16)
The last formulation we need is the deformation gradient tensorFFF . Therefore we start with derivingthe gradient operator with respect to the reference configuration
~∇0(~α) = (~α⊗ ~∇ξ) · ( ~X ⊗ ~∇x)−1
= αααE · ( ~N ⊗ ~∇ξ) · ( ~X ⊗ ~∇ξ)−1
= αααE ·GGG (3.17)
Then FFF will be
FFF = xxxE ·GGG (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)∫
V
ρ~b · δ~x dV +∫S
~t · δ~x dS = ~fextuS · δ~xS (3.19)
where ~fextuS is the nodal force vector and δ~xS the vector of virtual nodal displacement. Now wehave for the residual of the momentum balance equation
R~u =∑E
∫V
σσσ : (δxxxE · ggg) dV − ~fextuS · δ~xS
=∑E
∫V
σσσ · gggT : δxxxEdV − ~fextuS · δ~xS (3.20)
∆~uR~u =∑E
∫V
{J−1 ∂τττ
∂~∇(∆~u)− σσσ∆∆∆ III
}[∆uuuE · ggg] : (δxxxE · ggg) dV
=∑E
∫V
C : [∆uuuE · ggg] : (δxxxE · ggg) dV
=∑E
∫V
C : [∆uuuE · ggg] · gggT : δxxxE dV
=∑E
∫V
{{C [222] gggT
}[222 ggg]
}[∆uuuE ] : δxxxE dV (3.21)
∆αR~u =∑E
∫V
J−1 ∂τττ
∂α∆αα : ~∇(δ~x) dV
=∑E
∫V
J−1 ∂τττ
∂α∆αα : (δxxxE · ggg) dV
=∑E
∫V
J−1
(∂τττ
∂α· gggT∆αα
): δxxxE dV
=∑E
(∫V
J−1
(∂τττ
∂α· gggT ⊗ ~N
)∆~αE
): δxxxE dV (3.22)
3.2 Assembling of global system 15
and for the general nonlocal heat balance equation
Rα =∑E
∫V
f(α) δα dV +∫V
~qαc · ∇(δα) dV −∫V
rαc δα dV +∫S
qαn δα dS
=∑E
∫V
f(α) (δ~αE · ~N)− ~qαc · gggT · δ~αE − rαc (δ~αE · ~N) dV +∫S
qαn (δ~αE · ~N) dS
=∑E
(∫V
f(α) ~N − ggg · ~qαc − rαc ~N dV +∫S
qαn~N dS
)· δ~αE (3.23)
∆~uRα = −∑E
(∫V
({−III 222 ~qαc + ~qαc ⊗ III − III ∆∆∆ ~qαc } · ~∇(∆~u)
)· ~∇(δα) dV
−∫V
∂rαc
∂~∇(∆~u): ~∇(∆~u) δα dV
)
= −∑E
∫V
({−III 222 ~qαc + ~qαc ⊗ III − III ∆∆∆ ~qαc } ·∆uuuE · ggg) ·(gggT · δ~αE
)dV
−∑E
∫V
(∂rαc
∂~∇(∆~u): ∆uuuE · ggg
)(δ~αE · ~N
)dV
= −∑E
∫V
({−III 222 ggg · ~qαc + ~qαc ⊗ gggT − gggT ∆~qαc
}·∆uuuE
)·(gggT · δ~αE
)dV
−∑E
∫V
(∂rαc
∂~∇(∆~u)· gggT : ∆uuuE
)(δ~αE · ~N
)dV
= −∑E
(∫V
{−ggg222 ggg · ~qαc + ggg · ~qαc ⊗ gggT − ggg · gggT∆~qαc
}·∆uuuE dV
−∑E
{~N ⊗ ∂rαc
∂~∇(∆~u)· gggT
}·∆uuuE dV
)· δ~αE (3.24)
∆αRα =∑E
∫V
∂f(α)∂α
∆α δα dV + c ~∇(∆α) : ~∇(δα)− ∂rαc∂α
∆α δα dV
=∑E
∫V
∂f(α)∂α
∆α (δ~αE · ~N) + c ggg · ~∇(∆α) · δ~αE −∂rαc∂α
∆α (δ~αE · ~N) dV
=∑E
(∫V
∂f(α)∂α
(∆~αE · ~N) ~N + c ggg · gggT ·∆~αE −∂rαc∂α
(∆~αE · ~N) ~N)· δ~αE dV
=∑E
(∫V
(∂f(α)∂α
~N ⊗ ~N + c ggg · gggT − ∂rαc∂α
~N ⊗ ~N
)·∆~αE
)· δ~αE dV (3.25)
3.2 Assembling of global system
For the final assembling of the linear system of equations a transformation of the derived tensorexpressions to the corresponding row-array notation is needed. The equations (3.20)-(3.25) willchange to.
R~u =
(∑E
∫V
(σσσ · gggT
)RdV : δxxxRE
)− ~fextuS · δ~xS (3.26)
16 3.2 Assembling of global system
∆~uR~u =∑E
{∫V
{{C [222] gggT
}[222 ggg]
}RdV
}[∆uuuRE ] : δxxxRE (3.27)
∆αR~u =∑E
(∫V
J−1
(∂τττ
∂α· gggT ⊗ ~N
)RdV
)∆~αE : δxxxRE (3.28)
Rα =∑E
(∫V
f(α) ~N − ggg · ~qαc − rαc ~N dV +∫S
qαn ~N dS
)· δ~αE (3.29)
∆~uRα = −∑E
{∫V
{−ggg222 ggg · ~qαc + ggg · ~qαc ⊗ gggT − ggg · gggT∆~qαc
}RdV
}·∆uuuRE · δ~αE
−∑E
∫V
{~N ⊗ ∂rαc
∂~∇(∆~u)· gggT
}RdV
·∆uuuRE · δ~αE (3.30)
∆αRα =∑E
(∫V
∂f(α)∂α
~N ⊗ ~N + c ggg · gggT − ∂rαc∂α
~N ⊗ ~N dV
)·∆~αE · δ~αE (3.31)
Where the subscript R represents row notation. The linear system of equation can now be formu-lated as followed{(
KKK~u~u KKK~uα
KKKα~u KKKαα
)·(
∆~u∆~α
)}·(δ~xδ~α
)= −
(~fu~fα
)·(δ~xδ~α
)(3.32)
In what follows we use θ instead of α, because we are restricting to thermo-elasticity. As we aredealing here with constant strain elements, the element volume can be expressed as
V =12t det(JJJ) (3.33)
Where JJJ is the Jacobian tensor, defined as
JJJ = XXXE · ~∇ξ ~NT (3.34)
Thus, the element stiffness matrixes are given as
KKKE~u~u =
12t det(JJJ)
{{C [222]gggT
}[222 ggg]
}R(3.35)
KKKE~uθ =
12t det(JJJ) J−1
(∂τττ
∂θ· gggT ⊗ ~N
)R(3.36)
KKKEθ~u = −1
2t det(JJJ)
{−ggg222 ggg · ~qθ + ggg · ~qθ ⊗ gggT − ggg · gggT∆∆∆ ~qθ + ~N ⊗ ∂rθ
∂~∇(∆~u)· gggT
}R(3.37)
KKKEθθ =
12t det(JJJ)
(∂f(θ)∂θ
~N ⊗ ~N + c ggg · gggT − ∂rθ
∂θ~N ⊗ ~N
)(3.38)
Our framework is completed by obtaining the Right Hand Side. We derive these terms fromequation (3.26) and (3.29) with making use of the row convention.
~fE~u =12t det(JJJ)
(σσσ · gggT
)R(3.39)
~fEθ =12t det(JJJ)
(f(θ) ~N − ggg · ~qθ − rθ ~N
)(3.40)
3.3 Algorithmic tangent for thermo-elasticity 17
3.3 Algorithmic tangent for thermo-elasticity
Above we derived the general framework for calculating the stiffness matrix KKK and the righthand side ~f int. Now, the last step is to derive the algorithmic tangent for our specific materialformulation
Starting with the constitutive law for the kirchhoff stress τττ as
τττ = ({λ0 III ⊗ III + 2 µ0 III 222 III} · lnVVV )− (3 λ0 + 2 µ0)α0 (θ − θ0) III (3.41)
with
λ0 =E ν
(1 + ν)(1− 2 ν)
µ0 =E
2 (1 + ν)
lnVVV =3∑i=0
ln(di) ~vi ⊗ ~vi (3.42)
where
E = Young’s modulusν = Poisson ratioVVV = Left stretch tensor =
√BBB =
√FFF ·FFFT
di = Eigenvalue~vi = Eigenvectorα0 = Expansion coefficientθ = Current temperatureθ0 = Initial temperature
The derivation of τττ with respect to θ is simply given by
∂τττ
∂θ= − (3 λ0 + 2 µ0) α0 III (3.43)
The derivation of τττ with respect to FFF can be calculated as
∂τττ
∂FFF= {λ0 III ⊗ III + 2 µ0 III 222 III} ∂lnV
VV
∂FFF(3.44)
Knowing that
VVV =√BBB (3.45)
lnVVV =12
lnBBB (3.46)
we can write equation (3.44) as follows
∂τττ
∂FFF= {λ0 III ⊗ III + 2 µ0 III 222 III} 1
2∂lnBBB
∂FFF(3.47)
were we can write
∂ lnBBB∂FFF
=∂ lnBBB∂BBB
∂BBB
∂FFF(3.48)
Now, the first term can be writen as described by Silhavy [10]{∂ lnBBB∂BBB
}= Hij eeei ⊗ eeej ⊗ eeei ⊗ eeej (3.49)
18 3.3 Algorithmic tangent for thermo-elasticity
with
Hij =
{ln(bi)−ln(bj)
bi−bjif bi 6= bj
1bi
if bi = bj(3.50)
and
BBB = bi eeei ⊗ eeei (3.51)
and the second term as
∂BBB
∂FFF=
∂FFF
∂FFF·FFFT +FFF · ∂F
FFT
∂FFF
={III 222FFFT +FFF ∆∆∆∆∆∆∆∆∆ III
} [∂FFF∂FFF
]=
{III 222FFFT +FFF ∆∆∆ III
}(3.52)
This will lead to the final equation
∂τττ
∂FFF= {λ0 III ⊗ III + 2 µ0 III 222 III} 1
2
{∂lnBBB
∂BBB
}{III 222FFFT +FFF ∆∆∆ III
}(3.53)
Next, we calculate the elasticity tensor C. From equation (3.21) we know
C =
{J−1 ∂τττ
∂~∇(∆~u)− σσσ∆∆∆ III
}(3.54)
As
FFF = ~∇(~x)FFF = ~∇(~u) ·FFF (3.55)
and thus
∆FFF = ~∇(∆~u) ·FFF (3.56)
we can write
∆τττ =∂τττ
∂FFF·∆FFF
=∂τττ
∂FFF· ~∇(∆~u) ·FFF
=∂τττ
∂FFF{III 222FFF} [~∇(∆~u)] (3.57)
Now, we can write the Kirchhoff stress as
τττ = τττn + ∆τττ
= τττn +∂τττ
∂FFF{III 222FFF} [~∇(∆~u)] (3.58)
When now taking the derivative of τττ with respect to ~∇(∆~u)
∂τττ
∂~∇(∆~u)=∂τττ
∂FFF{III 222FFF} (3.59)
we can write
C ={J−1 ∂τττ
∂FFF{III 222FFF} − σσσ∆∆∆ III
}(3.60)
3.3 Algorithmic tangent for thermo-elasticity 19
Furthermore, we assume that
f(θ) =(θn+1 − θn
∆t
)ρ0 c0
∂f(θ)∂θ
=ρ0 c0dt
(3.61)
with
ρ0 = Initial densityc0 = Initial isochoric heat capacitydt = Time increment
The Matlab script containing the above formulas is given in appendix B. Because these formulasare 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. Thischapter 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 theC-code version. In order to run the script, include statements are necessary. Besides the standardinclude statement, the files created by transforming the Matlab code into C-code should also beincluded.
#include "uelement.c"#include "rtwtypes.h"#include "rt nonfinite.h"#include "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 derivedin 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 (DOF’s)
• DU, Incremental values of all variables
• DTIME, Increment of time
• PROPS, Material properties like Young’s Modulus, ν and temperature related properties
The stiffness matrix KKK of the complete system, and the residual vector ~f should be returnedto 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 containinformation about which elements should be used, what kind of boundary conditions will be appliedand how the geometry of the model is defined. The differences for a User-element job will bediscussed 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 parameteris the name of the element. The only condition the name must satisfy, is that it has to start withthe letter ”u”. Next, the "COORDINATES" need to be set. This number represents the amount ofdegrees of freedom. The third setting is the "PROPERTIES" setting. This number is the amountof properties used in the User-element. Finally, the "VARIABLES" should be set. This numberdepends 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, Young’smodulus, heat capacity, etc.) and 6 variables (e.g. σσσ11, σσσ22, σσσ33, σσσ12, σσσ13, σσσVM ).
The above settings can be completed with assigning the order of receiving and sending the variablesof the degrees of freedom. This could be best explained with the above example. There are threeconceptual differences possible listed below
*User element, ... *User element, ... *User element, ...Variables=9 Variables=9 Variables=71, 1, 2, 11 1, 1, 2, 111, 2 2, 111, 11 3, 1, 2, 11
In Abaqus, the degrees of freedom have different numbers, here 1 represents displacement x, 2displacement y and 11 temperature θ. For a complete overview of the convention of degrees offreedom in Abaqus, see appendix E. The stiffness matrix and residual vector should be calculatedin the same order as mentioned in table (4.1)
The equations for calculating the stiffness matrix and residual vector are in this report done bythe first call, so first all x components, than y and finally θ.
Abaqus does not support User-element visualizations. Therefore we write out the result datain a file which we later use to create visual results. The output that will be saved in this filecan be set by "*EL PRINT, ELSET=ALL, POSITION=INTEGRATION POINT" and "*Nodeprint". 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 resultsdirectly opened from a User-element job is given in figure 4.1
22 4.3 Obtaining Results
DOF DOF DOFcall 1 call 2 call 3x1 x1 x1
x2 y1 y1
x3 θ1 θ1
y1 x2 θ2
y2 y2 x3
y3 θ2 y3
θ1 x3 θ3
θ2 y3
θ3 θ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 othervariables like temperature or stresses can not be displayed. In the user manual of Abaqus is writtenthat plotting User-elements is not supported, but, if the User-element contain displacement degreesof 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 therethe information of the node-locations and which node-series form elements. Secondly it readsthe 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 containingthe 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, wealso 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 Sievertet al.[9]. The specimen contains two notches of 0.4 mm by 0.4 mm, see figure 5.1. If the one end isforced to move, stresses will concentrate at the two notches. Later, when also considering softeningeffects (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 displacementis high enough, the shear-bands from both sides will coincide.
17°
15. mm9. x 3. mm
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 thermalperformance of the element. Thus, displacements will be set to zero and the left side of thespecimen will be heated with a constant temperature of 350 K. The rest of the nodes will havean 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.000e+02+3.042e+02+3.083e+02+3.125e+02+3.167e+02+3.208e+02+3.250e+02+3.292e+02+3.333e+02+3.375e+02+3.417e+02+3.458e+02+3.500e+02
(a) 5 seconds
DOF1
+3.000e+02+3.042e+02+3.083e+02+3.125e+02+3.167e+02+3.208e+02+3.250e+02+3.292e+02+3.333e+02+3.375e+02+3.417e+02+3.458e+02+3.500e+02
(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 isneeded to increase the temperature. In figure 5.3 the average temperature on the right side of thespecimen, with varying heat capacity cv0 , is depicted.
Varying the heat capacity
290
300
310
320
330
340
350
360
0 1 2 3 4 5 6
Time [-]
Te
mp
era
ture
[K
]
Low
Middle
High
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 equivalentVon Mises stress is plotted for both elements. The displacement is set to 0.1 mm, the initialtemperature to 300 K.These results are almost identical, when keeping deformations small. When calculations are done
(Avg: 75%)SDV6
+0.000e+00+3.100e+02+6.200e+02+9.300e+02+1.240e+03+1.550e+03+1.860e+03+2.170e+03+2.480e+03+2.790e+03+3.100e+03+3.410e+03+3.720e+03
(a) σσσV M User-element
(Avg: 75%)S, Mises
+0.000e+00+3.100e+02+6.200e+02+9.300e+02+1.240e+03+1.550e+03+1.860e+03+2.170e+03+2.480e+03+2.790e+03+3.100e+03+3.410e+03+3.720e+03
(b) σσσV M Abaqus-element
Figure 5.4: σσσVM for User- and standard-element
outside this region (for metals, generally inside the plastic region), the results will not exactly beequal. This is visualized in figure 5.5, where the average reaction force (on the right side) is plottedversus the displacement.
Force vs. Displacement
0
2
4
6
8
10
12
14
0 0.02 0.04 0.06 0.08 0.1 0.12
Displacement [mm]
Forc
e [k
N]
User-elementAbaqus
(a) Elastic deformation
Force vs. Displacement
0
100
200
300
400
500
600
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Displacement [mm]
Forc
e [k
N]
User-elementAbaqus
(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 thiswork, C. Hortig [5] implemented a User-element that contains four degrees of freedom, displace-ments 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 insightinto 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 areshown. In order to visualize the crack development, elements showing damage greater than 95%are not depicted.
DOF2
+0.000e+00+8.333e−02+1.667e−01+2.500e−01+3.333e−01+4.167e−01+5.000e−01+5.833e−01+6.667e−01+7.500e−01+8.333e−01+9.167e−01+1.000e+00
(a) Crack half way
DOF2
+0.000e+00+8.333e−02+1.667e−01+2.500e−01+3.333e−01+4.167e−01+5.000e−01+5.833e−01+6.667e−01+7.500e−01+8.333e−01+9.167e−01+1.000e+00
(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.7the force on the right side is plotted versus displacement, for different values of the internal lengthparameter.
Varying internal length parameter
0
1
2
3
4
5
6
7
8
9
0 2 4 6 8 10
Displacement [mm]
Forc
e [k
N] Int. l. 0.025
Int. l. 0.05Int. l. 0.1Int. l. 0.2Int. l. 0.4
Figure 5.7: Varying the internal length
Chapter 6
Conclusions andRecommendations
In order to predict the structural behavior of products, such as the response on thermal andmechanical loads, Finite Element Method (FEM) programs are used. Advanced users implementtheir own elements more frequently, in order to solve non-standard problems. Abaqus, one of thecommercial FE codes, offers an interface for that.
This report constructs a general framework for creating User-elements, using a thermo-elasticelement as an example. Therefore the constitutive framework for this thermo-elastic element isderived and implemented in the general framework. This framework is mainly written in Matlaband 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 inchapter 5.2, show good comparable results in the elastic region. However, due to differences intheir constitutive material formulation, these results will never be exactly the same.
Additionally, the results of a thermo-viscoplastic element (chapter 5.3) are investigated. Theseresults show the trend that special details of material formulations can be implemented in a fairlystraight forward fashion.
In order to increase the functionality, the Python script, which is used to create a visual resultfile, should be expanded. This means, that the script should recognize different (standard) elementsand that more user variables can be included. Now, the Python script can read linear triangularand 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 incomposite structures. ISBN 87-550-3410-1
[4] Geers, M.G.D., Baaijens, F.P.T., Schreurs, P.J.G. Continuum Mechanics for Advanced Man-ufacturing Technologies, lecture notes - course 4C600
[5] Hortig, C., Svendsen, B., 2009. Local and non-local FE-simulations of high-speed cuttingproccesses
[6] Kouznetsova, V. Non-linear Finite Element Method for Solids, lecture notes for the course4K440
[7] Peerlings, R.H.J. Finite Element Method, lecture notes for the course ’Eindige-elementenmethode’ 4A4700
[8] Peerlings, R.H.J., Geers, M.G.D., de Borst, R., Brekelmans, W.A.M., 2001. A critical com-parison 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 nickel-base 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
AAA ·BBB = AijBkl(~ei ⊗ ~ej) · (~ek ⊗ ~el)= AijBjl(~ei ⊗ ~el)= AikBkj(~ei ⊗ ~ej) (A.1)
AAA ·BBBT = AijBkl(~ei ⊗ ~ej) · (~el ⊗ ~ek)= AijBkj(~ei ⊗ ~ek)= AikBjk(~ei ⊗ ~ej) (A.2)
AAA : BBB = AijBkl(~ei ⊗ ~ej) : (~ek ⊗ ~el)= AijBij (A.3)
AAA ·BBB ·CCC = AijBklCmn(~ei ⊗ ~ej) · (~ek ⊗ ~el) · (~em ⊗ ~en)= AijBklCln(~ei ⊗ ~ej) · (~ek ⊗ ~en)= AijBjlCln(~ei ⊗ ~en)= AijCln(~ei ⊗ ~en ⊗ ~ej ⊗ ~el)Bjl(~ej ⊗ ~el)= AikClj(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el)Bkl(~ek ⊗ ~el)= {AAA222CCC} BBB (A.4)
AAA ·BBBT ·CCC = AijBklCmn(~ei ⊗ ~ej) · (~el ⊗ ~ek) · (~em ⊗ ~en)= AijBklCkn(~ei ⊗ ~ej) · (~el ⊗ ~en)= AijBkjCkn(~ei ⊗ ~en)= AijCkn(~ei ⊗ ~en ⊗ ~ek ⊗ ~ej)Bkj(~ek ⊗ ~ej)= AilCkj(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el)Bkl(~ek ⊗ ~el)= {AAA∆∆∆CCC} BBB (A.5)
A : [BBB ·CCC] = AijklBmnCop(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el) : [(~em ⊗ ~en) · (~eo ⊗ ~ep)]= AijklBmnCnp(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el) : [(~em ⊗ ~ep)]= AijklBknCnl(~ei ⊗ ~ej)= AijklCnl(~ei ⊗ ~ej ⊗ ~ek ⊗ ~en)Bkl(~ek ⊗ ~en)= AijkmClm(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el)Bkl(~ek ⊗ ~el)= {A [222CCC]} [BBB] (A.6)
30
A : [BBB ·CCC] = AijklBmnCop(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el) : [(~em ⊗ ~en) · (~eo ⊗ ~ep)]= AijklBmnCnp(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el) : [(~em ⊗ ~ep)]= AijklBknCnl(~ei ⊗ ~ej)= AijklBkn(~ei ⊗ ~ej ⊗ ~en ⊗ ~el)Cnl(~en ⊗ ~el)= AijmlBmk(~ei ⊗ ~ej ⊗ ~ek ⊗ ~el)Ckl(~ek ⊗ ~el)= {A [BBB 222]} [CCC] (A.7)
AAA ·BBB · ~c = AijBklcm(~ei ⊗ ~ej) · (~ek ⊗ ~el) · ~em= AijBklcl(~ei ⊗ ~ej) · ~ek= AijBjlcl(~ei)= Aijcl(~ei ⊗ ~ej ⊗ ~el)Bjl(~ej ⊗ ~el)= Aijck(~ei ⊗ ~ej ⊗ ~ek)Bjk(~ej ⊗ ~ek)= {AAA222 ~c} [BBB] (A.8)
AAA ·BBBT · ~c = AijBklcm(~ei ⊗ ~ej) · (~el ⊗ ~ek) · ~em= AijBklck(~ei ⊗ ~ej) · ~el= AijBkjck(~ei)= Aijck(~ei ⊗ ~ek ⊗ ~ej)Bkj(ek ⊗ ~ej)= Aikcj(~ei ⊗ ~ej ⊗ ~ek)Bjk(~ej ⊗ ~ek)= {AAA∆∆∆ ~c} [BBB] (A.9)
Appendix B
Matlab Script
1 %#eml2
3 function [SVARS, RHS, K] = uelement(U, DU, DTIME, COORDS, PROPS)4
5 DRPLDEten = zeros(2,2);6
7 I = [1 0 0; 0 1 0; 0 0 1];8
9 Emodulus = PROPS(1);10 nu = PROPS(2);11 alpha0 = PROPS(3);12 theta0 = PROPS(4);13 t = PROPS(5);14 rpl = PROPS(6);15 DThetarpl = PROPS(7);16 rho0 = PROPS(8);17 cv0 = PROPS(9);18 k0 = PROPS(10);19
20 if DTIME == 0;21 Dt = 1;22 else23 Dt = DTIME;24 end25
26 xi1 = 1/3;27 xi2 = 1/3;28 N = [ 1 - xi1 - xi2 ; xi1 ; xi2 ];29 DN = [-1 -1 ; 1 0; 0 1];30
31 lambda0 = (Emodulus*nu)/((1+nu)*(1-2*nu));32 mu0 = Emodulus/(2*(1+nu));33
34 j = [ -(COORDS(1)+U(1))+(COORDS(4)+U(2)) -(COORDS(1)+U(1))+(COORDS(7)+U(3))35 -(COORDS(2)+U(4))+(COORDS(5)+U(5)) -(COORDS(2)+U(4))+(COORDS(8)+U(6)) ];36
37 J = [ -COORDS(1)+COORDS(4) -COORDS(1)+COORDS(7)38 -COORDS(2)+COORDS(5) -COORDS(2)+COORDS(8) ];39
40 F = zeros(3,3);41 F(1:2,1:2) = j * inv(J);42 F(3,3) = 1;43
44 Thetan = (transpose([ U(7); U(8); U(9) ]) * N);45 Theta = (transpose([ U(7)-DU(7); U(8)-DU(8); U(9)-DU(9) ])* N);46 Thetap = (Thetan-Theta)/Dt;47 g = DN * inv(j);
32
48
49 B = F * transpose(F);50
51 [v, d] = eigenvalues(B);52
53 lnV = 1/2 * LnDyadicEig(d(1,1),d(2,2),d(3,3),v(:,1),v(:,2),v(:,3));54 if abs(lnV(1,1)) ≤1e-1255 lnV(1,1) = 0;56 end57 if abs(lnV(2,2)) ≤1e-1258 lnV(2,2) = 0;59 end60 if abs(lnV(3,3)) ≤1e-1261 lnV(3,3) = 0;62 end63
64 TAU = T4dotT2((lambda0*DyadicT4(I,I)+2*mu0*T2BoxT2(I,I,3,3,3,3)),lnV,3,3,3,3)- ...65 ((3 * lambda0 + 2*mu0)*alpha0 * (Thetan - theta0) * I );66
67 Sigmar = Sigmarow(1/det(F) * TAU);68 Sigma = 1/det(F) * TAU;69 Sigmavm = sqrt(1/2*(Sigmar(1)-Sigmar(5))ˆ2+(Sigmar(5)-Sigmar(9))ˆ2 + ...70 (Sigmar(9)-Sigmar(1))ˆ2+6*(Sigmar(2)ˆ2));71
72 dTAUdtheta = PlaneStrain(-(3*lambda0 + 2*mu0) * alpha0 * I);73
74 dlnBdB = caldlnBdB(v,d);75 dBdF = T2BoxT2(I,transpose(F),3,3,3,3)+T2DeltaT2((F),I, 3,3,3,3);76 dTAUdF = T4dotT4((lambda0 * DyadicT4(I,I) + ...77 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)));86
87 Kuu = (T4toT2row(1/2 * t * detj * ...88 T4IBoxT2I(T4IBoxIT2(CTen,transpose(g),2,2,2,3,2,2),g,2,3,2,2,3,2)));89
90 Kutheta = (T21toT2row(1/2 * t * detj * DyadicT2T1(1/det(F)*dTAUdtheta * ...91 transpose(g),N,2,3,3)));92
93 fthetaint = (1/2 * t * detj * (rho0 * cv0 * Thetap * N - g * qcvec - rpl * N));94
95 Kthetau = (T12toT2row(-1/2 * t * detj * ...96 (-T2BoxT1(g,g*qcvec, 3, 2, 3) + ...97 DyadicT1T2(g * qcvec, transpose(g), 3 , 2, 3) - ...98 T2DeltaT1(g*transpose(g), qcvec, 3, 3, 2) + ...99 DyadicT1T2(N, DRPLDEten * transpose(g), 3, 2, 3) ) ) );
100
101 Kthetatheta = (1/2 * t * detj * (rho0 * cv0 / Dt * DyadicT2(N,N) + ...102 k0 * g * transpose(g) - DThetarpl * DyadicT2(N,N)));103
104 Kmatrix = [ Kuu Kutheta105 Kthetau Kthetatheta ];106 RHS = -transpose([ fuint ; fthetaint ]);107 K = transpose(Kmatrixtorow(Kmatrix));108 SVARS = transpose([Sigmar(1),Sigmar(5),Sigmar(9),Sigmar(2),Sigmar(3),Sigmavm]);109 end110
111 function [v, d] = eigenvalues(A)112 if abs(A(1,2)) ≤1e-12113 v = [1 0 0;0 1 0;0 0 1];114 d = A;
33
115 else116 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 0117 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) 0118 0
0 1 ];119 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);120 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);121
122 v = [ 1/sqrt(v1ˆ2+1) 1/sqrt(v2ˆ2+1) 0123 v1/sqrt(v1ˆ2+1) v2/sqrt(v2ˆ2+1) 0124 0 0 1 ];125 end126 end127
128 function [output] = PlaneStrain(A)129 output=zeros(2,2);130 for i = 1:2131 for j = 1:2132 output(i,j) = A(i,j);133 end134 end135 end136
137 function [output] = LnDyadicEig(a,b,c,D,E,F)138 output = log(a)*DyadicT2(D,D)+log(b)*DyadicT2(E,E)+log(c)*DyadicT2(F,F);139 end140
141 function [output] = T4dotT2(A,B,I,J,K,L)142 r=1;143 output = zeros(3,3);144 c = zeros(1,9);145 for j = 1:J146 for i = 1:I147 for l = 1:L148 for k = 1:K149 c(r) = A(k,l,i,j)*B(k,l);150 r=r+1;151 end152 end153 r=1;154 output(i,j) = sum(c);155 end156 end157 end158
159 function [output] = DyadicT4(A,B)160 output = zeros(3,3,3,3);161 for i = 1:3162 for j = 1:3163 for k = 1:3164 for l = 1:3165 output(k,l,i,j) = A(i,j)*B(k,l);166 end167 end168 end169 end170 end171
172 function [output] = T2BoxT2(A,B,I,L,K,J)173 output = zeros(3,3,3,3);174 for i = 1:I175 for j = 1:J176 for k = 1:K177 for l = 1:L178 output(k,l,i,j) = A(i,k)*B(l,j);
34
179 end180 end181 end182 end183 end184
185 function [output] = Sigmarow(A)186 output = zeros(1,9);187 r = 1;188 for j = 1:3189 for i = 1:3190 output(1,r) = A(i,j);191 r = r+1;192 end193 end194 end195
196 function [output] = caldlnBdB(v,d)197 output = zeros(3,3,3,3);198 H = zeros(3,3);199 Z = zeros(3,3,3,3);200 for i=1:3;201 for j=1:3202 if abs((abs(d(i,i))-abs(d(j,j)))) ≤1e-12203 H(i,j) = 1/d(i,i);204 else205 H(i,j) = ( log(d(i,i)) - log(d(j,j)) ) / ( d(i,i) - d(j,j) );206 end207 end208 end209 for i=1:3210 for j = 1:3211 Z = H(i,j) * DyadicT4(DyadicT2(v(:,i),v(:,j)),DyadicT2(v(:,i),v(:,j)));212 output = output + Z;213 end214 end215 end216
217 function [output] = T2DeltaT2(A,B,I,L,K,J)218 output = zeros(3,3,3,3);219 for i=1:I220 for j=1:J221 for k=1:K222 for l=1:L223 output(k,l,i,j) = A(i,l)*B(k,j);224 end225 end226 end227 end228 end229
230 function [output] = T4dotT4(A,B)231 r=1;232 output = zeros(3,3,3,3);233 c = zeros(1,9);234 for i=1:3235 for j=1:3236 for o=1:3237 for p=1:3238 for k=1:3239 for l=1:3240 c(r) = A(k,l,i,j)*B(o,p,k,l);241 r=r+1;242 end243 end244 output(o,p,i,j) = sum(c);245 r=1;
35
246 end247 end248 end249 end250 end251
252 function [output] = T2toT1row(A)253 output = zeros(6,1);254 r = 1;255 for i = 1:2256 for j = 1:3257 output(r,1) = A(i,j);258 r = r+1;259 end260 end261 end262
263 function [output] = T4toT2row(A)264 output = zeros(6,6);265 r=1;266 q=1;267 for k = 1:2268 for l = 1:3269 for i = 1:2270 for j = 1:3271 output(q,r) = A(i,j,k,l);272 r=r+1;273 end274 end275 r=1;276 q=q+1;277 end278 end279 end280
281 function [output] = T4IBoxT2I(A,B,K,L,I,M,J,M2)282 c = zeros(1,2);283 output = zeros(2,3,2,3);284 for k=1:K285 for l=1:L286 for i=1:I287 for j=1:J288 for m=1:M289 c(m) = A(i,m,k,l)*B(j,m);290 end291 output(i,j,k,l) = sum(c);292 end293 end294 end295 end296 end297
298 function [output] = T4IBoxIT2(A,B,I,M,K,L,M2,J)299 c = zeros(1,2);300 output = zeros(2,2,2,3);301 for k=1:K302 for l=1:L303 for i=1:I304 for j=1:J305 for m=1:M306 c(m) = A(i,j,k,m)*B(m,l);307 end308 output(i,j,k,l) = sum(c);309 end310 end311 end312 end
36
313 end314
315 function [output] = T21toT2row(A)316 output = zeros(6,3);317 r=1;318 q=1;319 for k = 1:2320 for l = 1:3321 for j = 1:3322 output(q,r) = A(1,j,k,l);323 r=r+1;324 end325 r=1;326 q=q+1;327 end328 end329 end330
331 function [output] = DyadicT2T1(A,b,I,J,K)332 r = 1;333 output = zeros(1,3,2,3);334 for i = 1:I335 for j = 1:J336 for k = 1:K337 output(1,r,i,j) = A(i,j)*b(k);338 r=r+1;339 end340 r=1;341 end342 r=1;343 end344 end345
346 function [output] = T12toT2row(A)347 output = zeros(3,6);348 r=1;349 q=1;350 for i = 1:3351 for k = 1:2352 for l = 1:3353 output(q,r) = A(k,l,i);354 r=r+1;355 end356 end357 q=q+1;358 r=1;359 end360 end361
362 function [output] = T2BoxT1(A,b,I,J,K)363 output = zeros(2,3,3);364 for i = 1:I365 for j = 1:J366 for k = 1:K367 output(j,k,i,1) = A(i,j)*b(k);368 end369 end370 end371 end372
373 function [output] = DyadicT1T2(a,B,I,J,K)374 output = zeros(2,3,3);375 r = 1;376 for i = 1:I377 for j = 1:J378 for k = 1:K379 output(r,k,i,1) = a(i) * B(j,k);
37
380 end381 r=r+1;382 end383 r=1;384 end385 end386
387 function [output] = T2DeltaT1(A,b,I,K,J)388 output = zeros(2,3,3);389 r = 1;390 for i = 1:I391 for j = 1:J392 for k = 1:K393 output(r,k,i,1) = A(i,k)*b(j);394 end395 r=r+1;396 end397 r=1;398 end399 end400
401 function [output] = DyadicT2(a,b)402 output = zeros(3,3);403 for k=1:3404 for l=1:3405 output(k,l)=a(k)*b(l);406 end407 end408 end409
410 function [output] = Kmatrixtorow(A)411 output = zeros(1,81);412 r=1;413 for i=1:9414 for j=1:9415 output(r) = A(j,i);416 r=r+1;417 end418 end419 end
Appendix C
UEL Template
#include <stdio.h>#include <stddef.h>#include <stdlib.h>#include <math.h>#include <float.h>#include "uelement.c"#include "rtwtypes.h"#include "rt nonfinite.h"#include "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 solution-
dependent state variables. This can be used tostore, for example, the stresses and the damage.(The only output from Abaqus self, will be thedisplacement U and the reaction forces RF).
double ENERGY[ ], For non-linear steps array ENERGY contains thevalues 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 stiffnessintroduced to control hourglassing orother 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 non-
linear problems.
39
int *NSVARS, User-defined number of solution-dependent statevariables.
double PROPS[ ], User defined (material) properties. These can beset in the input file as *UEL PROPERTY.(seechapter 4)
int *NPROPS, User-defined number of real property values.double COORDS[ ], Array containing the coordinates of the element
being calculated. This can be for example x,y,T,Dint *MCRD, The maximum number of user-defined coordinates
being used by Abaqus.int *NNODE, User-defined number of nodes on the current element.double U[ ], Total values of the variables.double DU[ ], Incremental values of the variables for the current
increment for the right-hand-side.double V[ ], Time rate of change of the variables, defined for
implicit dynamics only.double A[ ], Accelerations of the variables. Defined for
implicit dynamics only.int *JTYPE, 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 inAbaqus-Standard, for example, you can defineelement types U1, U2, U3.
double TIME[ ], time[0] = step time at beginning of increment.time[1] = total time at beginning of increment.
double *DTIME, Time increment.int *KSTEP, Current step number.int *KINC, Current increment number.int *JELEM, User-assigned element number.double PARAMS[ ], An array containing the parameters associated with
the solution procedure.int *NDLOAD, Identification number of the distributed load or
flux currently active on this element.int JDLTYP[ ], An array containing the integers used to define
distributed load types for the element.double ADLMAG[ ], For general nonlinear steps ADLMAG(K1) is the total
load magnitude of the K1th distributed load at theend of the current increment for distributed loadsof type Un.
double PREDEF[ ], An array containing the values of predefined fieldvariables, such as temperature in an uncoupledstress/displacement analysis, at the nodes of theelement.
int *NPREDF, Number of predefined field variables, includingtemperature. For user elements Abaqus-Standarduses one value for each field variable per node.
int LFLAGS[ ], An array containing the flags that define thecurrent solution procedure and requirementsfor element calculations
LFLAGS[1] Defines the procedure typeLFLAGS[2] =0 Small-displacement analysis.LFLAGS[2] =1 Large-displacement analysis
(non-linear geometric
40
effects included in thestep).
LFLAGS[3]=1 Normal implicit timeincrementation 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 residualvector for the initialacceleration calculation(or the calculation ofaccelerations after impact).
LFLAGS[3]=100 Define perturbationquantities for output
LFLAGS[4]=0 The step is a general stepLFLAGS[4]=1 The step is a linear
perturbation step.LFLAGS[5]=0 The current approximations
to UN, etc. were based onNewton corrections.
LFLAGS[5]=1 The current approximationswere found by extrapolationfrom the previous increment.
int *MLVARX, Dimensioning parameter used when severaldisplacement or right-hand-side vectors are used.
double DDLMAG[ ], or general nonlinear steps DDLMAG contains theincrements in the magnitudes of the distributedloads that are currently active on this element fordistributed loads of type Un.
int *MDLOAD, Total number of distributed loads and/or fluxesdefined on this element.
double *PNEWDT, Ratio of suggested new time increment to the timeincrement currently being used.
int JPROPS[ ], An integer array containing the NJPROP integerproperty values defined for use with this element.
int *NJPROP, User-defined number of integer property valuesassociated with the element.
double *PERIOD Time period of the current step.)
{user element(U, DU, COORDS, PROPS, SDV, SVARS, RHS, AMATRX);
}
Appendix D
Input file
*HEADING
*Node1, 0., 0.2, 0., 1.3, 1., 0.
*User element, Type=U3, Nodes=3, Coordinates=3, Properties=14,Variables=911, 21, 11
*Element, Type=U3, Elset=ALL1, 1, 3, 2
*UEL Property, Elset=ALL206400, 0.29, 1e-5, 300, 1, 0, 0, 8.19325e-9,4.35e+8, 0.2227539844, 0, 2, 1
*Nset, nset=allnodes, generate1, 27, 1
*Nset, nset=left1, 2, 11
*Nset, nset=right19, 23, 27
*Initial conditions, Type=Temperatureleft, 3000right, 100
*Step, Unsymm=YES, Nlgeom=YES, Extrapolation=NO
*STATIC0.1, 1., 0.0, 0.1
*Boundary, Type=Displacementleft, 1, 1, 0left, 2, 2, 0right, 1, 1, 0right, 2, 2, 4
*EL print, elset=ALL, position=integration pointSDV,
*Node printU, NT11
*End Step
Appendix E
Convention DOFs in ABAQUS
The degrees of freedom are always referred to as follows:
Node Degree ofnumber freedom1 x-displacment2 y-displacment3 z-displacment4 rotation about x-axis, in radians5 rotation about y-axis, in radians6 rotation about z-axis, in radians7 Warping amplitude (for open-section beam elements)8 Pore pressure, hydrostatic fluid pressure, or acoustic pressure9 Electric potential10 Connector material flow (units of length)11 Temperature (or normalized concentration in mass diffusion analysis)12 User defined13 User defined14 etc.
Appendix F
Python script
from abaqus import backwardCompatibilitybackwardCompatibility.setValues(reportDeprecated=False)
import sysfrom abaqus import *import copyfrom abaqusConstants import *#import regionToolset#import displayGroupMdbToolset as dgmimport part#import materialgimport sectionimport assemblyimport stepimport loadimport meshimport jobimport visualizationimport xyPlotimport displayGroupOdbToolset as dgofrom odbAccess import *from string import *from sys import exitfrom 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 UEL.dat\n\n’)batchfile.write(’del UEL.odb\n\n’)batchfile.write(’del UEL.lck\n\n’)batchfile.write(’del UEL.log\n\n’)batchfile.write(’del UEL.msg\n\n’)batchfile.write(’del UEL.prt\n\n’)batchfile.write(’del UEL.sta\n\n’)batchfile.write(’del 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=0counter=0for 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 = 0counter=counter+1if counter==2:
counter=0list.append([[],[]])
inputfile.close()return list
def read inputfile(inpfile):
inputfile= open(datfile, ’r’)list=[ [], [] ] write=0counter=0for 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 = 0counter=counter+1if counter==2:
breakinputfile.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=0for frame in listvalue:
for gp in frame[0]:i=0for gpv in gp[2:]:
Gausspointvalue[f][i][int(gp[0])]=[gpv]i=i+1
f=f+1
f=0for 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=1for 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+1if 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+1if 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=1for 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=1for 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=1for 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=1valuetable=[]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, ))