Professional Documents
Culture Documents
Chapter 2
Introduction to FEM
These notes are prepared by
Dr. Cneyt Sert
http://www.me.metu.edu.tr/people/cuneyt
csert@metu.edu.tr
These notes are prepared with the hope to be useful to those who want to learn and teach FEM. You are free to use
them. Please send feedbacks to the above email address.
2-1
Left:
20 oC
(, ) = ?
Bottom: Heat coming in
Right:
Insulated
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-2
Simple shaped
elements
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-3
0 =0 ,
sin + 2sin(1 )
+ 2 2
sin(1)
0<<1
1 =0
-0.01
-0.02
-0.03
-0.04
-0.05
0
0.2
0.4
0.6
0.8
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
1
2-4
e=2
2
e=3
3
e=4
4
Node
5
Element
Global node
number
2-5
: Approximate FE solution
5 = 0
1 = 0
1
2
e=1
3
e=2
4
e=3
e=4
2-6
=1
Number of nodes
Nodal unknowns
() : Approximation functions
1
0
if =
if
, = 1,2, ,
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-7
1
e=1
e=2
e=3
e=4
e=1
e=2
e=3
e=4
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-8
3
4
2 2
1 = 5
Each is multiplied by
4 4
1 1
e=1
5 5
e=2
e=3
e=4
=1
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-9
= 0
=0
2
2 + 2
= 0
IBP
1
0
1
Weak form :
0
1
0
+ 2
=0
0
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-10
= ,
1st eqn ( = 1 ) :
2nd eqn ( = 2 ) :
3rd eqn ( = 3 ) :
4th eqn ( = 4 ) :
5th eqn ( = 5 ) :
1 1
0
1 + 1 2
1 2
0
1 3
0
1 4
0
1 5
0
= 1,2, ,
1
0
2 + 2 2
+
=1
=0
=0
=0
=0
4
0
=1
=0
=0
=1
5 + 5 2
+
=1
4 + 4 2
1
1
=1
3 + 3 2
=0
=0
5
0
=0
=0
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-11
3 =
4 1
2 4
3
3 + 3 2
3 4
4 2
3 =
e=3
e=4
= 3 = 3 4
= 3 = 4 1
=
e=2
= 2 (2 4) + 3 (4 1)
Simplified sum over e=2
= 3 (3 4) + 4 (4 2)
Simplified sum over e=3
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-12
2-13
97
47
97
25
The result for 3 is : 2 + 3 4 +
24
6
24
384
Other integrals are calculated in Example2.1v2.m MATLAB code (see the next slide).
The resultant 5 equations are
1
47
97
12
24
97 47
97
24
6
24
97 47
24
6
97
24
[]
1
2
97
24
47
6
97
24
97
24
47
12
4
5
{}
768
7
384
25
384
55
384
27
256
{}
=0
0
0
=1
{}
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-14
Example2_1v2.m code
(2nd & simpler version)
2-4*x;
3-4*x;
4-4*x;
2-15
Nodal unknown
vector
1
Force vector
1
Boundary term
vector
1
=0
+
=1
1 =
5 =
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-16
12
22
32
42
52
13
23
33
43
53
14
24
34
44
54
15
25
25
45
55
1
2
3
4
5
1
1
2
2
= 3 + 3
4
4
5
5
23
33
43
24 2
2 21 1 25 5
2
34 3 = 3 31 1 35 5 + 3
44 4
4 41 1 45 5
4
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-17
24
0
97
24
47
6
97
24
97
24
47
6
2
3
4
7
00
384
25
00
384
55
00
384
2
0.0232
3 = 0.0405
4
0.0392
0
0
Because
1 = 0
5 = 0
0.0234
= 0.0408
0.0394
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-18
FEM
Exact
-0.01
-0.02
4 element FE solution
vs.
exact solution
-0.03
-0.04
-0.05
0
0.25
0.5
0.75
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-19
Good match
97
47
27
5 = 4 +
+
= 0.2639
24
12 5 256
Second way : Use the derivatives of the FE solution at the boundaries
1 =
5 =
2 1
0.0232 0
=
=
= 0.0928
0.25
=0
=1
5 4 0 (0.0392)
=
=
= 0.1568
0.25
No match
Why?
Which one is better?
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-20
2-21
Larger elements
(coarser mesh) in
low gradient
regions
Smaller elements
(finer mesh) in
high gradient
regions
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-22
Remarks (contd)
2D elements can be triangular or quadrilateral.
In 3D they can be tetrahedral, triangular prism (wedge) or hexahedral (brick).
Triangular
Quadrilateral
Tetrahedron
(Pyramid)
Triangular prism
(Wedge)
Hexahedron
(Brick)
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-23
Remarks (contd)
In our first FE solution we used linear (2-node) elements.
It is possible to use higher order elements, which make use of more nodes.
When we use quadratic (3-node) elements we can have quadratic polynomial solutions
over each element.
The following sample solution makes use of 3 quadratic elements ( = 3) with a
total node number of 7 ( = 7).
6
2
e=1
e=2
e=3
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-24
Remarks (contd)
Our first FE solution was piecewise continuous.
It was continuous across element interfaces, however its first deriative was not.
This is known as a 0 continuous solution, i.e. only the 0th derivative of the unknown
(which is the unknown itself) is continuous.
For 2nd order DEs, the weak form contains first derivative of the unknown and the use
of 0 continuous solution is enough.
For higher order DEs, for example the 4th order one used for beam bending,
0 continuity is not enough and a 1 continuous solution is necessary.
FEM results in a sparse stiffness matrix, i.e. a matrix with lots of zero entries.
This is due to the compact support property of the approximation functions.
For 2D and especially for 3D problems this feature is important to decrease memory
usage of the code.
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-25
Remarks (contd)
The structure of the final linear algebraic equation system depends on how we
number the mesh nodes globally.
When we do a different numbering, the final equation system does NOT change
mathematically, however the [] matrix changes.
In certain linear system solution techniques [] is stored as a banded matrix and
bandwidth of [] is tried to be minimized to decrease memory usage.
Bandwith of is directly related to how we number the mesh nodes. Commercial
FE software use bandwidth reduction algorithms to minimize the bandwidth of [].
In the problem we solved, [] turns out to be symmetric.
This is a due to the solved DE and the use of GFEM.
The following DE with the additional 1st derivative will not result in a symmetric [].
2
2+
= 2
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-26
Remarks (contd)
The DE we solved was linear.
For a nonlinear DE, such as the following one, an extra linearization step is necessary
to obtain the system of linear algebraic equations.
2
2 = 2
METU Dept. of Mechanical Engineering ME 413 Int. to Finite Element Analysis Lecture Notes of Dr. Sert
2-27