How to create and solve finite element models?
Application to 2nd Order Differential Equations!
#WikiCourses #FEM
https://wikicourses.wikispaces.com/TopicX+Element+Equations
Solve 2nd order differential equations using finite element method
1. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Introduction to the Finite
Element Method
2nd order DE’s in 1-D
2. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• Understand the basic steps of the finite
element analysis
• Apply the finite element method to second
order differential equations in 1-D
3. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
The Mathematical Model
• Solve:
• Subject to:
Lx
fcu
dx
du
a
dx
d
0
0
00 ,0 Q
dx
du
auu
Lx
4. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #1: Discretization
• At this step, we divide
the domain into
elements.
• The elements are
connected at nodes.
• All properties of the
domain are defined at
those nodes.
5. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #2: Element Equations
• Let’s concentrate our
attention to a single
element.
• The same DE applies
on the element level,
hence, we may follow
the procedure for
weighted residual
methods on the
element level!
21
0
xxx
fcu
dx
du
a
dx
d
21
2211
21
,
,,
Q
dx
du
aQ
dx
du
a
uxuuxu
xxxx
6. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Polynomial Approximation
• Now, we may propose an approximate
solution for the primary variable, u(x),
within that element.
• The simplest proposition would be a
polynomial!
7. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Polynomial Approximation
• Interpolating the values
of displacement
knowing the nodal
displacements, we may
write:
01 bxbxu
01111 bxbuxu
2
12
1
1
12
2
u
xx
xx
u
xx
xx
xu
02122 bxbuxu
8. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Polynomial Approximation
e
ux
u
u
uu
u
xx
xx
u
xx
xx
xu
2
1
212211
2
12
1
1
12
2
9. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #2: Element Equations
(cont’d)
• Assuming constant
domain properties:
• Applying the
Galerkin method:
21
2
2
0
xxx
fcu
dx
ud
a
02
2
Domain
jiiji
i
j dxfxuxxcu
dx
xd
xa
10. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #2: Element Equations
(cont’d)
• Note that:
• And:
ee hdx
xd
hdx
xd 1
,
1 21
Domain
ij
x
x
i
j
Domain
i
j
dx
dx
xd
dx
xd
a
dx
xd
xa
dx
dx
xd
xa
2
1
2
2
11. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #2: Element Equations
(cont’d)
• For i=j=1: (and ignoring boundary terms)
• Which gives:
0
12
1
2
1
2
2
2
x
x eee
dx
h
xx
fu
h
xx
c
h
a
0
23
1
ee
e
fh
u
ch
h
a
12. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Step #2: Element Equations
(cont’d)
• Repeating for all terms:
• The above equation is called the element
equation.
1
1
221
12
611
11
2
1 ee
e
fh
u
uch
h
a
13. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
What happens for adjacent
elements?
14. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• Learn how the finite element model for the
whole domain is assembled
• Learn how to apply boundary conditions
• Solving the system of linear equations
15. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Recall
• In the previous lecture, we obtained the
element equation that relates the element
degrees of freedom to the externally
applied fields
• Which maybe written:
1
1
221
12
611
11
2
1 ee
e
fh
u
uch
h
a
2
1
2
1
43
21
f
f
u
u
kk
kk
16. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Two–Element example
1
2
1
1
1
2
1
1
1
4
1
3
1
2
1
1
f
f
u
u
kk
kk
2
2
2
1
2
2
2
1
2
4
2
3
2
2
2
1
f
f
u
u
kk
kk
3
2
1
3
2
1
3
2
1
2
4
2
3
2
2
2
1
1
4
1
3
1
2
1
1
0
0
Q
Q
Q
f
f
f
u
u
u
kk
kkkk
kk
17. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Illustration: Bar application
1. Discretization: Divide the bar into N number of
elements. The length of each element will be
(L/N)
2. Derive the element equation from the differential
equation for constant properties an externally
applied force:
02
2
xF
x
u
EA
0
2
1
2
x
x
ij
ij
e
dxfu
dx
d
dx
d
h
EA
18. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Performing Integration:
1
1
211
11
2
1 e
e
e
e
fh
u
u
h
EA
Note that if the integration is evaluated from 0 to he,
where he is the element length, the same results
will be obtained.
0
2
1
2
x
x
ij
ij
e
dxfu
dx
d
dx
d
h
EA
19. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Two–Element bar example
1
2
1
1
1
2
1
1
11
11
f
f
u
u
h
EA
e
2
2
2
1
2
2
2
1
11
11
f
f
u
u
h
EA
e
0
0
1
2
1
2
110
121
011
3
2
1 R
fh
u
u
u
h
EA e
e
20. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Applying Boundary Conditions
21. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Applying BC’s
• For the bar with fixed left side and free
right side, we may force the value of the
left-displacement to be equal to zero:
0
0
1
2
1
2
0
110
121
011
3
2
R
fh
u
u
h
EA e
e
22. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Solving
• Removing the first row and column of the
system of equations:
• Solving:
1
2
211
12
3
2 e
e
fh
u
u
h
EA
4
3
2
2
3
2
EA
fh
u
u e
23. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Secondary Variables
• Using the values of the displacements
obtained, we may get the value of the
reaction force:
0
0
1
2
1
2
2
4
2
3
0
110
121
011 R
fh
fh
fh e
e
e
24. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Secondary Variables
• Using the first equation, we get:
• Which is the exact value of the reaction
force.
R
fhfh ee
22
3
efhR 2
25. 2nd order DE’s in 1-D
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Summary
• In this lecture, we learned how to
assemble the global matrices of the finite
element model; how to apply the boundary
conditions, and solve the system of
equations obtained.
• And finally, how to obtain the secondary
variables.