### MECH300H Introduction to Finite Element Methods Lecture 7

```MECH300H Introduction to Finite
Element Methods
Lecture 7
Finite Element Analysis of 2-D Problems
2-D Discretization
Common 2-D elements:
2-D Model Problem with Scalar Function
- Heat Conduction
• Governing Equation
  T ( x, y )    T ( x, y ) 
  Q( x, y )  0

   
x 
x  y 
y 
• Boundary Conditions
Dirichlet BC:
Natural BC:
Mixed BC:
in W
Weak Formulation of 2-D Model Problem
• Weighted - Integral of 2-D Problem ----   T ( x, y )    T ( x, y ) 

W w  x   x   y   y   Q( x, y )dA  0
• Weak Form from Integration-by-Parts ---- w  T  w  T 

0    

 wQ( x, y )  dxdy



x  x  y  y 

W
 
T 
 
T 
   w
dxdy
 dxdy    w

x 
x 
y 
y 
W
W
Weak Formulation of 2-D Model Problem
• Green-Gauss Theorem ---- 
T 
T 

W x   w x  dxdy  G   w x  nxds

 
T 
T 

w
dxdy


w
W y  y 
G  y  n yds
where nx and ny are the components of a unit vector,
which is normal to the boundary G.

 


n  nx i  n y j  i cos   j sin
Weak Formulation of 2-D Model Problem
• Weak Form of 2-D Model Problem ---- w  T  w  T 

0    

 wQ( x, y )  dxdy



x  x  y  y 

W
 T 
 T  
  w  
n y  ds
 nx   

 y  
 x 
G
EBC: Specify T(x,y) on G
 T 
 T  
NBC: Specify   x  nx    y  n y  on G


 

 T   T  
where qn ( s)      i     j    nxi  n y j  is the normal
 x   y  
outward flux on the boundary G at the segment ds.
FEM Implementation of 2-D Heat
Conduction – Shape Functions
Step 1: Discretization – linear triangular element
T1
T  T11  T22  T33
Derivation of linear triangular shape functions:
T3
1  c0  c1 x  c2 y
Let
T2
Interpolation properties
c0  c1 x1  c2 y1  1
i  1 at ith node
i  0 at other nodes
c0  c1 x3  c2 y3  0
1  1 x
Same
2
1

1 x1
y  1 x2
1 x3
c0  c1 x2  c2 y2  0
y1 
y2 
y3 
 x3 y1  x1 y3 
y 

 y3  y1 
2 Ae
 x x 
 1 3 
x
 c0  1 x1
 c   1 x
2
 1 
 c  1 x
3
 2 
1
1
 x2 y3  x3 y2 
1
x
y




 
0

y

y


2
3
 
2
A
e


 
0
 x3  x2 
3
1

 x1 y2  x2 y1 
y 

 y1  y2 
2 Ae
 x x 
 2 1 
x
y1 
y2 

y3 
1
1
 0
 
 
 0
FEM Implementation of 2-D Heat
Conduction – Shape Functions
linear triangular element – area coordinates
T1
1
A2
T3
1

A3
A1
T2
1
2 
1
3 
 x2 y3  x3 y2 
y 
 A1
y

y
 2

3
2 Ae
 x  x  Ae
 3 2 
x
 x3 y1  x1 y3 
y 
 A2
 y3  y1  
2 Ae
 x  x  Ae
 1 3 
x
 x1 y2  x2 y1 
y 
 A3
y

y
 1 2 
2 Ae
 x  x  Ae
 2 1 
x
3
1
2
Interpolation Function - Requirements
• Interpolation condition
• Take a unit value at node i, and is zero at all other nodes
• Local support condition
• i is zero at an edge that doesn’t contain node i.
• Interelement compatibility condition
• Satisfies continuity condition between adjacent elements
over any element boundary that includes node i
• Completeness condition
• The interpolation is able to represent exactly any
displacement field which is polynomial in x and y with the
order of the interpolation function
Formulation of 2-D 4-Node Rectangular Element –
Bi-linear Element
Let u ( , )  1u1  2u2  3u3  4u4
  
    
 1   1   1    2   1  
a 
b
a
b


  
3 
4   1  
ab
ab

Note: The local node numbers should be arranged in a counter-clockwise sense. Otherwise, the area
Of the element would be negative and the stiffness matrix can not be formed.
1
2
3
4
FEM Implementation of 2-D Heat
Conduction – Element Equation
• Weak Form of 2-D Model Problem ---- w  T  w  T 

0    

  wQ( x, y )  dxdy   wqn ds

x  x  y  y 
We 
Ge

u ( x, y ) 
Assume approximation:
n
u 
j 1
j
j
( x, y )
and let w(x,y)=i(x,y) as before, then
 i   n

 i   n

0  
   T j j  
   T j j   i Q  dxdy   i qn ds
 x x  j 1
We 
G
 y y  j 1


n
 K T    Qdxdy    q ds
j 1
where
ij
j
i
We
i n
Ge
 i  j
i  j 
Kij   

 dxdy

x

x

y

y

We 
FEM Implementation of 2-D Heat
Conduction – Element Equation
n
 K T    Qdxdy    q ds
j 1
ij
j
i
We
 l232
l23  l31 l23  l12 

 
2
 K   l23  l31 l31 l31  l12 
4 Ae 
2 
l

l
l

l
l
12
 23 12 31 12

i n
Ge
 Q1   q1 
F   Q2   q2 
Q   q 
 3  3
Qi 
  Qdxdy
i
We
qi   i qn ds
Ge
Assembly of Stiffness Matrices
Fi ( e ) 
ne
(e) (e)

Q
dxdy


q
ds

K





ij u j
 i
 in
j 1
W( e )
(1)
2
U 1  u1( 1 ) ,U 2  u
G( e )
 u1( 2 ) ,U 3  u3( 1 )  u4( 2 ) ,U 4  u2( 2 ) ,U 5  u3( 2 )
Imposing Boundary Conditions
The meaning of qi:
q1(1) 
3
3
1
1
(1) (1)
q
 n 1 ds 
G1

1

(1)
h12
2
(1) (1)
q
 n 2 ds 
G1
(1)
h12
3
1
1

2


(1)
h23

(1)
h12
qn(1)2(1) ds   qn(1)2(1) ds   qn(1)2(1) ds
(1)
h23
(1)
h31
(1)
h23
(1) (1)
q
 n 3 ds 
G1
2
(1)
h31
qn(1)2(1) ds   qn(1)2(1) ds
q3(1) 
1
(1)
h23
(1)
h31
q2(1) 
3
(1)
h12
qn(1)1(1) ds   qn(1)1(1) ds
2


qn(1)1(1) ds   qn(1)1(1) ds   qn(1)1(1) ds

(1)
h12
qn(1)3(1) ds   qn(1)3(1) ds   qn(1)3(1) ds
qn(1)3(1) ds   qn(1)3(1) ds
(1)
h31
(1)
h23
(1)
h31
Imposing Boundary Conditions
q2  q  q
q3  q3(1)  q4(2)
q
 ds   q  ds
q1(2) 
q
 ds   q  ds
q4(2) 
(1)
2
Consider
q 
(1)
2
(1) (1)
n
2
(1)
h12
q 
(1)
3
(1) (1)
n
2
(1) (1)
n 3
Equilibrium of flux:

qn(2)4(2) ds 
(1)
h23
  qn(2)

qn(2)1(2) ds

qn(2)4(2) ds
( 2)
h41
( 2)
h34
(1)
h31
qn(1)

qn(2)1(2) ds 
( 2)
h12
(1)
h23
(1) (1)
n 3
(1)
h23
(2)
1
( 2)
h41
(2)
h41
FEM implementation:

qn(1)2(1) ds  
(1)
h23

qn(2)1(2) ds;
( 2)
h41
q2 

(1)
h12
qn(1)2(1) ds 

qn(1)3(1) ds  
(1)
h23

( 2)
h12
qn(2)1(2) ds

qn(2)4(2) ds
( 2)
h41
q3 

(1)
h31
qn(1)3(1) ds 

( 2)
h34
qn(2)4(2) ds
Calculating the q Vector
Example:
qn  0
T  293K
qn  1
2-D Steady-State Heat Conduction - Example
A
D
qn  0
AB and BC:
CD: convection
DA:
0.6 m
C
B
0.4 m
y
x
T  180 C
o
h  50 W
m C
2 o
T  25o C
```