Académique Documents
Professionnel Documents
Culture Documents
1
INTRODUCTION
• Direct stiffness method is limited for simple 1D problems
• FEM can be applied to many engineering problems that are
governed by a differential equation
• Need systematic approaches to generate FE equations
– Weighted residual method
– Energy method
• Ordinary differential equation (second-order or fourth-order)
can be solved using the weighted residual method, in
particular using Galerkin method
• Principle of minimum potential energy can be used to derive
finite element equations
2
EXACT VS. APPROXIMATE SOLUTION
• Exact solution
– Boundary value problem: differential equation + boundary conditions
– Displacements in a uniaxial bar subject to a distributed force p(x)
d 2u
2
+ p( x ) = 0, 0 £ x £ 1
dx
u(0) = 0 üïï
ïý Boundary conditions
du
(1) = 1ïï
dx ïþ
– Essential BC: The solution value at a point is prescribed (displacement
or kinematic BC)
– Natural BC: The derivative is given at a point (stress BC)
– Exact solution u(x): twice differential function
– In general, it is difficult to find the exact solution when the domain
and/or boundary conditions are complicated
– Sometimes the solution may not exists even if the problem is well
defined
3
EXACT VS. APPROXIMATE SOLUTION cont.
• Approximate solution
– It satisfies the essential BC, but not natural BC
– The approximate solution may not satisfy the DE exactly
– Residual: d 2u%
2
+ p( x ) = R( x )
dx
– Want to minimize the residual by multiplying with a weight W and
integrate over the domain
1
ò0 R( x )W ( x )dx = 0 Weight function
– If it satisfies for any W(x), then R(x) will approaches zero, and the
approximate solution will approach the exact solution
– Depending on choice of W(x): least square error method, collocation
method, Petrov-Galerkin method, and Galerkin method
4
GALERKIN METHOD
• Approximate solution is a linear combination of trial functions
N
u%( x ) = å ci f i ( x ) Trial function
i= 1
– Accuracy depends on the choice of trial functions
– The approximate solution must satisfy the essential BC
• Galerkin method
– Use N trial functions for weight functions
1
ò0 R( x )f i ( x )dx = 0, i = 1,K , N
1æd 2u
% ö
çç ÷
ò0 çè dx 2 + p( x ) ÷÷øf i ( x )dx = 0, i = 1,K , N
1 d 2u
% 1
ò0 dx 2 f i ( x )dx = - ò0 p( x )f i ( x )dx, i = 1,K , N
5
GALERKIN METHOD cont.
• Galerkin method cont.
– Integration-by-parts: reduce the order of differentiation in u(x)
1
du% %d f
1 du 1
ò0 dx dx dx = - ò0 p( x )f i ( x )dx,
i
f - i = 1,K , N
dx i 0
1 df du% 1 du du
ò0 ò0
i
dx = p( x )f i ( x )dx + (1)f i (1) - (0)f i (0), i = 1,K , N
dx dx dx dx
– Same order of differentiation for both trial function and approx. solution
– Substitute the approximate solution
N
1 df df j 1 du du
ò0 åi
c j
dx j = 1 dx
dx = ò0 p( x )f i ( x )dx +
dx
(1)f i (1) -
dx
(0)f i (0), i = 1,K , N
6
GALERKIN METHOD cont.
• Galerkin method cont.
– Write in matrix form
N
1 df i df j
K ij = ò0 dx dx
dx
1 du du
Fi = ò0 p( x )f i ( x )dx +
dx
(1)f i (1) -
dx
(0)f i (0)
7
EXAMPLE1
• Differential equation Trial functions
d 2u f 1( x ) = x f 1¢( x ) = 1
2
+ 1 = 0,0 £ x £ 1
dx f 2(x) = x2 f 2¢( x ) = 2 x
u(0) = 0 üïï
ïý Boundary conditions
du
(1) = 1ïï
dx ïþ
• Approximate solution (satisfies the essential BC)
2
u%( x ) = å ci f i ( x ) = c1x + c2 x 2
i= 1
• Approximate solution
x2
u%( x ) = 2x -
2
– Approximate solution is also the exact solution because the linear
combination of the trial functions can represent the exact solution
9
EXAMPLE2
• Differential equation Trial functions
d 2u f 1( x ) = x f 1¢( x ) = 1
2
+ x = 0, 0£ x£ 1
dx f 2(x) = x2 f 2¢( x ) = 2 x
u(0) = 0 üïï
ïý Boundary conditions
du
(1) = 1ïï
dx ïþ
1 ìï 16 ü ï
• Coefficient matrix is same, force vector: {F} = í ý
12 ïïî 15 ïïþ
ìï 19 ü ï x2
{c} = [K] {F} = ïí 121 ïý
- 1 19
u%( x ) = x-
ïïî - 4 ïïþ 12 4
• Exact solution
3 x3
u( x ) = x -
2 6
10
EXAMPLE2 cont.
• Approximation is good for u(x), but not good for du/dx
1.6
1.4
1.2
1.0
u(x), du/dx
0.8
0.6
0.4
0.2
0.0
0 0.2 0.4 x 0.6 0.8 1
11
HIGHER-ORDER DIFFERENTIAL EQUATIONS
w (0) = 0 ü ïï
• Fourth-order differential equation ïý Essential BC
dw
(0) = 0 ïï
d 4w dx ïþ
- p( x ) = 0, 0£ x£ L
dx 4 d 2w ü
ïï
( L ) = M ïï
– Beam bending under pressure load dx 2 ïý Natural BC
d 3w ïï
• Approximate solution 3
(L ) = - V ïï
dx ïþ
N
w%( x ) = å ci f i ( x )
i= 1
12
HIGHER-ORDER DE cont.
• After integration-by-parts twice
3 L 2% L
d w% d w df i L d 2w
%d 2f L
ò0 ò0
i
f
3 i
- + dx = p( x )f i ( x )dx, i = 1,K , N
dx 0 dx 2 dx 0 dx 2
dx 2
L L
L d 2w
%d 2f L d w% 3 2%
d w df i
ò0 ò0
i
2 2
dx = p( x )f i ( x )dx - f
3 i
+ , i = 1,K , N
dx dx dx 0 dx 2 dx 0
f 1 = x 2, f 2 = x 3 f 1¢¢= 2, f 2¢¢= 6 x
• Coefficient matrix
1 2
K11 = ò0 (f 1¢¢) dx = 4
1 é4 6 ù
K12 = K 21 = ò0 (f 1¢f¢¢
2¢)dx = 6 [K] = ê ú
êë6 12 ú
û
1 2
K 22 = ò0 (f 2¢¢) dx = 12
14
EXAMPLE cont.
• RHS
3 2
1 d w (0) d w (0) 16
F1 = ò0 2
x dx + V f 1(1) +
dx 3
¢
f 1(0) + Mf 1(1) -
dx 2
¢
f 1(0) =
3
1 d 3w (0) d 2w (0) 29
F2 = ò0 3
x dx + V f 2 (1) +
dx 3
f 2 (0) + M f ¢
2 (1) -
dx 2
f ¢
2 (0) =
4
• Approximate solution
ì
ï 41 ü
- 1 ï 24 ïï 41 2 1 3
{c} = [K] {F} = í 1 ý %( x ) =
w x - x
ïïî - 4 ïïþ 24 4
• Exact solution
1 4 1 3 7 2
w(x) = x - x + x
24 3 4
15
EXAMPLE cont.
2
w'', w'''
-1
-2
-3
0 0.2 0.4 x 0.6 0.8 1
w'' (exact) w'' (approx.) w''' (exact) w''' (approx.)
16
FINITE ELEMENT APPROXIMATION
• Domain Discretization
– Weighted residual method is still difficult to obtain the trial functions
that satisfy the essential BC
– FEM is to divide the entire domain into a set of simple sub-domains
(finite element) and share nodes with adjacent elements
– Within a finite element, the solution is approximated in a simple
polynomial form
u(x)
Approximate
solution
x
Finite Analytical
elements solution
1D 2D 3D
One element
18
TRIAL SOLUTION
– Solution within an element is approximated using simple polynomials.
1 2 n1 n
1 2 3 n1 n n+1
xi xi+1
li
– i-th element is composed of two nodes: xi and xi+1. Since two
unknowns are involved, linear polynomial can be used:
u%( x ) = a0 + a1x, xi £ x £ xi + 1
19
TRIAL SOLUTION cont.
– Substitute two nodal values
xi + 1 - x x - xi
u%( x ) = (i )
u i + (i )
ui + 1
L 4443
14442 L 443
1442
Ni ( x ) Ni + 1( x )
20
TRIAL SOLUTION cont.
• Observations
– Solution u(x) is interpolated using its nodal values ui and ui+1.
– Ni(x) = 1 at node xi, and =0 at node xi+1.
Ni(x) Ni+1(x)
xi xi+1
– The solution is approximated by piecewise linear polynomial and its
gradient is constant within an element.
u ui+2 du
ui dx
ui+1
21
GALERKIN METHOD
• Relation between interpolation functions and trial functions
– 1D problem with linear interpolation
ìï 0, 0 £ x £ xi - 1
ïï
ïï ( i - 1) x - xi - 1
ND ïï Ni ( x ) = ( i - 1)
, xi - 1 < x £ xi
L
f i ( x ) = ïí
u%( x ) = å ui f i ( x ) ïï ( i )
ïï i N ( x ) =
xi + 1 - x
, xi < x £ xi + 1
i= 1 (i )
ïï L
ïïî 0, xi + 1 < x £ xND
– Difference: the interpolation function does not exist in the entire
domain, but it exists only in elements connected to the node
• Derivative
ìï 0, 0 £ x £ xi - 1 1
ïï
ïï 1 1/ L(i - 1)
f i (x )
ï , xi - 1 < x £ xi
d f i ( x ) ïï L( i - 1)
= í xi - xi- 1 xi xi + 1
dx ïï 1
2
ïï - (i )
, xi < x £ xi + 1 - 1/ L(i )
ïï L d f i (x )
ïïî 0, xi + 1 < x £ xND dx
22
EXAMPLE
• Solve using two equal-length elements
u(0) = 0 üïï
d 2u ïý Boundary conditions
+ 1 = 0,0 £ x £ 1 du
dx 2
(1) = 1ïï
dx ïþ
0
0 0.5 1
x
23
EXAMPLE cont.
• Derivatives of interpolation functions
d f 1( x ) ìï - 2, 0 £ x £ 0.5 df 2 ( x ) ìï 2, 0 £ x £ 0.5
= í = í
dx ïîï 0, 0.5 < x £ 1 dx ïîï - 2, 0.5 < x £ 1
df 3 ( x ) ìï 0, 0 £ x £ 0.5
= í
dx ïïî 2, 0.5 < x £ 1
• Coefficient matrix
df 1 df 2
1 0.5 1
K12 = ò dx = ò (- 2)(2)dx + ò (0)(- 2)dx = - 2
0 dx dx 0 0.5
1 df df 0.5 1
K22 = ò 2 2
dx = ò 4dx + ò 4dx = 4
0 dx dx 0 0.5
• RHS
0.5 1 du du du
F1 = ò0 1´ (1- 2 x )dx + ò0.5 1´ (0)dx +
dx
(1)f 1(1) -
dx
(0)f 1(0) = 0.25 -
dx
(0)
0.5 1 du du
F2 = ò0 2xdx + ò0.5 (2 - 2 x )dx +
dx
(1)f 2 (1) -
dx
(0)f 2 (0) = 0.5
24
EXAMPLE cont.
• Matrix equation
é 2 - 2 0 ùìï u1 üï ìï F1 ü ïï Consider it as unknown
ê úïï ïï ïï ï
ê- 2 4 - 2 úí u2 ý = í 0.5 ý
ê úïï ïï ïï ïï
êë 0 - 2 2 û
úîï u3 þ
ï îï 1.25 þ ï
• Striking the 1st row and striking the 1st column (BC)
é 4 - 2 ùìï u2 ü ï ìï 0.5 ü ï
ê úí ý = í ý
úïïî u3 ïïþ
êë- 2 2 û îïï 1.25 þ
ïï
• Solve for u2 = 0.875, u3 = 1.5
• Approximate solution
ìï 1.75 x, 0 £ x £ 0.5
%
u( x ) = í
ïïî 0.25 + 1.25 x, 0.5 £ x £ 1
25
EXAMPLE cont.
• Solution comparison 1.6
u(x)
0.8
• Derivative shows a large
discrepancy 0.4
u-exact
u-approx.
• Approx. derivative is 0
constant as the solution is 0 0.2 0.4 x 0.6 0.8 1
piecewise linear 2
1.5
du/dx
du/dx (exact)
0.5
du/dx (approx.)
0
0 0.2 0.4 x 0.6 0.8 1
26
FORMAL PROCEDURE
• Galerkin method is still not general enough for computer code
• Apply Galerkin method to one element (e) at a time
• Introduce a local coordinate
x - xi x - xi
x = xi (1 - x ) + x j x x= =
x j - xi L(e )
28
FORMAL PROCEDURE cont.
• Change variable from x to x
1 1 dNi êdN1 dN2 ú ìï u1 üï 1
L( e ) ò0 d x
ê úd x gí ý = L ò p( x )Ni (x )d x
(e )
êë d x û ïïî u2 ïïþ
dx ú 0
du du
+ ( x )N (1) - ( x )N (0), i = 1,2
dx j i dx i i
– Do not use approximate solution for boundary terms
• Element-level matrix equation
ìï ü
( xi ) ïïï
du
ïï - 1 ìï N1(x ) üï
[k( e ) ]{u( e ) } = {f ( e ) }+ ïí ïý
ò0
dx {f (e ) (e )
}= L p( x ) í ýdx
ïï du ï ïïî N2 (x ) ïïþ
ïï + ( x j ) ïï
î dx ïþ
é ædN ö2 dN1 dN2 ùú
êç 1 ÷ ÷
1 1ê ç
è d x ÷
ø dx dx ú é 1 - 1ù
ék ù= ê úd x = 1 ê
û L( e ) ò0 ê ú
( e )
ë 2 ú L ë- 1 1 úû
(e ) ê
2´ 2 êdN2 dN1 ædN2 ÷ö ú
çç
ê dx dx
ë è dx ÷
ø úû
÷
29
FORMAL PROCEDURE cont.
• Need to derive the element-level equation for all elements
• Consider Elements 1 and 2 (connected at Node 2)
ìï du ü
ïï
ék11 (1) ï
(1) - ( x )
k12 ù ìï u1 üï ìï f1 ü ï ïï dx 1
ïï
ê ú í ý= í ý + í ý
êëk21 k22 ú ï u ï ï
û ïî 2 ïþ ïî 2 ïþf ï ï du ï
ïï + ( x2 ) ïï
ïî dx ïþ
ìï du ü
ïï
ék11 (2) (2) ï - ( x )
k12 ù ìï u2 ü ï ìï f2 üï ïï dx 2
ïï
ê ú í ý= í ý + í ý
êëk21 k22 ú ï u ï ï
û ïî 3 ïþ ïî 3 ïþ f ï ï du ï
ïï + ( x3 ) ïï
ïî dx ïþ
• Assembly
Vanished
ì
ï du ü
ï
ék (1)
ê 11
(1)
k12 0 ùúìï u1 üï ìïï f1(1) üïï ïï - dx ( x1 ) ïï unknown term
êk (1) (2) úï
ï ïï ïï (1) (2) ï
ï ïïï ïï
ýï
(1) (2)
ê 21 k22 + k11 k12 úí u2 ý = í f2 + f2 ý + í 0
ê ï ï ïï ïï ïï ïï
(2) úïï u ïï
ê0
ë
(2)
k21 k22 ûúî 3 þ ïîï f3(2) ïï ïï du
þ ï
ï
( x3 ) ïï
îï dx þï
30
FORMAL PROCEDURE cont.
• Assembly of NE elements (ND = NE + 1)
é (1) ù ïìï - ü
( x1 ) ïïï
du
êk11 (1)
k12 0 K 0 úìï u ü ìï f (1) üï ïï
ê úï 1 ïï ïï 1 ïï dx ïï
êk (1) k (1) + k (2) ïï ïï ïï
ê 21 22 11
(2)
k12 L 0 ú u
úï 2 ï
ïï f (1) + f (2) ïï
ïï 2 2 ï ï 0 ïï
ê (2) (2) (2) úïï
í ý
ïï ïí (2) (3) ïï +
ý ïïí 0 ïýï
ê0 k221 k22 + k11 0 ú 3 = u
ïï f3 + f3 ïï
L
ê úïï ïï ïï ï
ê M M M O M úïï Mïï ïï M ïï ïï M ïïï
ê úï ï ïï ïï ïï ïï
ê0 (NE ) ( NE ) úïï u ïï du
êë 0 0 k21 k22 úî N þ ( NE )
ïîï fN ïþ ï ïï + ( xN ) ïï
û(ND´ 1) (ND´ 1) îï dx ï
þ
(ND´ ND ) (ND´ 1)
[K]{q} = {F}
31
EXAMPLE
• Use three equal-length elements
d 2u
2
+ x = 0, 0£ x£ 1 u(0) = 0, u(1) = 0
dx
ìï xi x j üï
ïï + ïï
= L( e ) ïí
3 6ï
ý, (e = 1,2,3)
ïï xi x j ïï
ïï + ï
î 6 3 ïþ
32
EXAMPLE cont.
• RHS cont. ìï f (1) ü ìï f (2) ü ìï f (3) ü
ïí 1 ïýï = 1 íìï 1 ýü ï
, ïí 2 ïýï = 1 íìï 4 ýü ï
, ïí 3 ïýï = 1 íìï 7 ýü ï
ïï f (1) ïï 54 ïïî 2 ïïþ ïï f (2) ïï 54 ïïî 5 ïïþ ïï f (3) ïï 54 ïïî 8 ïïþ
î 2 þ î 3 þ î 4 þ
• Assembly
ìï 1 du ü
ïï - (0) ïïï
ïï 54 dx ïï Element 1
é 3 - 3 0 ì
0 ùï u1 ï ï ü ïï
ê úïï ïï ïï 2
+
4
ï Element 2
ê- 3 3+ 3 - 3 0 úïï u2 ïï ïï 54 54 ïï
ê úí ý = í ý Element 3
ê0 - 3 3 + 3 - 3 úïï u3 ïï ïï 7 5 ïï
ê úï ï ï + ï
êë 0 0 - 3 3úûïïî u4 ïïþ ïïï 54 54 ïï
ïï 8 du ïïï
ïïî + (1)
54 dx ïïþ
• Apply boundary conditions
– Deleting 1st and 4th rows and columns
u2 = 4
é 6 - 3 ùìï u2 ü ï 1 ìï 1ü ï 81
ê úí ý = í ý
úïïî u3 ïïþ 9 ïîï 2 ïþ
êë- 3 6 û ï u3 = 5
81
33
EXAMPLE cont.
• Approximate solution
ìï 4 1
ïï x, 0£ x£
ïï 27 3 0.08
u-approx.
ïï 4 1æ 1ö 1 2
u-exact
u%( x ) = ïí + çç x - ÷
÷,
÷ 3 £ x £ 0.06
ïï 81 27 è 3ø 3
u(x)
ïï 0.04
ïï 5 5æ ö 2
2÷
- çç x - , £ x£ 1
ïïî 81 27 è 3÷
÷
ø 3
0.02
1
u( x ) = x (1 - x 2 )
6
– Three element solutions are poor
– Need more elements
34
ENERGY METHOD
• Powerful alternative method to obtain FE equations
• Principle of virtual work for a particle
– for a particle in equilibrium the virtual work is identically equal to zero
– Virtual work: work done by the (real) external forces through the virtual
displacements
– Virtual displacement: small arbitrary (imaginary, not real) displacement
that is consistent with the kinematic constraints of the particle
• Force equilibrium
å Fx = 0, å Fy = 0, å Fz = 0
L
ds x
• Equilibrium equation: + Bx = 0 This is force equilibrium
dx
• PVW L
æd s x ÷ ö
ò ò çè dx + Bx ÷÷ødu( x )dAdx = 0
ç
0 A
dWe - dWi
dWe + dWi = 0
37
PVW cont.
• in equilibrium, the sum of external and internal virtual work is
zero for every virtual displacement field
• 3D PVW has the same form with different expressions
• With distributed forces and concentrated forces
dWe = ò (t x du + t y dv + tzdw )dS + åi (Fxi dui + Fyi dv i + Fzi dw i )
S
38
VARIATION OF A FUNCTION
• Virtual displacements in the previous section can be
considered as a variation of real displacements
• Perturbation of displ u(x) by arbitrary virtual displ du(x)
ut ( x ) = u( x ) + t du( x )
• Variation of displacement
dut ( x )
= du( x ) Displacement variation
dt t = 0
dU = - dWi
40
PMPE cont.
• Potential energy of external forces
– Force F is applied at x = L with corresponding virtual displ du(L)
– Work done by the force = Fdu(L)
– The potential is reduced by the amount of work
dV = - F du(L) F is constant
dV = - d(Fu(L) )
virtual displacement
– With distributed forces and concentrated force
L
V = - Fu(L ) - ò0 bxu( x )dx dV = - dWe
• PVW dU + dV = 0 or d(U + V ) = 0
dP = 0
41
EXAMPLE: PMPE TO DISCRETE SYSTEMS
• Express U and V in terms of u2
displacements, and then F3
1 3
differential P w.r.t displacements 2
42
EXAMPLE cont.
3
• Strain energy of the system U = å U (e )
e= 1
1 L 1 æ 4 ö
U (c1, c2 ) = AE ò (c1 + 2c2 x ) dx = AE ççLc12 + 2L2c1c2 + L3c22 ÷
2
2 0 2 è 3 ÷
÷
ø
• Potential energy of forces
L L
V (c1, c2 ) = - ò bx ( x )u( x )dx - (- F )u(L ) = - ò bx (c1x + c2 x 2 )dx + F (c1L + c2L2 )
0 0
æ L2 ö
÷ æ 2 L3 ö÷
ç
= c1 ç FL - bx ÷ ç
çè 2ø ÷+ c2 èççFL - bx 3 ø÷÷
46
EXAMPLE cont.
• PMPE P (c1, c2 ) = U + V
¶P 2 L2 - b± b 2 - 4ac
= AELc1 + AEL c2 + FL - bx = 0
¶ c1 2 2a
¶P 2 4 3 2 L3
= AEL c1 + AEL c2 + FL - bx = 0
¶ c2 3 3
47