Академический Документы
Профессиональный Документы
Культура Документы
3 Weighted Residuals
i=1
where ci are constants to be determined.
Substituting into the differential equation, equality is frequently not satisfied. Hence, an
error or residual can be stated as:
R(x) = D(u(x)) − P (x)
The main idea of the MWR is to force the residual to zero in average over the domain by
means of weighted integrals.
Z
wi (x)R(x) dx = 0 i = 1, 2, 3, . . . , n
Ω
Raul
Durand 1
Finite Method of Weighted Residuals
Elements
If we guarantee a priori that the approximate solution satisfies the boundary conditions of
the BVP, then the number of weighting functions wi (x) is exactly the number of unknowns.
Thus, the result of the use of weighted integrals is a set of n algebraic equations for the n
unknown constants ci .
In this regard, the basis functions must be properly chosen in order to the approximate
solution satisfies the boundary conditions.
Also, the weighting functions must be defined. The way how these functions are chosen
defines different sub-methods of weighted residuals. Among the most common methods we
have:
• Collocation method
• Lest squares method
• Galerkin method
• Petrov-Galerkin method
• Sub-domain method
• Method of moments
Raul
Durand 2
Finite Collocation Method
Elements
Collocation Method
In the collocation method, the weight functions are taken from the family of Dirac delta
functions in the domain.
wi (x) = δ̄(x − xi )
Applying the integral properly of the Dirac’s delta function we arrive to R(xi ) = 0
This means that the collocation method corresponds to setting the residual equal to zero
at the singularity of the Dirac delta function. That is, residual is equal to zero at specific
points xi in the domain.
Raul
Durand 3
Finite Least Squares Method
Elements
where ci are the unknown parameters in the residual function R(x). In order to minimize
this scalar function, the derivatives of S with respect to all the unknowns parameters must
be equal to zero:
∂S
∂ci =0
Z
∂
∂ci [R(x)]2 dx = 0
ZΩ
2 R(x) ∂R(x)
∂ci = 0
ZΩ
R(x) ∂R(x)
∂ci = 0
Ω
By comparisons with the weighted integral formula, it is possible to notice that the weighting
function in this method are equal to:
∂R(x)
wi (x) = ∂ci
Raul
Durand 4
Finite Galerkin Method
Elements
Galerkin Method
The Galerkin method is one of the most used methods to find approximate solutions of BVP.
This method can be viewed as a modification of the least squares method. In this case, the
weighting functions are taken as the derivatives of the approximation function U (x) with
respect to the unknown parameters ci .
Thus:
∂U (x)
wi (x) = ∂ci
n
!
= ci Ni (x) + N0 (x)
X
∂
∂ci
i=1
= ∂U
∂ci
wi (x) = Ni (x)
Raul
Durand 5
Finite Example 1
Elements
Example 1
Consider the following boundary value problem with homogeneous boundary conditions:
d2 u
dx2
− 4x2 = 1, x ∈ (0, 1)
u(0) = 0
u(1) = 0
To find an approximate solutions using the MWR first we need to choose the basis functions
Ni (x) in order to compose a trial function U (x).
For homogeneous boundary conditions at x = a and x = b, the general form:
with p and q being positive integers greater than zero, automatically satisfies the boundary
conditions and is continuous in x ∈ (a, b). For a single basis function, the simplest form is
N1 (x) = x(x − 1) so the trial function is given by
U (x) = c1 x(x − 1)
Raul
Durand 6
Finite Example 1
Elements
Then, substituting U (x) into the differential equation yield the residual:
We also need to define a weighting function w1 (x) to perform a weighted integral and obtain
the equation to solve for c1 . Let’s use the weighting functions provided by the methods of
weighted integrals.
Collocation method
In this method we need to provide the points where we want the residual equal to zero. In
this case, since we have only one unknown value and x ∈ (0, 1) let’s choose the midpoint
x = 12 , thus:
R( 21 ) = 0
2c1 − 4( 12 )2 − 1 = 0
Solving this equation leads to c1 = 1. Then, then the approximate solution is given by:
U (x) = x(x − 1)
Raul
Durand 7
Finite Example 1
Elements
Comparison between approximate and real solution using the collocation method
Raul
Durand 8
Finite Example 1
Elements
Weighted residuals functions and error on the approximated solution using the collocation method
Raul
Durand 9
Finite Example 1
Elements
In this case, since the weighting function is equal to a constant, we could choose to integrate
only the residual function.
Solving the last equation we have c1 = 76 , thus the approximate solution is:
U (x) = 76 x(x − 1)
Raul
Durand 10
Finite Example 1
Elements
Comparison between approximate and real solution using the least squares method
Raul
Durand 11
Finite Example 1
Elements
Galerkin method
For the case of the Galerkin method, the weighting function is given by:
w(x) = ∂U
∂c1
= ∂c1 (c1 x(x
∂
− 1))
= x(x − 1)
= N1 (x)
Z 1
x(x − 1)(2c1 − 4x2 − 1) dx = 0
0
11
30 − 13 c1 = 0
U (x) = 11
10 x(x − 1)
Raul
Durand 12
Finite Example 1
Elements
Comparison between approximate and real solution using the Galerkin method
Raul
Durand 13
Finite Example 1
Elements
Weighted residuals functions and error on the approximated solution using the Galerkin method
Raul
Durand 14
Finite Example 2
Elements
Example 2
As a second example consider the boundary value problem:
d2 u
dx2
− du
dx = 0, x ∈ (0, 1)
u(0) = 0
u(1) = 1
Notice that the boundary conditions are not homogeneous. In this case, we can establish an
approximate solution of the form:
n
U (x) = ci Ni (x) + N0 (x)
X
i=1
Let’s consider two basis functions for this example, thus the trial function assumes the
following form:
U (x) = c1 N1 (x) + c2 N2 (x) + N0 (x)
Raul
Durand 15
Finite Example 2
Elements
N1 (x) and N2 (x) should satisfy the homogeneous boundary conditions and N0 (x) is chosen
to satisfy the nonhomogeneous condition. In this case we have:
N1 (x) = x(x − 1)
N2 (x) = x2 (x − 1)
N0 (x) = x
U (x) = c1 x(x − 1) + c2 x2 (x − 1) + x
To find the residual function for the problem, we substitute U (x) into the differential equa-
tion, thus
R(x) = −3c2 x2 + 8c2 x − 2c1 x + 3c1 − 2c2 − 1
Now we need to define the weighting functions to be used. In this case, since we have two
unknown constants, we will need two weighting functions w1 (x) and w2 (x). Let’s chose these
functions according to the weighted residual methods.
Raul
Durand 16
Finite Example 2
Elements
Collocation method
For this method, we choose two points along the domain: x = 1
3 and 23 .
Substituting into the residual expression, for the first point we have
R( 13 ) = 0
7
3 c1 + 31 c2 − 1 = 0
R( 23 ) = 0
5
3 c1 + 2c2 − 1 = 0
Those are the two equation that compose the system of equations for finding c1 and c2 .
Solving the system we obtain c1 = 37
15
and c2 = 37
6
.
Finally, the approximate solution can be written as
U (x) = 6 3
37 x + 9 2
37 x + 22
37 x
Raul
Durand 17
Finite Example 2
Elements
Comparison between approximate and real solution using the collocation method
Raul
Durand 18
Finite Example 2
Elements
Weighted residuals functions and error on the approximated solution using the collocation method
Raul
Durand 19
Finite Example 2
Elements
w1 (x) = ∂R
∂c1
= ∂c1 (−3c2 x
∂ 2
+ 8c2 x − 2c1 x + 3c1 − 2c2 − 1)
= 3 − 2x
w2 (x) = ∂R
∂c2
= ∂c1 (−3c2 x
∂ 2
+ 8c2 x − 2c1 x + 3c1 − 2c2 − 1)
= −3x + 8x − 2
3
Raul
Durand 20
Finite Example 2
Elements
Later we need to evaluate the weighted integrals for each case, thus
Z 1
w1 (x)R(x) dx = 0
0
Z 1
(3 − 2x)(−3c2 x2 + 8c2 x − 2c1 x + 3c1 − 2c2 − 1) dx = 0
0
13
3 c1 + 76 c2 − 2 = 0
Z 1
w2 (x)R(x) dx = 0
0
Z 1
(−3x3 + 8x − 2)(−3c2 x2 + 8c2 x − 2c1 x + 3c1 − 2c2 − 1) dx = 0
0
7
6 c1 + 47
15 c2 −1=0
U (x) = 120 3
733 x + 186 2
733 x + 427
733 x
Raul
Durand 21
Finite Example 2
Elements
Comparison between approximate and real solution using the Least Squares method
Raul
Durand 22
Finite Example 2
Elements
Weighted residuals functions and error on the approximated solution using the Least Squares method
Raul
Durand 23
Finite Example 2
Elements
Galerkin method
In the Galerkin method the weight functions are the same as the basis functions, so
Z 1
w1 (x)R(x) dx = 0
0
Z 1
x(x − 1)(−3c2 x2 + 8c2 x − 2c1 x + 3c1 − 2c2 − 1) dx = 0
0
1
3 c1 − 11
60 c2 + 1
6 =0
Z 1
w2 (x)R(x) dx = 0
0
Z 1
x2 (x − 1)(−3c2 x2 + 8c2 x − 2c1 x + 3c1 − 2c2 − 1) dx = 0
0
3
− 20 c1 − 2
15 c2 + 1
12 =0
Raul
Durand 24
Finite Example 2
Elements
Solving these equations the constants in the trial function are found as c1 = 25
61 and c2 = 61 .
10
U (x) = 10 3
61 x + 15 2
61 x + 36
61 x
Comparison between approximate and real solution using the Galerkin method
Raul
Durand 25
Finite Example 2
Elements
Weighted residuals functions and error on the approximated solution using the Galerkin method
Raul
Durand 26
Finite Exercises
Elements
Exercises
1. Solve the boundary value problem stated below using the three studied methods of
weighted residuals and one basis function.
d2 y
dx2
+ y = 2x, x ∈ (0, 1)
y(0) = 0
y(1) = 0
Compare the results with the analytical solution. Explain why the Galerkin method was
able to match the analytical result.
Raul
Durand 27
Finite Domain subdivision
Elements
Domain subdivision
N1 (x)
To introduce the concept of domain subdivision let’s
consider the following boundary value problem:
d2 U
dx2
+ f (x) = 0 x ∈ (a, b) x1 x2 x3 x4 x
u(a) = ua N2 (x)
u(b) = ub
Raul
Durand 28
Finite Domain subdivision
Elements
Now, we can proceed with the weighted residuals method. Thus, substituting the approxi-
mate solution into the differential equation the residual function is:
n
d2 U
R(x) = + f (x)
X
dx2
i=1
n
d2
= (ui Ni (x)) + f (x)
X
dx2
i=1
Using the Galerkin method, the weighted integrals, for i = 1, ..., 4, are:
Z b
Ni (x)R(x) dx = 0
a
Z b n
d2
Ni (x) (ui Ni (x)) + f (x) dx = 0
X
dx2
a i=1
Raul
Durand 29
Finite Domain subdivision
Elements
For a particular point (node) i we can limit the integral into the subdomains (xi−1 , xi ) and
(xi , xi+1 ), thus
Z xi
d2
Ni (x) dx2
(ui−1 Ni−1 (x) + ui Ni ) + f (x) dx +
xi−1
Z xi+1
d2
Ni (x) dx2
(ui Ni (x) + ui+1 Ni+1 ) + f (x) dx = 0
xi
Considering all nodes, these integrals lead to a system of n equations, so we are able to find
the unknown parameters ui .
Raul
Durand 30
Finite Element formulation
Elements
Element formulation
If we find the exact solution of a differential equation in the domain (a, b), this solution must
satisfy for any subdomain (xi , xi+1 ) ∈ (a, b). Then, to solve a BVP, we can start formulating
the approximate solution for each subdomain instead to formulate a solution for the whole
domain. This introduces the concept of finite element.
For the given subdomain, the boundary conditions are:
Raul
Durand 31
Finite Element formulation
Elements
x1 x2 x
Note that the interpolation functions Ni satisfy the fol-
lowing conditions: Basis functions for a subdomain
N1 (x1 ) = 1 N1 (x2 ) = 0
N2 (x1 ) = 0 N2 (x2 ) = 1
Later, substituting the approximate solution for an element into the differential equation we
have the residual
d2 U
R(e) (x) = dx2
+ f (x)
2
= d
dx2
(u1 N1 (x) + u2 N2 (x)) + f (x)
Raul
Durand 32
Finite Element formulation
Elements
Applying the Galerkin method we will get a set of two equations, for nodes i = 1 and i = 2:
Z x2
Ni (x)R(x) dx = 0
x
Z x2 Z 1x2
2 (
Ni (x) d dx
U e)
2 dx + Ni (x)f (x) dx = 0
x1 x1
or
Z x2 Z x2
dU (e)
dx + u2 dx dx = N1 f (x) dx +
dN1
dx u1 dN 1 dN2
dx x
x x 1
Z x1 2 Z x1 2
dU (e)
dx + u2 dx dx = N2 f (x) dx + dx
dN1
u1 dN 1 dN2
dx x2
x1 x1
Raul
Durand 33
Finite Element formulation
Elements
We can rearrange the terms inside the integrals using matrix-vector notation in order to joint
both equations, thus:
Z x2 ( ) ( ) ( ) Z x2 ( )
N1 N1 u N
dU (e)
d
dx
d
dx · 1 dx = 1
f (x) dx + dx x
x1 N2 N2 u2 x1 N2 1
Introduction a vector U = [U1 U2 ]T and a row matrix N = [N1 N2 ], we can rewrite the
equation above as:
Z x2 Z x2
dNT dN dU (e)
dx dx dx U (e)
= NT f (x) dx + dx x
x1 x1 1
where K is frequently called as the element stiffness matrix and F as the right-hand side
term.
Raul
Durand 34
Finite Example
Elements
Example
As an example, let’s solve the BVP below using two subdomains (elements):
2
x ddxu2 + du
dx −x=0
u(2) = 0
d
dx u(4) =1
By dividing the domain in two, we can define the subdomain (2, 3) for the first element
and the subdomain (3, 4) for the second one. Later, for each element, assuming linear basis
functions and local numbering we have
x2 − x
N1 (x) =
x2 − x1
x − x1
N2 (x) =
x2 − x1
Raul
Durand 35
Finite Example
Elements
Integrating by parts
Z x2 Z x2
x2
Ni x du
dx x1 − x dN i du
dx dx dx − xNi dx = 0
x1 x1
Z x2 Z x2
x2
x dN i du
dx dx dx = Ni x du
dx x1 − xNi dx
x1 x1
Raul
Durand 36
Finite Example
Elements
or
Z x2 x2 Z x2
T dN (e)
x dN dx U (e)
= xNT dUdx − xNT x dx
dx dx x1
x1 x1
Applying this equation for the first element x ∈ (2, 3) we obtain the local system of equations
" # ( (1)) ( )( )
2.5 −2.5 u1 dx |x=2 − 1.167
−2 du dx |x=2 − 1.167
−2 du
−2.5 2.5 (1) = 3 dx |x=3 − 1.333 3 du
dx |x=3 − 1.333
du
u2
Raul
Durand 37
Finite Example
Elements
or
U (1) (x) = −0.333(x − 2)
(
U (x) =
U (2) (x) = −0.333(4 − x) + 0.286(x − 3)
Raul
Durand 38
Finite Example
Elements
Raul
Durand 39
Finite Exercises
Elements
Exercises
1. Solve the following BVP using the Galerkin method and two elements.
d2 u
dx2
−x=0
u(0) = 0
u(3) = 1
2. Solve the problem above using three elements and compare the results with the two
elements solution and the analytical solution.
3. Solve the following BVP using the Galerkin method and two elements.
dx = 6x
d
dx x du
u(1) = 1
du
dx u(2) =2
Raul
Durand 40
Finite Bar element
Elements
Bar element
The Galerkin method can be used to derive the equa-
tions of an element for the one dimensional elastic-
ity problem. The constitutive relation is given by
σx = Eεx . The resulting element is called bar element 1 2
(also rod or truss element). F1 F2
0 L
Essential boundary conditions are axial displacement Bar element forces
at both ends, u1 and u2 . On the other hand, natural
boundary conditions are given by corresponding axial
forces F1 and F2 .
The constitutive model for axial deformation is σx = Eεx , where E is the Young’s modulus.
Also, the strain definition gives εx = du
dx . Thus, the problem differential equation is
2
E d dx
u(x)
2 = 0, x ∈ (0, L)
with L as the element lenght.
The approximate solution is assumed as:
u(x) = u1 N1 (x) + u2 N2 (x)
Raul
Durand 41
Finite Bar element
Elements
Assuming a domain where x ∈ (0, L), the interpolation functions are given by:
N1 (x) = 1 − x
L
N2 (x) = x
L
Since the interpolation functions are linear, it is said that this element has C 0 continuity
functions. That means that there is continuity of displacements between adjacent elements
but there is not continuity of displacement derivatives.
Applying the Galerkin method we get the weighted integral defined over the bar element
volume:
Z
2
Ni (x) E ddxu2 dV = 0 i = 1, 2
V
Z L
2
Ni (x) E ddxu2 A dx = 0 i = 1, 2
0
Raul
Durand 42
Finite Bar element
Elements
The right hand side terms are related with the natural boundary conditions, external forces
in this case.
Writing in matrix form and considering E du
dx = σx and σx A = F we obtain the following
system
Z L " dN1 dN1 dN1 dN2 # ! !
dx dx dx dx u1 F1
AE dx =
0 dN2 dN1 dN2 dN2 u2 F2
dx dx dx dx
Since the interpolation functions are linear, all derivatives are constant. Thus the system
becomes
" # ! !
1 −1 u1 F1
AE
=
L −1 1 u2 F2
This system can be used later to analyze a one dimensional problem where the domain has
been subdivided in several elements. Each element will contribute to mount a global system
of equations.
Raul
Durand 43
Finite Beam element
Elements
Beam element
q(x)
A beam element is intended to be used to estimate de- V1
flections due to flexure. No axial strain is considered. M1 M2
x
0 L
Essentials boundary conditions are displacements and V2
rotations at endpoints. Natural boundary conditions
are given by the distributed force q(x), endpoints mo- dV
= q(x) d2 M
= q(x)
dx dx2
ments ans shear forces.
Beam element forces
The governing equation for beam flexure is the fourth order differential equation
d2 2
dx2
d v
EI dx2 = q(x)
In this case the approximate solution is defined with four interpolation functions
These interpolation functions are known as cubic Hermite polynomials. For this reason, this
element is also called Hermitian beam element. They are C 1 continuity elements since the
first derivative of interpolation functions is continuous between adjacent elements. In other
words, slopes are continuous between elements.
Raul
Durand 44
Finite Beam element
Elements
Hermite interpolation
The Hermite interpolation allows to find an interpolating polynomial that matches an un-
known function at observed values and at the observed values of its first m derivatives.
Assuming x ∈ (0, L), for any deformation state in a
beam element, the interpolation should satisfy: 1
v(0) = v1 , v(L) = v2 N1
0 0
v (0) = θ1 , v (L) = θ2 N3
Raul
Durand 45
Finite Beam element
Elements
Applying the Galerkin method on the residual of the beam differential equation and using
the Hermite interpolation functions, we have:
Z L h i
d2 2
Ni (x) dx2
d v
EI dx2 − q(x) dx = 0 i = 1, 4
0
After integrating by parts twice we arrive to the weak form of the beam element:
Z L Z L L L
d2 Ni d2 v 3 d2 v
EI dx = 3 +
d v
Ni q(x)dx − Ni EI dx dNi
dx EI dx2 0 i = 1, 4
dx2 dx2 0
0 0
After substituting the approximate into this equation, performing the integrations, assuming
q(x) as constant and writing in matrix form we finally obtain:
12 6L −12 6L 6
v1 V1
6L 4L2 −6L 2L2
θ1 M1
L
qL
EI
= +
L3 −12 −6L 12 −6L v2 V2 6
12
account.
Note that in this element shear force and moment distributions are noncontinuous. Also,
they are constant and linear, respectively.
Raul
Durand 46
Finite Exercises
Elements
Exercises
1. Consider a uniaxial member subjected to axial loads where the cross-sectional area
varies according to A = A0 (1 + Lx ) with x ∈ (0, L). Given the governing equation
2
E ddxu2 = 0, determine the Galerkin finite element equations.
2. A 2 m lenght rod fixed at the left end is being pulled at the right end by a force
FA = 2 kN. At the middle of the rod another force FB = 1 kN is also applied and is
pulling to the right. Plot the resulting displacement field for the whole rod. Consider
EA = 2 kN/m for the left half of the rod and EA = 1 kN/m for the other half.
3. A cantilever beam is embedded at the left end and subject to a vertical load q(x) =
−1 kN/m. Plot the resulting deflection field for the beam. Consider EI = 1 kN m2
and L = 1 m.
4. For the last exercise, find the functions for the shear force and moment along the beam
based on the approximate solution for the deflection. Plot both functions together with
the corresponding analytical expressions.
Raul
Durand 47
Finite Bibliography
Elements
Bibliography
1. J.N. Reddy, An Introduction to the Finite Element Method, Third edition, McGraw
Hill, 2005.
2. T.J.R. Hughes, The Finite Element Method, Dover, 2000.
Raul
Durand 48