0% found this document useful (0 votes)
227 views36 pages

7.weighted Residual Methods Galerkin - English - 2022

The document discusses the weighted residual method for approximating solutions to systems of differential equations. It introduces the method and explains: 1) An approximate solution is found that satisfies boundary conditions but not the differential equation exactly, resulting in a residual. 2) The Galerkin method is used to minimize the residual by choosing trial functions and weighting the residual integration. 3) This results in a system of equations that can be solved for the coefficients of the approximate solution as a linear combination of trial functions. 4) Examples are provided to demonstrate applying the Galerkin method to simple problems and the effect of trial function selection on solution accuracy.

Uploaded by

Pavlos Yioukkas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
227 views36 pages

7.weighted Residual Methods Galerkin - English - 2022

The document discusses the weighted residual method for approximating solutions to systems of differential equations. It introduces the method and explains: 1) An approximate solution is found that satisfies boundary conditions but not the differential equation exactly, resulting in a residual. 2) The Galerkin method is used to minimize the residual by choosing trial functions and weighting the residual integration. 3) This results in a system of equations that can be solved for the coefficients of the approximate solution as a linear combination of trial functions. 4) Examples are provided to demonstrate applying the Galerkin method to simple problems and the effect of trial function selection on solution accuracy.

Uploaded by

Pavlos Yioukkas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

FINETE ELEMENT METHOD IN

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)

– Essential (Ουσιώδης) boundary conditions: values of the solution at


specific points (η τιμή της λύσης (μετατόπιση) σε συγκεκριμένο σημείο)
– Natural (Φυσικές) boundary conditions: value of the differentiation is
known in a specific location (stress BC)
– Exact solution u(x): at least two times differentiable
– In general the exact solution is difficult to be found (or may not exist)
when the field and the boundary conditions are complex

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 (Υπόλοιπο):

– The objective is to minimize the residual (υπόλοιπο) using a


weighting parameter W and integrating the field.
(7.3)

Then R(x) approaches zero, and the approximate solution will


converge the exact.
– Depending the choice of W(x) we have the following methods: least
square error, collocation, Petrov-Galerkin, and Galerkin
4
Weighted residual method – Exact and approximate
solution of differential equations
• Approximate solution as a linear combination of trial functions
(συναρτήσεων δοκιμής)
𝑁
(7.4)
𝑢෤ 𝑥 = ෍ c𝑖φ𝑖(𝑥) Trial function
𝑛=1
ci = συντελεστές προς υπολογισμό

– The accuracy depends on the choice of the trial functions


– The approximate solution will have to satisfy the essential boundary
conditions (π.χ. 𝑢(0)
෤ = 0).
• Galerkin Method
– Use of N trial functions as weighting functions
1
(7.5)
න R(x)φ𝑖(𝑥)dx =0, i=1, … , N
0
1
𝜕2𝑢෤ (7.6)
න 2
+ 𝑝(𝑥) φ𝑖(𝑥)dx =0, i=1, … , N
0 𝜕𝑥
1 2 1
𝜕 𝑢෤
න φ𝑖 (𝑥)dx =− න 𝑝(𝑥)φ𝑖(𝑥)dx , i=1, … , N (7.7)
0 𝜕𝑥2 0
5
Weighted residual method – Exact and approximate
solution of differential equations
• Galerkin
– Integration by parts: u=u(φ(x)).

1 1
𝑑 𝑢෤ 𝑑 𝑢෤ 𝑑φ𝑖
φ𝑖ቤ 1 − න 𝑑𝑥 𝑑𝑥 dx =− න 𝑝(𝑥)φ𝑖(𝑥)dx , i=1, … , N (7.8)
𝑑𝑥 0 0 0

– Application of limits and reformulation:


1 1
𝑑φ𝑖 𝑑 𝑢෤ 𝑑𝑢 1 𝑑𝑢 0
න dx = න 𝑝(𝑥)φ𝑖(𝑥)dx + φ 1 − φ 0 , i=1, … , N (7.9)
0 𝑑𝑥 𝑑𝑥 0 𝑑𝑥 𝑑𝑥
– The same degree of differentiation for the trial functions and the
approx. solution.
– Substituting the approximate solution (εξ. 7.4):
1 𝑁 1
𝑑φ𝑖 𝑑φ𝑗 𝑑𝑢 1 𝑑𝑢 0
න ෍ c𝑗 dx = න 𝑝(𝑥)φ𝑖(𝑥)dx + φ 1 − φ 0 , i=1, … , N
0 𝑑𝑥 𝑑𝑥
𝑗=1 0 𝑑𝑥 𝑑𝑥
Note: - Boundary conditions in eq. 7.1, du(1)/dx=1
(7.10)
- j=1, …. N 6
Weighted residual method – Exact and approximate
solution of differential equations – Galerkin method
• Galerkin method cont.
– In short form:
𝑁

෍ K𝑖𝑗c𝑖𝑗 = F𝑖, i=1, … , N [K] {c} = {F} (7.11)


(N´ N )(N´ 1) (N´ 1)
𝑗=1
1
𝑑φ𝑖 𝑑φ𝑗
K𝑖𝑗 = න dx (7.12)
0 𝑑𝑥 𝑑𝑥
1
𝑑𝑢 1 𝑑𝑢 0
F𝑖 = න 𝑝(𝑥)φ𝑖(𝑥)dx + φ 1 − φ 0 , (7.13)
0 𝑑𝑥 𝑑𝑥
– The matrix of coefficients is symmetric: Kij = Kji
– N equations in N unknowns.

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

• The exact solution (satisfies essential conds.):


2

𝑢(𝑥)
෤ = ෍ 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}:

c1=2 and c2=-1/2

• Approximate solution:

– The approximate solution is exact because the linear combination of


the trial functions can represent the exact solution.

9
Weighted residual method – Exact and approximate solution of differential
equations – Galerkin method – Example 7.2: 2nd order differential equations.

• Differential equation with p(x)=x Trial functions


𝜑1(𝑥) =x 𝜑′1(𝑥) = 1
𝜑2(𝑥) =x2 𝜑 ′ 2(𝑥) = 2x

16
• Coefficient matrix is the same, F changes: {𝐹} = 1/12
15

{c}=[K]-1{F} , c1=19/12 και c2=-1/4


𝑢෤ =19/12 x - x2/4
• Exact solution
3 x3
u( x ) = x -
2 6

– The trial functions do not represent the exact solution.


10
Weighted residual method – Exact and approximate solution of differential
equations – Galerkin method – Example 7.2: 2nd order differential equations.
• The approximation is good for u(x), but not 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

u-exact u-approx. du/dx (exact) du/dx (approx.)

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

• Types of finite elements

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:

– The coefficients a0 and a1, are expressed as functions of u(xi) και


u(xi+1).

19
Weighted residual method – Galerkin method – Trial functions

– Replacing the functions for the node displacements:

7.14

– a0 and a1 are expressed in terms of ui and ui+1 and the solution is


approximated as:

7.15

– The solution for the i-th element:

7.16

– Ni(x) and Ni+1(x): Shape functions (Συναρτήσεις μορφής) a𝐧𝐝 𝑢෤ the


displacement interpolation (παρεμβολή μετατόπισης)

20
Weighted residual method – Galerkin method – Trial functions

• Observations regarding the shape functions


– The solution u(x) is interpolated between 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 with discrete polynomials and therefore
the gradient is constant within the elements.
u ui+2 du
ui dx
ui+1

xi xi+1 xi+2 xi xi+1 xi+2

– The mean values of the strains and stresses can be evaluated at the
nodes.
21
Weighted residual method – Galerkin method

• Relationships between interpolations and trial functions.


– 1D problem with linear interpolation

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:

• 3 nodes at x = 0, 0.5, 1.0; Displacement at nodes = u1, u2, u3

• 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.

• Differentiation of the interpolation functions:

• Coefficient matrix:

• Right hand side of the equation – Vector {F}:

24
Weighted residual method – Galerkin method – Example 7.4.

• System equations

• Eliminating 1η row and 1η column:

• Solution: for u2 = 0.875, u3 = 1.5


• Approximate solution:

– Piecewise linear solution


25
Weighted residual method – Galerkin method – Example 7.4.

• Solution comparison 1.6

• The approximate has ~ 8% 1.2


error.

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

exact are 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
Weighted residual method – Galerkin method – Procedure in FEM

• The Galerkin method needs further formulation for use in the


computational methods of the FEM.
• Application of the Galerkin method in an element (e)
• Introduction of the local coordinate system:
𝑥 − 𝑥𝑖 𝑥 − 𝑥𝑖
𝑥 = 𝑥𝑖 (1 − 𝜉) + 𝑥𝑗 𝜉 𝜉= = (𝑒)
𝑥𝑗 − 𝑥𝑖 𝐿
• Approximate solution within the element:

27
Weighted residual method – Galerkin method – Procedure in FEM

• Interpolation properties:

• Differentiations in the approximate solutions:

• Application of the Galerkin method at the element level (see


eq. 7.9), two equations are extracted:

28
Weighted residual method – Galerkin method – Procedure in FEM

• Change of variable from x to x

– No approximations for the boundary conditions terms.


• Element equations

29
Weighted residual method – Galerkin method – Procedure in FEM

• Formulation of the equations for all elements


• For elements 1 and 2 (connected at node 2):

• Assembly:

30
Weighted residual method – Galerkin method – Procedure in FEM

• Assembly for NE elements (ND = NE + 1)

• The coefficient matrix [K] is singular: it will be converted to


non-singular after the application of the boundary conditions.

31
Weighted residual method – Galerkin method – Procedure in FEM
– Example 7.5.
• System with 3 elements of same length.

• All elements have the same coefficient matrix.

• Change of variable p(x) = x to p(x):


• Vector {f}

32
Weighted residual method – Galerkin method – Procedure in FEM
– Example 7.5.

Assembly of system equations

Application of boundary conditions


Delete row-columns

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

• Exact solution: 0 0.2 0.4


x
0.6 0.8 1

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 για να λύσετε το παρακάτω πρόβλημα με α) προσέγγιση
ενός και β) δύο όρων. Συγκρίνετε το αποτέλεσμα με αυτό της αναλυτικής λύσης με τον
σχεδιασμό γραφήματος των δύο λύσεων.

Boundary conditions (Συνοριακές συνθήκες)

The approximation is divided in to


two parts. The first satisfies the
Use the approximations below:
essential BCs exactly (i.e. U(0)=1
and u(1)=0). The rest of the solution
1 term is included in the unknowns and
eliminated.
Η προσέγγιση είναι χωρισμένη σε
2 terms δύο μέρη. Το πρώτο μέρος
ικανοποιεί τις ουσιώδεις συν. συνθ.
ακριβώς (δηλ. U(0)=1 και u(1)=0). H
υπόλοιπη λύση περιέχει τους
Exact solution
αγνώστους και διαγράφεται. 35
Weighted residual method – Galerkin method

Problem 7.2
The problem of the beam under bending is expressed as follows:

When a uniformly distributed load is applied (p(x)=p0) calculate the bending


(deflection) (assume 𝑤(𝑥)
෥ = 𝑐𝜑 𝜒 = 𝑐𝑥2 1 − 𝑥 2) with the Galerkin method.

Όταν ένα ομοιόμορφα κατανεμημένο φορτίο εφαρμόζεται (p(x)=p0),


υπολογίστε την λύγιση (υποθέστε 𝑤(𝑥)
෥ = 𝑐𝜑 𝜒 = 𝑐𝑥2 1 − 𝑥 2) με τη μέθοδο
Galerkin.

36

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy