Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Kenny Erleben
kenny@diku.dk
Department of Computer Science
University of Copenhagen
2010
Technically one would do the same to the boundary conditions and add all
up into a single equation.
5
2 y (x)
c(x) dx =
v (x)
x 2
Z xn
Z xn
2 y (x)
dx
v (x)
v (x)c(x)dx = 0
x 2
x1
x1
v (x) x
x
x
x1
x1
x1
Cleaning up
Z
xn
x1
6
v (x) y (x)
dx +
x
x
xn
v (x)c(x)dx = 0
x1
What Happened?
Originally we had the term
Z
v (x)
2 y (x)
dx
x 2
y1 (x)
y
y (x) =
Ni (x)
yi = N1 (x) Nn (x) ... = N
{z
}
|
i=1
yn (x)
N(x)
| {z }
n
X
Ni (x) = 1
2
9
What is
R xn
x1
Ndx = 1?.
10
xi x
1 x
xi x
= 1 xxi
Ni (x) = max 0, 1
x
11
functions
xi1 x xi
xi < x xi+1
otherwise
xn
x1
v (x) y (x)
dx +
x
x
xn
v (x)c(x)dx = 0
x1
xn
x1
13
Z xn
NT (x) N(x)
T
N (x)c(x)dx = 0
dx y +
x
x
x1
Cleaning Up
Now
y
Z
xn
x1
Z xn
NT (x) N(x)
T
dx y +
N (x)c(x)dx = 0
x
x
x1
14
xn
K=
x1
NT (x) N(x)
dx
x
x
xn
f=
NT (x)c(x)dx
x1
then we have
K
y =f
We are almost done, we just need to add the boundary conditions
before we can solve the linear system for our solution y .
15
(
1
K1i
0
i 1, . . . , n
if i = 1
otherwise
17
KF D
I
yF
f
= F
yD
d
(Ne )T cdx = 0
xi
19
20
x xi
xj xi
and Nje =
xj x
xj xi
xi x
x
and Nje =
x xj
x
Nje
Nie
1
1
=
and
=
x
x
x
x
which are constants independent of x
21
xj
xi
1
(Ne )T Ne e
1
1
y dx =
2
1
x
x
x
1 1
1 e
=
y
1 1
x
|
{z
}
y e
xj
dx
xi
Ke
and
e
xj
f =
(Ne )T cdx
xi
22
So we finally have
K
y=
Ke y e =
23
X
e
fe = f
24
27
Study Group
Make an implementation of the 1D example. Use the values
x1 = 1, xn = 2
x = 0.1
a = 1, b = 2, c = 0
Start by making a sketch on paper showing how you expect
y (x) to look like.
Discuss which parts of the algorithm that is nave parallizable
Consider using an iterative method (like Conjugate Gradient)
for solving the reduced system, can you suggest any
optimizations? (Hint: do not actually assemble the global
matrix)
Make pseudo code algorithms for your optimizations
28
Let us go to 2D
29
30
The Problem
We wish to find the unknown function u(p) : R2 7 R on some
T
domain p = x y R2 . All we know is some differential
equation
2 u(p) 2 u(p)
+
= c(p)
y 2
x 2
where c(p) : R2 7 R is some known function also we are given
some boundary conditions
u(p) = a(p)
For all p . Now we will do this using the finite element
method (FEM).
31
The 2D Domain
32
33
Aei
Ae
Aej
Ae
Ae
Nke = ke
A
Here As are triangle areas and Ae = Aei + Aej + Aek total area
3
35
36
37
So we find by differentiation
(pk pj )y
Nie
=
x
Ae
e
(pk pj )x
Ni
=
y
Ae
Similar for Nje and Nke . Observe they are constants independent of
x and y .
38
39
Ne
y
f =
T
Ne
+
y
Ne
x
T
Ne
x
!
Ae
(Ne )T cd
40
Same as in 1D
41
Same as in 1D
(If conditions are point wise)
42
Same as in 1D
43
45
Study Group
Derive the formula for Ke and f e in full detail for the 2D
example
Make an implementation of the 2D example on a rectangular
domain that is 6-by-2 in size.
Set a = 1 on the left edge of the rectangle and a = 2 on the
right size.
Use c = 0
Treat boundary conditions as point wise conditions
46
47
48
The Solution
49
v T A(u)d = 0
and
v T B(u)d = 0
v A(u)d +
v T B(u)d = 0
50
Wj uj
v =
j uj
W
then
ujT
Z
Z
+
T
Wj B(N u)d = 0
51
52
Given
Z
jT B(N u)d = 0
W
Integration by part
Z
Z
T
j )T F (N u)d = 0
C (Wj ) D(N u)d + E (W
53
Discrete Systems
j )T F (N u) then
Let G C (Wj )T D(N u) and g E (W
Z
Z
Z
X Z
Gd + gd =
Gd +
gd = 0
54
2D Elasticity
55
56
where
is Cauchy stress tensor written as a 3 dimensional vector
is the virtual Cauchy strain tensor written as a 3
dimensional vector
ue is the virtual displacement vector of dimension 6
f e is the external body force vector of dimension 6
As usual we treat boundary conditions as point wise and can ignore
them for now.
57
58
0
x
S = 0 y
59
Linear Elasticity
If one imposes the condition that is symmetric then the stress
tensor can be saved in a 3-dimensional vector
T
= 11 22 12
Similar trick can be used for a symmetric strain tensor
T
= 11 22 12
The stress tensor may be related to the Cauchy strain tensor by
the linear relation
= D = DBue
where D is a 3-by-3 elasticity matrix.
60
That is it!
61
1
0
E
1
0
D=
(1 2 )
(1)
0 0
2
and
e
Ni
x
B=
0 e
Ni
y
62
Nje
0
x
Nie
y 0
e
e
Ni
x
Nj
y
e
Nk
x
e
Nj
0
y
e
e
0
Nj
x
Nk
y
0
Nke
y
e
Nk
x
Study Group
63
Further Reading
O. C. Zienkiewicz and R. L. Taylor: The Finite Element
Method, volume 1, The Basis, Fifth Edition, Butterworth and
Heinemann, 2002
R. D. Cook, D. S. Malkus, M. E. Plesha and R. J. Witt:
Concepts and applications of finite element analysis, fourth
edition, John Wiley and Sons, 2002.
M
uller and M. Gross: Interactive virtual materials,
Proceedings of Graphics Interface 2004.
R. Schmedding and M. Teschner: Inversion Handling for
Stable Deformable Modeling, The Visual Computer, vol. 24,
no. 7-9 (CGI 2008 Special Issue), pp. 625-633, 2008.
A. W. Bargteil, C. Wojtan, J. K. Hodgins, and G. Turk: A
finite element method for animating large viscoplastic flow,
ACM Trans. Graph. vol 26. no. 3. 2007.
64
Intermediate Programming
Implement a rectangular solid 2D bar of dimension 6-by-2
meters and made of steel like material. Attach the left side of
the bar to a wall (use boundary condition u = 0) and apply a
downward nodal load on the right edge of the bar.
Examine the eigenvalue spectrum of the global stiffness matrix
before applying boundary conditions and after.
Examine the fill pattern of the stiffness matrix.
Investigate what happens to the deformations when you vary
the resolution and load on the bar. Try to find the best
suitable mesh resolution.
From everyday life steel material appears to be noticeable
incompressible. Examine whether your implementation has
volume (area in 2D) conservation.
65
Advanced Programming
Combine your 2D elastic model simulator with a LCP solver
that can solve for non-penetration of nodes against a fixed
completely rigid surface
Make the collision detection between a 2D solid rectangular
bar and a circular surface using an implicit function
: R2 7 R (signed distance field outside positive and inside
negative) of the surface. Let the contact normal and
separation distance be given by
(p)
n(p) =
and d(p) = (p)
k (p) k
The deformed coordinates of the solid can be found as
p = p0 + u
66
n1 1
K
u = f + ...
nn n
Of course you only need to add normal forces for the cases
where di 0.
Observe that results of the LCP solver go into the FEM solver
and vice versa. Thus, they are linked in some nonlinear non
smooth fashion. This is the problem you need to find a
solution for.
67