1. 1
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Numerical Solution of
Boundary Value Problems
Weighted Residual Methods
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Objectives
• In this section we will be introduced to the
general classification of approximate
methods
• Special attention will be paid for the
weighted residual method
• Derivation of a system of linear equations
to approximate the solution of an ODE will
be presented using different techniques
2. 2
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Classification of Approximate
Solutions of D.E.’s
• Discrete Coordinate Method
– Finite difference Methods
– Stepwise integration methods
• Euler method
• Runge-Kutta methods
• Etc…
• Distributed Coordinate Method
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Distributed Coordinate Methods
• Weighted Residual Methods
– Interior Residual
• Collocation
• Galrekin
• Finite Element
– Boundary Residual
• Boundary Element Method
• Stationary Functional Methods
– Reyligh-Ritz methods
– Finite Element method
3. 3
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Basic Concepts
• A linear differential equation may be written in the form:
( )( ) ( )xgxfL =
• Where L(.) is a linear differential operator.
• An approximate solution maybe of the form:
( ) ( )∑=
=
n
i
ii xaxf
1
ψ
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Basic Concepts
• Applying the differential operator on the approximate
solution, you get:
( )( ) ( ) ( ) ( )
( )( ) ( ) 0
1
1
≠−=
−⎟
⎠
⎞
⎜
⎝
⎛
=−
∑
∑
=
=
xgxLa
xgxaLxgxfL
n
i
ii
n
i
ii
ψ
ψ
( )( ) ( ) ( )xRxgxLa
n
i
ii =−∑=1
ψ
Residue
4. 4
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Handling the Residue
• The weighted residual methods are all
based on minimizing the value of the
residue.
• Since the residue can not be zero over the
whole domain, different techniques were
introduced.
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
General Weighted Residual
Method
5. 5
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Objective of WRM
• As any other numerical method, the
objective is to obtain of algebraic
equations, that, when solved, produce a
result with an acceptable accuracy.
• If we are seeking the values of ai that
would reduce the Residue (R(x)) allover
the domain, we may integrate the residue
over the domain and evaluate it!
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Evaluating the Residue
( )( ) ( ) ( )xRxgxLa
n
i
ii =−∑=1
ψ
( )( ) ( )( ) ( )( ) ( ) ( )xRxgxLaxLaxLa nn =−+++ ψψψ ...2211
n unknown variables
( ) ( )( ) ( ) 0
1
=⎟
⎠
⎞
⎜
⎝
⎛
−= ∫ ∑∫ =Domain
n
i
ii
Domain
dxxgxLadxxR ψ
One equation!!!
6. 6
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Using Weighting Functions
• If you can select n different weighting
functions, you will produce n equations!
• You will end up with n equations in n
variables.
( ) ( ) ( ) ( )( ) ( ) 0
1
=⎟
⎠
⎞
⎜
⎝
⎛
−= ∫ ∑∫ =Domain
n
i
iij
Domain
j dxxgxLaxwdxxRxw ψ
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Collocation Method
• The idea behind the collocation method is
similar to that behind the buttons of your
shirt!
• Assume a solution, then force the residue
to be zero at the collocation points
7. 7
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Collocation Method
( ) 0=jxR
( )
( )( ) ( ) 0
1
=−
=
∑=
j
n
i
jii
j
xFxLa
xR
ψ
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example Problem
8. 8
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
The bar tensile problem
( )
0/
00
'
02
2
=⇒=
=⇒=
=+
∂
∂
dxdulx
ux
sBC
xF
x
u
EA
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Bar application
( ) 02
2
=+
∂
∂
xF
x
u
EA
( ) ( )∑=
=
n
i
ii xaxu
1
ψ
( ) ( ) ( )xRxF
dx
xd
aEA
n
i
i
i =+∑=1
2
2
ψ
Applying the collocation method
( ) ( ) 0
1
2
2
=+∑=
j
n
i
ji
i xF
dx
xd
aEA
ψ
9. 9
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
In Matrix Form
( )
( )
( )⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
−=
⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
nnnnnn
n
n
xF
xF
xF
a
a
a
kkk
kkk
kkk
MMMOMM
2
1
2
1
21
22212
12111
...
...
...
Solve the above system for the “generalized
coordinates” ai to get the solution for u(x)
( )
jxx
i
ij
dx
xd
EAk
=
= 2
2
ψ
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Notes on the trial functions
• They should be at least twice
differentiable!
• They should satisfy all boundary
conditions!
• Those are called the “Admissibility
Conditions”.
10. 10
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Using Admissible Functions
• For a constant forcing function, F(x)=f
• The strain at the free end of the bar should
be zero (slope of displacement is zero).
We may use:
( ) ⎟
⎠
⎞
⎜
⎝
⎛
=
l
x
Sinx
2
π
ψ
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Using the function into the DE:
• Since we only have one term in the series,
we will select one collocation point!
• The midpoint is a reasonable choice!
( )
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎠
⎞
⎜
⎝
⎛
−=
l
x
Sin
l
EA
dx
xd
EA
22
2
2
2
ππψ
{ } { }faSin
l
EA −=
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎠
⎞
⎜
⎝
⎛
− 1
2
42
ππ
11. 11
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Solving:
• Then, the approximate
solution for this problem is:
• Which gives the maximum
displacement to be:
• And maximum strain to be:
( ) ( ) EA
fl
EA
fl
SinlEA
f
a
2
2
2
21 57.0
24
42
≈==
πππ
( ) ⎟
⎠
⎞
⎜
⎝
⎛
≈
l
x
Sin
EA
fl
xu
2
57.0
2
π
( ) ( )5.057.0
2
=≈ exact
EA
fl
lu
( ) ( )0.19.00 =≈ exact
EA
lf
ux
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Homework #11
• Solve the beam bending
problem, for beam
displacement, for a
simply supported beam
with a load placed at the
center of the beam using
– Any weighting function
– Collocation Method
• Use three term Sin series
that satisfies all BC’s
• Write a program that
produces the results for
n-term solution.
)(4
4
xF
dx
wd
=
0
)()0(
0)()0(
2
2
2
2
==
==
dx
lwd
dx
wd
lww
12. 12
ENME 602 Spring 2007
Dr. Eng. Mohammad Tawfik
Exact Solution
12/1
10
3
15
7
412
2/10
60
13
12
)(
23
3
<<+−+−=
<<+=
x
xxx
x
xx
xw