7.weighted Residual Methods Galerkin - English - 2022
7.weighted Residual Methods Galerkin - English - 2022
ENGINEERING DESIGN
ΜΜΥ416
7. Approximate solution for systems of
differential equations: the weighted
residual method
Προσεγγιστική λύση συστημάτων
διαφορικών εξισώσεων: Μέθοδος
σταθμισμένων υπολοίπων
1
Weighted residual method – Μέθοδος σταθμισμένων
υπολοίπων - Introduction
• The direct method, the principle of virtual work, and the
energy methods are used in FEM for both simple and more
complex problems.
• FEM is used in engineering problems which are expressed
from differential equations (deformations, heat transfer, fluid
flow, etc.)
• In the Weighted Residual Method a systematic approach is
used for the formulation of the system equations.
• The differential equations of the system are formulated and
solved using the Galerkin method.
2
Weighted residual method – Exact and approximate
solution of differential equations
• Exact solution of differential equations
– Boundary value problem: differential equation + boundary conditions
– Displacement in uniaxial bar charged by a distributed force p(x)
(7.1)
3
Weighted residual method – Exact and approximate
solution of differential equations
• Approximate solution
– Satisfies the essential (ουσιώδεις) boundary conditions but not the
natural (φυσικές)
– The approximate solution does not satisfy the differential equation
exactly
(7.2)
– Residual (Υπόλοιπο):
1 1
𝑑 𝑢 𝑑 𝑢 𝑑φ𝑖
φ𝑖ቤ 1 − න 𝑑𝑥 𝑑𝑥 dx =− න 𝑝(𝑥)φ𝑖(𝑥)dx , i=1, … , N (7.8)
𝑑𝑥 0 0 0
7
Weighted residual method – Exact and approximate solution of
differential equations – Galerkin method – Example 7.1
• Differential equation with p(x)=1. Trial functions:
𝜑1(𝑥) =x 𝜑′1(𝑥) = 1
𝜑2(𝑥) =x2 𝜑 ′ 2(𝑥) = 2x
𝑢(𝑥)
= c𝑖φ𝑖 (𝑥) = c1𝑥 + c2𝑥2
𝑗=1
• Coefficient matrix and vector F:
1
K11 = න (φ′1)2dx = 1
0
1
K12 = K21 = න (φ′1φ′2)dx = 1
0
1
K22 = න (φ′2)2dx = 4/3
0 8
Weighted residual method – Exact and approximate solution of
differential equations – Galerkin method – Example 7.1
• Matrix [Κ] and vector {F}
3 3 9
𝐾 = 1/3 {𝐹} = 1/6
3 4 8
• Solving in terms of {c}:
• Approximate solution:
9
Weighted residual method – Exact and approximate solution of differential
equations – Galerkin method – Example 7.2: 2nd order differential equations.
16
• Coefficient matrix is the same, F changes: {𝐹} = 1/12
15
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
Weighted residual method – Galerkin method – Higher order differential
equations.
• 4th degree differential equation:
d 4w
4
- p( x ) = 0, 0£ x£ L
dx
– Beam bending under pressure charge
• Approximate solution
𝑁
𝑤
= c𝑖φ𝑖 (𝑥)
𝑗=1
• Weighted residual equation (Galerkin method)
1
𝑑4𝑤
න − 𝑝(𝑥) φ𝑖(𝑥)dx=0 , i=1, … , N
0 𝑑𝑥4
– Reformulating the equation for the reduction of the degree of
differentiation and using integration by parts.
12
Weighted residual method – Galerkin method – Higher order differential
equations.
𝐿 2 2𝜑 𝐿
𝑑3𝑤
𝑑 2𝑤
𝑑 2𝜑 𝑑 𝑤 𝑑 𝑖
φ ቤL−
𝑖 𝐿+න
ቤ 2 2
dx = න 𝑝(𝑥)φ𝑖(𝑥)dx , i=1, … , N
0 𝑑𝑥 𝑑𝑥
𝑖
𝑑𝑥3 0 𝑑𝑥2 𝑑𝑥2 0 0
𝐿
𝑑2 𝑤
𝑑2𝜑𝑖 𝐿
𝑑3 𝑤
𝑑 2𝑤
𝑑𝜑𝑖 𝐿
න dx = න 𝑝 𝑥 φ dx − φ ቤ L+ ቤ , i=1, … , N
2
0 𝑑𝑥 𝑑𝑥
2 𝑖 𝑥 𝑑𝑥3 𝑖
𝑑𝑥2 𝑑𝑥 0
0 0
• Replacement for 𝑤
(not for the terms of the BCs):
𝐿 𝑁
𝑑2𝜑𝑗 𝑑2𝜑𝑖 𝐿
𝑑3𝑤
𝑑 2𝑤
𝑑𝜑𝑖 𝐿
න c𝑗 2 2
dx = න 𝑝 𝑥 φ 𝑥 dx − φ ቤ L+ ቤ , i=1, … , N
0 𝑗=1 𝑑𝑥 𝑑𝑥 𝑖
𝑑𝑥 3 𝑖
0
2
𝑑𝑥 𝑑𝑥 0
0
𝐿
𝑑2𝜑𝑗 𝑑2𝜑𝑖
[Κij] = න dx
• Matrix form: 0 𝑑𝑥 2 𝑑𝑥2
𝐿
[K] {c} = {F} 𝑑3 𝑤
𝑑2𝑤
𝑑𝜑𝑖 𝐿
𝐹 = න 𝑝 𝑥 φ𝑖 𝑥 dx − 3 φ𝑖 ቤ L + ቤ
N´ N N´ 1 N´ 1 𝑑𝑥 2
𝑑𝑥 𝑑𝑥 0
0 0
13
Weighted residual method – Galerkin method – Higher order differential
equations.– Example 7.3: 4th degree deferential equation.
• 4th degree deferential equation dw
w (0) = 0 (0) = 0
dx
d 2w d 3w B.Cs
(1) = 2 (1) = - 1
• Use 2 trial functions. dx 2
dx 3
• Matrix of coefficients:
14
Weighted residual method – Galerkin method – Higher order differential
equations.– Example 7.3: 4th degree deferential equation.
• Vector F:
• Approximate solution:
• Exact solution:
1 4 1 3 7 2
w(x) = x - x + x
24 3 4
15
Weighted residual method – Galerkin method – Higher order differential
equations.– Example 7.3: 4th degree deferential equation.
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
Weighted residual method – Galerkin method – Discretisation
• Field discritazation
– In the weigthed residual method it is not easy to define the trial
functions, which will satisfy the essential boundary conditions.
– In the FEM the field is divided in a number of subfields with common
nodes.
– Within the sub-fields the solution is approximated with simple
polynomials.
u(x)
Προσεγγιστική
λύση
x
Πεπερασμένα Αναλυτική
στοιχεία λύση
– When enough finite elements are used the approximate solution can
converge to the analytical solution.
17
Weighted residual method – Galerkin method – Discretisation
1D 2D 3D
• After the discretization of the field in finite elements the
integrals for the matrices [Κ] and {F} are performed in each
element. For example if the field is divided in 10 parts the
integral will be formulated including 10 parts:
18
Weighted residual method – Galerkin method – Trial functions
– The solution within the element is approximated with polynomials.
1 2 n−1 n
1 2 3 n−1 n n+1
xi xi+1
li
– The ith element is defined by two nodes: xi and xi+1. Since the
unknowns are two linear functions the following can be used:
19
Weighted residual method – Galerkin method – Trial functions
7.14
7.15
7.16
20
Weighted residual method – Galerkin method – Trial functions
xi xi+1
– The solution is approximated with discrete polynomials and therefore
the gradient is constant within the elements.
u ui+2 du
ui dx
ui+1
– The mean values of the strains and stresses can be evaluated at the
nodes.
21
Weighted residual method – Galerkin method
7.17
– Difference: The interpolation does not exist in all the field but only at
the elements that are connected at the node.
• Differentiation of φi(x):
22
Weighted residual method – Galerkin method – Example 7.4.
• Solution for two elements of same length:
• Approximate solution:
7.17
f_1
f 0.5 f_2
f_3
0
0 0.5 1
x
23
Weighted residual method – Galerkin method – Example 7.4.
• Coefficient matrix:
24
Weighted residual method – Galerkin method – Example 7.4.
• System equations
u(x)
0.8
• The derivatives have lerger
differences. 0.4
u-exact
u-approx.
• The approximate solutions 0
are constant, whereas the 0 0.2 0.4 x 0.6 0.8 1
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
Weighted residual method – Galerkin method – Procedure in FEM
27
Weighted residual method – Galerkin method – Procedure in FEM
• Interpolation properties:
28
Weighted residual method – Galerkin method – Procedure in FEM
29
Weighted residual method – Galerkin method – Procedure in FEM
• Assembly:
30
Weighted residual method – Galerkin method – Procedure in FEM
31
Weighted residual method – Galerkin method – Procedure in FEM
– Example 7.5.
• System with 3 elements of same length.
32
Weighted residual method – Galerkin method – Procedure in FEM
– Example 7.5.
33
Weighted residual method – Galerkin method – Procedure in FEM
– Example 7.5.
• Approximate solution:
0.08
u-approx.
u-exact
0.06
u(x)
0.04
0.02
1
u( x ) = x (1 - x 2 )
6
– Therefore, 3 elements are not enough.
– More elements needed.
34
Weighted residual method – Galerkin method
Problem 7.1
Use the Galerkin method to solve the problem below with a) approximation of 1 term, and b) 2
terms. Compare the solution with this of the exact solution by creating graphs for the two
solutions.
Χρησιμοποιήστε τη μέθοδο Galerkin για να λύσετε το παρακάτω πρόβλημα με α) προσέγγιση
ενός και β) δύο όρων. Συγκρίνετε το αποτέλεσμα με αυτό της αναλυτικής λύσης με τον
σχεδιασμό γραφήματος των δύο λύσεων.
Problem 7.2
The problem of the beam under bending is expressed as follows:
36