MAE3456 - MEC3456: The Finite Element Method: One Dimensional Problems
MAE3456 - MEC3456: The Finite Element Method: One Dimensional Problems
MAE3456 - MEC3456: The Finite Element Method: One Dimensional Problems
MAE3456 – MEC3456
Lecture 29
Outline
• Application to an ODE
Review of MWR
∂2Q ∂2Q
L (Q ) = 2 + 2 − f (x, y) = R
∂x ∂x
L(Q) = R → 0.0
Review of MWR
N
Q(x, y) = Q0 (x, y) + ∑ a jφ j (x, y)
j=1
OR ∫∫∫ W ( ) ( x, y, z) R (
m el1 m el1 )
dxdydz +
∫∫∫ W ( ) ( x, y, z) R (
m el2 m el2 )
dxdydz +
+ ∫∫∫ Wm(elN ) ( x, y, z ) Rm(elN ) dxdydz = 0
Q ( xE , t ) = ∑ a j (t ) φ j ( xE )
Finite Element Method – trial functions
Q ( xE , t ) = ∑ a j (t ) φ j ( xE )
Q ( xE , t ) = ∑ Q jE (t ) φ j ( xE )
= Q1E (t ) φ1 (x) + Q2E (t ) φ2 (x)
Q(x)
Q1
Q2
• Because we have chosen the Lagrange
polynomials, the unknown coefficients
aj are simply Q1 and Q2 whose values
we are seeking at the two nodes. φ1(x)
MAE3456 – MEC3456
Lecture 29
Application to a One-Dimensional Example
• Example:
• apply the FEM to solve the 1D heat equation
d 2T
= − f (x) With 0 ≤ x ≤ L
2
dx
€
Application to One-Dimensional Example
d 2T
2
= − f (x) over 0 ≤ x ≤ L
dx
• Solution
• The first step is to approximate the solution on a generic
element.
T ( xE ) = T1Eφ1 (x) + T2Eφ2 (x)
" (E) %
x − x
T ( x ) = T1E $ ( E ) 2 ( E ) '
# x1 − x2 &
" (E) %
x − x
+ T2E $ ( E ) 1 ( E ) '
# x2 − x1 &
Application to One-Dimensional Example
d 2T " x − x (E ) % " x − x (E ) %
= − f (x) T ( x ) = T1E $ (E ) 2 (E ) ' + T2E $ (E ) 1 (E ) '
dx 2 # x1 − x2 & # x2 − x1 &
d 2T x2 ! d 2T $
dx 2
= − f (x) ∫ x1
Wm (x)# 2 + f (x)& dx = 0
" dx %
• Therefore, we have:
d 2T x2 ! d 2T $
dx 2
= − f (x) ∫ x1
Wm (x)# 2 + f (x)& dx = 0
" dx %
x2 d 2T x2
∫ x1
φ m (x) 2 dx = − ∫ x φ m (x) f (x)dx
dx 1
Application to One-Dimensional Example
d 2T x2 d 2T x2
dx 2 = − f (x) ∫ x1
φ m (x) 2 dx = − ∫ x φ m (x) f (x)dx
dx 1
€ x2 d 2T x2 d " dT %
∫ x1
φ m (x) 2 dx = ∫ x φ m (x) $ ' dx
dx 1 dx # dx &
x2
dT x2 dT dφ m
= φ m (x)
dx
− ∫ x1
dx dx
dx
x1
Application to One-Dimensional Example
d 2T x2 d 2T x2
dx 2 = − f (x) ∫ x1
φ m (x) 2 dx = − ∫ x φ m (x) f (x)dx
dx 1
x2 d 2T dT (x1 ) x2 dT dφ1
∫ x1
φ1 (x) 2 dx = −
dx dx
− ∫ x1
dx dx
dx
x2 d 2T x2
∫ x1
φ m (x) 2 dx = − ∫ x f (x)φ m (x)dx m = 1, 2
dx 1
1 dT (x2 ) x2
( −T1 + T2 ) = + ∫ f (x)φ2 (x)dx
x2 − x1 dx x1
Application to One-Dimensional Example
1 dT (x1 ) x2
(T1 − T2 ) = − + ∫ f (x)φ1 (x)dx
x2 − x1 dx x1
1 dT (x2 ) x2
( −T1 + T2 ) = + ∫ f (x)φ2 (x)dx
x2 − x1 dx x1
T3 T4
T2
T1 T5
x1 x2 x3 x4 x5
∫∫∫ W ( x, y, z) R dx dy dz =0
m
∫∫∫ W ( ) ( x, y, z) R (
m el1 m el1 )
dxdydz +
∫∫∫ W ( ) ( x, y, z) R (
m el2 m el2 )
dxdydz +
+ ∫∫∫ Wm(elN ) ( x, y, z ) Rm(elN ) dxdydz = 0
Application to One-Dimensional Example
• Note that T1(E) is T on the left side of element E and T2(E) is T on the
right side (not to be confused with T1, T2)
Application to One-Dimensional Example
f(x) = 10.0
0.0 10.0
1
$ ') (E ) - = ) (E )
-+) -
# −0.4 0.4 &*+T *. * dT (x ) * +12.5.
2 2
*+ dx *.
Application to One-Dimensional Example
0.0
✔ 10.0
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
$ ' ) (E ) - = ) -+ ) -
€ # −0.4 0.4 (E )
& *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Application to One-Dimensional Example
✔
0.0 10.0
" 0 0 0 0 0 %( 0 , ( 0 ,
$ '* * * *
$ 0 0.4 −0.4 0 0 '*T2 * *−dT(x2 ) / dx +12.5*
* * * *
$ 0 −0.4 0.4 0 0 ')T3 - = )dT(x3 ) / dx +12.5 -
$ 0 0 0 0 0 '* 0 * * 0 *
$ '* * * *
$# 0 0 0 0 0 '&*0 * *0 *.
+ . +
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
$ ' ) (E ) - = ) (E ) -+ ) -
# −0.4 0.4 & *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Add equations for Node 1 and 2 together
" 0.4 −0.4 0 0 0 %(T1 , " 0 0 0 0 0 % (0 ,
$ ' * * $ '* *
$ −0.4 0.4 0 0 0 '** 2 ** $ 0 0.4 −0.4 0 0 '**T2 **
T
$ 0 0 0 0 0 ')0 - + $ 0 −0.4 0.4 0 0 ')T3 - =
$ '* * $ '* *
$ 0 0 0 0 0 0
'* * $ 0 0 0 0 0 ' *0 *
$ 0 0 0 0 0 ' *0 * $ 0 0 0 0 0 ' *0 *
# &+ . # &+ .
(−dT (x ) / dx +12.5, (0 ,
1
* * * *
* dT (x 2
) / dx +12.5 * * −dT (x 2
) / dx +12.5*
* * * *
) 0 +
- ) dT (x3
) / dx +12.5 -
*0 * * *
* * * 0 *
*0 * *+0 *.
+ .
✔ ✔
0.0 10.0
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
$ ' ) (E ) - = ) -+ ) -
€ # −0.4 0.4 (E )
& *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Application to One-Dimensional Example
✔
0.0 10.0
" 0 0 0 0 0 %( 0 , ( 0 ,
$ '* * * *
$ 0 0 0 0 0 '* 0 * * 0 **
* * *
$ 0 0 0.4 −0.4 0 ')T3 - = )−dT(x3 ) / dx +12.5-
$ 0 0 −0.4 0.4 0 '*T4 * *dT(x4 ) / dx +12.5 *
$ '* * * *
$# 0 0 0 0 0 '&*0 * *0 *.
+ . +
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
$ ' ) (E ) - = ) (E ) -+ ) -
# −0.4 0.4 & *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Application to One-Dimensional Example
✔
0.0 10.0
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
€ $ ' ) (E ) - = ) (E ) -+ ) -
# −0.4 0.4 & *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Application to One-Dimensional Example
( dT (x1(E ) ) ,
−
" 0.4 −0.4 % (*T1(E ) ,* ** dx ** (12.5 ,
$ ' ) (E ) - = ) (E ) -+ ) -
# −0.4 0.4 & *+T2 *. * dT (x2 ) * + 12.5 .
*+ dx *.
Application to One-Dimensional Example
• Boundary condition
• If we apply the boundary condition by specifying the heat
flux at the two ends of the solution domain as
dT (x1 ) dT (x5 )
= 66 = −34
dx 0.0 10.0 dx
T1 = 40
T2 = 173.75
T3 = 245
T4 = 253.75
T5 = 200
Summary