0% found this document useful (0 votes)
57 views

2 - Weighted Residual Methods - Annotated Notes 2021

1. The document discusses weighted residual methods for approximating solutions to differential equations. 2. It provides an example of using weighted residual methods to find an approximate solution to a second order differential equation with boundary conditions. 3. Weighted residual methods try to minimize the error between the approximate solution and the exact solution by determining the unknown coefficients in a trial function that is a series solution.

Uploaded by

Luay Almnini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

2 - Weighted Residual Methods - Annotated Notes 2021

1. The document discusses weighted residual methods for approximating solutions to differential equations. 2. It provides an example of using weighted residual methods to find an approximate solution to a second order differential equation with boundary conditions. 3. Weighted residual methods try to minimize the error between the approximate solution and the exact solution by determining the unknown coefficients in a trial function that is a series solution.

Uploaded by

Luay Almnini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

2 WEIGHTED RESIDUAL METHODS

2.1 APPLICATIONS OF DIFFERENTIAL EQUATIONS

Before introducing the weighted residual method, let us consider a 2nd order differential equation
(DE) such as the governing equation for an axial bar problem.

𝑓𝑓(𝑥𝑥): force per unit length


𝐸𝐸, 𝐴𝐴, 𝐿𝐿
𝑓𝑓(𝑥𝑥)𝑑𝑑𝑑𝑑
σΑ (𝜎𝜎 + 𝑑𝑑𝑑𝑑)(𝐴𝐴 + 𝑑𝑑𝑑𝑑)

𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
𝑥𝑥

For horizontal equilibrium:


(𝜎𝜎 + 𝑑𝑑𝑑𝑑)(𝐴𝐴 + 𝑑𝑑𝑑𝑑) + 𝑓𝑓(𝑥𝑥)𝑑𝑑𝑑𝑑 − 𝜎𝜎𝜎𝜎 = 0
𝜎𝜎𝜎𝜎 + 𝜎𝜎𝜎𝜎𝜎𝜎 + 𝐴𝐴𝐴𝐴𝐴𝐴 + ���
𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 + 𝑓𝑓(𝑥𝑥)𝑑𝑑𝑑𝑑 − 𝜎𝜎𝜎𝜎 = 0
0→very small compared to other terms

∴ 𝜎𝜎𝜎𝜎𝜎𝜎 + 𝐴𝐴𝐴𝐴𝐴𝐴 + 𝑓𝑓(𝑥𝑥)𝑑𝑑𝑑𝑑 = 0


𝑑𝑑(𝜎𝜎𝜎𝜎)
+ 𝑓𝑓(𝑥𝑥) = 0
𝑑𝑑𝑑𝑑

Define u as the displacement at any point x along the bar. To arrive at a DE in terms of u, we do
the following.
𝑑𝑑𝑑𝑑
𝜎𝜎 = 𝐸𝐸𝐸𝐸, and 𝜀𝜀 =
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
∴ 𝜎𝜎 = 𝐸𝐸
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
−𝑑𝑑 �𝐸𝐸𝐸𝐸 �
∴ 𝑑𝑑𝑑𝑑 = 𝑓𝑓(𝑥𝑥) 0≤
��
���
𝑥𝑥 ≤
��𝐿𝐿
𝑑𝑑𝑑𝑑 Domain of the bar

Boundary conditions:
@ x = 0, u = 0
→ Essential, or Kinematic or Forced or Dirichlet BC (since it relates to the basic variable u)

𝑑𝑑𝑑𝑑
@ x = L, σ = 0 (stress free), 𝐸𝐸 𝑑𝑑𝑑𝑑 = 0
→ Natural or Force or Neumann BC (since it relates to the derivative of the basic variable u)

Note: This 2nd order DE is applicable only to continuous systems (both geometry and force being
continuous)

[9]
The following tables present different examples of physical phenomena described by differential
equations.

Table 2.1: Some examples of second-order differential equation in one dimension


𝑑𝑑 𝑑𝑑𝑑𝑑
− �𝑎𝑎 � = 𝑓𝑓 for 0 < 𝑥𝑥 < 𝐿𝐿
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
Essential boundary condition: 𝑢𝑢|𝑥𝑥=0 = 𝑑𝑑0 ; natural boundary condition: �𝑎𝑎 𝑑𝑑𝑑𝑑 �� = 𝑔𝑔0
𝑥𝑥=𝐿𝐿

Field Primary a Source term Secondary


variable u f variable g0
1. Axial deformation Longitudinal EA, Friction or contact Axial force
of a bar displacement E = modulus force on surface of
A = cross-section bar
area
2. Transverse Transverse Tension in cable Distributed Axial force
deflection of a deflection transverse load (generally
cable unknown)
3. Heat transfer Temperature Thermal Heat generation Heat flux
along a fin in heat conductivity
exchanger
4. Flow through Hydrostatic 𝜋𝜋𝐷𝐷 4 Flow source Flow rate
,
pipes pressure 128𝜇𝜇 (generally zero)
D = diameter
μ = viscosity
5. Laminar Velocity Viscosity Pressure gradient Axial stress
incompressible
flow through a
channel under
constant pressure
gradient
6. Flow through Fluid head Coefficient of Fluid flux Flow
porous media permeability (seepage)
7. Electrostatics Electrostatic Dielectric Charge density Electric flux
potential constant

[10]
Generalized for higher dimensions, the same format of DE is recognized as the Poisson’s
equation

Table 2.2: Some examples of the Poisson’s equation


−𝛻𝛻 ∙ (𝑘𝑘∇𝑢𝑢) = 𝑄𝑄
𝜕𝜕𝜕𝜕
Natural boundary condition: 𝑘𝑘 𝜕𝜕𝜕𝜕 + ℎ(𝑢𝑢 − 𝑢𝑢∞ ) = 𝑞𝑞, with 𝑛𝑛�⃗ being the unit normal to the
boundary; essential boundary condition: 𝑢𝑢 = 𝑢𝑢�

Field of application Primary Material Source variable Secondary variable


variable u constant k Q 𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕
q,𝜕𝜕𝜕𝜕 , 𝜕𝜕𝜕𝜕
1. Heat transfer Temperature Conductivity k Heat source Q Heat flow q [comes
T from conduction
𝑘𝑘(𝜕𝜕𝜕𝜕⁄𝜕𝜕𝜕𝜕)
and convection
ℎ(𝑇𝑇 − 𝑇𝑇∞ )]
2. Irrotational flow of Stream Density ρ Mass 𝜕𝜕𝜕𝜕
= −𝑣𝑣
𝜕𝜕𝜕𝜕
an ideal fluid function ψ production σ 𝜕𝜕𝜕𝜕
(normally zero) 𝜕𝜕𝜕𝜕
= 𝑢𝑢
Velocity Density ρ Mass 𝜕𝜕𝜕𝜕
= 𝑢𝑢
𝜕𝜕𝜕𝜕
potential ϕ production σ 𝜕𝜕𝜕𝜕
(normally zero) 𝜕𝜕𝜕𝜕
= 𝑣𝑣
3. Ground-water flow Piezometric Permeability Recharge Q (or Seepage q
head ϕ K pumping, ‒ Q) 𝜕𝜕𝜕𝜕
𝑞𝑞 = 𝐾𝐾 𝜕𝜕𝜕𝜕
velocities:
𝜕𝜕𝜕𝜕
𝑢𝑢 = −𝐾𝐾 𝜕𝜕𝜕𝜕
𝜕𝜕𝜕𝜕
𝑣𝑣 = −𝐾𝐾 𝜕𝜕𝜕𝜕
4. Torsion of constant Stress 𝑘𝑘 = 𝐺𝐺1 , 𝑄𝑄 = 2𝜃𝜃 , 𝜕𝜕𝜕𝜕
𝜕𝜕𝜕𝜕
= −𝜏𝜏𝑧𝑧𝑧𝑧
cross-section function ϕ G = Shear θ = Angle of 𝜕𝜕𝜕𝜕
members modulus twist per unit 𝜕𝜕𝜕𝜕
= −𝜏𝜏𝑧𝑧𝑧𝑧
length
5. Electrostatics Scalar Dielectric Charge density Displacement flux
potential ϕ constant ε ρ density Dn
6. Magnetostatics Magnetic Permeability μ Charge density Magnetic flux
potential ϕ ρ density Bn
7. Transverse Transverse Tension in Transversely Normal force q
deflection of elastic deflection u membrane T distributed load
membranes

[11]
2.2 WEIGHTED RESIDUAL METHODS

The Weighted Residual Methods (WRM) are meant to find an approximate solution to a
differential equation (DE). To present the methods, let us consider a Second Order DE and its
Boundary Conditions (BC)
𝑑𝑑 𝑑𝑑𝑑𝑑
DE ⇒ �𝑥𝑥 2 � = 6𝑥𝑥; 1 ≤ 𝑥𝑥 ≤ 2
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
BC ⇒ 𝑦𝑦(1) = 0, 𝑦𝑦(2) = 0

The exact solution to the above DE under the BC’s specified is


𝑦𝑦 = 6�𝑥𝑥 + 3𝑥𝑥 − 9

To solve this problem approximately, we can use any one of the WRM:
1. Collocation Method
2. Sub-domain Method
3. Least Squares Method
4. Galerkin Method (mostly used in FEM)

An approximate solution gives an error which we try to minimize.

Trial function ⇒ let’s try a series solution of the following form,


𝑛𝑛

𝑦𝑦𝑛𝑛 = � 𝑐𝑐𝑖𝑖 𝜑𝜑𝑖𝑖 (𝑥𝑥)


𝑖𝑖=1

where 𝜑𝜑𝑖𝑖 (𝑥𝑥) – Arbitrary function of x (also called trial function),


and ci – unknown coefficients to be determined

Now substitute yn, in the given DE we will find that


𝑑𝑑 𝑑𝑑𝑦𝑦𝑛𝑛
�𝑥𝑥 2 � ≠ 6𝑥𝑥
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

since it is not the exact solution. Therefore, we will end up with a residual function,
𝑑𝑑
𝑅𝑅 = 𝑥𝑥 2 𝑦𝑦𝑛𝑛″ + 2𝑥𝑥𝑦𝑦𝑛𝑛′ − 6𝑥𝑥 ≠ 0 where ( )′ = ( )
𝑑𝑑𝑑𝑑

The objective of all WRM’s is to minimize R.


The trial functions must satisfy all boundary conditions.
Let us try some polynomials.
1st order (linear) polynomials are not suitable since y″ = 0
∴ try
𝜑𝜑1 = (𝑥𝑥 − 1)(𝑥𝑥 − 2)
𝜑𝜑2 = 𝑥𝑥(𝑥𝑥 − 1)(𝑥𝑥 − 2) Both satisfy the BC’s

[12]
2.2.1 COLLOCATION METHOD
In collocation method, we make R = 0 at some pre-selected points in order to find the value of
the unknown coefficients ci.
One term solution:
𝑦𝑦1 = 𝑐𝑐1 𝜑𝜑1
= 𝑐𝑐1 (𝑥𝑥 − 1)(𝑥𝑥 − 2)

𝑦𝑦1 = 𝑐𝑐1 (𝑥𝑥 − 2) + 𝑐𝑐1 (𝑥𝑥 − 1),
𝑦𝑦1″ = 𝑐𝑐1 + 𝑐𝑐1
= 2𝑐𝑐1
∴ 𝑅𝑅1 = 𝑥𝑥 2 𝑦𝑦1″ + 2𝑥𝑥𝑦𝑦1′ − 6𝑥𝑥
= 2𝑐𝑐1 𝑥𝑥 2 + 2𝑥𝑥𝑐𝑐1 (2𝑥𝑥 − 3) − 6𝑥𝑥
= 6𝑐𝑐1 𝑥𝑥 2 − 6𝑥𝑥(𝑐𝑐1 + 1)
Let’s make R1 = 0 @ x = 1.5 (mid-point)
𝑐𝑐1 (1.5)2 − 1.5(𝑐𝑐1 + 1) = 0
0.75𝑐𝑐1 = 1.5
𝑐𝑐1 = 2
∴ 𝑦𝑦1 = 2(𝑥𝑥 − 1)(𝑥𝑥 − 2)

x 1 1.25 1.5 1.75 2


yexact 0 -0.45 -0.50 -0.32 0
y1 0 -0.375 -0.50 -0.38 0

Note: The fact that the approximate and exact solution coincide at the mid-point (x = 1.5) is
purely a coincidence. If our residual was defined as the difference between the exact and
approximate solution (i.e. if=R yexact − y1 ) then we would have expected to get the answers to
coincide by forcing R to vanish at the mid-point. However, our residual is not defined this way
rather it stems from the lack of satisfaction of the differential equation. They are not the same
things!
Two terms solution:
𝑦𝑦2 = 𝑐𝑐1 𝜑𝜑1 + 𝑐𝑐2 𝜑𝜑2
= 𝑐𝑐1 (𝑥𝑥 − 1)(𝑥𝑥 − 2) + 𝑐𝑐2 𝑥𝑥(𝑥𝑥 − 1)(𝑥𝑥 − 2)
= (𝑥𝑥 − 1)(𝑥𝑥 − 2)(𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥)
𝑦𝑦2′ = (𝑥𝑥 − 2)(𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥) + (𝑥𝑥 − 1)(𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥) + 𝑐𝑐2 (𝑥𝑥 − 1)(𝑥𝑥 − 2)
𝑦𝑦2″ = (𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥) + 𝑐𝑐2 (𝑥𝑥 − 2) + �𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥 + 𝑐𝑐2 (𝑥𝑥 − 1) + 𝑐𝑐2 (𝑥𝑥 − 1) + 𝑐𝑐2 (𝑥𝑥 − 2)�
    = 2(𝑐𝑐2 (𝑥𝑥 − 1) + 𝑐𝑐2 (𝑥𝑥 − 2) + 𝑐𝑐1 + 𝑐𝑐2 𝑥𝑥)
 = 2𝑐𝑐1 + 6𝑐𝑐2 𝑥𝑥 − 6𝑐𝑐2
∴ 𝑅𝑅2 = 𝑥𝑥 2 𝑦𝑦2″ + 2𝑥𝑥𝑦𝑦2′ − 6𝑥𝑥

[13]
      = −2𝑥𝑥(3𝑐𝑐1 − 2𝑐𝑐2 − 3𝑐𝑐1 𝑥𝑥 + 9𝑐𝑐2 𝑥𝑥 − 6𝑐𝑐2 𝑥𝑥 2 + 3)
set R2 =0 @ 2 points to find out the two unknowns c1 and c2.
For example, let R2 = 0 @ x = 1.333 and 1.666 (i.e. 1/3rd points).

There will be two equations and two unknowns as follows:


2.667𝑐𝑐1 + 1.778𝑐𝑐2 – 8 = 0
6.667𝑐𝑐1 + 12.22𝑐𝑐2 – 10 = 0
2.67 1.78 𝑐𝑐1 8
� � �𝑐𝑐 � = � � ⇒ 𝑐𝑐1 = 3.8571, 𝑐𝑐2 = −1.2857
6.67 12.2 2 10
x 1 1.25 1.5 1.75 2
yexact 0 -0.45 -0.51 -0.32 0
y2 0 -0.42 -0.48 -0.30 0

2.2.2 SUB-DOMAIN METHOD


In this method, we choose regions within the entire domain and force the integral of the residual
to zero over these regions.

𝑥𝑥2
� 𝑅𝑅𝑅𝑅𝑅𝑅 = 0
𝑥𝑥1

One term solution:


𝑅𝑅 = 𝑥𝑥 2 𝑦𝑦1″ + 2𝑥𝑥𝑦𝑦1′ − 6𝑥𝑥
= 6𝑐𝑐1 𝑥𝑥 2 − 6𝑥𝑥(𝑐𝑐1 + 1)
Choose the whole domain as the region over which the integral of the residual is set to zero:
2 2
� 𝑅𝑅𝑅𝑅𝑅𝑅 = � [6𝑐𝑐1 𝑥𝑥 2 − 6𝑥𝑥(𝑐𝑐1 + 1)] 𝑑𝑑𝑑𝑑 = 0
1 1

5𝑐𝑐1 − 9 = 0 ⇒ 𝑐𝑐1 = 1.8

Two terms solution:


Choose two sub-domains
1st sub-domain ⇒ 1 < x < 1.5
2nd sub-domain ⇒ 1.5 < x < 2

1.5 2
∴ � 𝑅𝑅2 𝑑𝑑𝑑𝑑 = 0 → , � 𝑅𝑅2 𝑑𝑑𝑑𝑑 = 0 → 
1 1.5

1 0.4375 𝑐𝑐1 3.75 𝑐𝑐1 = 4.3761


� �� � = � � ⇒
4 8.5625 𝑐𝑐2 5.25 𝑐𝑐2 = −1.4312

[14]
2.2.3 LEAST SQUARES METHOD
In this method form the integral of the square of the residual over the entire domain and then
minimize it w.r.t. the coefficients (i.e. ci)
𝑅𝑅𝑛𝑛 = 𝑥𝑥 2 𝑦𝑦𝑛𝑛″ + 2𝑥𝑥𝑦𝑦𝑛𝑛′ − 6𝑥𝑥
2
   ∂𝑅𝑅𝑛𝑛
� 𝑅𝑅𝑛𝑛2 𝑑𝑑𝑑𝑑 = 𝑓𝑓(𝑐𝑐1 , 𝑐𝑐2 , 𝑐𝑐3… ) �⎯� � 𝑅𝑅𝑛𝑛 𝑑𝑑𝑑𝑑 = 0
1 ∂𝑐𝑐𝑖𝑖
∂𝑓𝑓
= 0 for 𝑖𝑖 = 1, … , 𝑛𝑛
∂𝑐𝑐𝑖𝑖

So, there will be n equations and n unknowns to be determined.

One term solution:


𝑦𝑦1 = 𝑐𝑐1 𝜑𝜑1
𝑅𝑅1 = 6𝑐𝑐1 𝑥𝑥 2 − 6𝑥𝑥(𝑐𝑐1 + 1)
2

∴ �� 𝑅𝑅12 𝑑𝑑𝑑𝑑� = 0
∂𝑐𝑐1 1
2
∂𝑅𝑅1
� 𝑅𝑅1 =0
1 ∂𝑐𝑐1
74.4𝑐𝑐1 − 102 = 0 ⇒ 𝑐𝑐1 = 1.37

Two terms solution:


𝑦𝑦2 = 𝑐𝑐1 𝜑𝜑1 + 𝑐𝑐2 𝜑𝜑2
2
∂� �� 𝑅𝑅 2 𝑑𝑑𝑑𝑑� = 0
∂𝑐𝑐1 2
1
2
∂𝑅𝑅2
� 𝑅𝑅2 =0→
1 ∂𝑐𝑐1

2
∂� 2
∂𝑐𝑐2 �� 𝑅𝑅2 𝑑𝑑𝑑𝑑� = 0
1
2
∂𝑅𝑅2
� 𝑅𝑅2 =0→
1 ∂𝑐𝑐2

37.2 79 𝑐𝑐1 51 𝑐𝑐 = 3.6571


� � �𝑐𝑐 � = � �⇒ 1
79 177.9 2 97.4 𝑐𝑐2 = −1.0765

Note: the matrix is symmetric ⇒ the advantage is that this reduces the capacity needed to store
the data.

[15]
2.2.4 GALERKIN METHOD
In this method,

� 𝑅𝑅𝜑𝜑𝑖𝑖 𝑑𝑑Ω = 0; 𝑖𝑖 = 1, … , 𝑛𝑛
Ω
Ω = domain

In other words, we force the 2 functions R and φi to be orthogonal.

Consider 2 functions u(x) and v(x)


In general, if ∫Ω 𝑢𝑢𝑢𝑢 𝑑𝑑Ω = 0, then the 2 functions u(x) and v(x) are said to be orthogonal within
the domain Ω.
𝑛𝑛𝑛𝑛𝑛𝑛 𝑚𝑚𝑚𝑚𝑚𝑚
e.g.⋅ 𝑠𝑠𝑠𝑠𝑠𝑠 𝐿𝐿 and 𝑠𝑠𝑠𝑠𝑠𝑠 𝐿𝐿 ⇒ which are the mode shapes of a beam of length L are orthogonal
since
𝐿𝐿 0 𝑛𝑛 ≠ 𝑚𝑚
𝑛𝑛𝑛𝑛𝑛𝑛 𝑚𝑚𝑚𝑚𝑚𝑚
� 𝑠𝑠𝑠𝑠𝑠𝑠 � � 𝑠𝑠𝑠𝑠𝑠𝑠 � � 𝑑𝑑𝑑𝑑 = �𝐿𝐿� 𝑛𝑛 = 𝑚𝑚
0 𝐿𝐿 𝐿𝐿 2

One term solution:


2
� 𝑅𝑅1 𝜑𝜑1 𝑑𝑑𝑑𝑑 = 0
1
2
� [𝑐𝑐1 (6𝑥𝑥 2 − 6𝑥𝑥) − 6𝑥𝑥](𝑥𝑥 − 1)(𝑥𝑥 − 2) 𝑑𝑑𝑑𝑑 = 0
1

0.8𝑐𝑐1 + 1.5 = 0 ⇒ 𝑐𝑐1 = 1.875

Two terms solution:


2 symmetry
� 𝑅𝑅2 𝜑𝜑1 𝑑𝑑𝑑𝑑 = 0⎫
⎪ −0.8 −1.3 𝑐𝑐1
1 −1.5
2 � � �𝑐𝑐 � = � �
⎬ −1.3 −2.22 2 −2.3
� 𝑅𝑅2 𝜑𝜑2 𝑑𝑑𝑑𝑑 = 0⎪
1 ⎭
𝑐𝑐1 = 3.9535, 𝑐𝑐2 = −1.2791

[16]

You might also like