Download Numerical Solution of Differential Equations with Orthogonal

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Linear least squares (mathematics) wikipedia , lookup

Cubic function wikipedia , lookup

Mathematical optimization wikipedia , lookup

Newton's method wikipedia , lookup

Root-finding algorithm wikipedia , lookup

Quartic function wikipedia , lookup

System of polynomial equations wikipedia , lookup

Interval finite element wikipedia , lookup

Weber problem wikipedia , lookup

False position method wikipedia , lookup

System of linear equations wikipedia , lookup

Calculus of variations wikipedia , lookup

Transcript
Technische Universität München
Numerical Solution of Differential Equations
with Orthogonal Collocation
Rechnergestütztes Praktikum zur Vorlesung
Reaktordesign – Betrieb und Auslegung chemischer Reaktoren
Dipl.-Ing. Holger Marschall
Prof. Dr.-Ing. Olaf Hinrichsen
Technische Universität München
Technische Universität München
Collocation – Basic Principle
•
Basic Concept: The unknown exact solution is expanded in a
series of known functions {yi(x)}, which are chosen to satisfy
as many conditions of the problem as feasible: symmetry and i.e.
boundary conditions.
•
The series of functions is called a trial function.
exact solution
approximate solution
x collocation points
0 boundary conditions
X
(*)
0
X
0
0
As more terms are included in the series,
the more the trial function (with more
unknown coefficients) approximates the
exact solution!
1
2
Technische Universität München
Collocation – Basic Principle
•
Suppose the differential equation is
•
Then the expansion is substituted into the
differential equation to form the residual.
•
In the collocation method the residual is
set to zero at a set of points, called
collocation points.
•
This provides N equations; two more equations come from the
boundary conditions, giving N+2 equations for N+2 unknowns.
3
Technische Universität München
Collocation – Basic Principle
•
A major improvement is achieved when the entire solution process is
done in terms of the solution at the collocation points rather than the
coefficients in the expansion.
Thus we would evaluate Eqn. (*) at the collocation points
•
… and then solve for the coefficients in terms of the solution at the
collocation points.
4
Technische Universität München
Collocation – Basic Principle
•
Furthermore if we differentiate Eq. (*) once, and evaluate it at all
collocation points, we can write the first derivative in terms of the
values at the collocation points.
•
This can be written as (by substituting for ai)
or shortened to
5
Technische Universität München
Collocation – Basic Principle
•
Similar steps can be applied to the second derivative to get:
6
Technische Universität München
Collocation – Example
Reaction in a Tubular Reactor
non-dimensionalised
(dimensionless length = 1)
The differential equation
at the collocation points is
and the two boundary
conditions are
To apply the method it is neccessary to find the matrices Aij and Bij
and then solve the set of algebraic equations, perhaps with the
Newton-Raphson method.
7
Technische Universität München
Orthogonal Collocation
•
If orthogonal polynomials are used, and the collocation points are the
roots to one of the orthogonal polynomials, then we get what is
known as the orthogonal collocation method.
•
In the orthogonal collocation method we expand the solution in a
series involving orthogonal polynomials – usually Legendre
polynomials.
(**) which is also
8
Technische Universität München
Orthogonal Collocation
•
There are N interior points plus one at each end. and the domain is
always transformed to lie on 0 to 1.
•
To define the matrices Aij and Bij we evaluate this expression at the
collocation points; we also differentiate it and evaluate the result at
the collocation points.
9
Technische Universität München
Orthogonal Collocation
•
Put these formulas in matrix notation, where Q, C, and D are N+2 by
N+2 matrices.
•
Solving the first equation for d
we can rewrite the first and second derivatives as
10
Technische Universität München
Orthogonal Collocation
 Thus the derivative at any collocation point can be determined in
terms of the solution at the collocation points.
 Once we know the solution at all collocation points we can find d.
 And once we know d we can find the solution for any x.
 If we wish to find the solution at a point that is not a collocation point
then we use Eqn. (**)
11
Technische Universität München
Orthogonal Collocation
•
To evaluate integrals accurately, we use the quadrature formula
•
To determine Wj we evaluate this equation for powers of x.
This is Gaussian quadrature.
12
Technische Universität München
Take Home Message:
Orthogonal Collocation needs only a few terms
to solve many problems very accurately.
13