Professional Documents
Culture Documents
Aerospace Computational Mechanics: The Method of Weighted Residuals
Aerospace Computational Mechanics: The Method of Weighted Residuals
Lecture 28
Problems with the Finite Difference Approach
2
An Industrial Example – Tube bundle heat exchanger
3
An Industrial Example
4
A real world example – Weather prediction
• Meteorolgy predictions
require very large domains.
5
A real world example – Weather prediction
• When adding a
landmass, the
mesh used is not
only very large,
but also very
complex.
6
Examples in Industry
7
The Method of Weighted Residuals (MWR)
∂Q ∂2Q
= 2
∂t ∂x
has been rewritten in finite difference format as:
Q n+1
j − Q n
j Q n
− 2Q n
+ Q n
= j−1 j j+1
Δt Δx 2
8
The Method of Weighted Residuals
∂Q ∂2Q
= 2
∂t ∂x
Using MWR, the following approximate solution is written:
N
Q = ∑ a j (t) φ j (x)
j=1
Where:
• aj are unknown coefficients and
• φj are known analytic functions
9
The Method of Weighted Residuals
N
Q = ∑ a j (t) φ j (x)
j=1
k=−∞
• In general:
11
General Formulation
∂Q ∂2Q ∂Q ∂2Q
=κ 2 OR L(Q) = −κ 2 = 0
∂t ∂x ∂t ∂x
The area
highlighted in
blue is the
residual
Here the red line is the 'real' answer. The blue dashed line is the
approximate solution.
The area
highlighted in
blue is the
residual
Here the red line is the 'real' answer. The blue dashed line is the
approximate solution.
L(Q) ⇒ 0
∫ W (x) R(x)dx = 0
m (1-D problem) OR
∫W m (x) L(Q)dx = 0
∂Q ∂2Q
L(Q) = −κ 2
∂t ∂x
17
General Formulation
• Subdomain method
• Collocation method
• Least-Squares method
• Galerkin method
18
Different Techniques - Subdomain method
Wm = 1 inside subdomain Dm
Wm= 0 outside Dm
19
Different Techniques - Subdomain method
20
Different Techniques - Collocation method
Wm (x, y) = δ ( r − rm ) r =(x,y)
21
Different Techniques - Collocation method
T1 T2 T3
The collocation method
is equivalent to the finite T4 T5 T6
difference method.
T7 T8 T9
22
Different Techniques – The Galerkin method
24
Summary: The Method of Weighted Residuals
Lecture 28
Application to an Ordinary Differential Equation
dq
−q = 0 for 0 ≤ x ≤ 1
dx
We will set a boundary condition q =1 at x = 0
x
q(x) = e
N
q(x) = q0 (x) + ∑ a jφ j (x)
j=1
j
• Here we choose: φ j (x) = x
and note that φj(0) = 0
28
Application to an Ordinary Differential Equation
N
q(x) = 1+ ∑ a j x j
j=1
• This form of the solution naturally satisfies the boundary
conditions. That is, q = 1 at x = 0,
dq
−q = R
dx
• Here, I have a derivative term, this may be determined as:
dq N
= ∑ a j j x j−1
dx j=1
29
Application to an Ordinary Differential Equation
N
R = −1+ ∑ a j ( j x j−1 − x j )
j=1
30
Application to an Ordinary Differential Equation
N
R = −1+ ∑ a j ( j x j−1 − x j )
j=1
∫W m (x) R(x)dx = 0
x=0
Wm (x) = φ m (x) = x m
• What does the subscript m imply?
33
Application to an Ordinary Differential Equation
1 # N &
∫ Wm (x)%%−1+ ∑ a j ( j x − x )(( dx = 0
j−1 j
1 #% N '
m+ j %
∫ $%−x + ∑ a j ( j x − x )(% dx = 0
m m+ j−1
• Or:
N
−1 " j 1 %
+ ∑aj $ − '=0
m +1 j=1 # m + j m + j +1 &
for 1 ≤ m ≤ N (i.e., we have N equations)
35
Application to an Ordinary Differential Equation
N
−1 " j 1 %
+ ∑aj $ − '=0
m +1 j=1 # m + j m + j +1 &
N
−1 " j 1 %
+ ∑aj $ − '=0
m +1 j=1 # m + j m + j +1 &
[C] [ A ] = [ D]
• Where C is a matrix ⎛ j 1 ⎞
Cm , j = ⎜⎜ − ⎟⎟
⎝ m + j m + j + 1 ⎠
1
D is a column vector Dm =
m +1
[C] [ A ] = [ D]
• Thus:
−1
[ A ] = [C] [ D]
38
Application to an Ordinary Differential Equation
N
• An example: −1 " j 1 %
+ ∑aj $ − '=0
m +1 j=1 # m + j m + j +1 &
Let N = 3. Determine the coefficients aj and hence the approximate
solution the ODE
⎡ 1 / 6 5 / 12 11 / 20 ⎤ ⎡ a1 ⎤ ⎡1 / 2⎤
⎢1 / 12 3 / 10 13 / 30⎥ ⎢a ⎥ = ⎢1 / 3⎥
⎢ ⎥ ⎢ 2 ⎥ ⎢ ⎥
⎢⎣1 / 20 7 / 30 5 / 14 ⎥⎦ ⎢⎣ a3 ⎥⎦ ⎢⎣1 / 4⎥⎦
2.5
• Compare to the 2
actual solution
q(x) = e x 1.5
42