Você está na página 1de 20

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.

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

u ( x) = ci i
i =1

where i is the number of grid points (the edges of our elements) defined at locations xi. 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

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

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

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

u1 = c1 u2 = c1 + c2

c1 = u1 c2 = u1 + u2
1 0 A= - 1 1

c = Au

Finite element method basis functions

1-D elements linear basis functions


As we have expressed the coefficients ci as a function of the function values at node points 1,2 we can now express the approximate function using the node values

u ( ) = u1 + (u1 + u 2 ) = u1 (1 ) + u2 = u1 N1 ( ) + N 2 ( )

.. and N1,2(x) are the linear basis functions for 1-D elements.

Finite element method basis functions

1-D quadratic elements


Now we require that our function u(x) be approximated locally by the quadratic function

u ( ) = c1 + c2 + c3 2
Our node points are defined at 1,2,3=0,1/2,1 and we require that

u1 = c1 u2 = c1 + 0.5c2 + 0.25c3 u3 = c1 + c2 + c3
0 0 1 A= 3 4 1 2 4 2
Finite element method basis functions
5

c = Au

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

u ( ) = c1 + c2 + c3 2 = u1 (1 3 + 2 2 ) + u2 (4 4 2 ) + u3 ( + 2 2 ) = ui N i ( )
i =1 3

... note that now we re using three grid points per element ... Can we approximate a constant function?

Finite element method basis functions

1-D cubic basis functions


... using similar arguments the cubic basis functions can be derived as

u ( ) = c1 + c2 + c3 2 + c4 3 N1 ( ) = 1 3 2 + 2 3 N 2 ( ) = 2 2 + 3 N 3 ( ) = 3 2 2 3 N 4 ( ) = 2 + 3
... note that here we need derivative information at the boundaries ... How can we approximate a constant function?
Finite element method basis functions
7

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

P3 P2 P1 x
before

P3

P1

P2
after

Finite element method basis functions

2-D elements: coordinate transformation


Any triangle with corners Pi(xi,yi), i=1,2,3 can be transformed into a rectangular, equilateral triangle with
P3 P1 (0,0) P2 (1,0) P3 (0,1) P2 P1

x = x1 + ( x2 x1 ) + ( x3 x1 ) y = y1 + ( y2 y1 ) + ( y3 y1 )
using counterclockwise numbering. Note that if =0, then these equations are equivalent to the 1D tranformations. We seek to approximate a function by the linear form

u ( , ) = c1 + c2 + c3
we proceed in the same way as in the 1-D case

Finite element method basis functions

2-D elements: coefficients


... and we obtain
P3 P1 (0,0) P2 (1,0) P3 (0,1) P2 P1

u1 = u (0,0) = c1 u2 = u (1,0) = c1 + c2 u3 = u (0,1) = c1 + c3


... and we obtain the coefficients as a function of the values at the grid nodes by matrix inversion

c = Au
1 0 0 A= 1 1 0 1 0 1
Finite element method basis functions

containing the 1-D case

1 0 A= - 1 1
10

triangles: linear basis functions


from matrix A we can calculate the linear basis functions for triangles
P3 P1 (0,0) P2 (1,0) P3 (0,1) P2 P1

N1 ( , ) = 1 N 2 ( , ) = N 3 ( , ) =

Finite element method basis functions

11

triangles: quadratic elements


Any function defined on a triangle can be approximated by the quadratic function 2 2

u ( x, y ) = 1 + 2 x + 3 y + 4 x + 5 xy + 6 y

and in the transformed system we obtain

u ( , ) = c1 + c2 + c3 + c4 2 + c5 + c6 2
P3 P1 (0,0) P2 (1,0) P3 (0,1) P4 (1/2,0) P5 (1/2,1/2) P6 (0,1/2)

+
P6

as in the 1-D case we need additional points on the element.

P5

P1

P4

P2

Finite element method basis functions

12

triangles: quadratic elements


To determine the coefficients we calculate the function u at each grid point to obtain

u1 = c1 u2 = c1 + c2 + c4 u3 = c1 + c3 + c6 u4 = c1 + 1 / 2c2 + 1 / 4c4 u5 = c1 + 1 / 2c2 + 1 / 2c3 + 1 / 4c4 + 1 / 4c5 + 1 / 4c6 u6 = c1 + 1 / 2c3 + 1 / 6c6

P3

P6 + P+ 1

+
P4

P5

P1 (0,0) P2 (1,0) P3 (0,1) P4 (1/2,0) P5 (1/2,1/2) P6 (0,1/2)

P2

... and by matrix inversion we can calculate the coefficients as a function of the values at Pi

c = Au

Finite element method basis functions

13

triangles: basis functions

c = Au

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

P3

P6 + P+ 1

+
P4

P5

P1 (0,0) P2 (1,0) P3 (0,1) P4 (1/2,0) P5 (1/2,1/2) P6 (0,1/2)

P2

... to obtain the basis functions

N1 ( , ) = (1 )(1 2 2 ) N 2 ( , ) = (2 1) N 3 ( , ) = (2 1) N 4 ( , ) = 4 (1 ) N 5 ( , ) = 4 N 2 ( , ) = 4 (1 )
... and they look like ...
Finite element method basis functions
14

triangles: quadratic basis functions


P3

The first three quadratic basis functions ...

P6 + P+ 1

+ + P

P5

P1 (0,0) P2 (1,0) P3 (0,1) P4 (1/2,0) P5 (1/2,1/2 P6 (0,1/2)

+2

Finite element method basis functions

15

triangles: quadratic basis functions


P3

.. and the rest ...

P6 + P+ 1

+ + P

P5

P1 (0,0) P2 (1,0) P3 (0,1) P4 (1/2,0) P5 (1/2,1/2 P6 (0,1/2)

+2

Finite element method basis functions

16

rectangles: transformation
Let us consider rectangular elements, and transform them into a local coordinate system

P4

P3

P4 P3

P1

P2 x
before

P1

P2
after

Finite element method basis functions

17

rectangles: linear elements


With the linear Ansatz

u ( , ) = c1 + c2 + c3 + c4
we obtain matrix A as

1 0 1 1 A= 1 0 1 1

0 0 0 1 1 1 0 0

and the basis functions

N1 ( , ) = (1 )(1 ) N 2 ( , ) = (1 ) N 3 ( , ) = N 4 ( , ) = (1 )
Finite element method basis functions
18

rectangles: quadratic elements


With the quadratic Ansatz

P4

u ( , ) = c1 + c2 + c3 + c4 2 + c5 + c6 2 + c7 2 + c8 2
we obtain an 8x8 matrix A ... and a basis function looks e.g. like

P7

P3

N1 ( , ) = (1 )(1 )(1 2 2 ) N 5 ( , ) = 4 (1 )(1 )


N1

+ P8
N2

+ P6
P5

P1

P2

Finite element method basis functions

19

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).

Finite element method basis functions

20