Beruflich Dokumente
Kultur Dokumente
WS 05/06
Serie 4
K
i
i−1 i
M
0 M M 1= M
VN (K ) = P3 (K ), ∀K ∈ M. (5)
We consider the system of linear forms of V K i D K i = {β K1 i , β K2 i , β K3 i , β K4 i } defined
by:
i −1
β K1 i (v) = v( ),
n
1 i −1
2 lim v 0 ( + x),
β K i (v) =
N x→0 + N
(6)
β 3 (v) = v( i ),
Ki
n
1 i
4
β K i (v) = lim v 0 ( + x).
N x→0− N
Show that D K i is unisolvent (D K i is a basis of (VK i )0 ).
(d) Find the local shape functions {b 1K i , b2K i , b3K i , b4K i } associated to the local degrees
of freedom D K i .
Hint: Find blK i ∈ P3 (K i ) such that β Kk i (blK i ) = δk,l , for all k, l = 1, ..., 4.
(e) Show that matching local degrees of freedom at a node ensures
j
(f) Prove that the global degrees of freedom {b N }2N
j =1 arising from the above local
degrees of freedom are:
i 1 i
β N2i (v N ) = v N ( ), β N2i+1 (v N ) = v N 0 ( ), ∀i = 0, ..., N . (8)
N N N
2N+2
What are the global shape functions {biN }i=1 ?
(g) Compute the stiffness matrix S:
Z 1
j
S j,i = (biN )0 (x) (b N )0 (x) d x (9)
0
ω2
ω3
a2
ω1
a1
! ! !
a11 a21 a31
a1 := , a2 := , a3 := . (11)
a12 a22 a32
The barycentric coordinates λ1 (x), λ2 (x), λ3 (x) at the point x ∈ R2 , which are given
by
! !
1 x1 − a21 a22 − a32
λ1 (x) := · ,
2|K | x2 − a22 a31 − a21
! !
1 x1 − a31 a32 − a12
λ2 (x) := · ,
2|K | x2 − a32 a11 − a31
! !
1 x1 − a11 a12 − a22
λ3 (x) := · ,
2|K | x2 − a12 a21 − a11
can be used to define the element shape functions b1 (x), b2 (x), b3 (x) for piecewise
linear finite elements
b1K (x) := λ1 (x), b2K (x) := λ2 (x), b3K (x) := λ3 (x), (12)
on each element. For piecewise linear finite elements the element stiffness matrix A K
for the Laplacian is given by
Z
ij j
A K := ∇biK · ∇b K (1 ≤ i, j ≤ 3).
K
(a) Show that the sum over all entries of a row or a column of the local stiffness matrix
equals zero.
(b) Show that the following equations hold true
Z
1
∇b1K · ∇b2K = − cotan(ω3 ) ,
2
K
Z
1
∇b1K · ∇b3K = − cotan(ω2 ) ,
2
K
Z
1
∇ b2K · ∇b3K = − cotan(ω1 ) .
2
K
3. On the square
= {(x, y) ∈ R2 / 0 6 x 6 1, 0 6 y 6 1}, (13)
we consider the problem
1
Find u ∈ H0 () such that:
Z Z
(14)
∇u∇v = f v,
with
f (x, y) = 13π 2 sin (3π x) sin (2π y). (15)
To compute a numerical approximation, we introduce the following discreet space:
0
S2,0 (M) = {v ∈ C 0 () / v|∂ ≡ 0, v|K ∈ P2 (K ) ∀K ∈ M}. (16)
where M is a triangular mesh of (see the following figure for an example)
The numerical approximation u N of the exact solution u is the unique solution of the
following problem:
0
Find u N ∈ S2,0 (M) such that:
Z Z
0
(17)
∇u N · ∇v N = f v N , ∀v N ∈ S2,0 (M).
Write a MATLAB code which computes and plots the approximate numerical soluti-
on.
One can refer to the appendix for more informations.
Practical exercise: the solution is due on Tuesday January 9.
Testat requirement: 50% of the theoretical exercises and 50% practical exercises (MAT-
LAB) should be solved.
Appendix: Quadratic finite elements
Linear finite elements you can find at the following adress MATLAB files which solves
0 (K ):
the same problem with V N (K ) = S1,0
http://www.sam.math.ethz.ch/ tordeux/LFE
mainLFE : computes and draws the solution
assemMat_LFE : assembles the galerkin matrix
STIMA_Lapl_LFE : computes the local stiffness matrix
assemLoad_LFE : assembles the right hand side
assemDir_LFE : takes into account the Dirichlet boundary condition
plot_LFE : plots a (linear by element) function
3
Local shape function. Let K be an element of M, {ai }i=1 3
be its vertices and {mi }i=1 be
the midpoints of the edges.
a3
m 1
m2
a 2
m 3
a1
A nice way to express the local shape functions associated to these degrees of freedom
3
consists in introducing the barycentric coordinates {λi }i=1 uniquely defined by the relati-
ons:
X3 X 3
i
x = λi (x) a K with λi (x) = 1. (19)
i=1 i=1
The local shape functions are then given by:
1
b K (x) = λ1 (x) (2λ1 (x) − 1),
b2K (x) = λ2 (x) (2λ2 (x) − 1),
b3 (x) = λ3 (x) (2λ3 (x) − 1),
K
(20)
b4K (x) = 4 λ2 (x) λ3 (x),
b5K (x) = 4 λ1 (x) λ3 (x),
6
b K (x) = 4 λ1 (x) λ2 (x).
Hint: to compute the local stiffness matrix, one can use the following formula:
Z
2 α 1 ! α2 ! α3 !
λα1 1 λα2 2 λα3 3 = |K | . (22)
K (α1 + α2 + α3 + 2)!