4 FEM - Lect2
4 FEM - Lect2
4 FEM - Lect2
Theoretical Basis of
Finite Element
Contents
1 Introduction
5 Conclusion
I. Introduction
Introduction
The finite element method is a numerical approximation method of
mathematical physics problems by computer analysis.
It originated from solid mechanics and rapidly developed to other physical
fields such like hydromechanics, heat transfer theory, electromagnetics and
acoustics.
We have to solve the Euler equations when dealing with the practical
problems but unfortunately it’s usually very difficult to get the analytical
solutions.
So here comes the direct method of variation problems. People usually
transform the differential problem into a variation one due to its convenience.
So
V u0 W C02 [a, b]
b
Q[V ] [( PV )V rV 2 2 fV ]dx
a
a a
Because V(a) = V(b) =0, the equation can be written as
Q[V ] [ P V rV 2 2 fV ]dx
b 2
a
Consider V(x) = u0(x) + W(x)
2.1 Brief introductions
Prove:We have
Pu0 Wdx ru0Wdx
b b b
[ Pu W ru W ]dx Pu W
b
a 0 0 0 a a a
a 0 0 a
b b
So Q[V ( x)] [ Pu02 ru02 2 fu0 ]dx [ PW 2 rW 2 ]dx
a a
b
Q[u0 ( x)] [ PW 2 rW 2 ]dx Q[u0 W ]
a
The equation above holds apparently for any
W ( x) C02 [a, b]
2.1 Brief introductions
Prove:
Notice that P(x) and r(x) are not negative. So when W(x) is not identically
equivalent to zero, we have
b
a
[ P( x)W 2 ( x) r ( x)W 2 ( x)]dx 0
which can be proved by the following proof by contradiction.
If the integral above equals to zero, the integrand equals to zero. That is
P( x)W 2 ( x) r ( x)W 2 ( x) 0 P( x)W 2 ( x) 0 W 2 ( x) 0
W(x) is a constant, so
W ( x) 0 W ( x) C
Due to the continuity of the function we have
W (a) W (b) 0 W ( x) 0
which means once V(x) doesn’t identically equal to u0(x) we have
b
Q[V ( x)] Q[u0 ( x)] [ PW 2 rW 2 ]dx Q[u0 ( x)]
a
So the functional Q[u(x)] gets its minimum at the solution u0(x) of the differential
equation.
2.1 Brief introductions
Prove:
2)If the functional Q[u(x)] reaches its minimum at u0(x) then u0(x) is the
solution of the differential equations.
If the arbitrary W ( x) C02 [a, b] doesn’t identically equivalent to zero, then for any
real number λ we have
Q[u0 ( x) W ( x)] Q[u0 ( x)] [ P W r W ]dx
b 2 2
a
When W(x) and u0(x) are fixed, the red part of the equation can be regarded as
the function φ(λ), so
b b
( ) [ PW 2 rW 2 ]dx 2 [ Pu0W ru0W fW ]dx 0
2
a a
[ Pu ru
b
0 0 f ]Wdx 0
a
which holds for any W ( x) C02 [a, b]
Similar to the preliminary theory of variation we have
Pu0 ru0 f 0
where u0(x) is the solution of the differential equation.
Conclusion:
The necessary and sufficient condition of u0(x) being the solution of the
differential equation is that the functional Q[u(x)] gets its minimum at u0(x),
which means the extremum problem of the functional and the problem of
differential equations are equivalent.
Definition:The sequences that satisfy the following conditions can be called the
minimizing sequences of the functional.
Q[un ] min Q[u] n
Theorem:If the differential operator T is positively definite, then any minimal
sequence of the corresponding functional converges to the solution of its Euler equation.
b
Tu f Q[ y ( x)] F ( x, y, y)dx
a
2.2 The method of Ritz
Review
From the discussion above we can confirm that the differential problems can
be transformed into the variational ones.
Now let’s explain it in a mathematical way (but not precise).
Lu f
For a differential equation
L is defined as
d
Lu P( x)u ( x) r ( x)u ( x)
dx
The operator L is linear so
L(c1u1 c2u2 ) c1L(u1 ) c2L(u2 )
Please prove it on your own.
2.2 The method of Ritz
Review
To simplify the writing we denote the integral as
b
a
f ( x) g ( x)dx ( f , g )
and call it the inner product of the function f and g.
The corresponding functional is
b b b
Q[u ( x)] [( Pu)u ru 2 fu ]dx u[( Pu) ru ]dx 2 fudx
2
a a a
which can be written as
Q[u ( x)] (Lu, u) 2( f , u )
It’s easy to prove that the inner product defined here has the following
properties ( f ,c g c g ) c ( f , g ) c ( f , g )
1 1 2 2 1 1 2 2
(c1 f1 c2 f 2 , g ) c1 ( f1 , g ) c2 ( f 2 , g )
Now we’ll discuss the Ritz method of variational problems. That is how
to establish the minimizing sequence by the method of Ritz.
Apparently L is only a special case. So we’ll change it to T for practical
problems.
2.2 The method of Ritz
(1)Transform the problem of differential equations into the variational one
by the variational principle
n n n
Q[u ] Q[un ] (Tun , un ) 2( f , un ) (T aii , aii ) 2( f , aii )
i 1 i 1 i 1
n n
a a ( T , ) 2 a ( f , ) F ( a , a , , a )
i j i j i i 1
And the functional has become the multivariable function of a ,a , …, a
i , j 1 i 1
2 n
after the
1 2 n
calculation of inner product.
2.2 The method of Ritz
(4)According to the extremum theory of multivariable function we have
the governing equations as follows.
F F
0, , 0
a1 an
expressed in the form of matrix as
(T1 , 1 ) (T1 , 2 ) (T1 , n ) a1 ( f , 1 )
( T , ) ( T , ) ( T , ) a ( f , )
2 1 2 2 2 n 2
2
( T ,
n 1 ) ( Tn , 2 ) ( T n , n n
) a ( f , n
)
(5)Solve the equations and get a1,a2, …, an
n
un aii
i 1
So we have the approximate extremum function of the functional, which is
the approximate solution of a differential equation.
Now let’s look at some examples.
2.2 The method of Ritz
Examples
Solve the function u(x)∈C2[0,1] that satisfy the following equations
u( x) u ( x) x
u (0) u (1) 0
We can easily solve the exact solution
e
u ( x ) 2 (e x e x ) x
e 1
Now let’s solve the problem by the method of Ritz.
The equation here is actually the special case of the differential operator L
mentioned before. That is P(x) ≡r(x)≡1,f(x) ≡-x
d d
Lu P ( x )u ( x ) r ( x )u ( x ) (u ) u f x
dx dx
So the corresponding functional is
Q[u ( x)] (Lu, u) 2( f , u)
The solution space here is C2[0,1].
2.2 The method of Ritz
Example
Let the basis functions be 1 ( x) x(1 x)
2 ( x) x 2 (1 x)
3 ( x) x3 (1 x)
They apparently satisfy
i (0) 0 i (1) i ( x) C02 [0,1]
It can be proved that the three functions above are linearly independent.
Substituted into the expression above we can get the following equations.
the symmetry
Exercise
Solve the extremum function of the functional
1
Q[ y ] ( y2 4 y 2 )dx y(0) 0, y(1) 1
0
Solve the problem respectively by the Euler equation and the method of Ritz
(take 3 terms)
2.2 The method of Ritz
Further discussions
There are still some problems unsolved even one can solve the
variation problem by the method of Ritz. For example whether
the linear equations solved by the Ritz method have solutions
and whether the solution is unique.
Now let’s discuss the problem in detail.
The Ritz method has approximated the functional into the
multivariable function
n n
Q[u ] F (a1 , a2 , , an ) a a (T , ) 2 a ( f , )
i , j 1
i j i j
i 1
i i
written as a a
b
(Li , j ) kij B(i , j ) [ Pi j ri j ]dx
a
let ( f , i ) bi
Then the equations can be written as
k11a1 k12 a2 k1n an b1
k a k a k a b
21 1 2 2 2n n 2
kn1a1 kn 2 a2 knn an bn
or expressed with matrix notations
Ka b
2.2 The method of Ritz
Further discussion
The coefficient symmetry of the equations mentioned before can be obtained
directly by its calculation formula
b
kij B(i , j ) [ Pi j ri j ]dx B( j , i ) k ji
a
which means the coefficient matrix K of the equations is symmetric.
Now let’s prove K is positively definite
cT (c1 , c2 , , cn ) 0 : cT Kc 0
In fact n n
cc k [ Pc c rc c ]dx
b
c Kc
T
i j ij i j i j i j i j
a
i , j 1 i , j 1
n n n n
[ P cii c j j r cii c j j ]dx
b
a
i 1 j 1 i 1 j 1
n n
B( cii , c j j ) B(un ( x), un ( x))
n i 1 n j 1
where un ( x) cii c j j
i 1 j 1
2.2 The method of Ritz
Further discussion
n
un ( x) cii
Now that
i 1
When the vector c≠0, then un(x) doesn’t identically equal to zero. Because the
functions φ1,φ2, …, φn are linearly independent.
Now we only have to prove that there exists δ>0 that will make
We have
u(t ) dt u(t ) dt
x x x x
u ( x) u(t ) *1dt 1 dt xa
2 2
a a a a
.
2.2 The method of Ritz
Further discussion 2
b b
x
b
x
dx
a a a a a
2
So u 2
( x ) dx u (t ) dt dx x a u (t ) dt
b 2
x a u(t ) dt dx u(t ) dt x a dx
b b 2 b
a a a a
(b a) 2 (b a) 2
a u(t ) dt 2 a u( x)
b b
2 2
dx
2
And
2
a u( x) dx (b a)2
b b
2
u 2 ( x)dx
a
Thus
[ P un r un ]dx [ min P( x) un r un ]dx
b 2 2 b 2 2
a a a x b
a
b
[ min P( x)
a x b
2
(b a )
2 n
u
2
r n ]dx
u
2
. a
b
[ min P( x)
a x b
2
(b a) 2
u n
2
]dx a
b
u n
2
dx
2.2 The method of Ritz
Further discussion
In conclusion we have
a a (T , ) 2 a ( f , )
Because
F (a1 , a2 , , an ) i j i j i i
i , j 1 i 1
According to the conclusion of
2
F
2F ai a j kij ai a j 0
ai a j
That is the second-order variation is greater than zero, which means the solution
we get can make the functional get its minimum.
2.3 Application of the Ritz method
Summary
The discussion before mainly focuses on the mathematical aspect. Now let’s discuss the
application of the Ritz method in mechanics.
The method of Ritz directly use the principle of minimum potential energy
(1)Choose the permissible trial function for the displacement.
ui ui0 ainuin n 1, 2, ,N
where i is the free index, n is the summation index and ain is the displacement parameter
of the undetermined displacement.
The value range of the free index i depends on the specific problem, for example for the
three-dimensional problem i can be 1, 2, 3.
ui0 is the function of displacement that satisfies the given nonhomogeneous boundary
condition of displacement, which means ui0 ui on Su.
uin is the function of displacement that satisfies the homogeneous boundary condition of
displacement, which means uin =0 on Su.
(2)Write the expression Π(ui) of the total potential energy of the given elastic system ,
substitute the possible trial function of displacement and obtain the expression Π(ain) of
the total potential energy expressed by the undetermined displacement parameters.
(3)Calculate the variation of the total potential energy Π.
Because the form of the displacement function has been determined so only the amplitude
(the undetermined coefficient ain) will change when solving the variation.
2.3 Application of the Ritz method
Summary
(3)According to the principle of minimum potential energy
ain 0
ain
Because δain are mutually independent, the coefficients equal to zero. That is
0 n 1, 2, , N
ain
This is the solving equation of the Ritz method.
It’s actually the approximate equilibrium equation expressed by the displacement
parameters.
For the linear elastic problem total potential energy Π is the second-order functional
of the displacement and its derivative. Substitute the trial function of displacement and
we can get the quadratic function of the undetermined coefficient of displacement.
So the equation above is actually the linear algebraic equations of ain, which can be
easily solved by computer.
(4)Solve the algebraic equations above and we can get the undetermined parameter of
displacement and then substitute it into the equation below.
ui ui0 ainuin n 1, 2, ,N
We can get the approximate solution of the displacement field.
Stress and strain can also be solved by displacement but generally the obtained stress
field doesn’t satisfy the static equilibrium equations.
2.3 Application of the Ritz method
The beam with uniform load
Let’s consider a beam example. q
Q0 l Ql
y
Now let’s derive the differential equilibrium equations and the static boundary
conditions expressed with the beam deflection according to the principle of
minimum potential energy.
The advantage of variation method is that one can easily obtain the correct
boundary conditions.
Let the beam deflection be w(x). Denote the curvature of the beam axis in flexure
as κ. And the strain energy of the beam is
1 L
U M dx
2 0 d 2w
Because M=EIκ. Notice that in the case of small deformation we have 2
2
dx
So the strain energy can be written as U 1
L d w
2
2 0
EI 2 dx
dx
2.3 Application of the Ritz method
The beam with uniform load
The boundary S of this problem is the upper and lower surfaces and the two ends. If the direction
of load is as shown in the picture then the potential energy of the external force is
L dw dw
V qwdx Q0 w0 M 0 Q w
L L M L
0
dx 0 dx L
The total potential energy of2 the beam is
1 L d 2w L dw dw
EI 2 dx qwdx Q0 w0 M 0 QL wL M L
2 0 dx 0
dx 0 dx L
Solve the variation of the equation above
2
1 L 2
d w L dw dw
EI 2 dx q wdx Q0 w0 M 0 QL wL M L
2 0 dx 0
dx 0 dx L
2 L
1 L d 2w dw
EI 2 dx q wdx Q w 0 M
L L
2 0 dx 0
dx 0
Calculate the first term
2
1 L d 2w L d 2w d 2w L d 2 w dw
2 0
EI 2 dx EI 2 2 dx EI 2 d dx
dx 0 dx dx 0 dx dx
L
d 2 w dw L d d 2 w dw
. EI 2 0 EI 2 dx
dx dx 0 dx dx dx
L L
d 2 w dw d d 2 w L d
2
d 2w
EI 2 w EI 2 0 2 EI 2 wdx
dx dx 0 dx dx
0
dx dx
2.3 Application of the Ritz method
The beam with uniform load
Substitute the equation above into the variation of the total potential energy
L L
L d d w
2 2
dw d w
2
d d w2
2
EI 2
q wdx EI M w EI 2
Q
2
0
dx dx dx dx 0
dx dx 0
EI 2 dx qwdx y
2 0
dx 0
1. The trial function also the deflection is
w ax(l x)
It apparently satisfies the boundary condition
w(0) w(l ) 0
Substitute it into the expression of the total
potential energy and we have
EI
2a
l l
dx qa x(l x)dx
2
2 0 0
1
Only a is the variable so 2 EIla 2 ql 3a
6
1 3 ql 2
Thus the approximate solution of the deflection is. 0 4 EIla ql 0 a
a 6 2 24 EI
ql
w x(l x)
24 EI
2.3 Application of the Ritz method
The beam with uniform load
In engineering practice, people mostly focus on the maximum of deflection, which
occurs in the middle ql 2 l l ql 4
wmax (l )
24 EI 2 2 96 EI
The exact solution obtained by mechanics4of materials is
5ql
wmax
384 EI
The error is around 20%, which is quite dissatisfying.
x
2. Change the trial function to w a sin
l
which satisfies the boundary conditions apparently. Substitute the equation into
the expression of the total potential energy that
EI 2 l 2 x x
2
l
a sin dx qa sin dx
2 l 0
l 0
l
. EI 4 2 2ql
a a
4l 3
2.3 Application of the Ritz method
The beam with uniform load
So
EI 4 2ql 4ql 4
0 a 0 a
a 2l 3
EI 5
So the approximate solution of deflection is
4ql 4 x
w sin
EI 5 l
Similarly the deflection in the middle is the maximum.
4ql 4 l 4ql
4
wmax sin
EI 5
l 2 EI
5
The error is 0.38% , which is quite satisfying compared to the solution above.
One can take more terms or even infinite series to obtain more accurate
result.
We can notice the advantage of the direct method of variation problems that we
only need to solve the algebraic equations rather than the differential equations.
Once the trial function is approprivately, it only needs to solve several
(sometimes even one) algebraic equations to get the result accurate enough.
2.4 The method of Galerkin
The method of Galerkin
Galerkin proposed another direct method of variation problem in 1915, which is a special
form of the Ritz method in mechanics.
Now let’s look at his idea.
The variation of the minimum potential energy is
( ij , j fi ) ui dV ( ij n j pi ) ui dS 0
V S
, which is the origin of the Ritz method: Establish and substitute the trial function satisfying
the displacement boundary conditions on Su.
However the trial function of the displacement is required to satisfy both the boundary
conditions of the displacement on Su and the external force on Sσ in the method of Galerkin.
V
( ij , j fi )uin dV 0 n 1, 2, ,N
This is the solving equation of the Galerkin method, which is also the linear
equations after integration.
2.4 The method of Galerkin
The method of Galerkin
Take the beam as example. We have obtained its functional form of the total potential
energy l
F ( x, w, w, w)dx
0
Using the operation notations of variation we can get its first-order variation as
l F d F d 2 F
w[ 2 ]dx
0
w dx w dx w
l l
d dw
[ w( Fw w
F )] [ F
w ]
dx 0 dx 0
We can know that the terms outside the sign of integration are the variation of
potential energy on the boundary.
When replace the real w by the approximate displacement function wn,there usually
remain only one term of integral because the trial function must satisfy all the
boundary conditions according to the method of Galerkin.
Rewritten as
l F d F d 2 F l
0 wn [ w dx w dx 2 w ]dx 0 wn f ( x, w, w, w, )dx
Substitute the trial function and we can get a set of linear equations.
2.4 The method of Galerkin
The method of Galerkin
Example:Solve the approximate value of the deflection of the beam with two fixed
ends and uniform load.
Solve:Let the trial function of the deflection be
2 x
w a (1 cos ) l
x
l y
0 2 0
l
4
1 2
a 2 EI qal (1 )
2 2l 2
32 2 ql 4
Because a 0 , we have a 4 (1 )
EI
So the maximum of the deflection at x=l is
322 ql 4
wmax a(1 cos l ) 4 (1 )
2l 4 EI
1 ql
4.5% smaller compared to the accurate result
8 EI
2.4 The method of Galerkin
Comparison to the method of Ritz
Solution 2. The Galerkin method
The method of Galerkin requires that the trial function must satisfy the boundary
conditions of both the external force and the displacement. So the trial function of the
Ritz method is not appropriate here.
Exercise: What will be the result if adopt the trial function of Ritz method?
It’ll be easier to consider the boundary condition of the external force first when
looking for the trial function of the Galerkin method.
Let d 2w x
2
a(1 sin )
dx 2l
Apparently it satisfies the condition that the moment and the shearing force equal to
zero at x=l
w(l ) 0 w(l ) 0
Integrate the equation above twice and
1 2 2l 2 x
w a x sin Ax B
2 2l
The integral constants A and B are determined by the boundary condition that the
trial function satisfies at x=0. That is w(0) 0 w(0) 0
2.4 The method of Galerkin
1 2 4 ql 4
wmax al ( 2 ) 0.126
2
2 EI
The result is 0.8% bigger than the accurate solution and is apparently better than the first
approximate solution of the Ritz method.
The trial function of the Galerkin method is also the trial function of the Ritz method. You can try to
substitute the trial function above into the Ritz method to solve the problem.
2.5 Conclusion
Conclusions
The solving equations of the Galerkin method can be explained by the idea of the weighted
residual method.
For example according to the equilibrium conditions the real solution w of the beam with
uniform load should satisfy:
d 4w l d 4w
EI 4 q 0 ( EI 4 q) wdx 0
dx 0 dx
The trial function wn doesn’t always satisfy the equilibrium equations in the domain
once relax the requirement. So there will be a nonzero residual on the right side after
substituted into the equilibrium equations.
n
d 4 wn
wn aii EI 4
q Ri 0
i 1 dx
The method of weighted residual is to adjust the undetermined parameters of the trial
functions to make the integral of the product of the residual and some weight
functions equals zero in the entire domain. And we can obtain the approximate
solution. l l d 4w
0 i 0 dx4 q i dx 0 i 1, 2,
R dx EI n
,N
There are different ways to choose the weight function. And when the weight function
is the admissible function φi of the trial function, it becomes the method of Galerkin.
III. The method of weighted residuals
3.1 Brief
We’ve discussed the approximate solutions of the physical problems or the differential
equations.
However, not all the differential equations can be transformed into the variation
problem, which means we should first think about the inverse problem of the variation.
( x, y, y, y) 0
Solve the functional of which the function above is the Euler equation.
For the first question, we usually solve its differential equations by eliminating the
parameters and then obtain the coresponding functional, which actually turns out to be
the second question.
3.1 Brief
As stressed before, all the differential equations don’t have the functional of which the
differential equation itself is the Euler equation.
Take the second-order ordinary differential equation for example
( x, y, y, y) 0
If it is the Euler equation of the functional below
b
Q[ y ] F ( x, y, y)dx
a
Then
d
( x, y, y, y) 0 Fy Fy Fy Fyx yFyy yFyy
dx
So
d d
y y ( Fyy Fyyx Fyy y Fyyy y Fyyy ) Fyy
dx dx
( Fyyx yFyyy yFyyy ) ( Fyyx yFyyy yFyyy ) 0
So φ must satisfy d
. y y 0
dx
3.1 Brief
1. Find a set of linearly independent elements φ1,φ2, …, φn in H and denote the formed
M span{1 , 1 , , n }
subspace as
x
l
y
As discussed before the control differential equation and the boundary conditions of this
problem are d 4w
EI 4 q 0
dx
x 0 : w 0, w 0
x l : w 0, w 0
Now let’s use the low dimensional approximate method to solve the problem for better
understanding of the essence of the weighted residual method. 。
The low dimensional approximate method means there is only one or several
undetermined parametric variables in the trial function
x
w1 c sin First order approximation
l
x 3 x Second order approximation
w2 c1 sin c2 sin
l l
We can prove that the equations above have already satisfy the boundary conditions
so there is only internal residual.
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
x
l
Solution
For the first order approximate
l x
l
4
x x
0 R sin l dx 0 EIc l sin l q sin l dx
l
4
l
EIc 2q 0
l 2
4ql 4
So the parametric variable c is c 5
EI
c is apparently the max deflection at the mid-span and the error is 0.386%
compared to the exact solution.
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
x
l
y
Moment Method
The moment method is similar to the Galerkin method but the difference is that the
weighted functions is the power series of the coordinates 1,x, x2,… and the number of the
weighted functions is equal to the number of parametric variables. Let the product
integral of the internal residual with every weighted function equals zero thus derive the
equation of the parametric variables.
Solve
For the first order approximate
3
l
0 R 1dx 2 EIc ql 0
l
So the parametric variable c is
ql 4
c 3
2 EI
c is apparently the max deflection at the mid-span and the error is 23.85%
compared to the exact solution. 。
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
x
l
y
Least Square Method
Make the square integral of the internal residual get its extremum in the solving domain,
which means the derivative of the integral of every parametric variable equals zero. And we
can get the algebraic equations to solve the parametric variables.
Solve
d l 2 l dR
For the first order approximate
dc 0
R dx 2 0
R
dc
dx
l
4
l
EIc 2q 0
l 2
4
4ql
So the parametric variable c is c 5
EI
c is apparently the max deflection at the mid-span. The approximate solution
obtained in this way is the same as the Galerkin method.
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
x
l
y
Collocation Method
Select several collocations in the solving domain at which the internal residual equals zero
thus we can get the equations to solve the variables. The number of the collocations should
be equal to the number of undetermined parametric variables.
Solve
For the first-order approximation there’s only one parametric variable so only one collocation
is needed. Let the collocation be the middle point.
4
R x l EIc q 0
2 l
So the parametric variable c is ql 4
c 4
EI
C is apparently the max deflection at the mid-span and the error is 21.16%
compared to the exact solution.
。
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
x
l
y
Subdomain Method
Divide the solving domain into several parts and make the integral of the internal residual
equals zero in very subdomain thus we can get the algebraic equations to solve the parametric
variables. The number of the subdomains divided should be equal to the number of the
undetermined parametric variables.
Solve
There’s only one parametric variable in the trial function for the first order approximation. So
it only requires the integral in the solving domain equals zero. So now the subdomain method
is the same as the moment method.
3
l
0 Rdx 2 EIc
4
ql 0
l
ql
So the parametric variable c is c 3
2 EI
C is apparently the max deflection at the mid-span and the error is 23.85%
compared to the exact solution.
3.2 Example
Example
Solve the deflection at the middle of the simply supported beam with uniform load.
Conclusion
We introduced five methods to solve the approximate solution with the same first order
approximate function. We can find out that the errors of the least square method and the
Galerkin method are the smallest.
Exercise: Try to use the five methods above to solve the problem with the second
order approximate function.
Discussion
The methods above can be generally called the weighted residual method and they are
actually very similar to each other, which can all be expressed in a unified formula. That is to
form different methods by choosing the proper weighted functions.
But why these methods are so similar? What’s their inner link? And what’s the essence of the
unified formula of the weighted residual method?
We have to first study the functional analysis and the Sobolev space.
3.3 Further discussion
The functional of variance
The governing differential equations in the theoretical research and the engineering
application can be generally expressed as
Pm u f 0
The corresponding boundary conditions are
Qt (u) ft (t 1, 2, , m)
where Pm is a m-order differential operator, Qt is a (t-1) order differential operator in the
normal direction of the boundary, ft is the given coordinate function and the boundary Γ
of the domain Ω is m
t
t 1
Usually the problem is supposed to be regular and well posed.
The regularity is the smoothness of the solution, which means if there exists
determined degree of smoothness of the boundary conditions then the solution
must hold certain degree of smoothness.
The “well-posed” means the existence of the solutions, the uniqueness and the
continuity dependence of the definite conditions.
n
Let the trial function be u cii
i 1 function and ci is the corresponding undetermined
where {φi} is the basis of the trial
parametric variable.
3.3 Further discussion
The functional of variance
The trial space consist of all the trial functions is called the trial function space.
Because the trial function may satisfy neither the equations nor the boundary conditions. So
there will be respectively the internal residual RI and the boundary residual Rt after
substituted into the equations.
Solve the weighted integral of all the residual squares in the corresponding domain and we
have m
J R (u ) I2 RI2 d t2 Rt2 d
t
t 1
The formula above is called the functional of variance, which is actually the functional of the
square residual , where βI is the weighting coefficient in the domain and βt is the
weighting coefficient of the boundary conditions.
The variation principles of the variance functional and the energy functional are
very similar:
1.They are both the extremum principles of the functional.
2.They are both the second-order positive functional for linear problems so the necessary
and sufficient condition that the functional gets its minimum is that the first-order
variation equals zero.
l/2 l/2
IV. The finite element method
4.1 Brief
We took the one dimensional problem for example when introducing the different
methods. So let’s look at a two-dimensional example for better understanding of the
necessity of the finite element method.
Example
Solve the Poisson equation by the Galerkin method
2u 2u
: u 2 2 2
x y
:u 0
where Ω:{|x|<a,|y|<a},Γ is the boundary of Ω.
Solution
Choose two linearly independent basis functions as
1 (a 2 x 2 )(a 2 y 2 )
2 (a 2 x 2 )(a 2 y 2 )( x 2 y 2 )
Let u2 c11 c22
The formula above satisfies all the boundary conditions so it can be used as the trial
function of the Galerkin method.
4.1 Brief
The solving equation of the Galerkin method
1 Rd 0 1 u2 f d 0
(T1 , 1 )c1 (T2 , 1 )c2 ( f , 1 )
2 Rd 0 2 u2 f d 0 (T1 , 2 )c1 (T2 , 2 )c2 ( f , 2 )
Then
16 16 8 12 16 16 10
(T1 , 1 ) 11d a (T1 , 2 ) 2 1d a
5 3 3 35 5 3 3
8 128 10 22 32 8 2 12
(T2 , 1 ) 12 d
35 5 3
a (T2 , 2 )
2 2 d
7 5 5 27
a
16 4 6
32 6
( f , 1 ) 21d a ( f , 2 ) 22 d a
9 5 9
Thus 1 5 7 37 1 15 35
c1 2 c2
a 8 277 a 4 16 277
4.1 Brief
So the approximate solution is
u u2 c11 c22
1 35 2 15 2 2
( a 2
x 2
)( a 2
y ) 74 ( x y )
a 16 277
2
a 2
Apparently the boundary curve is square.
We can see that even for this very simple equation, to form a proper trial function can be
very difficult when the boundary curve is complicated.
Besides the Galerkin method requires a relatively high level of smoothness degree of the
trial function. For example the second order derivative of this trial function must be
integrable. So we usually transform the solving equation to an equivalent integral weak
form to decrease the requirement of the trial function smoothness.
So we can solve the partitioned interpolation of the solving domain after obtaining the
equivalent integral weak form of the equation and then expand the range of the trial
functions.
It leads to the finite element method applicable for a wider domain.
4.1 Brief
Now let’s discuss the main idea of the finite element method.
1. The classical finite element method is to find the variation problem of the
differential equations through the principle of variation and thus to find the
corresponding functional.
One can directly start to establish the functional from the variation method for
the mechanical problems.
The requirement of the smoothness degree of the trial function is relatively high
when using the equivalent integral method obtained by the Galerkin method.
It has to be transformed to equivalent weak form to decrease the requirement of
the smoothness degree.
The common approach is the integration by parts or to directly solve by the
principle of virtual work for the mechanical problems.
4.1 Brief
a
Integrate the first term by parts
Q[u ( x)] P( x)u( x)u ( x) a P( x)u ( x)u ( x) dx
b b
a
r ( x)u ( x)u ( x ) 2 f ( x )u ( x) dx
b
a u(a)= u(b)=0
Pu2 ru 2 2 fu dx
b
1 x xi i ( x)
i 线性 x xi 1,xi 1 linear
1
x0 xi 1 xi xi 1 xn
0 其他
others
x0 x1 x2 xn 1 xn
0 ( x)
1 ( x)
1
n ( x)
1
4.2 The mathematical description of the finite element method
The value of every basis function equals 1 at the according nodes and 0 at
other nodes due to its special construction (usually called the property of
Kronecker).
So the coefficients of the approximate solution a1 , a2 ,…, an are just the
function values ui ( i = 1,… , n) of v (x) at the discrete points x1 , x2 ,…,
xn.
Now let’s summarize the solving steps of the finite element method
Take the one dimensional equation for example
( x xi 1 ) /( xi xi 1 ) x [ xi 1 , xi ]
i ( x)
i ( xi 1 x) /( xi 1 xi ) x [ xi , xi 1 ] 1
0 x [ xi 1 , xi ] [ xi , xi 1 ]
xi 1 xi xi 1
n ( x)
0 x [ xn 1 , xn ]
n 1
( x xn 1 ) /( xn xn 1 ) x [ xn 1 , xn ] xn 1 xn
4.3 Solving steps of the finite element method
N 2(i ) x ei i ( x)
i N1(i 1) x ei 1 1
ei ei 1
0 x e e
i i 1 xi 1 xi xi 1
n ( x)
0 x en
n ( n ) en 1
N2 x en
xn 1 xn
4.3 Solving steps of the finite element method
4. Element analysis
We establish the basis function and solve the extremum equations by element when using
the finite element method. n
Calculate the functional by element, v( x) aii ( x) for example for the normal
element ej i 0
Qj
1
2 e j
Pv 2
rv 2
2 fv dx
It should be noticed that only the basis functions φj-1 and φj of the trial function v(x) are
not equal to zero in the element ej(xj-1<x<xj) ( j)
N1( j ) ( x) N 2 ( x)
j 1 ( x) j ( x)
specificaly, it is
ej
x j 1 xj
So in the element ej the trial function is
j 1 ( x) N1( j ) ( x) ( x x j 1 ) /( x j x j 1 )
j ( x) n N 2( j ) ( x) ( x j 1 x) /( x j 1 x j )
v( x) aii ( x) u j 1 N1( j ) ( x) u j N 2( j ) ( x)
i 0
4.3 Solving steps of the finite element method
2 ej
dx dx
2
dN1( j ) ( j) ( j)
( j)
r N1 ]dx u j 1u j ej P
1 2 dN dN
u j 1 [ P
2
( j) 1 2
rN1 N 2 dx
( j)
2 ej
dx dx dx
2
dN ( j)
r N 2 ]dx u j 1 fN1( j ) ( x)dx u j fN 2( j ) ( x)dx
1 2
u j [P
2 ( j) 2
2 ej
dx ej ej
dN( j ) dN ( j )
Let ej
k P rN N dx
( j) ( j)
ej dx dx
bej fN( j ) ( x)dx
. ej
4.3 Solving steps of the finite element method
4. Element analysis
So in the interval (xj-1<x<xj) the functional value of the element ej can be
written as 1 1
Q j u 2j 1k11ej u j 1u j k12ej u 2j k22ej u j 1b1ej u j b2ej
2 2
So the derivate of the element is
Q j
k11ej u j 1 k12ej u j b1ej
u j 1
Q j
k12ej u j 1 k22ej u j b2ej
u j
k22ej u j b2ej u
j 12 j
u
j
Kei is also called the element stiffness matrix of element ej.
4.3 Solving steps of the finite element method
5. Assemble the equations
We discussed a specific element at one time just now. And we can obtain a
number of n derivative formulas of elements from e1 to en.
Add them together according to the public nodes and then get the overall
extremum equations.
First write down the equations
Q n Q j
0 (i 0,1, , n)
ui j 1 ui
For arbitrary element ej
1 1
Q j u 2j 1k11ej u j 1u j k12ej u 2j k22ej u j 1b1ej u j b2ej
2 2
After recurrence we have
1 1
Q j 1 u 2j k11e j 1 u j u j 1k12e j 1 u 2j 1k22
e j 1
u j b1e j 1 u j 1b2e j 1
2 2
It can be seen that the other terms don’t contain uj except Qj and Qj+1, which
means only the terms Qi and Qi+1 have the partial derivatives of ui .Thus
Q n Q j Qi Qi 1
.
ui j 1 ui ui ui
4.3 Solving steps of the finite element method
5. Assemble the equations
So
Q Q1 Q2
0
u1 u1 u1
Q Q2 Q3
0 Q n Q j
u2 u2 u2 0 (i 1, 2, , n)
ui j 1 ui
Q Qn
0
un un
According to the element analysis before we have
Q1
k12e1u0 k22e1u1 b2e1
u1
Q2
k11e 2u1 k12e 2u2 b1e 2
u1
k21enun 1 k22enun b2en
Expressed in the form of matrix where
b e1
b e2
u1
k22e1 k11e 2 k12e 2 0 2
e 2 e3
1
b b u 2
k21 k22 k11 k12
e2 e2 e3 3
0 2 1
k21 k22 k11 k12 U
e3 e3 e4 4
K
0 0
B
0 k21e 4 k22
e4
k11e5 k12e5
e n1 en un 1
2b b1
n b2en un
n
0 k21 k22
We can observe the pattern of the global stiffness assembled by the element
stiffness.
4.3 Solving steps of the finite element method
6. Introduce the boundary conditions
We can naturally introduce the functional when discussing the variation problems without special
treatment for the natural boundary conditions.
For the compulsive (essential) boundary conditions we can directly introduce the equations to reduce
the dimensions of the undetermined equations.
It is usually realized by “put 1 on the diagonal”. For example suppose the equations are
k11 k12 k1n u1 b1
k k2 n u2 b2
21 k22
k1n k2 n knn un bn
Suppose the value of a point i on the boundary is known, then
Here we’ll directly establish the equivalent integral weak form according to the principle
of virtual work d
Let the virtual displacement be φ(x) then the according virtual strain is ( x )
In terms of the principle of virtual work: dx
The virtual work of the internal force equals that of the external force
l l l
( x) ( x)dx
0 0
EAu( x) ( x)dx A g ( x)dx P ( L)
0
So the equation above is the equivalent integral weak form.
4.4 Mechanical examples
The first step of the finite element method is the discretization.
Usually the differential and virtual work equations are called the continuous form.
Element subdivision
Divide the interval [0,l] into a number of n parts
0 x0 x1 xn l
The interval [xi, xi+1] is called the element ei (i=0,1,…,n-1) and x=xi+1 is the
nodes(i=0,1,…,n).
Displacement mode
The displacement mode is actually the specific form of determined interpolation
polynomials, which is also the trial function expressed with the function value at the
nodes.
Now we’ll use the linear displacement mode. That is to represent the displacement
using the step-linear-functions. And we only need to write the expression of
displacement trial function in each element.
4.4 Mechanical examples
Displacement mode
Suppose the displacement ui-1 and ui at the two ends xi-1 and xi of the element ei :[xi-1, xi] are given.
Because the displacement of element ei is linear and according to the two-point form of linear equation
of analytic geometry we can get the expression of u(x) in the element ei as
xi x x xi 1
u ( x) ui 1 ui ( xi 1 x xi )
xi xi 1 xi xi 1
Adopt the local number of nodes and
y N1(i ) ( x) N 2(i ) ( x)
xi x x xi 1
N (i )
N (i )
1
xi xi 1 xi xi 1
1 2
Element analysis
The equation of the virtual work can be written in the form of discretization
after determining the displacement mode.
Rewrite the global integral of the virtual work equation into a partitioning
integral n 1 n 1
EA
i 0
ei
u ( x) ( x)dx A f ( x)dx P ( L)
i 0
ei
where f=ρg.
4.4 Mechanical examples
Element analysis
Substitute the according determined displacement mode into the left part of
the integral of every element ei. And we have
EA u( x) ( x)dx EA ( x) u( x)dx
T
ei ei
where [k ]ei [ B]T EA[ B] dx is called the element stiffness matrix.
ei
where {F }ei
ei
A[ N ] fdx is called the equivalent force of element nodes.
4.4 Mechanical examples
The assembling of the global stiffness matrix and the global load vector
Assemble every element of the element stiffness matrix and the element load vector
according to its global number and we can get the global stiffness matrix and the global
load vector.
We can find the following properties of the global stiffness matrix:
1. Symmetric matrix
2. Sparse matrix
3. Nonnegative definite matrix
Constraint handling
Introduce the boundary condition by “put 1 on the diagonal”.
Solving equation
The coefficient matrixes of the linear equations obtained by the finite element method
have the properties of symmetry and sparsity but usually very high order. So we
usually use the computer programming to solve
Further analysis
After solving the displacement we can obtain the parameters such like strain, stress
and the support reverse force by further calculation.
4.5 Example analysis
Question 1 As shown in the picture, apply an axial load P on the
right end of the first-step shaft part.
A1 E1 AE 2 2
p
1 2
L L
6 6
: A 2.0 10 m
1 2
A 1.0 10 m
2 2
E E E 2.0 10 Pa
1 2 11
P 100N L L 1.0m
1 2
4.5 Example analysis
Solve:(1) Structure discretization
Deformation analysis: There is only axial deformation with the same
displacement at every section. Suppose there is one axial displacement at every
node. And express the element with axial deformation by line segment.
u1 u2 u3
1 P1 1 2 P2 2 3 P3
u1 e
u x e
u2
x
i j
At point i u x i u1 e
a u1e (2)
u x j
e e
At point j u2 ae
bL u 2 (3)
Le —— element length
Solve the simultaneous equations(2)(3)
u 2e u1e
Thus: b (4)
Le
Substitute(2)and(4)back to(1)and we have
u 2e u1e e e
u x u1
e
e
x Incorporate with identical indicators u1 u 2
L
4.5 Example analysis
x e x e
And u x 1 e u1 e u 2
L L
Written in the form of matrix
x 1
e
x u
u x 1 e , e e
L L u 2
Let u ux
x x
N 1 e , e —— Shape function matrix
L L
1
u e
u e
e —— Displacement vector of element nodes
u 2
So
u N u
e
4.5 Example analysis
(3)Element analysis
Calculate the elastic strain energy of the element
1 1 e L
U dv A 0 dx
e
e
2V e
2
u(x )
x
N
x
u e
N
x 1
, N
2
u
e
1 1
1
e e
1 u u
e , e e
B e
L L u 2
u 2
1 u1
e e
1 u 1
E E e , e e E B e
e
L L u 2
u 2
4.5 Example analysis
u1
e
u B
1 e Le T
U e
A e
1
e
,u 2 E e
B
e dx
2 u 2
0
1 e e
e
u
1
B
T
A L u1e ,u 2e E e
B
e
2
u 2
u
1
e
1
u A
T
e
1
,u 2 e e e
LE e
B
B
e
2 u 2
Let K e Ae Le E e B
T
B
1
e 1 1
e e
L 1 1 A E
A LE
e e e
1 Le Le 1 1
, e
e L
L
称单元刚度矩阵
4.5 Example analysis
So the elastic strain energy of the element can be expressed as
1
T
U e
ue K e u e
2
Where
1
u e
—— Displacement vector of the element nodes.
u e
e
u 2
T
u e
u1e ,u 2e
u1
u
1
u 2
1 1 4.0 105 4.0 105
K
1 A1E 1
1 1 5
L1 4.0 105
4.0 10
4.5 Example analysis
As for element 2
u 2
u
2
u 3
U U U
1 2
P1 —Unknown P2 0 P3 100 N
4.5 Example analysis
The potential energy of the structure is