Você está na página 1de 5

Algorithms

A1. Introduction to finite element method


Ales Janka
office Math 0.107
ales.janka@unifr.ch
http://perso.unifr.ch/ales.janka/mechanics

September 29, 2010, Universite de Fribourg

Algorithms

A1. Introduction to finite elements

Basic ideas behind the Finite Element Method (FEM)


Main task: find an easy way how to represent general functions
u : IR (scalar fields) on a computer. The method has to:
work well even on complicated computational domains
IRd ,
represent well a large class of functions u (continuous,
discontinuous, singular at a point),
be simple and easy to use (clear data-representation, fast),
provide possibility of adaptation (improving precision of the
result).

Main problem: The space C 0 () of all continuous functions on


is infinite-dimensional. How do we represent such functions on a
computer with finite RAM memory in finite time?
Algorithms

A1. Introduction to finite elements

1. Basic ideas: complex computational domains


Approximate by a union of non-overlapping simple (finite) elements

Works for general surfaces and volumes


Simple data-representation: list of vertices and elements (2 matrices)
Can be refined when needed, to capture geometry or physics
Algorithms

A1. Introduction to finite elements

1. Basic ideas: complex computational domains


Approximate by a union of non-overlapping simple (finite) elements

Works for general surfaces and volumes


Simple data-representation: list of vertices and elements (2 matrices)
Can be refined when needed, to capture geometry or physics
Algorithms

A1. Introduction to finite elements

2. Basic ideas: clear data-representation


List of vertex coordinates and list of vertices in each element

Nodal coordinates:
coordinates of mesh vertices

x1 y1 z1
x2 y2 z3

..
.
.
..
..
.

xi yi zi

..
..
..
.
.
.

XYZ =
xj yj zj

..
..
..
.
.
.

xk yk zk

..
..
..
.
.
.
xn yn zn

Element connectivity:
node indices in each element

1 10 2
.. .. ..
. . .

Elm = i j k

.. .. ..
. . .
5 1 2

5
j

k
Algorithms

10

A1. Introduction to finite elements

3. Basic ideas: representing a scalar function u : IR

Interpolation of u(x) on one element: u(x) uh (x)

Lagrange element P1

Type of uh (x): polynomial of low degree


The simplest = linear uh (x):
uh (x) = a + b x + c y

uk

Interpolation conditions:
uh (xi ) = u(xi ) = ui

uh(x)

uh (xj ) = u(xj ) = uj

u(x)

uh (xk ) = u(xk ) = uk

xk
ui
x

uj Error of interpolation in L2 norm:

ku uh k2, =

xi
xj

Algorithms

[u(x) uh (x)]2 dx

A1. Introduction to finite elements

3. Basic ideas: representing a scalar function u : IR

Interpolation of u(x) on one element: u(x) uh (x)

Rewrite uh (x) in a nodal basis hi (x), j (x), k (x)i:


uh (x) = ui i (x) + uj j (x) + uk k (x)
k(x)

i(x)

with linear ` (x) such that


j(x)

1, if ` = m
` (xm ) =
0, otherwise

xk

xi
xj
Algorithms

A1. Introduction to finite elements

4. Calculation of nodal basis functions on each element


Linear basis functions: ` (x) = a` + b` x + c` y , for ` = i, j, k.
How to calculate the 3 3 constants a` , b` , c` :
` (xi )

= a` + b` xi + c` yi =

` (xj )

= a` + b` xj + c` yj =

`i

`j

` (xk ) = a` + b` xk + c` yk = `k
Equations for

1
1
1

ai
bi
ci

a` , b` , c` in matrix

xi yi
ai aj
xj yj bi bj
xk yk
ci cj

form:

ak
1 0 0
bk = 0 1 0
ck
0 0 1


ak
1 xi
bk = 1 xj
ck
1 xk

1
yi
1 0 0
yj 0 1 0
yk
0 0 1

aj
bj
cj

Algorithms

A1. Introduction to finite elements

5. Spatial derivatives of uh (x) on each element


uh (x) in the nodal basis:
uh (x) = ui i (x) + uj j (x) + uk k (x)
Linear basis functions: ` (x) = a` + b` x + c` y , for ` = i, j, k.
Spatial derivatives of the scalar field uh (x) on one element T :

j
i
k
uh
=
u
+
u
+
u
= ui bi + uj bj + uk bk
i
j
k
x T
x
x
x

j
uh
k
i
=
u
+
u
+
u
= ui ci + uj cj + uk ck
i
j
k
y T
y
y
y

uh
x 
bi
T

=
ci
uh

y T

Matrix form:

Algorithms

bj
cj

bk
ck

ui
uj
uk

A1. Introduction to finite elements

Você também pode gostar