What are weighted residual methods?
How to apply Galerkin Method to the finite element model?
#WikiCourses #Num001
https://wikicourses.wikispaces.com/TopicX+Approximate+Methods+-+Weighted+Residual+Methods
2. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
5. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
6. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
7. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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.
9. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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!
10. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Evaluating the Residue
xRxgxLa
n
i
ii 1
xRxgxLaxLaxLa nn ...2211
n unknown variables
0
1
Domain
n
i
ii
Domain
dxxgxLadxxR
One equation!!!
11. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
12. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
15. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
The bar tensile problem
0/
00
'
02
2
dxdulx
ux
sBC
xF
x
u
EA
16. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
17. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
In Matrix Form
nnnnnn
n
n
xF
xF
xF
a
a
a
kkk
kkk
kkk
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
18. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Notes on the trial functions
• They should be at least twice
differentiable!
• They should satisfy all boundary
conditions!
• Those are called the “Admissibility
Conditions”.
19. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
20. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
21. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
22. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
The Subdomain Method
• The idea behind the
subdomain method is
to force the integral
of the residue to be
equal to zero on a
subinterval of the
domain
23. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
The Subdomain Method
0
1
j
j
x
x
dxxR
0
11
1
j
j
j
j
x
x
n
i
x
x
ii dxxgdxxLa
24. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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 subdomain method
11
1
2
2 j
j
j
j
x
x
n
i
x
x
i
i dxxFdx
dx
xd
aEA
25. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
In Matrix Form
11
2
2 j
j
j
j
x
x
i
x
x
i
dxxFadx
dx
xd
EA
Solve the above system for the “generalized
coordinates” ai to get the solution for u(x)
26. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
27. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Using the function into the DE:
• Since we only have one term in the series,
we will select one subdomain!
l
x
Sin
l
EA
dx
xd
EA
22
2
2
2
ll
fdxadx
l
x
Sin
l
EA
0
1
0
2
22
28. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
lEA
fl
a
22
1 637.0
2
2
l
x
Sin
EA
fl
xu
2
637.0
2
5.0637.0
2
exact
EA
fl
lu
0.10.10 exact
EA
lf
ux
fla
l
x
Cos
l
EA
l
1
0
22
29. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
The Galerkin Method
• Galerkin suggested that the residue
should be multiplied by a weighting
function that is a part of the suggested
solution then the integration is performed
over the whole domain!!!
• Actually, it turned out to be a VERY
GOOD idea
31. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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 Galerkin method
Domain
j
n
i Domain
i
ji dxxFxdx
dx
xd
xaEA
1
2
2
32. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
In Matrix Form
Domain
ji
Domain
i
j dxxFxadx
dx
xd
xEA
2
2
Solve the above system for the “generalized
coordinates” ai to get the solution for u(x)
33. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Same conditions on the functions
are applied
• They should be at least twice
differentiable!
• They should satisfy all boundary
conditions!
• Let’s use the same function as in the
collocation method:
l
x
Sinx
2
34. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Substituting with the approximate
solution:
Domain
j
n
i Domain
i
ji dxxFxdx
dx
xd
xaEA
1
2
2
l
l
fdx
l
x
Sin
dx
l
x
Sin
l
x
Sina
l
EA
0
0
1
2
2
222
ll
a
l
EA
2
22
1
2
EA
fll
EA
f
a
2
3
2
1 52.0
16
35. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Substituting with the approximate
solution: (Int. by Parts)
Domain
j
n
i Domain
i
ji dxxFxdx
dx
xd
xaEA
1
2
2
ll
a
l
EA
2
22
1
2
EA
fll
EA
f
a
2
3
2
1 52.0
16
Domain
ij
l
i
j
Domain
i
j
dx
dx
xd
dx
xd
dx
xd
x
dx
dx
xd
x
0
2
2
Zero!
36. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
What did we gain?
• The functions are required to be less
differentiable
• Not all boundary conditions need to be
satisfied
• The matrix became symmetric!
37. Weighted Residual Methods
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Summary
• We may solve differential equations using a
series of functions with different weights.
• When those functions are used, Residue
appears in the differential equation
• The weights of the functions may be determined
to minimize the residue by different techniques
• One very important technique is the Galerkin
method.