Sie sind auf Seite 1von 3

Finite Element Method I Finite Element Method II

Example Definition (Finite Element Method)

Lets consider the O.D.E. on the interval t ∈ ∆ = [0; 1] Consider an equation (O.D.E.) f ( t, y, y′ ) = 0 of a function y( t) defined on the
interval t ∈ ∆:
f ( t, y, y′ ) = y′ ( t) + y( t) = 0 1 Define a trial solution of the form:
n
with the initial condition y(0) = 1. ỹ( t) = φ0 +
X
a i φ i ( t)
i =1
We can solve this O.D.E.:
where the functions {φ i ( t)} are basis functions, and φ0 refers to a constant
analytically giving the exact solution:
that usually can be inferred from initial conditions.

y( t) = exp(− t) 2 Replace y( t) by ỹ( t) in the O.D.E. f ( t, ỹ( t), ỹ ( t)) = R ( t, a) (R is called the
residual) and solve the coefficients {a i } i=1···n .
numerically giving an approximate solution using:
The estimated ỹ( t) gives a numerical solution to the O.D.E. defined on the
Ï Finite Difference Method,
interval ∆.
Ï Finite Element Method.

Solving y′ + y = 0 using collocation method I Solving y′ + y = 0 using collocation method II

Definition (Collocation method) Example

The collocation method imposes that the residual vanishes at n points i.e. Lets take t1 = 31 and t2 = 32 such that we impose R ( t1 , a) = R ( t2 , a) = 0. This gives
R ( t i ; a) = 0 for t i ∈ ∆ and i = 1, · · · , n. us 2 equations: ³ ¡ ¢2 ´
1 + 1 + 31 a 1 + 23 + 13
 ¡ ¢

 a2 = 0

Example  ³ ¡ ¢2 ´
1 + 1 + 32 a 1 + 43 + 23
 ¡ ¢
a2 = 0

i
We choose the basis φ i ( t) = t and n = 2 so:
Solving in a 1 and a 2 gives:
ỹ( t) = 1 + a 1 φ1 ( t) + a 2 φ2 ( t) = 1 + a 1 t + a 2 t2
27 9 2
ỹ( t) = 1 − t+ t
29 29
and
R ( t, a) = 1 + (1 + t) a 1 + (2 t + t2 ) a 2 Compare that with the true function y( t) = exp(− t).

Sub-domain method I Sub-domain method II

Example
We choose ∆1 = 0; 21 and ∆2 =
£ ¤ £1 ¤
2;1 and :
· ¸
Definition (subdomain method) 1 1 5 7
Z
R ( t; a) dt = 2 + a1 + a2 = 0
∆1 ∆1 2 8 24
Divide the interval ∆ of definition of the O.D.E. into subdomains {∆ i } i=1,··· ,n , and
and
solve a such that : 1
Z ·
1 7 25
¸
1
Z
R ( t; a) dt = 2 + a1 + a2 = 0
R ( t; a) dt = 0 ∀ i = 0, · · · , n ∆2 ∆2 2 8 24
∆i ∆i
Solving this system gives the solution
18 6 2
ỹ( t) = 1 − t+ t
19 19

Compare ỹ( t) estimated using subdomain method, with the exact solution y( t).
Least-Squares Method I Least-Squares Method II

Definition (Least-Squares Method)


We can use least square estimation to find the optimum values of the parameters
a: ½Z ¾
â = arg min (R ( t; a))2 dt Example

or solve Exercise: Try to find ỹ with the Least squares method.



Z
(R ( t; a))2 dt = 0 ∀i
∂a i ∆
or

Z
(R ( t; a))2 dt = 0 ∀i
∆ ∂a i
or
∂R ( t; a)
Z
2 R ( t; a) dt = 0 ∀i
∆ ∂a i

Galerkin Method I Exercises

Definition (Galerkin Method) Solve on the interval [0; 1] the O.D.E.:


The Galerkin method imposes the following criterium to estimate a:
y′′ ( t) + y( t) = 1
Z
R ( t; a) φ i ( t) dt = 0 ∀ i = 1, · · · , n
∆ with the boundary conditions y(0) = 1 and y(1) = 0:
1 analytically.
Example 2 numerically using
1 the collocation method
Find that the estimate of ỹ( t) using Galerkin method is:
2 the subdomain method
32 2
ỹ( t) = 1 − t + t2 3 the Galerkin method
35 7
3 Draw all the solutions you found on a graph (use matlab).
Compare that solution with the exact one y( t).

Method of Weighted residuals I Method of Weighted residuals II


Weighting function Wi for:
1 the Collocation method:
Definition (Weighted residuals)
Wi ( t) = δ( t − t i )
In fact all the previous method (collocation, galerkin, subdomain, Least squares) 2 the Sub-domain method:
can be understood as special cases of the Method of Weighted residuals (MWR). (
The notion of MWR is to force the residual R ( t; a) to zero in some average sense 1 if t ∈ ∆ i
Wi ( t) =
over the domain. That is: 0 otherwise
Z
3 the Least Squares method:
R ( t, a) Wi ( t) dt = 0 i = 1, · · · , n

∂R ( t; a)
Wi ( t) = 2
where the number of weight functions Wi ( t) is exactly equal to the number of ∂a i
unknown constant a i in ỹ. 4 the Galerkin Method:
∂ ỹ
Wi ( t) = = φ i ( t)
∂a i
Remarks on FDM and FEM Which basis functions? I

Amongst the methods of weighted residuals, the Galerkin method is the most
Finite Difference Method: FDM Finite Element Method: FEM uses commonly used.
approximates an operator (e.g., the exact operators but approximates
derivative) and solves a problem on a the solution basis functions. Also,
set of points (the grid). FE solves a problem on the interiors MWR apply equally well to any family of basis functions {φ i }. However to be
of grid cells (and optionally on the sucessful, the basis functions need to be chosen with care
gridpoints as well). Ï Global basis functions perform badly in fitting local behaviour, e.g.:

φ i (t) = t i

Which basis functions? II Which basis functions? III

Ï More local basis functions can be defined so that there are non-zero only on
small regions, e.g. piecewise linear (or hat) functions:

t− t i−1



 t i − t i−1 t i−1 ≤ t < t i






t i+1 − t
φ i (t) = t i+1 − t i t i ≤ t < t i+1









0 otherwise

Das könnte Ihnen auch gefallen