Beruflich Dokumente
Kultur Dokumente
Michael Trapp
Andreas Öchsner
Computational
Plasticity for
Finite Elements
A Fortran-Based
Introduction
SpringerBriefs in Applied Sciences
and Technology
Computational Mechanics
Series editors
Holm Altenbach, Lehrstuhl Technische Mechanik, Institut für Mechanik,
Otto-von-Guericke-Universität Magdeburg, Magdeburg, Germany
Andreas Öchsner, Faculty of Mechanical Engineering, Esslingen University of
Applied Sciences, Esslingen am Neckar, Germany
Lucas F. M. da Silva, Department of Mechanical Engineering, University of Porto,
Porto, Portugal
More information about this series at http://www.springer.com/series/8886
Michael Trapp Andreas Öchsner
•
Computational Plasticity
for Finite Elements
A Fortran-Based Introduction
123
Michael Trapp Andreas Öchsner
TU Munich Faculty of Mechanical Engineering
Munich Esslingen University of Applied Sciences
Germany Esslingen am Neckar
Germany
In this book, we want to demonstrate the use of the classic programming language
FORTRAN for numerical computing in the context of the finite element method.
For this purpose, we are focusing specifically on the subject of computational
plasticity.
FORTRAN is a programming language, specifically designed for scientific and
engineering applications. Since its initial release in the 1950s, many upgrade fea-
tures have been added.
FORTRAN has asserted itself due to its practical use. Unlike earlier programs
with machine or assembly code, FORTRAN uses higher language with abstract
words and syntax, which automize computation instructions. This makes the code
easy to read and write, and much less prone to bugs.
A decided advantage of FORTRAN is its flexibility. As it does not depend on a
particular computing system, a transfer is very simple. In this context, it should be
noted that all classical finite element packages are written in this language. Some
even offer an interface to link one’s own code to the commercial package. As a
general-purpose tool, FORTRAN is a modern alternative for numerical computing
and scientific programming. As opposed to many numerical software, FORTRAN
is always transparent and easy to work with.
We look forward to receiving some comments and suggestions for the next
edition of this textbook.
v
Acknowledgements
vii
Contents
1 Theoretical Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Behavior of Elasto-Plastic Materials . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 One-Dimensional Continuum Approach . . . . . . . . . . . . . . . . . . . . . 7
2.1 One-Dimensional Continuum Theory . . . . . . . . . . . . . . . . . . . . . 7
2.2 FORTRAN Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 One-Dimensional Finite Element Approach . . . . . . . . . . . . . . . . . . . 19
3.1 One-Dimensional Finite Element Theory . . . . . . . . . . . . . . . . . . 19
3.2 FORTRAN Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4 Three-Dimensional Finite Element Approach . . . . . . . . . . . . . . . . . 33
4.1 Three-Dimensional Finite Element Theory . . . . . . . . . . . . . . . . . 33
4.2 FORTRAN Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5 Summary and Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6 FORTRAN Source Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.1 One-Dimensional Continuum Model . . . . . . . . . . . . . . . . . . . . . . 48
6.2 One-Dimensional Finite Element Models . . . . . . . . . . . . . . . . . . 53
6.3 One-Dimensional CPP Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 68
6.4 Three-Dimensional Finite Element Model . . . . . . . . . . . . . . . . . . 71
Appendix A: FORTRAN Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
ix
Symbols and Abbreviations
xi
xii Symbols and Abbreviations
Mathematical Symbols
Multiplication sign (used where essential)
…T Transposed
(…)−1 Inverse
@n Nth partial derivative with respect to n
@nn
a Vector, tensor or matrix
det ¼ j. . .j Determinant/absolute value
sgn Signum function
N Natural numbers 1, 2, 3…
Indices, Superscripted
…° Volumetric
…’ Deviatoric
Symbols and Abbreviations xiii
…el Elastic
…elpl Elasto-plastic
…pl Plastic
…init Initial, at the start of plastic regime
…j Of iteration j
…m Of element m
…i Of node i
…t Trial
Indices, Subscripted
…c Compression
…eff Effective
…eq Equivalent, effective
…long Longitudinal
…n Of increment n
…t Tension
…tvs Transversal
. . .T Tangent, tangential
…x x-direction
…y y-direction
…z z-direction
Abbreviations
1D One-dimensional
2D Two-dimensional
3D Three-dimensional
const Constant
CPP Closest point projection algorithm
FE Finite element(s)
FEM Finite element method
FIBE Fully implicit backwards Euler method
lin Linear
non-lin Non-linear
NR Newton–Raphson method
PR Poisson’s ratio ”
red Reduced
SIBE Semi-implicit backwards Euler method
tol Tolerance
v.M. von Mises
Chapter 1
Theoretical Foundation
Ductile solids subjected to a uniaxial external load (a total force F0 ) produce in the
elasto-plastic range a yield stress k within the body that leads to strain (deformation)
ε of the material. A fundamental objective of material models is to find a relation
between the strain ε and the acting stress σ. Figures 1.1a and b show examples of
one-dimensional stress-strain curves for elasto-plastic materials [13].
As long as the initial yield stress kcinit (for compression) or ktinit (for tension) is not
reached, the deformation is purely elastic. In the elastic regime, the (incremental)
stress-strain relation is linear, expressed explicitely by Hooke’s law [31]:
The slope is equal to a constant called the Young’s modulus E. After the applied
load is removed, the deformed object returns back to its original undeformed shape.
Accordingly, the yield stress k takes the same path for loading and unloading in the
stress-strain graph (under the assumption of isotropic hardening) [17].
Once the external load exceeds the initial yield stress k init of the material, elasto-
plastic deformation occurs. In this case, the deformation is no longer purely elastic,
but also plastic (permanent). An elasto-plastically deformed object does not return
back to its original undeformed shape, as loading and unloading paths are different
[6, 17].
Figure 1.1a shows an example of a loading and unloading path. During loading,
the slope in the plastic regime is equal to the elasto-plastic modulus E elpl [7, 31, 34]:
dσ
E elpl = . (1.2)
dε
(a) (b)
Fig. 1.1 Uniaxial stress-strain graphs for an elasto-plastic material with (a) arbitrary isotropic
hardening and (b) linear and ideal isotropic hardening
Young’s modulus E and the elasto-plastic modulus E elpl are combined in the tangent
modulus Ẽ [26]:
E, elastic regime
Ẽ = (1.3)
E elpl plastic regime .
During unloading, the unloading curve has the slope of Young’s modulus E. After
unloading, a plastic strain εpl remains. When reapplying the load, the loading path
is now different, because the yield strength function k is different [17].
An explicit function for all possible loading and unloading paths cannot be defined.
A usual alternative is to use the instantaneous stress and strain rates to describe a
particular position on the deformation path [26].
To simplify the model, we make the following assumptions for the following deriva-
tions:
1. The model is one-dimensional, albeit still abiding continuum laws.
2. Deformations are small, thus geometric nonlinearities are negligible.
3. Deformation does not lead to fracture.
4. The material is isotropic, behaving the same in all directions.
5. As the load is not reversed at any time, no kinematic hardening occurs.
6. The loading process is quasi-static and hence not time-dependent.
1.2 Mathematical Model 3
Yield Condition
To determine whether or not a plastic strain occurs, a yield condition F [3, 31] is
defined:
⎧
⎪
⎨< 0 : elastic material behavior
F(σ, q) = 0 : elasto-plastic material behavior . (1.4)
⎪
⎩
>0: invalid state (needs correction)
Besides the acting stress σ, the yield condition also depends on the past deformation
history [26], taken into account by some internal material variable q. The yield
condition is calculated, for example, by comparing a yield criterion f (σ) to an
experimental yield stress curve k = k(q), derived from uniaxial test data:
The yield criterion f (σ) is formulated with the effective stress σeff [18], a scalar value
derived from the acting stress components œ. In the special case of one-dimensional
loading, the effective stress equals the applied load œ = σ = σeff . For general three-
dimensional loading, finding a representative effective stress is more difficult. It is
not feasible to carry out experiments for all combinations of different multiaxial
stress states. Instead, yielding is predicted with yield condition theories such as the
von Mises or the Tresca yield conditions, discussed in Chap. 4.
Flow Rule
An infinitely small total strain increment dε can be divided into an elastic and a
plastic part [6, 17, 18, 31], as visualized in Fig. 1.1a:
dσ
dεel = . (1.7)
E
The evolution of the infitesimal plastic strain increments dεpl is described by the flow
rule [31]:
dεpl = dλr (σ, q) . (1.8)
The factor dλ ≥ 0 is called the consistency parameter and corresponds to the mag-
nitude of the increment:
pl
dλ = |dεpl | = dεeff . (1.9)
r stands for the function of flow direction and determines the sign of the value of
dεpl . Generally, r is described by some independent plastic potential Q, resulting in
4 1 Theoretical Foundation
Material Hardening
Plastic deformation causes material hardening, which in turn increases the yield
stress k. Further plastic deformation only occurs beyond the new yield limit. The
stress increment solely due to material hardening is [31]:
Rearranging Eq. (1.14) and substituting in Eq. (1.9) (flow rule) results in:
pl σdεpl σr (σ, q)
dq = dκ = dεeff = = dλ . (1.15)
σeff σeff
h(σ,q)
The hardening function h [31] describes the evolution of the hardening parameter,
pl
in our case dq = dκ = dεeff :
σr (σ, q)
h= . (1.16)
σeff
Isotropic hardening can be subdivded into three idealized types, shown in Fig. 1.1:
idealized, linear and arbitrary.
1.2 Mathematical Model 5
In the general case of arbitrary material hardening, the stress-strain relation in the
plastic regime is non-linear. This is due to the fact that the plastic modulus E pl and
the elasto-plastic modulus E elpl both are non-linear [34]:
dσ E E pl (κ)
E elpl (κ) = = . (1.18)
dε E + E pl (κ)
In contrast to arbitrary hardening, for linear hardening the plastic and elasto-plastic
moduli are both constant. This results in a linear stress-strain relation in the plastic
regime:
E E pl
σ = E elpl ε = ε . (1.19)
E + E pl
In the case of ideal plasticity, no hardening occurs (see Fig. 1.1b). Therefore the
plastic and elasto-plastic moduli vanish:
E pl = E elpl = 0 . (1.20)
Chapter 2
One-Dimensional Continuum Approach
Abstract In this chapter, the elasto-plastic material model is analyzed with numeri-
cal methods. For this purpose, simple tensile tests are carried out. The test geometry
is modeled in the simplest way, as a one-dimensional continuum. After the theory,
example numerical algorithms are discussed for different test setup conditions.
To simplify the model, we accept a small error by neglecting transversal strain and
by setting ν = 0. This results in an idealized pure uniaxial deformation.
Now, we want to find a stress-strain relationship and need to integrate the rate
equations. However, an analytic approach generally is not feasible, as the stress-
strain functions are not unique (explicit).
The alternative is to solve the model with numerical methods by using incremental
loads, as illustrated in Fig. 2.2. For every load increment, a local algorithm is applied.
The input consists of the values from the previous state at load increment n and an
external strain increment εn . The algorithm interprets the input and calculates the
values for the next state at load increment n + 1. The output now serves as input for
the next load increment, along with another strain increment.
(a) (b)
In a force-controlled setup, the total applied force Ftot is divided into n = inc >
0 increments σn , n = 1, 2, ..., inc. Although differently sized increments may
increase the accuracy of the results, we choose equally sized increments σ for
simplicity and educational purpose. Consequently, the stress σn , n = 0, 1, ..., inc is
known at every state.
The strain increments εn , n = 1, 2, ..., inc are evaluated with the Newton
(Newton- Raphson) method [15, 31, 34, 44], illustrated in Fig. 2.3.
Generally, the algorithm tries to find a specific zero x of a function f (x): First, an
appropriate point xn on the function graph is chosen. Then the point of intersection
xn+1 between the tangent line and the x-axes is evaluated. The tangent line goes
through the point f (xn ) and has a slope of f (xn ). After a point xn+1 is found, its
function value f (xn+1 ) is the new starting point. The algorithm repeats itself until
subsequent iterations of the solution variable fall below a tolerance tol = xn+1 − xn .
The Newton method is summarized by the following iterative equation [28, 30, 31,
43]:
f (xn )
xn+1 = xn − . (2.2)
f (xn )
j+1 σ
εn+1 = εnj − j
. (2.3)
Ẽ n
The iteration counter within the current increment n is denoted by j = 1, 2, .... The
j j
tangent modulus Ẽ n = Ẽ n (κ) is not constant and needs to be iterated as well, which
is explained later.
In a displacement-controlled setup, there is no need to calculate the strain incre-
ments εn = ε, as they are already defined.
10 2 One-Dimensional Continuum Approach
j
Once a strain increment εn is found, the values of the current increment are
updated using a local integration scheme. A classical example is the implicit back-
ward Euler method [30, 31, 43]: For every increment, a solution is first predicted.
In the case that the predicted solution is invalid, it is projected back towards a valid
state.
The algorithm consists of many predictor-corrector steps [15], as shown in Fig. 2.4,
for a displacement controlled setup. The stress increments σn in the plastic regime
are equal, as the hardening function is linear. The implicit backward Euler method
is also called predictor-corrector method, back projection method, radial return map-
ping or closest point projection.
An example predictor-corrector step [31, 39] is shown in Fig. 2.5. First, a trial
stress state σn+1
t
is evaluated:
σn+1
t
= σn + Eεn = σn + Eεnel . (2.4)
As the predictor step is purely elastic, the plastic strain εpl and the equivalent plastic
strain κ do not change:
κn+1
t
= κn . (2.5)
At this point, it needs to be determined if the trial state is valid [31, 39]. For this
purpose, Eq. (1.4) (yield condition) is applied. If the trial state is in the elastic regime
t
F(σn+1 , κn+1
t
) < 0, as shown in Fig. 2.6a, no correction needs to be made towards
the stress:
2.1 One-Dimensional Continuum Theory 11
Fig. 2.6 Visualization of possible trial stress states for a predictor-corrector step: trial stress a in
the elastic regime b and c in the plastic regime
σn+1 = σn+1
t
. (2.6)
In this case, no plastic deformation occurs and the effective plastic strain does not
change:
κn+1 = κn+1
t
. (2.7)
However, if the trial state is in the plastic regime, the predicted step is invalid,
t
F(σn+1 , κn+1
t
) > 0, as shown in Figs. 2.6b and c. In this case, the trial state has to
be projected back towards a valid stress state. This is done by means of a plastic
pl
corrector σn [31, 39], visualized in Fig. 2.5:
To update all state values, another Newton algorithm is applied, this time within
the increment. First, a vector m of residuals is defined, containing the stress residual
rσ , the effective plastic strain residual rκ , and the yield condition residual r F [31]:
⎡ ⎤ ⎡ ⎤
rσ σ − σn+1
t
+ λEsgn(σ )
m = ⎣ rκ ⎦ = ⎣ κ − κnt − λ ⎦ = 0 , (2.9)
rF F(σ, κ)
Now, the vector of unknowns is iterated by the use of Eq. (2.2) (Newton method):
−1
j+1 j dm j j
v n+1 = v n+1 − (v ) m(v n+1 ) . (2.11)
dv n+1
j
The matrix dm
dv
(v n+1 ) results from differentiating every component of m with respect
to every component of v [31]:
⎡ ∂rσ ∂rσ ∂rσ ⎤ ⎡ ⎤
E −1
j
∂σ ∂κ ∂λ 0 sgn(σn+1 )
dm j
(v n+1 ) = ⎣ ∂r
∂σ
κ ∂rκ ∂rκ ⎦
∂κ ∂λ
=⎣ 0 −1 1 ⎦. (2.13)
dv ∂r F ∂r F ∂r F j
∂σ ∂κ ∂λ sgn(σn+1 ) − dκ
dk
0
Generally, the iterated solution is not sufficient after just one iteration, as visualized
in Fig. 2.7b. The procedure needs to be repeated several times, until the solution
j+1 j
vector iterations fall below a prescribed tolerance tol > |v n+1 − v n+1 |.
In the special case of linear hardening ( dκ = E pl = const.), we only need one
dk
(a) (b)
Fig. 2.7 Illustration of the predictor-corrector method for a linear hardening and b arbitrary hard-
ening
dm 0 −1
v n+1 = v 0 − (v ) m(v 0 )
dv
⎡ t⎤
σn
E
= ⎣ κn ⎦ − ×
0 E + E pl (2.15)
⎡ ⎤⎡ ⎤
E pl −sgn(σn+1 t
)E pl sgn(σn+1
t
) 0
⎣sgn(σn+1
t
) −1 −E −1 ⎦ ⎣ 0 ⎦ .
−1 pl
sgn(σn+1 )
t
E E −E −1 t
Fn+1
Substituting Eq. (2.16) into the first line of Eq. (2.15) leads to:
t
Fn+1 E
σn+1 = 1 − σt . (2.17)
E + E pl |σn+1
t
| n+1
Substituting Eq. (2.16) into the second line of Eq. (2.15) results in:
t
Fn+1
κn+1 = κn + . (2.18)
E + E pl
In Fig. 2.8, the transition point (angular point) from the elastic to plastic regime
requires special consideration.
j
The following case differentiation is made for the tangent modulus Ẽ n [31]:
14 2 One-Dimensional Continuum Approach
⎧
⎪
⎨ E, elastic regime
Ẽ nj = E nint, j , transition regime . (2.19)
⎪
⎩ pl
E , plastic regime
To evaluate the intermediate modulus E int in the transition regime, the following
iteration is used:
j j
σn+1 σn+1 − σn
E nint, j = j
= j
. (2.20)
εn+1 εn+1 − εn
The secant method in Eq. (2.20) can be applied in a much broader sense to numerically
j
approximate the tangent modulus Ẽ n+1 for arbitrary material hardening [31]:
j j
j σn σn+1 − σn
Ẽ n+1 (κ) = j
= j
. (2.21)
εn εn+1 − εn
Now, we can condense the tangent modulus to one iterative equation, instead of
distinguishing between elastic and plastic regime.
An example problem with specific values is adopted from [31]. The setup is shown
in Fig. 2.9. One side of the specimen is fixed to a wall to facilitate calculation.
For now, we choose a linear material hardening function and prescribe a total
force Ftot . An example numerical solution algorithm is presented in Fig. 2.10. Every
step is recorded in the output file.
The external input text file is named ‘_Input.txt’ and is presented in Sect. 6.1. The
algorithm reads the following input values from the text file, see step (1) in Fig. 2.10:
Young’s modulus E, the plastic modulus E pl , the initial yield stress k init , the total
prescribed force Ftot , the total prescribed displacement u tot (not relevant for now),
2.2 FORTRAN Examples 15
(a) (b)
Fig. 2.9 Example tensile test setup for a 1D continuum model with a material properties and b
geometric properties
the specimen length L, the total number of increments inc, and the cross sectional
area A of the specimen. For better handling, a few more input values are introduced:
the tolerance values T olC P P and T ol I Loop for the Newton- Raphson iterations,
a flag LinC P P to switch between a linear and non-linear hardening function, and a
flag Fcontr olled to switch between a force-controlled and a displacement-controlled
setup. As we now consider a force-controlled setup and a linear hardening function,
we set both flags to ‘T’ (‘true’).
The main file for the continuum model, named ‘Conti1D.f’, is listed in Sect. 6.1,
along with the corresponding continuum subroutines file, named ’ContiSubrou-
tines1D.f’. We start at the initial increment n = 0 and set all values to 0, as shown
in step (2) of Fig. 2.10. This includes the acting stress σn , the applied force Fn , the
displacement u n , the total strain εn and the (effective) plastic strain κn . Furthermore,
we assume that the initial tangent modulus Ẽ 0 = E equals Young’s modulus, as we
start in the elastic regime.
As shown in step (3) of Fig. 2.10, a query n == inc now determines whether the
final increment n = inc is reached. As this is not yet the case, the increment counter
n is increased to n + 1, see step (4) of Fig. 2.10.
At this point, we enter the outer loop. In step (5) of Fig. 2.10, we reset the iteration
j
counter j = 0 and the iterated strain εn+1 = 0. Next, in step (6), we record the current
state values σn , u n and εn . Afterwards, in step (7), we calculate the force increment:
Ftot
F = . (2.22)
inc
From this, we calculate the stress increment:
F
σ = . (2.23)
A
Now, in step (8), we enter the inner loop. First, we increase the iteration counter to
j + 1. Then, in step (9), we calculate the strain and displacement increments:
16 2 One-Dimensional Continuum Approach
(3) query
n == inc
no
outer loop
(force-controlled setup only) ΔF, Δσ
no
(12) iterated solution (with CPP) Δλj+1
n+1 , σ j+1 j+1 j+1
n+1 , κn+1 , Ẽn+1
yes
(13) tolerance check εj+1 j
n+1 − εn+1 < tol
Fig. 2.10 Flow chart of an example global integration algorithm for a one-dimensional continuum
model
2.2 FORTRAN Examples 17
j+1
σn+1 − σn+1
εnj+1 = j+1
, (2.24)
Ẽ n
u nj+1 = Lεnj+1 . (2.25)
j+1
In Eq. (2.24), the term σn+1 − σn+1 describes the remaining portion of the prescribed
stress increment σn = σ .
Next, stress and strain are updated, according to step (10):
j+1 j
εn+1 = εn+1 + εnj+1 , (2.26)
j+1 j
u n+1 = u n+1 + u nj+1 . (2.27)
At this point, the input data is complete and the CPP algorithm is executed. In
the Fortran codes, the file containing the CPP algorithm subroutines is named
’CPPSubroutines1D.f’ and can be found in Sect. 6.3.
The CPP algorithm begins by calculating a trial state, checked for validity with
the yield condition, as described in step (11). In case the trial state is elastic with
t
Fn+1 ≤ 0, the inner loop is exited. However, if the trial state is elasto-plastic with
t
Fn+1 > 0, the values need to be iterated, using Eq. (2.16) (to calculate λn+1 ),
Eq. (2.17) (to calculate σn+1 ) and Eq. (2.18) (to calculate κn+1 ), according to step
(12) of Fig. 2.10.
Next, a tolerance check is conducted, according to step (13). If the tolerance
j+1 j
tol < εn+1 − εn+1 is exceeded, the CPP algorithm is executed again. When the
tolerance is not exceeded any more, the algorithm exits the inner loop and returns to
the outer loop.
In the outer loop, the current (iterated) values are adopted as starting values for
the next increment n + 1, see step (14). The outer loop then repeats itself until the
final increment n = i. At last, in step (15), the output recorded in the corresponding
output file. In a variation of the setup, a function of the plastic modulus E pl (κ) is
considered:
E pl (κ) = 1.29 × 104 − 2.5 × 105 × κ . (2.28)
At step (12) in Fig. 2.10, the material hardening function is no longer linear and the
general form of the CPP algorithm has to be applied, see Eqs. (2.9)–(2.14). In the
Fortran program, the user chooses a non-linear function simply by setting the flag
LinC P P to ’F’ (’false’).
We now consider yet another test setup. This time, the setup is not force-controlled,
but instead displacement-controlled. This is achieved by setting the flag Fcontr olled
in the input file ’_Input.txt’ to ’F’ (’false’), see Sect. 6.2.
As before, we read the input variables, set all values to zero and assume Ẽ 0 = E.
In the outer loop, we again reset the iteration counter j = 0 and record the current
state values. However, in contrast to the force-controlled setup, the total displacement
is prescribed. Therefore, we do not calculate force increment, but instead calculate
the displacement and strain increments directly, see step (7) in Fig. 2.10:
18 2 One-Dimensional Continuum Approach
u tot
u = , (2.29)
inc
u
ε = . (2.30)
L
We also do not need to iterate the displacement and strain increments, see step (9) in
j+1 j+1
Fig. 2.10. After updating the displacement u n+1 (see Eq. 2.27) and the strain εn
(see Eq. 2.26), the CPP algorithm is executed. Analogously to the force-controlled
setup, the CPP algorithm needs to be adjusted according to the prescribed hardening
function. After the CPP algorithm, the inner loop is left and the state values in the
outer loop are updated. The outer loop is repeated until the final increment n = inc.
Chapter 3
One-Dimensional Finite Element
Approach
As before, the tensile test specimen is a bar with constant cross-sectional area A and
length L, modeled as a one-dimensional member. According to the finite element
method [40], this member is subdivided into m = 1, 2, ..., ele elements (Fig. 3.1),
and i = 1, 2, 3, ..., ele + 1 = nod nodes (Fig. 3.2).
The mathematical model differenciates between nodal values and elemental val-
ues. A displacement u i and force F i pertain to node i, while stress σ m , strain εm and
tangent modulus Ẽ m (u) correspond to element m.
For one element ele = 1 (and hence nod = ele + 1 = 2 two nodes), the defor-
mation u n+1 at the next increment n + 1 can be modeled with the following set of
non-linear equations [2, 23, 31]:
1
A Ẽ u 1n+1 − Ẽ u 1n+1 u n+1 Fn+1
1
2 2 = , (3.1)
L − Ẽ u n+1 Ẽ u n+1 u 2n+1 Fn+1
2
K (u)u = F , (3.2)
An alternative representation for one element is given with the tangent stiffness
K = K̃ = K T = LA Ẽ [27, 34]:
1
K u 1n+1 −K u 1n+1 u n+1 Fn+1
1
= . (3.3)
−K u 2n+1 K u 2n+1 u 2n+1 Fn+1
2
As the specimen is fixed to the wall on the left-hand side, node i = 1 does not
move in position:
u 1n = u 1n = 0 ∀ n . (3.4)
to:
A Ẽ (u n+1 )
u n+1 = Fn+1 . (3.5)
L
Equation (3.5) is satisfied only for an infinitesimal small disturbance dFn+1 ,
because Ẽ(u n+1 ) is only an incremental approximation of the exact modulus. Thus:
A Ẽ (u n+1 )
du n+1 = dFn+1 . (3.6)
L
However, in the actual numerical approach, the increment is finite. Assuming the
force increment is prescribed, the displacement is arbitrarily close to the final, fully
iterated value. Then, there must exist an arbitrary small force residual r such that
[7, 16, 31]:
A Ẽ (u n+1 )
r (u n+1 ) = u n+1 − Fn+1 = 0 (3.7)
L
= K (u n+1 ) u n+1 − Fn+1 = 0 . (3.8)
3.1 One-Dimensional Finite Element Theory 21
Application of the TAYLOR series of first order on the residual yields an iteration
equation [26, 31, 44]:
∂r
j
j+1 j j+1 j
r u n+1 = r u n+1 + u n+1 − u n+1 = 0 , (3.9)
∂u n+1
j
δ u n+1
where j denotes the current iteration within the increment n. Rearranging Eq. (3.9)
yields the objective, an equation to iterate the displacement increment [26, 31, 44]:
j
r u n+1
j+1 j
u n+1 = u n+1 − j . (3.10)
∂r (u)
∂u n+1
The derivative is not yet defined. Therefore, we rearrange Eq. (3.10) to obtain the
tangent stiffness K :
j j+1 j
r u n+1 − r u n+1
j ∂r (u)
K u n+1 = ≈ . (3.11)
∂u n+1
j+1
u n+1 − u n+1
j
j
The tangent stiffness is only exact if either j → ∞ and/or u n+1 → 0. Substi-
tuting Eq. (3.11) into Eq. (3.10) yields [16]:
j
r u n+1
j+1 j
u n+1 = u n+1 − . (3.12)
j
K u n+1
With the fully iterated incremental displacement from the previous increment
j=0
u n = u n+1 as starting value, Eq. (3.12) is evaluated in an iterative manner
j = 0, 1, 2, ... until falling under a user prescribed arbitrarily small tolerance t end >
j+1 j
u n+1 − u n+1 .
j+1
The tangent stiffness K n+1 for the next iteration is calculated by differentiating
Eq. (3.8) [31, 44]:
j+1 j
∂r (u) ∂ K (u) j j
= u n+1 + K u n+1 . (3.13)
∂u ∂u
n+1 n+1
j+1
= K u n+1
j
∂ K (u)
The tangent stiffness derivative ∂u n+1
can be approximated, e.g. with the
forward Euler method [31]:
22 3 One-Dimensional Finite Element Approach
j j
∂ K (u n ) K (u n+1 ) − K (u n )
= . (3.14)
∂u n+1
j
u n+1 − u n
displacement u is not subdivided into a plastic and elastic part, unlike the strain
ε = εel + εpl .
Hence we approximate the tangent modulus Ẽ by using Eq. (2.20), as before.
Following this, the tangent stiffness K = LA Ẽ is substituted in Eq. (3.10) to iterate
the displacement increment.
Now, a general test setup with m = ele ∈ N finite elements and i = nod = ele +
1 nodes is considered.
Multiple Elements
The system of equations is [2, 23, 31, 34]:
K u = F . (3.15)
The global stiffness matrix K contains the elemental stiffnesses K m [12, 31, 40]:
⎡ ⎤
K1 −K 1
⎢−K K + K
1 1 2 −K 2 ⎥
⎢ ⎥
⎢ −K 2 K 2 + K 3 −K 3 ⎥
⎢ ⎥
⎢ −K 3 K +K
3 4 ⎥
⎢
K =⎢ ⎥. (3.16)
... ... ... ⎥
⎢ ⎥
⎢ −K nod−3 K nod−3 + K nod−2 −K nod−2 ⎥
⎢ ⎥
⎣ −K nod−2 K nod−2 + K nod−1 −K nod−1 ⎦
−K nod−1 K nod−1
And last, the force increment vector F contains nodal force increments F i .
In our examples, a force is only applied at the last node i = nod:
⎡ ⎤ ⎡ ⎤
F 1 0
⎢ F 2 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ F 3 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ F 4 ⎥ ⎢ 0 ⎥
⎢
F = ⎢ ⎥ ⎢
=⎢ ⎥. (3.18)
.. ⎥
⎢ . nod−2 ⎥ ⎢...⎥
⎥
⎢F ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣F nod−1 ⎦ ⎣ 0 ⎦
F nod F
Applying the Taylor series approximation of first order leads to [31, 44]:
∂r (u) j
j+1 j j+1 j
r un+1 = r un+1 + un+1 − un+1 = 0 . (3.20)
∂u
n+1
j
j δ un+1
=K un+1
⎡ ⎤⎡ ⎤ ⎡ ⎤
K1 −K 1 0 0
⎢−K 1 K 1 + K 2 −K 2 ⎥ ⎢ u 2 ⎥ ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ −K 2 K 2 + K 3 −K 3 ⎥ ⎢ u 3 ⎥ ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ −K 3 K +K
3 4
⎥ ⎢ u ⎥ ⎢ 0 ⎥
4
⎢ ⎥⎢ ⎥=⎢ ⎥.
⎢ ... ... ... ... ... ... ... ⎥⎢ ... ⎥ ⎢...⎥
⎢ ⎥ ⎢ nod−2 ⎥ ⎢ ⎥
⎢ −K nod−3 K nod−3 + K nod−2 −K nod−2 ⎥ ⎢u ⎥ ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣ −K nod−2 K nod−2 + K nod−1 −K nod−1 ⎦ ⎣u nod−1 ⎦ ⎣ 0 ⎦
−K nod−1 K nod−1 u tot F
(3.22)
The global stiffness matrix K is given as input, as well as the prescribed displace-
ment increments u 1 = 0 and u nod = u tot .
The objective for now is calculate the nodal force increment F nod = F, which
is acting on the last node n = nod. This cannot be done directly because the nodal
displacement increments u i , i = 1, nod outside the boundary are unknown.
Instead, the system of equations can be solved manually by the method of insertion.
The second row of Eq. (3.22) yields:
K1 + K2 1 1
(K + K )u = K u ↔ u =
1 2 2 2
u 2 = K 1 u 2
3 3
+ 2 .
K2 K1 K
(3.23)
The third row of Eq. (3.22) yields:
K2 + K3 K2
− K 2 u 2 + (K 2 + K 3 )u 3 = K 3 u 4 ↔ u 4 = u 3
− u 2 .
K3 K3
(3.24)
Substitution of Eq. (3.23) into Eq. (3.24) yields:
K2 + K3 K1 + K2 K2 1 1 1
u = 4
− u = ... = K u
2 1 2
+ 2+ 3 .
K3 K2 K3 K1 K K
(3.25)
3.1 One-Dimensional Finite Element Theory 25
n−1
−1
u = K u
n 1 2
Ki , 3 ≤ n < nod . (3.26)
i=1
n
−1
u n+1 = K 1 u 2 Ki (3.27)
i=1
n−1
i −1 n −1
= K 1 u 2 K + K (3.28)
i=1
n−1
−1 −1
= K u1 2
Ki +K 1 u 2 K n (3.29)
i=1
u n
1
K
= u n + u 2 . (3.30)
Kn
Rearranging Eq. (3.30) yields:
K n u n+1 − u n = K 1 (u 2 − u 1 ) = F n+1 = F 2 = 0 . (3.31)
As the force increments F n = 0 all vanish for 1 < n < nod, the statement is
true. Not necessarily so for the elemental stress σ m , e.g. in the case that the tangent
stiffnesses K m are not equal.
Q.E.D.: The statement Eq. (3.26) is valid.
With Eq. (3.26), the second last row of Eq. (3.22) can be rewritten as:
n−3 n−2
−1
− K n−2 K 1 u 2 (K i )−1 + K n−2 + K n−1 K 1 u 2 Ki −K n−1 u n = 0 .
i =1 i =1
u n−2 u n−1
(3.32)
n−1
−1
u n = u 2 K 1 Ki . (3.33)
i =1
26 3 One-Dimensional Finite Element Approach
An example problem with a single finite element ele = 1 is adopted from [31]. The
test setup is shown in Fig. 3.4 and an example Fortran program is presented in
Sect. 6.2.
First, we focus on a force-controlled setup. The respective algorithm is visualized
with a structural diagram in Fig. 3.5. All steps are recorded in the output file. In
step (1) of Fig. 3.5, the input is the same as for the continuum model, including the
cross-sectional area A, the initial yield stress k init , Young’s modulus E = Ẽ n=0 , the
length L and a prescribed force Ftot or displacement u tot .
Initially for n = 0, the state values (σn , εn , κn , u n and Fn ) are all reset to zero, see
step (2). Additionally, the initial tangent modulus Ẽ 0 = E is assumed to be elastic,
while the tangent stiffness K = LA Ẽ is derived from the tangent modulus.
In step (3), the query n == inc checks if the last increment is reached. If this
is not the case, the algorithm enters the outer loop. Here, the increment counter is
increased in step (4). Next, we reset both the iteration counter j = 0 and the iterated
j
displacement u n+1 = 0 in step (5). Afterwards, we update the state variables σn , εn
and u n in step (6). In step (7), we calculate the force increments F = inc Ftot
, as well
as the residual r = −F.
EA
(2) initial state values σ0 = F0 = u0 = ε0 = κ0 = 0, K0 = L
(3) query
n == inc
no
j=0
or {Δu, Δε}
outer loop
(7) load increment ΔF, rn+1
Fig. 3.5 Flow chart of an example global integration algorithm for a one-dimensional model with
one finite element
28 3 One-Dimensional Finite Element Approach
In the inner loop, we first increase the iteration counter in step (8). Aftwards, in
step (9), we calculate the displacement increment, and from this the strain increment:
j+1
rn
u nj+1 = − j+1
, (3.35)
Kn
j+1
u n+1
εnj+1 = . (3.36)
L
In step (10), we update the displacement and the strain:
j+1 j
u n+1 = u n+1 + u nj+1 , (3.37)
j+1 j
εn+1 = εn+1 + εnj+1 . (3.38)
Now, in step (11), the CPP algorithm is called, which is the same algorithm already
used for the continuum model (see Sect. 6.3 for the code). The output, among others,
j+1
is an iterated tangent modulus Ẽ n . With this, the tangent modulus and the residual
are updated in step (12):
A j+1 j+1 j
K nj+1 = Ẽ r = rn+1 + K nj+1 u nj+1 . (3.39)
L n n+1
After updating the residual, the algorithm undergoes a tolerance check in step
j+1 j
(13), with the exit condition: tol > u n+1 − u n+1 . For the iteration, the algorithm is
then repeated from step (8). When the difference drops below the threshold tol, the
iterated state values are adopted in step (14) and make up the starting values for the
next increment n + 1.
The outer loop is repeated until the final increment n == i is reached, in which
case the algorithm ends in step (15).
For the displacement-controlled variation, no residual has to be formulated in step
(7), as the displacement increments u are already given. Instead, the displacement
increments can be calculated directly in this step. Similarly, in step (12), the residual
update is not neccessary. This leads to some simplifications.
In a new test, we now want to discretize the bar with multiple elements. An
example setup with multiple finite elements, adopted from [31], is shown in Fig. 3.6.
For the test, a bar with two different materials is analyzed. However, instead
of focusing on two elements, we consider a more general approach with m = ele
elements and i = ele + 1 = nod nodes. The structural diagram for the algorithm
is shown in Fig. 3.7. Each step is recorded in the output file. The corresponding
Fortran program is presented in Sect. 6.2.
In contrast to the setup with one finite element, the input file ’_input100.txt’ now
contains sets of elemental values Am , L m , E m , k init, m and E pl,m , see Sect. 6.2. The
algorithm stores, processes and transfers the data in arrays. Other input parameters,
including the total number of elements ele, the total number of nodes nod, the
3.2 FORTRAN Examples 29
(a) (b)
Fig. 3.6 Example setup with two finite elements and a linear hardening function
total number of increments inc and the total prescribed force Ftot stay scalars. The
algorithm reads the input from the text file, according to step(1) of Fig. 3.7.
In step (2), the force Fn and the elemental state values (σnm , εnm , and u m n ) are
all reset to zero. The elemental tangent moduli Ẽ nm = E m initially are set equal to
the respective elemental Young’s moduli E m . From this, the initial elemental tan-
m
gent stiffnesses K m = LAm Ẽ m are evaluated. This leads to the initial tangent stiffness
matrix K , see Eq. (3.16).
Next, the algorithm assesses the query n == inc in step (3), increases the incre-
ment counter to n + 1 in step (4) and then enters the outer loop. In step (5), the
algorithm resets the iteration counter j = 0 and the elemental displacement itera-
m, j
tions u n+1 = 0 for the tolerance check. Next, in step (6), the algorithm updates the
current state values: the force Fn , the nodal displacements u in , the elemental strains
εnm , and the elemental stresses σnm . In step (7), we calculate the force increment
F = inc Ftot
and prepare the residuals:
0 i = nod
rni = −Fni = . (3.40)
−Fni = − inc
Ftot
i = nod
Now, we enter the inner loop. In step (8), we increase the iteration counter to
j + 1. Then, in step (9), we invert the global tangent stiffness matrix K and evaluate
the displacement and strain increments as:
−1 i, j
u m,
n
j+1
= u m,
n
j
− K nj rn , (3.41)
1
εnm, j+1 = m u m+1,n
j+1
− u m,
n
j+1
. (3.42)
L
30 3 One-Dimensional Finite Element Approach
E m Am
(2) initial state values σ0m = F0 = ui0 = εm m m
0 = κ0 = 0, K0 = Lm , K
(3) query
n == inc
no
(4) increment counter n+1
outer loop
or pertubation increment
(displacement controlled setup)
nod
(13) tolerance check ui, j+1 i, j
n+1 − un+1 < tol
i=1
m
(14) values at next state σn+1 , uin+1 , εm
n+1
m
(15) output σinc , uiinc , εm
inc
Fig. 3.7 Flow chart of an example global integration algorithm for a one-dimensional model with
multiple finite elements
3.2 FORTRAN Examples 31
With the increments, the deformation values are iterated in step (10):
m, j+1 m, j
u n+1 = u n+1 + u m,
n
j+1
, (3.43)
m, j+1 m, j
εn+1 = εn+1 + εnm, j+1 . (3.44)
The strain increments are input for the CPP algorithm, step (10), which subse-
quently iterates each elemental state individually, independent from each other.
m, j+1
The output of the CPP algorithm are the iterated elemental tangent moduli Ẽ n
m, j+1
and the updated elemental tangent stiffnesses K n . Now, in step (12), the iterated
tangent stiffness matrix K nj+1 can be assembled. The matrix is used to update the
i, j+1
residuals rn+1 , using the following equation:
j+1 j
r n+1 = r n+1 + K nj+1 u . (3.45)
nod
i, j+1 i, j
u n+1 − u n+1 < tol . (3.46)
i =1
In the case that the queue is not satisfied, another iteration is initiated. After the
iterations, the final values are carried over to the next increment, see step (14). The
outer loop is repeated until the final increment is reached and the algorithm ends, see
step (15).
In a different test setup, a total displacement u tot is prescribed, rather than a total
force. The displacement increment of the last node u nod is now evaluated directly
in step (7) of Fig. 3.7. As the deformation increment is already known, the definition
and iteration of the residual is not neccessary in steps (7) and (12), respectively. For
the same reason, the stiffness matrix does not need to be inversed in step (9). At this
j+1
step, the force increment Fn is evaluated instead, according to Eq. (3.34).
Chapter 4
Three-Dimensional Finite Element
Approach
Abstract In this chapter, a mathematical model of the material for the three-
dimensional case is discussed. Therefore, the governing equations for the one-
dimensional case are generalized and modified. Many quantities that were scalars in
the one-dimensional case are arranged as vector quantities now.
For the model, we assume the same conditions as before, with the exception of
the one-dimensional model. In the three-dimensional space, with perpendicular axis
1, 2, 3 (or x, y, z), every arbitrary stress σ can be decomposed into stress components
σi j , as illustration in Fig. 4.1. The stress components are arranged in the Cauchy
stress tensor [3, 6, 31]:
⎡ ⎤ ⎡ ⎤
σ11 σ12 σ13 σx x σx y σx z
σi j = ⎣σ21 σ22 σ23 ⎦ = ⎣σ yx σ yy σ yz ⎦ . (4.1)
σ31 σ32 σ33 σzx σzy σzz
σi j = Eεi j , i = j . (4.4)
σ = Cε , (4.7)
4.1 Three-Dimensional Finite Element Theory 35
The stress tensor σ can be split additively into a volumetric and deviatoric part
[18, 30, 38]: ⎡ ◦ ◦ ◦⎤ ⎡ ⎤
σ11 σ12 σ13 σ11 σ12 σ13
σi j = ⎣σ21 ◦ ⎦
+ ⎣σ21 σ22 σ23 ⎦ .
◦ ◦
σ22 σ23 (4.18)
◦ ◦ ◦
σ31 σ32 σ33 σ31 σ32 σ33
A deviatoric stress tensor acting on a body only changes its shape, while a volu-
metric stress only changes its volume.
The volumetric stress tensor σi◦j is given by:
⎡ ◦
⎤ ⎡1 ⎤
σ11 J
3 1
⎢σ ◦ ⎥ ⎢ 1 J1 ⎥
⎢ 22 ⎥ ⎢ 3 ⎥
⎢σ ◦ ⎥ ⎢ 1 J1 ⎥
◦ ⎢ 33 ⎥ ⎢
σi j = ⎢ ◦ ⎥ = ⎢ 3 ⎥ . (4.19)
⎢σ12 ⎥ ⎢ 0 ⎥⎥
◦ ⎦
⎣σ13 ⎣ 0 ⎦
◦
σ23 0
On the other hand, the deviatoric stress tensor σi j is given by [9]:
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
s11 σ11 σ11 − 13 J1
⎢s22 ⎥ ⎢σ22 ⎥ ⎢σ22 − 1 J1 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ 3 ⎥
⎢s33 ⎥ ⎢σ ⎥ ⎢σ33 − 1 J1 ⎥
σi j = ⎢ ⎥ = ⎢ 33 ⎥=⎢ 3 ⎥ .
⎢s12 ⎥ ⎢σ ⎥ ⎢ σ12 ⎥
(4.20)
⎢ ⎥ ⎢ 12 ⎥ ⎢ ⎥
⎣s13 ⎦ ⎣σ ⎦ ⎣ σ13 ⎦
13
s23 σ23 σ23
4.1 Three-Dimensional Finite Element Theory 37
(a) (b)
Fig. 4.2 Illustration of a the von Mises yield criterion and b the Tresca yield criterion
Accordingly, the deviatoric invariants J1 , J2 , J3 are defined as:
J1 = s11 + s22 + s33 = 0 , (4.21)
1
J2 = s ji si j (4.22)
2
1
= (σ11 − σ22 )2 + (σ11 − σ33 )2 + (σ22 − σ33 )2
6
+ σ12 2
+ σ13
2
+ σ23
2
1 2 3
J3 = s11 s22 s33 = J3 − J1 J2 + J . (4.23)
3 27 1
Yield Condition
In the one-dimensional test, the yield criterion f (σ) = σeff corresponds to the one-
dimensional acting stress σ. Now, an arbitrary multi-dimensional stress state σ needs
to be reduced to a one-dimensional effective stress σeff . As practical tests are not
feasible, several yield criterion theories have been postulated instead. Among them
are the von Mises and the Tresca criterion, both shown in Fig. 4.2 for a two-
dimensional stress state. The shaded area in Fig. 4.2 represents the elastic range.
Any arbitrary stress state is composed of a normal component σ and a shear
component τ . Yielding will not occur if the stress state is within the yield surface.
Outside the yield surface, yielding will occur and the surface will expand in size due
to material hardening.
For a pure shear stress state, the von Mises criterion [7, 8, 18, 31, 34] predicts
that yielding only starts at stress τ = √13 kt , where kt is the tensile yield strength. The
Tresca yield criterion [8], on the other hand, predicts that yielding already starts
at τ = 21 kt . Thus, the Tresca criterion leads to a more conservative and careful
dimensioning.
38 4 Three-Dimensional Finite Element Approach
According to the three-dimensional von Mises yield condition [6, 30, 39], yield-
ing begins when the second deviatoric invariant J2 reaches a critical value:
F = f (σ) − k(κ) = 3J2 − k(κ) = 0 . (4.24)
Flow Rule
In the three-dimensional case, the flow rule [18, 30] is given as:
dF
r = dλ . (4.26)
dσ
Hardening Function
Analogous to [30], we define the (isotropic) hardening function as:
σT r
h= . (4.27)
σeff
For the fully implicit backward Euler (FIBE) method [29–31, 43, 44], r, h and
F are evaluated at the next increment n + 1 at the current iteration i:
⎡ −1 i ⎤
C σ n+1 − C −1 σ tn+1 + λin+1 r(σ in+1 , κin+1 )
m(v in+1 ) F I B E = ⎣ −κin+1 + κtn+1 + Δλh(σ in+1 , κin+1 ) ⎦. (4.30)
F(σ n+1 , κn+1 )
i i
For the semi-implicit backward Euler (SIBE) method [29–31, 36, 44], the func-
tions are evaluated explicitly at the previous increment n:
⎡ ⎤
C −1 σ in+1 − C −1 σ tn+1 + λin+1 r(σ n , κn )
m(v in+1 ) S I B E =⎣ −κin+1 + κtn+1 + Δλh(σ n , κn ) ⎦. (4.31)
F(σ n , κn )
∂m
Newton’s method requires finding the derivative ∂v
, of dimensions 8 × 8:
⎡ −1 ∂r ∂r
⎤
C + Δλ ∂σ λ ∂κ r
∂m ⎣
(v) = ∂h
λ ∂σ ∂h
−1 + λ ∂κ h⎦ . (4.32)
∂v ∂F ∂F
∂σ ∂κ
0
The term ∂∂JF is always constant. Assuming the von Mises yield condition, the
2
following relation can be derived:
√ 1
∂F 3 −2
= J2 . (4.34)
∂ J2 2
∂J
Thus, only the term ∂σ2 has to be evaluated each time. A general derivation is
given here using index notation [11]:
∂ J2 1 ∂ 1 ·k 1 ·k i j 1 ·k ·l
= · q (σi j σ − σk gi j σ − σk g σi j + σk σl gi j g )
ij ij ij
∂σ 2 ∂σ p 3 3 9
1 ∂ ·j i 1 ·k ·l
= ·q (σi σ· j − σk σl )
2 ∂σ p 3
1 i · ·q 1 1 (4.35)
= (σ· j gi p g jq + σi g·i p g j − σl·l g ·qp − σl·l g ·qp )
j
2 3 3
·q 1 ·l ·q
= σ p − σl g p
3
= s ·q
p ,
4.1 Three-Dimensional Finite Element Theory 41
dim
dim
σi j σ i j = σi j σ i j , (4.37)
i=1 j=1
The second derivative of the yield function with respect to the second deviatoric
invariant is defined as follows:
√ 3
∂2 F 3 −2
2 = − J2 . (4.39)
∂ J 2
4
The second derivative of the second deviatoric invariant with respect to the stress
yields:
∂ 2 J2 ∂
= (Ls)
∂σ 2 ∂σ
∂s
=L
∂σ
42 4 Three-Dimensional Finite Element Approach
·j
∂si
=L
∂σl·m
∂ ·j 1 ·j
= L ·m σi − σk·k gi
∂σl 3
∂ 1 k ·j
= L gi·i g·mj − σ g
∂σl·m 3 ·k i
∂ 1 ·n ·k · j
= L gl·i g·mj − σ g g
∂σl·m 3 k n i
1 ·j
= L gl·i g·mj − glk g mn gn·k gi
3
1 ·j
= L gl·i g·mj − gl·m gi
3
⎛ ⎡ ⎤ ⎞
1
⎜ ⎢ 1⎥ ⎟
⎜ ⎢ ⎥ ⎟
⎜ ⎢
1 ⎢ 1⎥ ⎥ ⎟
= L⎜
⎜ I − ⎢ ⎥ 1 1 1 0 0 0 ⎟
⎟
⎜ 3 ⎢0⎥ ⎟
⎝ ⎣0⎦ ⎠
0
:= L̃ = const.
−1
With all components present, the inverse ∂m ∂v
is now numerically evaluated,
and the solution vector v is iterated according to Eq. (2.11) (Newton method).
The idea for the three-dimensional test setup, shown in Fig. 4.5, is adopted from
[24]. A cube element of side length L = 1 is fixed to the wall on one side, thus nodes
5 6 Y
X
4 Z
3
1 2
4.2 FORTRAN Examples 43
t
(3) trial state σn+1 , κtn+1
t
(4) yield condition F σn+1 , k κtn+1
j=0
(5) initial solution vector vn+1
j j
vn+1 , m(vn+1 )
inner loop
j+1
(9) iterated solution vector vn+1
Fig. 4.6 Flow chart of an example local CPP integration algorithm for a three-dimensional finite
element model
44 4 Three-Dimensional Finite Element Approach
elasticity matrix C, see step (1) of Fig. 4.6. Furthermore, the input also includes the
state values from the previous state, listed in step (2): the acting stress vector σn , the
total strain vector εn and the effective plastic strain κ.
Analogous to the one-dimensional CPP algorithm, first the trial stress is calculated,
see step (3):
σ tn+1 = σ n + Cεn+1 . (4.40)
Next, by using the yield condition F(σ t , k(κtn+1 )), the trial state is checked for
validity in step (4). In case the state is valid, the step is elastic and thus, the algorithm
skips to the output in step (14).
In the other case, the trial state values are saved in the initial vector of unknowns,
see step (5), and the iteration starts. Initially reset to j = 0 in step (6), the iteration
counter is increased in step (7). Next, the vector of unknowns v j , and the residual
vector m(v j ) are evaluated in step (8). From this, the vector of unknowns is iterated
in step (9). In the following tolerance check in step (13), the iterated solution vector
v j+1 is compared to the previous solution vector v j+1 . If the difference exceeds the
tolerance tol, the iteration process is repeated from step (7). The iteration process
continues until the difference for two consecutive steps falls under the threshold tol.
At this point, the iterated properties are the output, see step (14), and produce the
input state variables for the next increment.
Chapter 5
Summary and Outlook
Abstract This chapter summarizes the most important aspects of the previous chap-
ters and gives an outlook for further potential research.
Under an increasing load, metal-like solids display first elastic and eventually elasto-
plastic deformation, when the load exceeds the initial yield limit. Plastic deformation
leads to yielding, which increases the yield limit of the material. After removing the
load, a permanent deformation persists.
The deformation properties can be described by rate equations such as the yield
condition, the flow rule and the hardening rule. The equations can be solved numeri-
cally by an integration algorithm. Among these is the fully implicit backwards Euler
algorithm. For this purpose, the total load is applied incrementally. The state variables
are calculated for each subsequent increment.
The analysis is tested for simple tensile tests. First, a one-dimensional continuum
formulation of the geometry is applied. Next, a one-dimensional finite element for-
mulation is applied. Eventually, a three-dimensional finite element formulation is
applied. The virtual tests are carried out for different test conditions.
Fortran is compatible with other software. Some of the computational software
provide interfaces to include Fortran user subroutines. Fortran shares many sim-
ilarities with other software. Thus, it is a good alternative for programming the finite
element code. Although some modifications would be neccesary, the same code can
also be written with other non-finite element software, such as Maple, Mathemat-
ica, Matlab, etc. An advantage of Fortran is its compatibility with the majority of
programs.
Modification of the provided Fortran code is easy. Example variations of the test
conditions such as changing the hardening function are presented. Other possibilities
include changing the yield condition (e.g. implementing the Tresca yield condition
instead of the von Mises yield condition), flow rule etc. The code can easily be
extended by dropping certain model restrictions, such as allowing kinematic harden-
ing, failure, etc. In Fortran, derivatives have to be implemented manually. Differ-
ent software, such as Maple, allow for symbolic differentiation and thereforeprovide
Abstract This chapter discusses the Fortran source codes for the numerical
analysis.
To compile the code at hand, any Fortran compiler can be used. As an example,
we use the open-source compiler Gnu Fortran (GFortran). The results of the
numerical analysis are veryfied by use of the finite element program Marc Mentat,
Version 2014.2, see [24, 25, 33].
Fortran code has strict formatting rules [35], as it must be written from column
6 to (usually) column 72. For better visualization, we choose column 57 as upper
limit. Columns 1–5 contain optional statement labels, while column 6 is reserved for
optional line continuation characters (usually &). In Gnu Fortran, exclamation
marks ‘!’ in a line are followed by comments.
Every Fortran program and subprogram is divided into an implementation (dec-
laration) and interface (execution) part, strictly separated from each other.
In the implementation section [35], all variables and their data types are declared.
Implicit type declaration is allowed, but it is not good programming practice to do so.
Instead, the keyword ‘implicit none’ is used and all variables are declared explicitly.
The data type ‘real*8’ declares a real of double precision.
In the interface section [35], the program executes a set of rules, structured in
reusable modules. Fortran distinguishes two types of modules, functions and sub-
routines. A function return exactly one output parameter, while a subroutine returns
several values through its arguments. During execution, functions are called by the
main program with the keyword ‘function’ and subroutines are called with the key-
word ‘call’.
A complete program consists of a main program and arbitrary many modules,
implemented outside the main program. The main program starts with the key-
word ‘program’, modules start with ‘subroutine’ and functions start with ‘function’.
All programs end with the keyword ‘end’. A collection of useful general-purpose
subroutines, such as subroutines for matrix inversion, can be found in [35]. Further-
more, program codes for a wide range of example problems can be found in [14–16,
34, 36].
If a program is dispersed among several files, all other files must be included in
the main file by using the keyword ‘include’ [35]. Fortran files generally have the
extension ‘.f’. The file structure of the example programs is shown in Fig. 6.1.
The Fortran program for the continuum model is split into a main file ‘Conti1D.f’,
an input file ‘_Input.txt’ an two additional files with subroutines, ‘ContiSubrou-
tines1D.f’ and ‘CPPSubroutines1D.f’. For a successful compilation, all files must
be present.
6.1 One-Dimensional Continuum Model 49
53 call UpdateInnerLoop(ds,Etil,L,u,j,deps,
54 & du,eps,epspl,s,dF,sinc,epsplinc,uinc,
55 & epsinc,Fcontrolled)
56 call CPP(deps,E,kinit,Epl,eps,epsinc,sinc,
57 & s,epspl,Etil,z,linCPP,tolCPP)
58 call UpdateOutputFile(A,F,du,u,eps,deps,
59 & epspl,s,n,j,output)
60 call checktol(eps,epsit,tolexceeded,
61 & tolILoop,Fcontrolled)
62 end do
63 end do
64 call CloseOutputFile(z,output)
65 end
66 include ’CPP1DSubroutines.f’
67 include ’ContiSubroutines1D.f’
ContiSubroutines1D.f
1 subroutine ReadInput(inc,Ftot,utot,A,L,E,kinit,Epl,
2 & tolCPP,tolILoop,linCPP,
3 & Fcontrolled,input)
4 implicit none
5 real*8 Ftot,utot,A,L,E,kinit,Epl,tolCPP,tolILoop
6 integer input,inc
7 logical linCPP,Fcontrolled
8 input=1
9 open(unit=input,file=’_Input.txt’,status=’old’)
10 read(input,*)
11 read(input,*)
12 read(input,*) inc,Ftot,utot,A,L,E,kinit,Epl,
13 & tolCPP,tolILoop,linCPP,Fcontrolled
14 close(unit=input)
15 end
16
17 subroutine WriteOutputFile(output)
18 implicit none
19 integer output,ele
20 output=2
21 open(unit=output,file="_Out.txt")
22 1 format (a,t5,a,t10,a,t25,a,t40,a,t55,a,t70,a,
23 & t85,a,t100,a/)
24 write(unit=output,fmt=1)"n","j","F","du","u",
25 & "deps","eps","epspl","s","[-]","[-]","[kN]",
26 & "[mm]","[mm]","[E-3]","[E-3]","[E-3]","[MPa]"
27 end
28
29 subroutine SetInitValues(E,Etil,s,eps,epspl,u,F,
30 & z)
31 implicit none
32 real*8 E,Etil,s,eps,epspl,u,F
33 integer z
34 s=0.D0
6.1 One-Dimensional Continuum Model 51
35 F=0.D0
36 u=0.D0
37 eps=0.D0
38 epspl=0.D0
39 Etil=E
40 z=0.D0
41 end
42
43 subroutine UpdateOuterLoop(j,sinc,s,epsplinc,
44 & epspl,epsinc,eps,epsit,
45 & uinc,u,deps,du,Ftot,utot,
46 & dF,ds,L,A,Etil,
47 & Fcontrolled,inc)
48 implicit none
49 real*8 sinc,s,epsplinc,epspl,epsinc,eps,deps,
50 & epsit,uinc,u,du,Ftot,dF,ds,utot,L,A,Etil
51 integer j,inc
52 logical Fcontrolled
53 j=0
54 sinc=s
55 uinc=u
56 epsinc=eps
57 epsit=0.D0
58 if(Fcontrolled)then
59 dF=Ftot/dble(inc)
60 ds=dF/(A*1.D6)
61 else
62 du=utot/dble(inc)
63 deps=du/L
64 end if
65 end
66
67 subroutine UpdateInnerLoop(ds,Etil,L,u,j,deps,
68 & du,eps,epspl,s,dF,
69 & sinc,epsplinc,uinc,
70 & epsinc,Fcontrolled)
71 implicit none
72 real*8 ds,Etil,L,deps,du,eps,epspl,s,u,
73 & dF,sinc,epsplinc,uinc,epsinc
74 integer j
75 logical Fcontrolled
76 j=j+1
77 if(Fcontrolled)then
78 deps=(sinc+ds-s)/Etil
79 du=deps*L
80 end if
81 eps=eps+deps
82 u=u+du
83 end
84
85 subroutine checktol(eps,epsit,tolexceeded,
86 & tolILoop,Fcontrolled)
87 implicit none
52 6 FORTRAN Source Codes
88 real*8 tol,eps,epsit,tolILoop
89 logical tolexceeded,Fcontrolled
90 tol=abs(eps-epsit)
91 tolexceeded=.true.
92 if(tol.lt.tolILoop.or..not.Fcontrolled)
93 & then
94 tolexceeded=.false.
95 end if
96 epsit=eps
97 end
98
99 subroutine UpdateOutputFile(A,F,du,u,eps,deps,
100 & epspl,s,n,j,output)
101 implicit none
102 real*8 F,du,u,eps,deps,epspl,s,A
103 integer n,j,output
104 2 format(i3.2,t5,i3.2,t10,f12.5,t25,f12.5,t40,
105 & f12.5,t55,f12.8,t70,f12.8,t85,f12.8,t100,
106 & f12.8/)
107 F=s*A*1.D6
108 write(unit=output,fmt=2) n,j,F/1.D3,du*1.D3,
109 & u*1.D3,deps*1.D3,eps*1.D3,epspl*1.D3,s
110 end
111
The input file ‘_Input.txt’ is a simple text file with input parameters, each occu-
pying one line. The input parameters define the geometry and material properties of
the tensile test specimen. The first comment line indicates the order and unit of mea-
surement. Collecting the input in a separate input file allows the user to conventiently
and quickly vary the test setup parameters.
_Input.txt
1 inc[-],F0[N],u0[m],A[m^2],L[m],E[MPa],kinit[MPa],
2 Epl[MPa],TolCPP[-],TolILoop[-],LinCPP==,FControlled==
3 10
4 60000.
5 0.008
6 0.0001
7 0.4
8 70000.
9 350.
10 7000.
11 0.0000000001
12 0.0000000001
13 F
14 T
6.2 One-Dimensional Finite Element Models 53
As before, the Fortran program for the FEM models is split into a main file, an
input file and two additional files with subroutines. For a successful compilation,
again all files must be present.
For the model with a single finite element, the main file is called ‘FEM1Ele1D.f’,
the input file ‘_Input.txt’ is adopted from the continuum model, and the subroutine
files are called ‘FEM1Ele1DSubroutines.f’ and ‘CPPSubroutines1D.f’.
For the model with multiple finite elements, the main file is called ‘FEMF100Ele1D.f’,
the input file is called ‘_input100.txt’ and the subroutines are called ‘FEM100Ele1D
Subroutines.f’ and ‘CPP1DSubroutines.f’.
FEM1Ele1D.f (main file)
1 program FEM1ele1D
2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 !utot - total prescribed displacement !
4 !Ftot - total prescribed force !
5 !eps - strain at current iteration !
6 !deps - strain increment of current iteration !
7 !epspl - plastic strain at current iteration !
8 !du - displacement increment of current iteration !
9 !u - displacement at current iteration !
10 !s - stress at current iteration !
11 !K - tangent stiffness at current iteration !
12 !F - force at current iteration !
13 !kinit - initial yield strength !
14 !A - cross section area of specimen !
15 !L - length of specimen !
16 !E - YOUNG’s modulus !
17 !Epl - plastic modulus !
18 !Etil - (approximated) tangent modulus !
19 !TolCPP - tolerance of CPP algorithm !
20 !TOlILoop - tolerance of inner loop !
21 !sinc - stress at beginning of current increment !
22 !epsinc - strain at beginning of current increment!
23 !uinc - displacement at beginning of current inc. !
24 !uit - displacement of previous iteration !
25 !dF - force increment at current iteration !
26 !r - residual at current iteration !
27 !inc - number of increments !
28 !n - increment counter !
29 !z - total iteration counter !
30 !j - iteration counter within an increment !
31 !output - output file reference number !
32 !input - input file reference number !
33 !linCPP - input flag, choose (non)linear CPP !
34 !Fcontrolled - input flag, force/displacement ctrl!
35 !tolexceeded - true if tolerance is exceeded !
36 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37 implicit none
54 6 FORTRAN Source Codes
38 real*8 utot,Ftot,eps,deps,epspl,du,u,s,K,F,
39 & kinit,A,L,E,Eelpl,Epl,Etil,TolCPP,
40 & TolILoop,sinc,epsinc,uinc,uit,dF,r
41 integer inc,n,z,j,output,input
42 logical linCPP,Fcontrolled,tolexceeded
43 call ReadInput(inc,Ftot,utot,A,L,E,kinit,Epl,tolCPP,
44 & tolILoop,linCPP,Fcontrolled,input)
45 call SetInitialValues1Ele(z,K,E,A,L,Etil,s,eps,
46 & epspl,u,F)
47 call WriteOutputFile(output)
48 do n=1,inc
49 call UpdateOuterLoop1Ele(sinc,s,uinc,u,
50 & epsinc,eps,dF,Ftot,r,
51 & du,Fcontrolled,utot,
52 & inc,j,uit,K)
53 tolexceeded=.true.
54 do while(tolexceeded)
55 call UpdateInnerLoop1Ele(du,r,u,deps,L,K,
56 & eps,j,Fcontrolled)
57 call CPP(deps,E,kinit,Epl,eps,epsinc,sinc,
58 & s,epspl,Etil,z,linCPP,tolCPP)
59 call UpdateResidual1Ele(A,L,du,Etil,K,r,
60 & uinc,u,Fcontrolled)
61 call UpdateOutputFile(A,F,du,u,eps,deps,
62 & epspl,s,n,j,output)
63 call checktol1Ele(u,uit,tolexceeded,
64 & tolILoop,Fcontrolled)
65 end do
66 end do
67 call CloseOutputFile(z,output)
68 end
69 include ’CPP1Dsubroutines.f’
70 include ’FEM1Ele1DSubroutines.f’
FEM1Ele1DSubroutines.f
1 subroutine ReadInput(inc,Ftot,utot,A,L,E,kinit,Epl,
2 & tolCPP,tolILoop,linCPP,
3 & Fcontrolled,input)
4 implicit none
5 real*8 Ftot,utot,A,L,E,kinit,Epl,tolCPP,tolILoop
6 integer input,inc
7 logical linCPP,Fcontrolled
8 input=1
9 open(unit=input,file=’_Input.txt’,status=’old’)
10 read(input,*)
11 read(input,*)
12 read(input,*) inc,Ftot,utot,A,L,E,kinit,Epl,tolCPP,
13 & tolILoop,linCPP,Fcontrolled
14 close(unit=input)
15 end
16
6.2 One-Dimensional Finite Element Models 55
17 subroutine WriteOutputFile(output)
18 implicit none
19 integer output
20 output=2
21 open(unit=output,file="_Out.txt")
22 1 format (/a,t5,a,t10,a,t25,a,t40,a,t55,a,t70,a,
23 & t85,a,t100,a/)
24 write(unit=output,fmt=1)"n","j","F","du","u",
25 & "deps","eps","epspl","s","[-]","[-]","[kN]",
26 & "[mm]","[mm]","[E-3]","[E-3]","[E-3]","[MPa]"
27 end
28
29 subroutine SetInitialValues1Ele(z,K,E,A,L,Etil,
30 & s,eps,epspl,u,F)
31 implicit none
32 real*8 K,E,A,L,Etil,s,eps,epspl,u,F
33 integer z
34 z=0
35 K=E*A*1.D6/L
36 Etil=E
37 s=0.D0
38 eps=0.D0
39 epspl=0.D0
40 u=0.D0
41 F=0.D0
42 end
43
44 subroutine UpdateOuterLoop1Ele(sinc,s,uinc,u,
45 & epsinc,eps,dF,Ftot,r,
46 & du,Fcontrolled,utot,
47 & inc,j,uit,K)
48 implicit none
49 real*8 F,sinc,s,uinc,u,epsinc,eps,K,uit,
50 & dF,Ftot,r,du,utot
51 integer inc,j
52 logical Fcontrolled
53 j=0
54 sinc=s
55 epsinc=eps
56 uinc=u
57 uit=0.D0
58 if(Fcontrolled)then
59 dF=Ftot/dble(inc)
60 r=-dF
61 else
62 du=utot/dble(inc)
63 end if
64 end
65
66 subroutine UpdateInnerLoop1Ele(du,r,u,deps,L,K,
67 & eps,j,Fcontrolled)
68 implicit none
69 real*8 du,r,K,u,deps,L,eps,A
56 6 FORTRAN Source Codes
70 integer j
71 logical Fcontrolled
72 if(Fcontrolled)then
73 du=-r/K
74 end if
75 j=j+1
76 u=u+du
77 deps=du/L
78 eps=eps+deps
79 end
80
81 subroutine UpdateResidual1Ele(A,L,du,Etil,K,r,
82 & uinc,u,Fcontrolled)
83 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
84 !update force residual !
85 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
86 implicit none
87 real*8 A,L,du,Etil,uinc,u,K,r,E
88 logical Fcontrolled
89 K=Etil*A*1.D6/L
90 if(Fcontrolled)r=r+K*du
91 end
92
93 subroutine UpdateOutputFile(A,F,du,u,eps,deps,
94 & epspl,s,n,j,output)
95 implicit none
96 real*8 F,du,u,eps,deps,epspl,s,A
97 integer n,j,output
98 2 format(i3.2,t5,i5.2,t10,f15.5,t25,f15.5,t40,
99 & f15.5,t55,f15.8,t70,f15.8,t85,f15.8,t100,f15.8)
100 F=s*A*1.D6
101 write(unit=output,fmt=2) n,j,F/1.D3,du*1.D3,
102 & u*1.D3,deps*1.D3,eps*1.D3,epspl*1.D3,s
103 end
104
105 subroutine checktol1Ele(u,uit,tolexceeded,
106 & tolILoop,Fcontrolled)
107 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
108 !check if tolerance is exceeded !
109 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
110 implicit none
111 real*8 tol,u,tolILoop,uit
112 logical tolexceeded,Fcontrolled
113 tol=abs(u-uit)
114 tolexceeded=.true.
115 if((tol.lt.tolILoop)
116 & .or.(Fcontrolled.eqv..false.))tolexceeded=.false.
117 uit=u
118 end
119
120 subroutine CloseOutputFile(z,output)
121 implicit none
122 integer z,output
6.2 One-Dimensional Finite Element Models 57
123 write(unit=output,fmt=’(a,i5.1)’)
124 & "iteration count:",z
125 close(output)
126 end
FEMF100Ele1D.f (main file)
1 program FEMU100ele1D
2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 !utot - total prescribed displacement !
4 !Ftot - total prescribed force !
5 !eps - strains at current iteration !
6 !deps - strain increments of current iteration !
7 !epspl - plastic strains at current iteration !
8 !du - displacement increments of current iteration!
9 !u - displacements at current iteration !
10 !s - stresses at current iteration !
11 !K - element stiffnesses at current iteration !
12 !Km - tangent stiffness matrix at current it. !
13 !Kmred - reduced tangent stiffness matrix !
14 !Kminv - inverse of tangent stiffness matrix !
15 !F - force at current iteration !
16 !kinit - initial yield strengths !
17 !A - cross section areas of specimen !
18 !L - element lengths of specimen !
19 !E - YOUNG’s moduli !
20 !Epl - plastic moduli !
21 !Etil - (approximated) tangent moduli !
22 !TolCPP - tolerance of CPP algorithm !
23 !TOlILoop - tolerance of inner loop !
24 !sinc - stresses at beginning of current increment!
25 !epsinc - strains at beginning of current inc. !
26 !uinc - displacements at beginning of current inc.!
27 !uit - displacements of previous iteration !
28 !dF - force increment at current iteration !
29 !r - residuals at current iteration !
30 !inc - number of increments !
31 !n - increment counter !
32 !z - total iteration counter !
33 !j - iteration counter within an increment !
34 !output - output file reference number !
35 !input - input file reference number !
36 !m - element counter !
37 !ele - number of elements !
38 !i - node counter !
39 !nod - number of nodes !
40 !linCPP - input flag, (non)linear CPP algorithm !
41 !Fcontrolled - input flag, force/displacement ctrl!
42 !tolexceeded - true if tolerance is exceeded !
43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
44 implicit none
45 real*8 utot,Ftot,eps(100),deps(100),epspl(100),
58 6 FORTRAN Source Codes
46 & du(100),u(100),s(100),K(100),Km(100,100),
47 & Kmred(100,100),Kminv(100,100),F,kinit(100),
48 & A(100),L(100),E(100),Epl(100),Etil(100),TolCPP,
49 & TolILoop,sinc(100),epsinc(100),uinc(100),
50 & uit(100),dF,r(100)
51 integer inc,n,z,j,output,input,m,ele,i,nod
52 logical EqEle,LinCPP,FControlled,tolexceeded
53 call ReadInput100(Ftot,utot,A,L,E,kinit,Epl,
54 & TolCPP,TolILoop,inc,ele,nod,LinCPP,FControlled,
55 & input,EqEle)
56 call SetInitialValues100(A,F,E,inc,s,Etil,
57 & eps,epspl,u,z,L,ele,K,nod,Kmred,Km,r)
58 call WriteOutputFile100(output)
59 do n=1,inc
60 call UpdateOuterLoop100(eps,s,u,r,epsinc,sinc,
61 & dF,nod,ele,du,Km,uinc,F0,u0,inc,F,j,
62 & Fcontrolled)
63 tolexceeded=.true.
64 do while (tolexceeded)
65 call UpdateInnerLoop100(Kmred,Kminv,r,L,j,
66 & du,u,deps,eps,ele,nod,K,dF,F,A,Fcontrolled)
67 do m=1,ele
68 call CPP(deps,E,kinit,Epl,eps,epsinc,sinc,
69 & s,epspl,Etil,z,linCPP,tolCPP)
70 end do
71 call UpdateResidual100(Etil,A,L,du,K,
72 & Km,nod,ele,r,u,Kmred,E,s,uinc,
73 & Fcontrolled)
74 call UpdateOutputFile100(A,K,F,du,u,eps,
75 & deps,epspl,s,n,output,ele,j,nod,dF)
76 call checktol100(u,uit,tolexceeded,nod,
77 & tolILoop,Fcontrolled)
78 end do
79 end do
80 call CloseOutputFile(z,output)
81 end
82 include ’CPP1DSubroutines.f’
83 include ’FEM100Ele1DSubroutines.f’
FEM100Ele1D.f (main file)
1 program FEMU100ele1D
2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 !utot - total prescribed displacement !
4 !Ftot - total prescribed force !
5 !eps - strains at current iteration !
6 !deps - strain increments of current iteration !
7 !epspl - plastic strains at current iteration !
8 !du - displacement increments of current iteration!
9 !u - displacements at current iteration !
10 !s - stresses at current iteration !
11 !K - element stiffnesses at current iteration !
6.2 One-Dimensional Finite Element Models 59
65 call UpdateInnerLoop100(Kmred,Kminv,r,L,j,
66 & du,u,deps,eps,ele,nod,K,dF,F,A,Fcontrolled)
67 do m=1,ele
68 call CPP(deps,E,kinit,Epl,eps,epsinc,sinc,
69 & s,epspl,Etil,z,linCPP,tolCPP)
70 end do
71 call UpdateResidual100(Etil,A,L,du,K,
72 & Km,nod,ele,r,u,Kmred,E,s,uinc,
73 & Fcontrolled)
74 call UpdateOutputFile100(A,K,F,du,u,eps,
75 & deps,epspl,s,n,output,ele,j,nod,dF)
76 call checktol100(u,uit,tolexceeded,nod,
77 & tolILoop,Fcontrolled)
78 end do
79 end do
80 call CloseOutputFile(z,output)
81 end
82 include ’CPP1DSubroutines.f’
83 include ’FEM100Ele1DSubroutines.f’
FEM100Ele1DSubroutines.f
1 subroutine ReadInput100(F0,u0,A,L,E,kinit,Epl,
2 & TolCPP,TolILoop,inc,ele,nod,LinCPP,FControlled,
3 & input,EqEle)
4 implicit none
5 real*8 F0,u0,A(100),L(100),E(100),kinit(100),
6 & Epl(100),TolCPP,TolILoop
7 integer inc,ele,m,input,nod
8 logical EqEle,LinCPP,Fcontrolled
9 input=1
10 open(unit=input,file=’_input100.txt’,
11 & status=’old’)
12 read(input,*)
13 read(input,*) ele
14 nod=ele+1
15 read(input,*)
16 read(input,*) EqEle
17 read(input,*)
18 read(input,*) inc
19 read(input,*)
20 read (input,*) F0
21 read(input,*)
22 read (input,*) u0
23 read(input,*)
24 if(eqEle.eqv..true.)then
25 read (input,*) A(1)
26 read(input,*)
27 read (input,*) L(1)
28 read(input,*)
29 read (input,*) E(1)
30 read(input,*)
6.2 One-Dimensional Finite Element Models 61
84 F=0.D0
85 do m=1,ele
86 Etil(m)=E(m)
87 s(m)=0.D0
88 eps(m)=0.D0
89 epspl(m)=0.D0
90 end do
91 do i=1,nod
92 u(i)=0.D0
93 end do
94 do m=1,ele
95 K(m)=Etil(m)*A(m)*1.D6/L(m)
96 end do
97 call getKm(Km,Kmred,K,ele,nod)
98 end
99
100 subroutine getKm(Km,Kmred,K,ele,nod)
101 implicit none
102 real*8 Km(100,100),K(100),Kmred(100,100)
103 integer g,h,m,ele,nod
104 do g=1,nod
105 do h=1,nod
106 Km(g,h)=0.D0
107 end do
108 end do
109 do m=1,ele
110 do g=1,nod
111 do h=1,nod
112 if((g.eq.h).and.(m.le.g).and.(g.le.m+1))then
113 Km(g,h)=Km(g,h)+K(m)
114 else if(((g+h-1).eq.2*m).and.(abs(g-h).eq.1))
115 & then
116 Km(g,h)=Km(g,h)-K(m)
117 end if
118 end do
119 end do
120 end do
121 do g=1,nod
122 do h=1,nod
123 Kmred(g,h)=Km(g+1,h+1)
124 end do
125 end do
126 end
127
137 end
138
190 do h=1,ele
191 Kminv(g+1,h+1)=inv(g,h)
192 end do
193 end do
194 do g=1,nod
195 do h=1,nod
196 du(g)=du(g)-Kminv(g,h)*r(h)
197 end do
198 end do
199 else
200 do m=1,ele-1
201 Kserial(m)=0.D0
202 end do
203 do i=1,nod-1
204 du(i)=0
205 end do
206 if(ele.eq.1)then
207 dF=K(ele)*du(nod)
208 end if
209 if (ele.gt.1)then
210 do m=1,ele
211 do h=1,m
212 Kserial(m)=Kserial(m)+1/K(h)
213 end do
214 end do
215 end if
216 if(ele.ge.2)then
217 du(2)=du(nod)/(K(1)*Kserial(ele))
218 dF=K(ele)*du(nod)*(1-Kserial(ele-1)/
219 & Kserial(ele))
220 end if
221 if(ele.gt.2)then
222 do m=3,ele
223 du(m)=du(2)*K(1)*Kserial(m-1)
224 end do
225 end if
226 end if
227 do i=1,nod
228 u(i)=u(i)+du(i)
229 end do
230 do m=1,ele
231 deps(m)=(du(m+1)-du(m))/L(m)
232 eps(m)=eps(m)+deps(m)
233 end do
234 end
235
296 if((tol.lt.tolILoop).or.
297 & (Fcontrolled.eqv..false.))tolexceeded=.false.
298 do i=1,nod
299 uit(i)=u(i)
300 end do
301 end
302
303 subroutine getinv(mat,inv,n)
304 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
305 !get invert inv of matrix mat, both of rank nxn !
306 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
307 implicit none
308 real*8 mat(100,100),inv(100,100),copy(100,100)
309 integer n,g,h
310 do g=1,n
311 do h=1,n
312 copy(g,h)=mat(g,h)
313 end do
314 end do
315 call matrixinv(copy,inv,n)
316 end
317
349 b(gRow,k)=dummy
350 end do
351 end if
352 dummy=a(g,g)
353 do h=1,n
354 a(g,h)=a(g,h)/dummy
355 b(g,h)=b(g,h)/dummy
356 end do
357 do h=g+1,n
358 dummy=a(h,g)
359 do k=1,n
360 a(h,k)=a(h,k)-dummy*a(g,k)
361 b(h,k)=b(h,k)-dummy*b(g,k)
362 end do
363 end do
364 end do
365 do g=1,n-1
366 do h=g+1,n
367 dummy=a(g,h)
368 do l=1,n
369 a(g,l)=a(g,l)-dummy*a(h,l)
370 b(g,l)=b(g,l)-dummy*b(h,l)
371 end do
372 end do
373 end do
374 end
375
376 subroutine CloseOutputFile(z,output)
377 implicit none
378 integer z,output
379 write(unit=output,fmt=’(a,i5.1)’)
380 & "iteration count:",z
381 close(output)
382 end
_input100.txt
1 ele[-]
2 1
3 EqEle==
4 T
5 i[-]
6 10
68 6 FORTRAN Source Codes
7 F0[N]
8 60000.
9 u0[m]
10 0.008
11 A[m^2]
12 0.0001
13 L[m]
14 0.4
15 E[MPa]
16 70000.
17 kinit[MPa]
18 350.
19 Epl[MPa]
20 7000.
21 TolCPP[-]
22 0.000000001
23 TolILoop[-]
24 0.000000001
25 LinCPP==
26 F
27 FControlled==
28 T
The file ‘CPPSubroutines1D.f’ with CPP subroutines is used for all 1D models.
CPPSubroutines1D.f
1 subroutine CPP(deps,E,kinit,Epl,eps,epsinc,sinc,
2 & s,epspl,Etil,z,linCPP,tolCPP)
3 implicit none
4 real*8 deps,E,kinit,Epl,eps,epsinc,sinc,st,
5 & funF,s,epspl,Etil,tolCPP,funK,epsplt
6 integer z
7 logical linCPP
8 st=s+E*deps
9 epsplt=epspl
10 if(funF(st,funK(epspl,kinit,Epl,linCPP))
11 & .le.0.D0)then
12 s=st
13 z=z+1
14 else
15 if(linCPP)then
16 call CPPpllin(st,kinit,Epl,E,epspl,s,z,
17 & epsplt)
18 else
19 call CPPplnonlin(st,s,epspl,kinit,E,z,
20 & tolCPP,epsplt)
6.3 One-Dimensional CPP Algorithm 69
21 end if
22 end if
23 Etil=(s-sinc)/(eps-epsinc)
24 end
25
26 subroutine CPPpllin(st,kinit,Epl,E,epspl,s,z,
27 & epsplt)
28 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29 !apply linear CPP-algorithm in plastic regime !
30 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31 implicit none
32 real*8 kinit,Epl,E,epspl,s,dl,funF,st,
33 & funK,spl,epsplt
34 integer z
35 dl=funF(st,funK(epsplt,kinit,Epl,.true.))/
36 & (E+Epl)
37 epspl=epsplt+dl*dsign(1.D0,st)
38 s=st-dl*E*dsign(1.D0,st)
39 z=z+1
40 end
41
42 subroutine CPPplnonlin(st,s,epspl,kinit,E,z,
43 & tolCPP,epsplt)
44 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
45 !apply non-linear CPP-algorithm in plastic regime!
46 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
47 implicit none
48 real*8 v(100,100),dl,Eelpl,m(100),Epl,tol,s,
49 & mtilinv(100,100),funF,funK,E,st,epsplt,
50 & kinit,epspl,tolCPP,junk
51 integer j,q,p,z
52 logical CPPtolexceeded
53 z=z+1
54 j=0
55 v(1,1)=st
56 v(2,1)=epsplt
57 v(3,1)=0.D0
58 s=st
59 epspl=epsplt
60 dl=0.D0
61 CPPtolexceeded=.true.
62 do while(CPPtolexceeded)
63 j=j+1
64 10 format(t1,a,i2.1,t85,f12.8,t99,f12.7)
65 write(unit=2,fmt=10)"cpp:",j,epspl*1.D3,s
66 Eelpl=E*Epl(epspl)/(E+Epl(epspl))
67 m(1)=(s-st)/E+dl*dsign(1.D0,s)
68 m(2)=epsplt-epspl+dl
69 m(3)=funF(s,funK(epspl,kinit,junk,.false.))
70 mtilinv(1,1)=Epl(epspl)
71 mtilinv(1,2)=-dsign(1.D0,s)*Epl(epspl)
72 mtilinv(1,3)=dsign(1.D0,s)
73 mtilinv(2,1)=dsign(1.D0,s)
70 6 FORTRAN Source Codes
74 mtilinv(2,2)=-1.D0
75 mtilinv(2,3)=-1.D0/E
76 mtilinv(3,1)=dsign(1.D0,s)
77 mtilinv(3,2)=Epl(epspl)/E
78 mtilinv(3,3)=-1.D0/E
79 do q=1,3
80 do p=1,3
81 v(q,j+1)=v(q,j)-E/(E+Epl(epspl))*
82 & mtilinv(q,p)*m(p)
83 end do
84 end do
85 s=v(1,j+1)
86 epspl=v(2,j+1)
87 dl=v(3,j+1)
88 tol=0
89 do q=1,3
90 tol=tol+(v(q,j+1)-v(q,j))**2
91 end do
92 tol=sqrt(tol)
93 if(tol.lt.tolCPP)then
94 CPPtolexceeded=.false.
95 end if
96 end do
97 end
98
99 function funF(s,funK)
100 implicit none
101 real*8 funF,s,funK
102 funF=abs(s)-funK
103 end
104
49 write(unit=1,fmt=’(/)’)
50 write(unit=1,fmt=10)"dl","kappa"
51 write(unit=1,fmt=30)dl,kappa
52 end if
53 write(unit=1,fmt=’(a)’),’!!!!!!!!!!!!!!!!!!!!’
54 write(unit=1,fmt=’(t30,a,i3.2)’) ’inc=’,inc
55 call CPP3D(E,nu,deps,eps,ds,s,depl,epl,
56 & dl,kappa)
57 write(unit=1,fmt=’(/)’)
58 write(unit=1,fmt=’(a)’)"output:"
59 write(unit=1,fmt=’(t10,a)’)"deps"
60 do i=1,6
61 write(unit=1,fmt=’(f20.10)’)deps(i)
62 end do
63 write(unit=1,fmt=’(/)’)
64 write(unit=1,fmt=10)"eps","ds","s","depl","epl"
65 do i=1,6
66 write(unit=1,fmt=20)eps(i),ds(i),s(i),depl(i),
67 & epl(i)
68 end do
69 write(unit=1,fmt=’(/)’)
70 write(unit=1,fmt=10)"dl","kappa"
71 write(unit=1,fmt=30)dl,kappa
72 end do
73 close(unit=1)
74 end
75 include ’UserSubroutines3D.f’
76 include ’CommonSubroutines3D.f’
The file ‘UserSubroutines3D.f’ contains subroutines that the user may varify.
Unlike before, there is no input file. Therefore, the code must be modified within the
respective subroutine.
UserSubroutines3D.f
1 subroutine CPP3D(E,nu,deps,eps,ds,s,
2 & depl,epl,dl,kappa)
3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4 !E - (const.) YOUNG’s modulus [MPa] !
5 !nu - (const.) POISSON’s number [-] !
6 !deps - (const.) strain increment vector[-] !
7 !ds - stress increment vector [MPa] !
8 !s - stress vector [MPa] !
9 !depl - plastic strain increment vector [-] !
10 !epl - plastic strain vector [-] !
11 !dl - effective plastic strain increment [-] !
12 !kappa - effective plastic strain [-] !
13 !eps - total strain vector [-] !
14 !st - trial stress vector (predictor) [MPa] !
15 !v0 - solution vector at beginning of inc. !
16 !vt - solution vector at trial stress state !
17 !v - solution vector at current iteration !
18 !vold - solution vector at previous iteration !
6.4 Three-Dimensional Finite Element Model 73
19 ! ->units [v(1-6)]=MPa,[v(7-8)]=[-] !
20 !tol - user prescribed tolerance [-] !
21 !F - yield function [MPa] !
22 !tolex - true if tolerance is exceeded !
23 !i - increment counter !
24 !it - iteration counter !
25 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26 implicit none
27 real*8 E,nu,deps(100),ds(100),s(100),depl(100),
28 & epl(100),dl,kappa,eps(100),st(100),v0(100),
29 & vt(100),v(100),vold(100),tol,F
30 logical tolex
31 integer i,it
32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 !set tolerance here: !
34 tol=1.D-8
35 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
36 it=0
37 call getv(v0,s,kappa,0.D0)
38 call geteps(eps,deps)
39 40 format (a,i2.2,a,f15.5)
40 write(unit=1,fmt=’(/)’)
41 do i=1,8
42 write(unit=1,fmt=40) "v0(",i,")=",v0(i)
43 end do
44 call getst(st,deps,s,nu,E)
45 write(unit=1,fmt=’(/)’)
46 do i=1,6
47 write(unit=1,fmt=40) "st(",i,")=",st(i)
48 end do
49 call getv(vt,st,kappa,0.D0)
50 write(unit=1,fmt=’(/)’)
51 do i=1,8
52 write(unit=1,fmt=40) "vt(",i,")=",vt(i)
53 end do
54 call getv(v,st,kappa,0.D0)
55 write(unit=1,fmt=’(/)’)
56 do i=1,8
57 write(unit=1,fmt=40) "v(",i,")=",v(i)
58 end do
59 call getF(F,vt)
60 if (F.le.0.D0) then
61 call getuk(v,v0,ds,s,depl,epl,dl,kappa,
62 & deps,eps)
63 it=it+1
64 else
65 30 format (a,f20.16)
66 write(unit=1,fmt=30) "F=",F
67 tolex=.true.
68 do while (tolex)
69 it=it+1
70 write(unit=1,fmt=’(/)’)
71 write(unit=1,fmt=’(a,i5.3)’)"iteration:",it
74 6 FORTRAN Source Codes
72 write(unit=1,fmt=’(/)’)
73 call getvold(vold,v)
74 call iteratev(v,nu,E,vt,v0)
75 call checktol(tol,tolex,v,vold,it)
76 call getuk(v,v0,ds,s,depl,epl,dl,kappa,deps,
77 & eps)
78 end do
79 call getepl(epl,depl,v)
80 end if
81 end
82
83 subroutine geth(h,v0)
84 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
85 !evaluate hardening function h !
86 !seff - effective stress !
87 !r - function of flow direction !
88 !sinc - stress at beginning of increment !
89 !kappainc - eff. pl. strain at beginning of incr.!
90 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
91 implicit none
92 real*8 h,seff,r(100),sinc(100),kappainc,v0(100)
93 integer i
94 do i=1,6
95 sinc(i)=v0(i)
96 end do
97 kappainc=v0(7)
98 call getseff(seff,v0)
99 call getr(r,v0)
100 h=0.D0
101 do i=1,6
102 h=h+sinc(i)*r(i)/seff
103 end do
104 end
105
106 subroutine getdhds(dhds,v)
107 implicit none
108 real*8 dhds(100),v(100)
109 integer i
110 do i=1,6
111 dhds(i)=0.D0
112 end do
113 end
114
115 subroutine getdFdJ2dev(dFdJ2dev,v)
116 implicit none
117 real*8 v(100),dFdJ2dev,J2dev
118 call getJ2dev(J2dev,v)
119 dFdJ2dev=sqrt(3.D0)/(2.D0*sqrt(J2dev))
120 end
121
122 subroutine getd2FdJ2dev2(d2FdJ2dev2,v)
123 implicit none
124 real*8 d2FdJ2dev2,J2dev,v(100)
6.4 Three-Dimensional Finite Element Model 75
178 do j=1,6
179 drds(i,j)=0.D0
180 end do
181 end do
182 end
CommonSubroutines3D.f
1 subroutine getF(F,v)
2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 !evaluate yield function F !
4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5 implicit none
6 real*8 F,k,seff,v(100)
7 call getk(k,v(7))
8 call getseff(seff,v)
9 F=seff-k
10 end
11
12 subroutine getepl(epl,depl,v)
13 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14 !evaluate accumulated plastic strain vector epl !
15 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 implicit none
17 real*8 v(100),epl(100),depl(100),dFds(100)
18 integer i
19 call getdFds(dFds,v)
20 do i=1,6
21 depl(i)=dFds(i)*v(8)
22 epl(i)=epl(i)+depl(i)
23 end do
24 end
25
26 subroutine geteps(eps,deps)
27 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28 !evaluate accumulated total strain vector eps !
29 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 implicit none
31 real*8 deps(100),eps(100)
32 integer i
33 do i=1,6
34 eps(i)=eps(i)+deps(i)
35 end do
36 end
37
38 subroutine getuk(v,v0,ds,s,depl,epl,dl,kappa,
39 & deps,eps)
40 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41 !read unknowns from solution vector v !
42 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6.4 Three-Dimensional Finite Element Model 77
43 implicit none
44 real*8 v(100),v0(100),deps(100),ds(100),s(100),
45 & dl,kappa,eps(100),depl(100),epl(100),dFds(100)
46 integer i
47 do i=1,6
48 ds(i)=v(i)-v0(i)
49 s(i)=v(i)
50 end do
51 kappa=v(7)
52 dl=v(8)
53 end
54
55 subroutine getidty(idty,n)
56 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
57 !create identity matrix of rank nxn !
58 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
59 implicit none
60 real*8 idty(100,100)
61 integer n,i,j
62 do i=1,n
63 do j=1,n
64 if (i.eq.j)then
65 idty(i,j)=1.D0
66 else
67 idty(i,j)=0.D0
68 end if
69 end do
70 end do
71 end
72
73 subroutine getC(C,nu,E)
74 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75 !create elasticity matrix of rank 6x6 !
76 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
77 implicit none
78 real*8 C(100,100),nu,E,L(100,100),Linv(100,100),
79 & aux1(100)
80 integer i,j
81 call getaux1(aux1)
82 call getL(L)
83 call matrixinv(L,Linv,6)
84 do i=1,6
85 do j=1,6
86 C(i,j)=0.D0
87 end do
88 end do
89 do i=1,6
90 do j=1,6
91 C(i,j)=C(i,j)+E/(1.D0+nu)*(nu/(1.D0-2.D0*nu)
92 & *aux1(i)*aux1(j)+Linv(i,j))
93 end do
94 end do
95 end
78 6 FORTRAN Source Codes
96
97 subroutine getL(L)
98 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
99 !create diagonal matrix L={1,1,1,2,2,2} !
100 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
101 implicit none
102 real*8 L(100,100)
103 integer i,j
104 do i=1,6
105 do j=1,6
106 if (i.eq.j) then
107 if (i.lt.4) then
108 L(i,j)=1.D0
109 else
110 L(i,j)=2.D0
111 end if
112 else
113 L(i,j)=0.D0
114 end if
115 end do
116 end do
117 end
118
119 subroutine getaux1(aux1)
120 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
121 !create vector aux1=[1,1,1,0,0,0]^T !
122 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
123 implicit none
124 real*8 aux1(100)
125 integer i
126 do i=1,3
127 aux1(i)=1.D0
128 end do
129 do i=4,6
130 aux1(i)=0.D0
131 end do
132 end
133
255 end do
256 do i=1,6
257 do j=1,6
258 dmdv(i,j)=Cinv(i,j)+v(8)*drds(i,j)
259 end do
260 end do
261 do j=1,6
262 dmdv(7,j)=v(8)*dhds(j)
263 dmdv(8,j)=dFds(j)
264 end do
265 do i=1,6
266 dmdv(i,7)=0.D0
267 dmdv(i,8)=r(i)
268 end do
269 dmdv(7,7)=-1.D0
270 dmdv(7,8)=h
271 dmdv(8,7)=dFdkappa
272 dmdv(8,8)=0.D0
273 end
274
275 subroutine getJ2dev(J2dev,v)
276 implicit none
277 real*8 J2dev,sdev(100),v(100)
278 integer i,j
279 call getsdev(sdev,v)
280 J2dev=0.D0
281 do i=1,3
282 J2dev=J2dev+0.5D0*sdev(i)**2
283 end do
284 do i=4,6
285 J2dev=J2dev+sdev(i)**2
286 end do
287 end
288
289 subroutine getsdev(sdev,v)
290 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
291 !evaluate deviator of a vector, e.g. stress !
292 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
293 implicit none
294 real*8 v(100),sdev(100),J1
295 integer i
296 J1=v(1)+v(2)+v(3)
297 do i=1,3
298 sdev(i)=v(i)-J1/3.D0
299 end do
300 do i=4,6
301 sdev(i)=v(i)
302 end do
303 end
304
305 subroutine getdJ2devds(dJ2devds,v)
306 implicit none
307 real*8 v(100),dJ2devds(100),L(100,100),sdev(100)
82 6 FORTRAN Source Codes
The following Tables A.1–A.5 contains a list of all variables used in the Fortran
codes:
Table A.1 List of deformation related variables used in the Fortran codes
Deformation
Type Variable Symbol Unit Description
j+1
Real*8 eps εn+1 [−] Strain at current increment and
iteration
Real*8 epsinc εn [−] Strain at previous increment
j
Real*8 epsit εn+1 [−] Strain at current increment and
previous iteration
j+1
Real*8 deps εn [−] Strain increment at current iteration
j+1
Real*8 epspl κn+1 [−] Effective plastic strain at current
increment and iteration
Real*8 epsplinc κn [−] Effective plastic strain at previous
increment
Real*8 epsplt κn+1
t [−] Trial effective plastic strain at current
increment
Real*8 dl λ [−] Consistency parameter
Real*8 utot u tot [−] Total user prescribed displacement
j+1
Real*8 du u n [−] Displacement increment at current
iteration
j+1
Real*8 u u n+1 [−] Displacement at current increment and
iteration
Real*8 uinc un [−] Displacement at previous increment
j
Real*8 uit u n+1 [−] Displacement at current increment and
previous iteration
Table A.2 List of stress and force related variables used in the Fortran codes
Stress and force
Type Variable Symbol Unit Description
j+1
Real*8 ds σn [MPa] Stress increment at current
iteration
j+1
Real*8 s σn+1 [MPa] Stress at current increment and
iteration
j+1
Real*8 sdev σ n+1 [MPa] Deviatoric stress at current
increment and iteration
Real*8 sinc σn [MPa] Stress at previous iteration
Real*8 st σn+1
t
[MPa] Trial stress at current increment
Real*8 funF F(σ, k(κ)) [MPa] Yield function
∂F
Real*8 dFds ∂σ [−] Derivative of the yield function
with respect to the stress
∂F
1
Real*8 dFdJ2dev MPa Derivative of the yield function
∂ J2
∂2 F
1
Real*8 d2Fds2 ∂σ 2 MPa Second derivative of the yield
function
∂2 F 1
Real*8 d2FdJ2dev2 2 Second derivative of the yield
∂ J2
MPa2
function
Real*8 r r [−] Function of flow direction
Real*8 seff σeff [−] Effective stress
Real*8 J2dev J2 [−] Second deviatoric invariant
j+1
Real*8 v vn+1 [MPa, −] Solution vector at current
increment and iteration
j=0
Real*8 v0 vn+1 [MPa, −] Solution vector at the beginning of
the increment
Real*8 vt vtn+1 [MPa, −] Solution vector at the trial state
j
Real*8 vold vn+1 [MPa, −] Solution vector at previous
iteration
j+1
Real*8 m mn+1 [MPa, −] Residual vector at current
increment and iteration
∂m j+1
MPa , −
1
Real*8 dmdv ∂v n+1 Residual matrix of derivatives with
respect to the solution vector
−1
∂m j+1
Real*8 dmdvinv ∂v n+1 [MPa, −] Residual matrix inverse (3D)
j+1 −1
∂m
Real*8 mtilinv ∂v n+1 [MPa, −] Residual matrix inverse (1D)
Real*8 Ftot Ftot [N] Total user prescribed force
j+1
Real*8 F Fn+1 [N] Force at current increment and
iteration
j+1
Real*8 dF Fn [N] Force increment at current iteration
j+1
Real*8 r rn+1 [N] Force residual at the current
increment and iteration
Appendix A: FORTRAN Variables 87
1. Anandarajah A (2010) Computational methods in elasticity and plasticity: solids and porous
media. Springer, New York
2. Bathe K-J (1996) Finite element procedures. Prentice-Hall, Upper Saddle River
3. Beer FP, Johnston ER Jr, DeWolf JT, Mazurek DF (2009) Mechanics of materials. McGraw-
Hill, New York
4. Belytschko T, Liu WK, Moran B (2000) Nonlinear finite elements for continua and structures.
Wiley, Chichester
5. Betten J (2001) Kontinuumsmechanik. Springer, Berlin
6. Boresi AP, Schmidt RJ (2003) Advanced mechanics of materials. Wiley, New York
7. Borja RI (2013) Plasticity: modeling and computation. Springer, Berlin
8. Budynas RG (1999) Advanced strength and applied stress analysis. McGraw-Hill Book, Sin-
gapore
9. Chakrabarty J (2006) Theory of plasticity. Elsevier Butterworth-Heinemann, Oxford
10. Chakrabarty J (2010) Applied plasticity. Springer, New York
11. Chen WF, Saleeb AF (1982) Constitutive equations for engineering materials: elasticity and
modelling, vol 1. Wiley, New York
12. Cook RD, Malkus DS, Plesha ME, Witt RJ (2002) Concepts and applications of finite element
analysis. Wiley, New York
13. Courtney TH (1990) Mechanical behavior of materials. Waveland Press, Waveland
14. Crisfield MA (2000) Non-linear finite element analysis of solids and structures: advanced
topics, vol 2. Wiley, Chichester
15. Crisfield MA (2001) Non-linear finite element analysis of solids and structures: essentials, vol
1. Wiley, Chichester
16. de Neto EA, Souza Peric D, Owen DRJ (2008) Computational methods for plasticity: theory
and applications. Wiley, Chichester
17. Doltsinis I (2000) Elements of plasticity: theory and computation. WIT Press, Southampton
18. Dunne F, Petrinic N (2005) Introduction to computational plasticity. Oxford University Press,
Oxford
19. Eschenauer H, Olhoff N, Schnell W (1997) Applied structural mechanics: fundamentals of
elasticity, load-bearing structures, structural optimization. Springer, Berlin
20. Gere JM, Timoshenko SP (1991) Mechanics of materials. PWS-KENT Publishing Company,
Boston
21. Gosz M (2006) Finite element method: applications in solids, structures, and heat transfer.
Taylor & Francis Group, Boca Raton
22. Gross D, Hauger W, Schröder J, Wall WA (2009) Technische Mechanik 2: Elastostatik.
Springer, Berlin
23. Hartmann F, Katz C (2007) Structural analysis with finite elements. Springer, Berlin
24. Henninger C (2001) Studienarbeit am Lehrstuhl für Technische Mechanik: Implementierung
des Return-Mapping-Algorithmus ‘Closest-Point-Projection’ in das FE-System MSC.Marc.
Universität Erlangen, Nürnberg
25. Javanbakht Z, Öchsner A (2017) Advanced finite element simulation with MSC Marc: appli-
cation of user subroutines. Springer, Cham
26. Kim N (2015) Introduction to nonlinear finite element analysis. Springer, New York
27. MacNeal RH (1994) Finite elements: their design and performance. Marcel Dekker, New York
28. Mitchell AR, Griffiths DF (1980) The finite difference method in partial differential equations.
Wiley, New York
29. Moran B, Ortiz M, Shih CF (1990) Formulation of implicit finite element methods for multi-
plicative finite deformation plasticity. Int J Num Meth Eng 29:483–514
30. Öchsner A (2003) Experimentelle und numerische Untersuchung des elasto-plastischen Ver-
haltens zellularer Modellwerkstoffe. Universität Erlangen-Nürnberg, Erlangen
31. Öchsner A (2014) Elasto-plasticity of frame structure elements: modelling and simulation of
rods and beams. Springer, Berlin
32. Öchsner A, Merkel M (2013) One-dimensional finite elements: an introduction to the FE
method. Springer, Berlin
33. Öchsner A, Öchsner M (2018) A first introduction to the finite element analysis program MSC
Marc/Mentat. Springer, Cham
34. Owen DRJ, Hinton E (1980) Finite elements in plasticity: theory and practice. Pineridge Press
Limited, Swansea
35. Press WH, Teukolsky SA, Vetterling WT, Flannery BP (1997) Numerical recipies in Fortran
77. Cambridge University Press, Cambridge
36. Reddy JN (2004) An introduction to nonlinear finite element analysis. Oxford University Press,
Oxford
37. Reddy JN (2006) An introduction to the finite element method. McGraw Hill, Singapore
38. Rees DWA (2016) Mechanics of solids and structures. Imperial College Press, London
39. Simo JC, Hughes TJR (1998) Computational inelasticity. Springer, New York
40. Steinke P (2010) Finite-Elemente-Methode: Rechnergestützte Einführung. Springer, Berlin
41. Szabó I (2003) Einführung in die Technische Mechanik: Nach Vorlesungen István Szabó.
Springer, Berlin
42. Timoshenko SP, Goodier JN (1970) Theory of elasticity. McGraw-Hill, New York
43. Weimin H, Reddy BD (1999) Plasticity: mathematical theory and numerical analysis. Springer,
New York
44. Wriggers P (2008) Nonlinear finite element methods. Springer, Berlin