Вы находитесь на странице: 1из 13

Technische Universitt Mnchen

Numerical Solution of Differential Equations


with Orthogonal Collocation
Rechnergesttztes Praktikum zur Vorlesung
Reaktordesign Betrieb und Auslegung chemischer Reaktoren
Dipl.-Ing. Holger Marschall
Prof. Dr.-Ing. Olaf Hinrichsen
Technische Universitt Mnchen

Technische Universitt Mnchen

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

(*)
0

X
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 Universitt Mnchen

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.

Technische Universitt Mnchen

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.

Technische Universitt Mnchen

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

Technische Universitt Mnchen

Collocation Basic Principle

Similar steps can be applied to the second derivative to get:

Technische Universitt Mnchen

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 Universitt Mnchen

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

Technische Universitt Mnchen

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.

Technische Universitt Mnchen

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 Universitt Mnchen

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 Universitt Mnchen

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 Universitt Mnchen

Take Home Message:


Orthogonal Collocation needs only a few terms
to solve many problems very accurately.

13

Вам также может понравиться