Sunteți pe pagina 1din 7

Finite Element Shape Functions

Essentially we are trying to construct functions which can be used to construct


approximations to u.

We do this by dividing into a finite number of subdomains called elements.
Lets consider triangular elements first.












The basic formula for interpolation in the element is derived as follows. Let u
h

stand for the approximation to u.

( ) cy bx a y , x u
h
+ +

Lets insist that

( )
1 1 1 1 1
h
cy bx a u y , x u + +

( )
2 2 2 2 2
h
cy bx a u y , x u + +

( )
3 3 3 3 3
h
cy bx a u y , x u + +

in other words the interpolation scheme be based on the values at the corners of
the triangle. We call these corners nodes.

Next do some algebra. Its a bit tedious and need not be gone over here. You
can make this an exercise if you are diligent.

We solve the three equations above for a, b, and c. Then we substitute back into
the original equation. We find that

( ) ( ) ( )
3 3 2 2 1 1
h
u y , x N u y , x N u y , x N u + +

where
Only 1 elem shown
1:(x
1
,y
1
)
3:(x
3
,y
3
)
2:(x
2
,y
2
)
u
1

u
3

u
2


( ) ( ) ( ) ( ) [ ] y x x x y y y x y x
A 2
1
y , x N
2 3 3 2 2 3 3 2 1
+ +

( ) ( ) ( ) ( ) [ ] y x x x y y y x y x
A 2
1
y , x N
3 1 1 3 3 1 1 3 2
+ +

( ) ( ) ( ) ( ) [ ] y x x x y y y x y x
A 2
1
y , x N
1 2 2 1 1 2 2 1 3
+ +


Here are sketches of the plots of these functions. They are called element shape
functions










Note that
Each shape function has a value of 1 at the node whose number it bears
and zero at all other nodes.
The interpolation scheme will match that of the adjacent elements since
they share 2 nodes in common, and the function varies linearly between
them.
This is harder to see at first glance, but the sum of the shape functions is a
constant, 1.


We can write the following formulas for functions v
h
and u
h
, which live in a finite
dimensional subspace of the space where u and v live. We use matrices for
economy.

[ ]
e
3
2
1
3 2 1
h
Nu
u
u
u
N N N u
1
1
1
]
1



There are three polynomials the Ns and three degrees of freedom, the nodal us.
So for this one element it looks like a three dimensional subspace. Not very
competent for interpolating. So we add more elements.
N
1
N
2

N
3


In like manner, any test function v
h
can also be interpolated in this manner.

[ ] ( )
T
T
e
3
2
1
3 2 1
h
N v
N
N
N
v v v v
1
1
1
]
1



Another part of our interpolation scheme has to do with the partial derivatives of
these quantities with respect to x and y.

( )
e
3
2
1
3 2 1
3 2 1
e h
Bu
u
u
u
y
N
y
N
y
N
x
N
x
N
x
N
Nu u
1
1
1
]
1

1
1
1
1
]
1


! !

where


1
]
1

1 2 3 1 2 3
2 1 1 3 3 2
x x x x x x
y y y y y y
A 2
1
B

It is also possible to write, for the test functions,

( ) ( ) ( )
T
T
e T
T
e
T
h
B v N v v

,
_


! !
.


Combination of the Shape Functions and the Variational Statement of the
Problem.

OK, now lets forget the triangle for a moment except to realize that it has given
us both shape functions in N, and their derivatives in B. This can actually come
from any properly derived element.

Restate the variational principle governing our phenomena.

Find a function u such that

0 dxdy f v v u k ds )) s ( u ) s ( u )( s ( vh
2
0
+


! !


for all admissible test functions v in a function space called H. It is a normed
linear space where all functions and first partial derivatives are square integrable
in .

Well, we cant find the function, usually. So we try to approximate it, seeking the
solution in a finite dimensional subspace H
h
. This is basically the space of
functions which can be thought of as being interpolated by these element shape
functions.

So our approximation is to seek an answer in H
h
, and here we hit paydirt. Find u
h

in H
h
such that

0 dxdy f v dxdy v u k ds )) s ( u u )( s ( h v
h h h
0
h h
2
+


! !

for all admissible v
h
in H
h
. Substitute in out interpolations. Integration over the
whole body is the sum of the integrals over each element.

( ) ( ) ( ) ( ) ds u hN v fdxdy N v ds Nu hN v dxdy Bu kB v
0
T
T
nbe
e
ne
T
T
e e T
T
nbe
e e T
T
ne
e
e e e e



+ +

Essentially this equation asks us to add up a number of element contributions.
Note that the elemental values u
e
and v
e
can be taken outside of the integrals,
since they are not dependent on x,y, or s. (Such dependence resides in the
shape functions alone.) We can now discuss the integrals that are left behind
briefly. First, let

e
Bdxdy kB K
T e
cond
.

In heat transfer, this is the part of the thermal stiffness matrix that depends on
conductivity. Next, let

e
Nds hN K
T e
conv


Again, in the heat transfer world, this is the part of the thermal stiffness matrix
that depends on convection. Please note that the integral is along the side of the
element. Only two of the three shape functions will be non-zero along each side.

Please note, however, that each of these matrices is a 3x3 and so they can get
added directly to one another.

Next, consider the next integral,

fdxdy N F
e
T e
source

.

This entity is a 3x1 vector. It is related to the source per unit volume term.


Finally consider,

e
ds hu N F
0
T e
conv
.
This is another 3x1 vector which results from convection (in the heat transfer
world, that is.)

Next, let us assemble these element matrices into global matrices. In principle
we do this by inflating the element matrix to the full problem size and adding.

We have



+
nbe
e
conv
ne
e
cond
K K K



+
nbe
e
conv
ne
e
source
F F F

The matrix K will be nxn where n is the number of nodes in the model. The
vector F will be nx1.

Let v be the complete list or vector of all nodal vs. Also u is the complete vector
of all nodal us. These will be nx1. And so the finite element equations become

F v Ku v
T T


or

( ) 0 F Ku v
T


which must hold for all admissible values of v. The quantity v is now seen to be
just a mathematical fiction or place holder which has guided us in setting up the
finite element equations,

F Ku .

These are created and solved by the finite element codes. If you look back over
the derivation, you can see that the shape function N can be quite general and
can come in from elements besides the 3 node triangle.

Before going on, here are some notes about the practical calculations being used
for the three node triangle elements.

For
e
cond
K , we note that the integrand kBTB is a constant. All we need to do is
to evaluate it and multiply the result by A, the area of the triangular element.

For
e
conv
K , the matter is not so simple. We have to integrate along the
boundary. Its a line integral as opposed to an area integral. Suppose it is the
boundary between node I and node J.








We can write, along this boundary, that

( ) 1
2
1
N
I


( ) + 1
2
1
N
J


And suppose now that h is also parameterized with respect to . Actually, to
make it simple here lets suppose that h is constant. To evaluate the integrals
which arise, such as the following one, a change of variables is used.



d
d
ds
h N N hds N N
e
1
1
J I J I


Now we will have terms like

( ) ( )

1
]
1


1
]
1



d
ds
h
3
2
d
d
ds
1
2
1
1
2
1
h d
d
ds
N hN
1
1
1
1
I I



( ) ( )

1
]
1

+
1
]
1



d
ds
h
3
2
d
d
ds
1
2
1
1
2
1
h d
d
ds
N hN
1
1
1
1
J J


and

I, =-1
J, =1
N
I

N
J

( ) ( )

1
]
1

+
1
]
1



d
ds
h
3
1
d
d
ds
1
2
1
1
2
1
h d
d
ds
N hN
1
1
1
1
J I


For example, say the convection took place on element side connecting nodes 1
and 2. Using these results, the convection contribution to the thermal stiffness
would be

1
1
1
1
1
1
]
1

,
_

0 0 0
0
3
2
3
1
0
3
1
3
2
d
ds
h K
e
conv


Hopefully, it should be obvious what happens on sides from 1 to 3 and from 2 to
3.

Next, consider the corresponding contribution to F. Again, suppose that h and u
0

are constant.

( )

1
]
1



d
ds
hu d
d
ds
hu 1
2
1
d
d
ds
hu N ds hu N
0
1
1
0
1
1
0 I 0 I
e


These calculations are illustrated in the Example spreadsheet which
accompanies these notes.

S-ar putea să vă placă și