Você está na página 1de 9

Chapter 2.

3: Mathematical
Background for FEM

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Today’s Agenda

• Exercises and review

• Boundary conditions

• General numerical solution methods

• Examples

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

1
Weak Form of the 1D Heat Flow
• Using the rule of integration by parts:
b b

∫ v dx dx = [uv] − ∫ u dx dx
du b dv
a
a a

• The weak form for 1D heat flow:


L
⎡ dT ⎤
L L
dv dT
∫0 dx Ak dx dx = ⎢⎣vAk dx ⎥⎦ 0 + ∫0 vQdx
L
⎛d ⎡ dT ⎤ ⎞ ⎛ dT ⎞
∫ v( x)⎜⎜⎝ dx ⎢⎣ Ak dx ⎥⎦ + Q ⎟⎟⎠dx = 0 q x =0 = ⎜ − k ⎟ =h
0 ⎝ dx ⎠ x =0
Tx = L = g

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Strong and Weak forms


• Weak form and strong form are equal if
the weak form is satisfied for any weight
function v(x).

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

2
Weak Form of the 1D Elastic Bar

L
⎡ du ⎤
L L
dv du
∫0 dx AE dx dx = ⎢⎣vAE dx ⎥⎦ 0 + ∫0 vbdx
⎛ du ⎞
N x =0 = ⎜ AE ⎟ = h
⎝ dx ⎠ x =0
u x=L = g

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Two Types Boundary Conditions


⎛ dT ⎞
q x =0 = ⎜ − k ⎟ = h : Can be used directly in the weak equation
⎝ dx ⎠ x =0
- Natural boundray conditions (NBC)
(Newmann boundary conditions )

Tx = L = g : Essesntial boundary conditions (EBC)


(specify the vaule of variable itself)
(Dirichlet boundary conditions)

Questions: Can we solve the problem with only natural boundary


conditions? And why?

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

3
General Numerical Solution Methods
• 1D differential equation:
Lu + g = 0, a ≤ x ≤ b
u x = a = u a ,u x =b = ub
• The above equation can be solved
analytically only for simple L and g.

• Aim: to have a method to solve


(approximately) the equation with arbitrary
expression for L and g

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

General Numerical Solution Methods


• We start with an approximate one:

Lu app + g = R ≠ 0
Residual
• We can multiply the residual by an arbitrary
weight function v(x)
To be solved

∫ v(Lu )
b b
app
+ g dx = ∫ vRdx =0
a a

• The approximate function: ⎡ a1 ⎤


⎢a ⎥
u app ( x) = ϕ1 ( x)a1 + ϕ 2 a2 + ... + ϕ n an = [ϕ1 ( x) ϕ 2 ... ϕ n ]⎢ 2 ⎥
⎢ ... ⎥
⎢ ⎥
⎣ an ⎦

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

4
General Numerical Solution Methods
We show a simpler example :
R( x) = Lu app ( x) + g ( x) ≠ 0 (0 ≤ x ≤ L)
⎡a ⎤
u app = ϕ Τ a = [ϕ1 ϕ 2 ]⎢ 1 ⎥ = ϕ1a1 + ϕ 2 a2
⎣ a2 ⎦
⎡a ⎤
Put the above equation together : R ( x) = Lϕ Τ a + g = [Lϕ1 Lϕ1 ]⎢ 1 ⎥ + g
⎣ a2 ⎦
We choose an arbitary weight function

v(x) = c1V1 + c2V2 = c Τ V

Substitute the above equation into the integral function


L
I = ∫ v( x) R( x) dx = 0
0
L
⎡V ⎤ ⎡a ⎤ L
⎡V ⎤
I = ∫ [c1 c2 ]⎢ 1 ⎥[Lϕ1
Lϕ1 ]⎢ 1 ⎥ dx + ∫ [c1 c2 ]⎢ 1 ⎥ g ( x) dx = 0
0 ⎣V2 ⎦ ⎣ a2 ⎦ 0 ⎣V2 ⎦
The above equation can be re - written :
I = c1s1 + c1s2 = 0

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

General Numerical Solution Methods


I = c1s1 + c1s2 = 0
where
⎡L ⎤ ⎡L ⎤ L
s1 = ⎢ ∫ V1 ( x) Lϕ1 ( x)dx ⎥ a1 + ⎢ ∫ V1 ( x) Lϕ 2 ( x)dx ⎥ a2 + ∫ V1 ( x) g ( x)dx
⎣0 ⎦ ⎣0 ⎦ 0

⎡L ⎤ ⎡L ⎤ L
s2 = ⎢ ∫ V2 ( x) Lϕ1 ( x)dx ⎥ a1 + ⎢ ∫ V2 ( x) Lϕ 2 ( x)dx ⎥ a2 + ∫ V2 ( x) g ( x)dx
⎣0 ⎦ ⎣0 ⎦ 0

Becasue c1 and c2 are arbitary constants we get

⎡L L
⎤ ⎡L ⎤
⎢ ∫ V1 ( x) Lϕ1 ( x)dx ∫ V ( x) Lϕ ( x)dx ⎥ ⎡ a ⎤
1 2 ⎢ ∫ V1 ( x) g ( x)dx ⎥
⎢0
⎢L
0
L
⎥ 1 = −⎢ 0
⎥ ⎢⎣a2 ⎥⎦ ⎢L

⎥ Ka = f
⎢ ∫ V2 ( x) Lϕ1 ( x)dx ∫0 V2 ( x) Lϕ 2 ( x)dx⎥⎦ ⎢ ∫ V2 ( x) g ( x)dx ⎥
⎣0 ⎣0 ⎦

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

5
General Numerical Solution Methods
• We choose the v(x) ⎡ c1 ⎤
⎢c ⎥
Arbitrary
v( x) = V1 ( x)c1 + V2 c2 + ... + Vn cn = [V1 ( x) V2 ... Vn ]⎢ 2 ⎥
⎢ ... ⎥ constants
⎢ ⎥
known functions ⎣ cn ⎦
⎡V1 ⎤
⎢V ⎥
v = V1c1 + V2 c2 + ... + Vn cn = [c1 c2 ... cn ]⎢ 2 ⎥
⎢ ... ⎥
⎢ ⎥
⎣Vn ⎦
b b b
cT ∫ V T (L(ϕa ) + g )dx = 0 ⇒ a ∫ V T L(ϕ )dx = − ∫ V T gdx
a a a

Ka = f
TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

General Numerical Solution Methods

⎡ b V L(ϕ )dx
∫ V L(ϕ )dx ∫ V L(ϕ )dx ⎤⎥ ⎡⎢ − ∫ V gdx ⎤⎥
b b

⎢ ∫a 1 1
b
1 2 ... 1 n 1
a a a
⎢ b V L(ϕ )dx
∫ V L(ϕ )dx ∫ V L(ϕ )dx ⎥⎥, f = ⎢⎢− ∫ V gdx ⎥⎥
b b

K = ⎢ ∫a 2 1
b
2 2 ... 2 n 2
a a a
⎢ ... ... ... ⎥ ⎢ ... ⎥
⎢ b ⎥ ⎢− b V gdx ⎥
V L(ϕ )dx ∫a Vn L(ϕ 2 )dx ... ∫a Vn L(ϕ n )dx⎦⎥ ⎣⎢ ∫a n
b b

⎣⎢ ∫a n 1 ⎦⎥

• K not necessarily symmetric in this form!


• Choose ϕ, V, + boundary conditions, calculate K
and f, get approximate solution for u.
• Depends on V, many methods aviailble
– Least square method, point collocation method ...

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

6
Galerkin Method
• Galerkin 1915 proposed: why we just
choose: Vi = ϕ i
• Weigh functions
b
= trial functions
∫ ϕ R dx =0, i = 1,2...., n
i i

• We get: a

⎡ b ϕ L(ϕ )dx
∫ ϕ L(ϕ )dx ∫ ϕ L(ϕ )dx ⎤⎥ ⎡⎢ − ∫ ϕ gdx ⎤⎥
b b

⎢ ∫a 1 1
b
2 2 ... 1 n 1
a a a
⎢ b ϕ L(ϕ )dx
∫ ϕ L(ϕ )dx ∫ ϕ L(ϕ )dx ⎥⎥, f = ⎢⎢− ∫ ϕ gdx ⎥⎥
b b

K = ⎢ ∫a 1 1
b
2 2 ... 2 n 2
a a a
⎢ ... ... ... ⎥ ⎢ ⎥...
⎢ b ⎥ ⎢− b ϕ gdx ⎥
⎢⎣ ∫a ϕ1 L(ϕ1 )dx ∫a ϕ n L(ϕ 2 )dx ... ∫a ϕ n L(ϕ n )dx⎥⎦ ⎣⎢ ∫a n
b b

⎦⎥
In this integral form, the K is in general not symmetric! No hurry, we have to
wait to the weak form.

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Finite Element Method


Weak form of the 1D heat flow problem:

L
d ⎛ dT ⎞ L
dv dT ⎡ dT ⎤
L

⎜ Ak
dx ⎝
⎟ + Q = 0,
dx ⎠
0≤ x≤L ∫ dx Ak dx dx = ⎢⎣vAk dx ⎥⎦ + ∫ vQdx
0 0 0

⎛ dT ⎞ ⎛ dT ⎞
q x =0 = ⎜− k ⎟ =h q x =0 = ⎜− k ⎟ =h
⎝ dx ⎠ x =0 ⎝ dx ⎠ x = 0
Tx = L = g Strong form Tx = L =g Weak form
⎡ ⎤
⎢T1 ⎥
Approximate the temperature by ⎢ ⎥
T = Na = [N1 N2 ... N n ]⎢T2 ⎥
⎢ ... ⎥
⎡ ⎤
⎢T ⎥
⎣ n⎦
⎢T1 ⎥
dT dN ⎡ dN dN 2 dN n ⎤ ⎢ ⎥
= a=⎢ 1 ... ⎢T2 ⎥ =Ba
dx dx ⎣ dx dx dx ⎥⎦ ⎢ ... ⎥
⎢T ⎥
⎣ n⎦

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

7
Finite Element Method
• By using the Galerkin method: Vi = N i

⎛b T ⎞
[ ]
b
• We get: ⎜ ∫ B AkBdx ⎟a = − N T Aq a + ∫ N TQdx
b
⎜ ⎟
⎝a ⎠ a

b
K = ∫ B T AkBdx square symmetric nxn stiffness matrix
a

[ ]
fb = − N T Aq a
b
Concentrated load vector
b
fI = ∫ N TQdx Distributed Load vector
a

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Comments
• The contributions of Galerkin is that we
have got rid of two types of functions –
weight functions and trial functions. In the
future we call them just shape functions

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

8
Example
An engineerin g problem is formulated by the following ordinary differential equation :
d 2u du
+x = 2u − 1 (0 ≤ x ≤ 1)
dx 2 dx
u x =0 = 2
du
= u x =1
dx x =0

a) What is the order of the differenti al equation?


b) Is the boundary condition at x = 0 a NBC or EBC?
c) Is the boundary condition at x = 1 a NBCor EBC?
d) Write the correspond ing integral form and weak form.
e) Assume u app = a0 + a1 x, what conditions must
u app satisfy such that u app is admissiabl e?
f) Use the Galerkin method to determine the unknows

TKT4145 – The Finite Element Method, NTNU Spring Course – Zhiliang Zhang

Você também pode gostar