MECH4450 Introduction To Finite Element Methods

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

MECH4450 Introduction to Finite

Element Methods

Numerical Methods
- Introduction
Introduction
Problem solving procedure:
Identify problem
Generate models
Solve equations
Interpret results

Numerical methods
- methods that seek quantitative approximations
to the solutions of mathematical problems
- finite element method, boundary element method
finite difference method, finite volume method, etc.
Function Evaluation
Taylor expansion of a smooth function about a point
3
= + + 2+ 3
+
2! 3!
Truncating the series up to finite terms - Approximation!

Linear approximation :

+
Quadratic approximation

+ + 2
2!
N-order approximation


2

+ + + +
2! !

Calculate: 1 + + 2 +
Numerical Integration
b

Calculate: I f x dx
a

Newton Cotes integration


Trapezoidal rule 1st order Newton-Cotes integration
f (b) f (a)
f ( x) f1 ( x) f (a) ( x a) Linear approximation
ba

f (a) f (b)
b b
I f ( x)dx f1 ( x)dx (b a)
a a
2

Trapezoidal rule multiple application


b xn x1 x2 xn

I f ( x)dx f n ( x)dx f ( x)dx f ( x)dx f ( x)dx


a x0 x0 x1 xn1

h n 1

I f (a) 2 f ( xi ) f (b)
2 i 1
Numerical Integration
b

Calculate: I f x dx
a

Newton Cotes integration


Simpson 1/3 rule 2nd order Newton-Cotes integration
Quadratic approximation

( x x1 )( x x2 ) ( x x0 )( x x2 ) ( x x0 )( x x1 )
f ( x) f 2 ( x) f ( x0 ) f ( x1 ) f ( x2 )
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x1 )

f ( x0 ) 4 f ( x1 ) f ( x2 )
b b
I f ( x)dx f 2 ( x)dx ( x2 x0 )
a a
6
Numerical Integration
b

Calculate: I f x dx
a

Gauss Quadrature
Trapezoidal Rule: Gauss Quadrature:

f (a ) f (b)
I (b a )
2
I c0 f ( x0 ) c1 f ( x1 )
(b a ) (b a)
f (a ) f (b)
2 2

Choose c0 , c1 , x0 , x1 according to certain criteria


Numerical Integration
b

Calculate: I f x dx
a

Gauss Quadrature
I c0 f ( x0 ) c1 f ( x1 )
Criteria: The Gauss Quadrature should provide exact solutions if the integrand is a

1: constant 2: linear function 3: quadratic function 4. cubic function

0 + 1 = b + a

2 2
0 0 + 1 1 =
2 Find 0 , 1 , 0 , 1
3 3

0 02 + 1 12 =
3
3 3
4 4
0 0 + 1 1 =
4
Numerical Integration
b

Calculate: I f x dx
a
1

Gauss Quadrature I f x dx c0 f x0 c1 f x1 cn 1 f xn 1
1
2pt Gauss Quadrature
1 1
1
I f x dx f f
1 3 3

3pt Gauss Quadrature


1
I f x dx 0.55 f 0.77 0.89 f 0 0.55 f 0.77
1

~ 2( x a)
Let: x 1
ba

1
b 1
1 1

a
f ( x)dx (b a) f (a b) (b a) ~
2 1
2 2
x d~

x
Numerical Integration - Example
1

Calculate: I e x sin xdx


0

Trapezoidal rule

Simpson 1/3 rule

2pt Gauss quadrature

1
e sin x e cos x
1 x x
Exact solution I e x sin xdx 0.90933
0
2 0
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination + back substitution
Example: 1 22 + 63 = 0 1 2 6 x1 0
2 x 3
2
21 + 22 + 33 = 3 2 3

1 3 0
1 + 32 =2
x3 2

1 2 6 x1 0
0 6 9 x 3
2
0 1 6
x3 2

1 2 6 x1 0
0 6 x 3
9 2
0 0 15 2 3 2

x3
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination
Example:
Linear System Solver
Solve: Ax b
Gauss Elimination: back substitution
Example:

Computer
3 3
3 = 3 =
33 33
2 23 3 2 23 3
2 = 2 = sum
22 22
1 12 2 13 3 1 12 2 13 3
1 = 1 =
11 11
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination + back substitution
Pseudo code:

Forward elimination: Back substitution:


bn
bn
ann
Do k = 1, n-1 Do ii = 1, n-1
Do i = k+1,n i = n ii
aik
c sum = 0
akk Do j = i+1, n
Do j = k+1, n sum = sum + aij b j
aij aij cakj
bi sum
bi bi cbk bi
aii
Finite Difference Method
du
Example 1: u u (0) u0 Find u in 0,1
dt
u du
u1 u0 t u0 u0 t u0 1 t
dt t 0
du
u2 u1 t u1 u1 t u0 1 t
2

t dt t t1
0 1

du
u N u N 1 t u0 1 t
N

dt t tN 1

Selection of t :
1 0 1
t
N N
Finite Difference Method
Find u in 0,1
du
Example 2: 2u 5e-t u (0) u0
dt
t u0 2u0 5e 0 t u0 2u0 5 t
du
u1 u0
dt t 0

t u1 2u1 5e t1 t u1 2u1 5e t t
du
u2 u1
dt t t1
Finite Difference Method
du
Example 3: u2 t u (0) 1 Find u in 0,1
dt

t u0 u0 2 t0 t 1 1 t t
du
u1 u0
dt t 0

t u1 u12 t1 t
du
u2 u1
dt t t1

1 i
t ti i t
0 1 N N

t ui 1 ui 12 ti 1 t
du
ui ui 1
dt t ti 1

You might also like