You are on page 1of 20

1 Finite element method basis functions

Finite Elements: Basis functions


1-D elements
coordinate transformation
1-D elements
linear basis functions
quadratic basis functions
cubic basis functions
2-D elements
coordinate transformation
triangular elements
linear basis functions
quadratic basis functions
rectangular elements
linear basis functions
quadratic basis functions
Scope: Understand the origin and shape of basis functions used in classical
finite element techniques.
2 Finite element method basis functions
1-D elements: coordinate transformation
We wish to approximate a function u(x) defined in
an interval [a,b] by some set of basis functions

=
=
n
i
i i
c x u
1
) (
where i is the number of grid points (the edges of
our elements) defined at locations x
i
. As the basis
functions look the same in all elements (apart from
some constant) we make life easier by moving to a
local coordinate system
i i
i
x x
x x

=
+1

so that the element is defined for x=[0,1].


3 Finite element method basis functions
1-D elements linear basis functions
There is not much choice for the shape of a
(straight) 1-D element! Notably the length can vary
across the domain.
We require that our function u() be approximated
locally by the linear function

2 1
) ( c c u + =
Our node points are defined at
1,2
=0,1 and we
require that
2 1 2
1 1
2 1 2
1 1
u u c
u c
c c u
c u
+ =
=
+ =
=
Au c =

=
1 1 -
0 1
A
4 Finite element method basis functions
1-D elements linear basis functions
As we have expressed the coefficients c
i
as a
function of the function values at node points
1,2
we can now express the approximate function
using the node values



) ( ) (
) 1 (
) ( ) (
2 1 1
2 1
2 1 1
N N u
u u
u u u u
+ =
+ =
+ + =
.. and N
1,2
(x) are the linear
basis functions for 1-D
elements.
5 Finite element method basis functions
1-D quadratic elements
Now we require that our function u(x) be
approximated locally by the quadratic function
2
3 2 1
) ( c c c u + + =
Our node points are defined at
1,2,3
=0,1/2,1 and
we require that
3 2 1 3
3 2 1 2
1 1
25 . 0 5 . 0
c c c u
c c c u
c u
+ + =
+ + =
=
Au c =

=
2 4 2
1 4 3
0 0 1
A
6 Finite element method basis functions
1-D quadratic basis functions
... again we can now express our approximated
function as a sum over our basis functions
weighted by the values at three node points
... note that now we re
using three grid points
per element ...
Can we approximate a
constant function?

=
=
+ + + + = + + =
3
1
2
3
2
2
2
1
2
3 2 1
) (
) 2 ( ) 4 4 ( ) 2 3 1 ( ) (
i
i i
N u
u u u c c c u


7 Finite element method basis functions
1-D cubic basis functions
... using similar arguments the cubic basis
functions can be derived as
3 2
4
3 2
3
3 2
2
3 2
1
3
4
2
3 2 1
) (
2 3 ) (
2 ) (
2 3 1 ) (
) (





+ =
=
+ =
+ =
+ + + =
N
N
N
N
c c c c u
... note that here we
need derivative
information at the
boundaries ...
How can we
approximate a constant
function?
8 Finite element method basis functions
2-D elements: coordinate transformation
Let us now discuss the geometry and basis
functions of 2-D elements, again we want to
consider the problems in a local coordinate
system, first we look at triangles
P
3
P
2
P
1
x
y
P
3
P
2
P
1

before
after
9 Finite element method basis functions
2-D elements: coordinate transformation
Any triangle with corners P
i
(x
i
,y
i
), i=1,2,3 can be
transformed into a rectangular, equilateral triangle
with
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)


) ( ) (
) ( ) (
1 3 1 2 1
1 3 1 2 1
y y y y y y
x x x x x x
+ + =
+ + =
using counterclockwise numbering. Note that if
=0, then these equations are equivalent to the 1-
D tranformations. We seek to approximate a
function by the linear form

3 2 1
) , ( c c c u + + =
we proceed in the same way as in the 1-D case
10 Finite element method basis functions
2-D elements: coefficients
... and we obtain
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
... and we obtain the coefficients as a function of the
values at the grid nodes by matrix inversion
3 1 3
2 1 2
1 1
) 1 , 0 (
) 0 , 1 (
) 0 , 0 (
c c u u
c c u u
c u u
+ = =
+ = =
= =
Au c =

=
1 0 1
0 1 1
0 0 1
A
containing the
1-D case

=
1 1 -
0 1
A
11 Finite element method basis functions
triangles: linear basis functions
from matrix A we can calculate the linear basis
functions for triangles
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)



=
=
=
) , (
) , (
1 ) , (
3
2
1
N
N
N
12 Finite element method basis functions
triangles: quadratic elements
Any function defined on a triangle can be approximated by the quadratic
function 2
6 5
2
4 3 2 1
) , ( y xy x y x y x u + + + + + =
and in the transformed system we obtain
2
6 5
2
4 3 2 1
) , ( c c c c c c u + + + + + =
as in the 1-D case
we need additional
points on the
element.
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
P
5
(1/2,1/2)
P
4
(1/2,0)
P
6
(0,1/2)
+ +
+
+
+
+
P
5
P
4
P
6
13 Finite element method basis functions
triangles: quadratic elements
To determine the coefficients we calculate the
function u at each grid point to obtain
6 3 1 6
6 5 4 3 2 1 5
4 2 1 4
6 3 1 3
4 2 1 2
1 1
6 / 1 2 / 1
4 / 1 4 / 1 4 / 1 2 / 1 2 / 1
4 / 1 2 / 1
c c c u
c c c c c c u
c c c u
c c c u
c c c u
c u
+ + =
+ + + + + =
+ + =
+ + =
+ + =
=
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
P
5
(1/2,1/2)
P
4
(1/2,0)
P
6
(0,1/2)
+ +
+
+
+
+
P
5
P
4
P
6
... and by matrix inversion we can calculate the coefficients as a function of
the values at P
i
Au c =
14 Finite element method basis functions
triangles: basis functions



=
4 0 0 2 0 2
4 4 4 0 0 4
0 0 4 0 2 2
4 0 0 1 0 3
0 0 4 0 1 3
0 0 0 0 0 1
A
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
P
5
(1/2,1/2)
P
4
(1/2,0)
P
6
(0,1/2)
+ +
+
+
+
+
P
5
P
4
P
6
... to obtain the basis functions
Au c =
) 1 ( 4 ) , (
4 ) , (
) 1 ( 4 ) , (
) 1 2 ( ) , (
) 1 2 ( ) , (
) 2 2 1 )( 1 ( ) , (
2
5
4
3
2
1






=
=
=
=
=
=
N
N
N
N
N
N
... and they look like ...
15 Finite element method basis functions
triangles: quadratic basis functions
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
P
5
(1/2,1/2
P
4
(1/2,0)
P
6
(0,1/2)
+ +
+
+
+
+
P
5
P
4
P
6 The first three quadratic basis functions ...
16 Finite element method basis functions
triangles: quadratic basis functions
P
3
P
2
P
1

P
1
(0,0)
P
3
(0,1)
P
2
(1,0)
P
5
(1/2,1/2
P
4
(1/2,0)
P
6
(0,1/2)
+ +
+
+
+
+
P
5
P
4
P
6
.. and the rest ...
17 Finite element method basis functions
rectangles: transformation
Let us consider rectangular elements, and transform them into a local
coordinate system
P
3
P
2 P
1
x
y
P
3
P
2
P
1

before
after
P
4
P
4
18 Finite element method basis functions
rectangles: linear elements
With the linear Ansatz

4 3 2 1
) , ( c c c c u + + + =
we obtain matrix A as

=
1 1 1 1
1 0 0 1
0 0 1 1
0 0 0 1
A
and the basis functions




) 1 ( ) , (
) , (
) 1 ( ) , (
) 1 )( 1 ( ) , (
4
3
2
1
=
=
=
=
N
N
N
N
19 Finite element method basis functions
rectangles: quadratic elements
With the quadratic Ansatz
2
8
2
7
2
6 5
2
4 3 2 1
) , ( c c c c c c c c u + + + + + + + =
we obtain an 8x8 matrix A ... and a basis function looks
e.g. like
P
3
P
2
P
1

P
4
+
+
+
+
P
5
P
6
P
7
P
8
) 1 )( 1 ( 4 ) , (
) 2 2 1 )( 1 )( 1 ( ) , (
5
1


=
=
N
N
N
1
N
2
20 Finite element method basis functions
1-D and 2-D elements: summary
The basis functions for finite element problems can be obtained by:
Transforming the system in to a local (to the element) system
Making a linear (quadratic, cubic) Ansatz for a function defined across
the element.
Using the interpolation condition (which states that the particular basis
functions should be one at the corresponding grid node) to obtain the
coefficients as a function of the function values at the grid nodes.
Using these coefficients to derive the n basis functions for the n node
points (or conditions).

You might also like