ICMM TGZielinski WRM - Paper
ICMM TGZielinski WRM - Paper
ICMM TGZielinski WRM - Paper
s=1
U
s
s
(x) (6)
where u is an approximated solution, and
U
s
are unknown coefcients, the so-called degrees of freedom,
s
=
s
(x) form a base set of selected functions (often called as trial functions
or shape functions). This set of functions generates the space of approximated
solutions.
Here, s =1, . . . N where N is the number of degrees of freedom.
2.3 Error functions
In general, an approximated solution, u, does not satisfy exactly the PDE and/or some (or
all) boundary conditions. The generated errors can be described by the following error
functions:
0. the PDE residuum
R
0
( u) =L( u) f , (7)
(ICMM Lecture) Weighted Residual Method 4
1. the Dirichlet condition residuum
R
1
( u) = u u, (8)
2. the Neumann condition residuum
R
2
( u) =
u
x
n , (9)
3. the Robin condition residuum
R
3
( u) =
u
x
n+ u
. (10)
2.4 Minimization of errors
Demand: Minimize the errors in a weighted integral sense
_
B
R
0
( u)
0
r
+
_
B
1
R
1
( u)
1
r
+
_
B
2
R
2
( u)
2
r
+
_
B
3
R
3
( u)
3
r
=0. (11)
Here,
_
0
r
_
,
_
1
r
_
,
_
2
r
_
, and
_
3
r
_
(r =1, . . . M) are sets of weight functions.
Note that M weight functions yield M conditions (or equations) from which to determine
the N coefcients U
s
. To determine these N coefcients uniquely we need N independent
conditions (equations).
Now, using the formulae for residua results in
_
B
L( u)
0
r
+
_
B
1
u
1
r
+
_
B
2
u
x
n
2
r
+
_
B
3
_
u
x
n+ u
_
3
r
=
_
B
f
0
r
+
_
B
1
u
1
r
+
_
B
2
2
r
+
_
B
3
r
.
(12)
2.5 System of algebraic equations
Applying the approximation u =
N
s=1
U
s
s
, and using the linearity of operators,
L( u) =
N
s=1
U
s
L(
s
) ,
u
x
n=
N
s=1
U
s
s
x
n, (13)
leads to the the following system of algebraic equations
s=1
A
rs
U
s
=B
r
(14)
where
A
rs
=
_
B
L(
s
)
0
r
+
_
B
1
s
1
r
+
_
B
2
s
x
n
2
r
+
_
B
3
_
s
x
n+
s
_
3
r
(15)
and
B
r
=
_
B
f
0
r
+
_
B
1
u
1
r
+
_
B
2
2
r
+
_
B
3
r
. (16)
(ICMM Lecture) Weighted Residual Method 5
2.6 Categories of WRM
Assume that the boundary conditions are met and approximated must be only the PDE
in the domain. The error of this approximation is minimized by zeroing an integral of
weighted residuum. There are four main categories of weight functions which generate
the following categories of WRM:
Subdomain method Here the domain is divided in M subdomains B
r
where
0
r
(x) =
_
_
_
1 x B
r
,
0 outside,
(17)
such that this method minimizes the residual error in each of the chosen subdo-
mains. Note that the choice of the subdomains is free. In many cases an equal
division of the total domain is likely the best choice. However, if higher resolution
(and a corresponding smaller error) in a particular area is desired, a non-uniform
choice may be more appropriate.
Collocation method In this method the weight functions are chosen to be Dirac delta
functions
0
r
(x) =(xx
r
). (18)
such that the error is zero at the chosen nodes x
r
.
Least squares method This method uses derivatives of the residual itself as weight
functions in the form
0
r
(x) =
R
0
( u(x))
U
r
. (19)
The motivation for this choice is to minimize
_
B
R
2
0
of the computational domain.
Note that (if the boundary conditions are satised) this choice of the weight function
implies
U
r
__
B
R
2
0
_
=0 (20)
for all values of U
r
.
Galerkin method In this method the weight functions are chosen to be identical to
the base functions.
0
r
(x) =
r
(x) . (21)
In particular, if the base function set is orthogonal (i.e.,
_
B
s
= 0 if r = s), this
choice of weight functions implies that the residual R
0
is rendered orthogonal with
the minimization condition
_
B
R
0
0
r
=0 (22)
for all base functions.
(ICMM Lecture) Weighted Residual Method 6
3 ODE example
3.1 A simple BVP approached by WRM
Boundary Value Problem (for an ODE): Find u = u(x) =? satisfying
d
2
u
dx
2
du
dx
=0 in B=[a, b] , (23)
subject to boundary conditions on B=B
1
B
2
={a} {b}:
u
x=a
= u (Dirichlet) ,
du
dx
x=b
= (Neumann) . (24)
WRM approach
Residua for an approximated solution u
R
0
( u) =
d
2
u
dx
2
d u
dx
, R
1
( u) = u
x=a
u, R
2
( u) =
d u
dx
x=b
. (25)
Minimization of weighted residual error (for weight functions
0
r
(x),
1
r
(x), and
2
r
(x), r =1, . . . N)
b
_
a
_
d
2
u
dx
2
d u
dx
_
0
r
+
_
_
u u
_
1
r
_
x=a
+
__
d u
dx
_
2
r
_
x=b
=0. (26)
System of algebraic equations (for the approximation u(x) =
N
s=1
U
s
s
(x))
N
s=1
A
rs
U
s
=B
r
(27)
where A
rs
=
b
_
a
_
d
2
s
dx
2
d
s
dx
_
0
r
+
_
s
1
r
_
x=a
+
_
d
s
dx
2
r
_
x=b
, (28)
B
r
=
_
u
1
r
_
x=a
+
_
2
r
_
x=b
. (29)
(ICMM Lecture) Weighted Residual Method 7
3.2 Numerical solution
Boundary limits and values:
a =0, u =1, b =1, =2.
Shape functions (s =1, 2):
_
s
_
=
_
1, e
x
_
.
Weight functions (r =1, 2):
_
0
r
_
=
_
1
r
_
=
_
2
r
_
=
_
1, x
_
.
System of equations:
_
1 (1+e)
0 e
__
U
1
U
2
_
=
_
3
2
_
.
Coefcients:
U
1
=1
2
e
, U
2
=
2
e
.
Approximated solution:
u =U
1
+U
2
e
x
=
2e
x
+e2
e
.
x
u(x)
a =0 0.5 b =1
0.5
1
1.5
2
2.5
1
(x) =1
2
(x) =e
x
0
1
(x) =
1
1
(x) =
2
1
(x) =1
0
2
(x) =
1
2
(x) =
2
2
(x) = x
u(x) =
2e
x
+e2
e
(exact solution)
One can check that this approximation is in fact the exact solution. Such result is
obtained thanks to the choice of shape functions (the simple subspace generated by the
shape functions happens to contain the exact solution).
(ICMM Lecture) Weighted Residual Method 8
3.3 Another numerical solution
Boundary limits and values:
a =0, u =1, b =1, =2.
Shape and weight functions (s =1, 2, 3):
_
s
_
=
_
0
s
_
=
_
1
s
_
=
_
2
s
_
=
_
1, x, x
2
_
.
System of equations:
_
_
_
_
1 0 3
0
1
2
7
3
0
2
3
13
6
_
_
_
_
_
_
_
_
U
1
U
2
U
3
_
_
_
_
=
_
_
_
_
3
3
2
_
_
_
_
.
Coefcients:
U
1
=
15
17
, U
2
=
12
17
, U
3
=
12
17
.
Approximated solution:
u =U
1
+U
2
x+U
3
x
2
=
3
17
_
5+4x+4x
2
_
.
x
u(x)
a =0 0.5 b =1
0.5
1
1.5
2
u(x) =
2e
x
+e2
e
(exact solution)
1
(x) =1
2
(x) = x
3
(x) = x
2
u(x) =
3
17
_
5+4x+4x
2
_