Sie sind auf Seite 1von 74

THE LOW DIMENSION MANIFOLD IN DISSIPATIVE

DYNAMICAL SYSTEMS; COMPUTING

Submitted by

ANEES UR REHMAN
M.Phil. Scholar

Supervisor

DR. MUHAMMAD SHAHZAD


Assistant Professor
Department of Mathematics
Hazara University Mansehra

DEPARTMENT OF MATHEMATICS
HAZARA UNIVERSITY MANSEHRA
2016

THE LOW DIMENSION MANIFOLD IN DISSIPATIVE


DYNAMICAL SYSTEMS; COMPUTING

By
ANEES UR REHMAN

DEPARTMENT OF MATHEMATICS
HAZARA UNIVERSITY MANSEHRA
2016

IN THE NAME OF ALLAH, THE


COMPASSIONATE, THE
MERCIFUL
AND HIS LAST PROPHET MUHAMMAD
(PEACE BE UPON HIM)

ii

DECLARATION
I hereby declare that this thesis neither as a whole, nor as a part thereof has been
copied out from any source. It is further declared that I have developed this thesis
and the accompanied report entirely on the basis of my personal efforts under the
sincere guidance of my supervisor Dr. Muhammad Shahzad. No portion of the
work present in this thesis has been submitted in support of any other degree or
qualification of this or any other university or institute of learning, if found I
should stand responsible.

Signature_______________
Anees Ur Rehman

iii

CERTIFICATE
It is certified that Mr. Anees Ur Rehman has carried out all the work related to this
thesis under my supervision at the department to Mathematics, Hazara University
Mansehra.

Supervisor: ___________________
Dr. Muhammad Shahzad
Department of Mathematics,
Hazara University, Mansehra

iv

FINAL APPROVAL

ACKNOWLEDGEMENTS
I would like to express my sincere gratitude to my research supervisor Dr.
Muhammad Shahzad for the continuous support of my M.Phil. study and related
research, for his patience, motivation, and immense knowledge. His guidance
helped me in all the time of research and writing of this thesis. I could not have
imagined having a better advisor and mentor for my MPhil. study.
Also, I would like to thank my mother for supporting me spiritually throughout
writing this thesis.

vi

TABLE OF CONTENTS
Title

Page

CHAPTER 1: INTRODUCTION

1.1 Introduction

1.2 Aim and Scope

1.3 Research Methodology

1.4 Thesis Outline

CHAPTER 2: MATERIALS AND METHODS

2.1 Some Basic Definitions

2.2 Formulation of a Chemical System

2.3 Mathematical Model of a Chemical System

2.4 Slow Invariant Manifold

2.5 Schur Decomposition

CHAPTER 3: SLOW INVARIANT MANIFOLD FOR


DISSIPATIVE DYNAMICAL SYSTEMS

11

3.1 ILDM Method

11

3.2 Two-Dimensional ILDM

15

3.3 Temkin-Boudrat Mechanism: A Model Reaction

15

3.4 Two-Dimensional ILDM for Temkin-Boudrat Mechanism

28

3.5 Comparison of ILDM Results to QEM and


SQEM Results

32

CONCLUSION

39
vii

REFERENCES

40

APPENDIX

43

Listing 1: MATLAB program to calculate 1D ILDM for


Temkin-Boudrat Mechanism

43

Listing 2: MATLAB program to calculate and plot solution


trajectories

47

Listing 3: MATLAB program to calculate and plot steady state

48

Listing 4: MATLAB program to calculate and plot eigenvalues

48

Listing 5: MATLAB program to calculate and plot 2D ILDM

51

Listing 6: MATLAB program to calculate and plot solution


trajectories in 3D phase space

viii

58

LIST OF FIGURES
1) Fig 2.1. Reaction process of a typical reversible reaction
2) Fig 2.2. Slow invariant manifold of a dissipative dynamical system in 3-D phase
space
3) Fig. 3.1: Species x1 and x4 go for steady state.
4) Fig. 3.2: Phase diagram for possible trajectories of the solution at discrete initial
conditions
5) Fig. 3.3: Absolute values of eigenvalues for the Jacobian at each discrete point
6) Fig. 3.4: 1-D ILDM approximation for SIM w.r.t. x1 and x4
7) Fig. 3.5: 1-D ILDM approximation along with solution trajectories
8) Fig. 3.6: 1-D ILDM approximation along with solution trajectories
9) Fig. 3.7: Solution trajectories in three-dimensional phase space
10) Fig. 3.8: A single projection curve passing through equilibrium point of 1-D
ILDM
11) Fig. 3.9: Projection curves are drawn with discrete nodes
12) Fig. 3.10: 2-D ILDM in 3-D phase space
13) Fig. 3.11: Comparing SQEM and ILDM for concentrations x1 and x4
14) Fig. 3.12: Comparing SQEM and ILDM for concentrations x1 and x5
15) Fig. 3.13: 1-D ILDM along with numerical solution of the reduced system
16) Fig. 3.14: QEM 1-D curve for the working example
17) Fig. 3.15: SQEM 1-D curve for the working example
18) Fig. 3.16: 1-D ILDM along with possible solution trajectories
19) Fig. 3.17: 1-D SQEM plot in 2D phase space
ix

LIST OF SYMBOLS
(Equation) Page
Roman Letters
A

Reactant specie in chemical reaction

(2.2) 5

Reactant specie in chemical reaction

(2.2) 5

Product specie in chemical reaction

(2.2) 5

Product specie in chemical reaction

(2.2) 5

Diagonal matrix in Schur decomposition of square matrix E

(2.13) 9

Matrix of eigenvectors of Jacobian matrix J

(3.6) 13

A square matrix to find its Schur decomposition

(2.13) 9

Function of X for the system of equations

Function of x for the reduced system of equations

(3.4) 12

Gj

j-th function of X where j goes from 1 to m

(3.2) 11

Jacobian of G

(3.4) 12

Molecular matrix

(3.1) 11

Previous ILDM point

(3.7) 13

Pi

Calculated ILDM point in forward direction, where i is positive


integer denoting individual point.

Pi

(3.45) 26

Calculated ILDM point in backward direction, where i is positive


integer denoting individual point.

Rj

(2.3) 5

(3.45) 26

Rate of reaction for j-th reaction, where j goes from 1 to s

(2.9) 8

Column matrix containing eigenvectors of E arranged from fastest


eigenvector to slowest eigenvector

(3.9) 14

Unitary matrix in Schur decomposition of square matrix E

(2.13) 9

QH

Conjugate transpose of matrix Q

(2.13) 9

Qf

Column matrix containing fast eigenvectors of Q 1

Column matrix of concentrations of m species

(2.10) 8

Column matrix of derivative of m species

(2.11) 8

Number of molecules of A

(2.2) 5

Component of order of reaction

(2.5) 6

Number of molecules of B

(2.2) 5

Reuse: Slowest eigenvector

(3.7) 13

(3.11) 14

Component of order of reaction

(2.5) 6

Number of molecules of C

(2.2) 5

Component of order of reaction

(2.6) 6

Number of molecules of D

(2.2) 5

Required dimension of the ILDM

Component of order of reaction

Small constant used for increment

(3.7) 13

Rate constant for forward reaction

(2.5) 6

Rate constant for backward reaction

(2.6) 6

k j

Rate constant for j-th forward reaction, where j goes from 1 to s

(2.9) 8

k j

Rate constant for j-th backward reaction, where j goes from 1 to s

(2.9) 8

(3.9) 14
(2.6) 6

xi

Number of species in reaction

Number of species in reduced system

(3.2) 11

qi

i-th fast eigenvector, where i goes from 1 to n

(3.9) 14

Increment in previous ILDM point

(3.7) 13

Number of equations in reaction

vi

i-th eigenvector in E where i goes from 1 to n

(3.6) 13

Vector of concentrations of reduced number of species

(3.3) 12

Derivative of x

(3.3) 12

xj

j-th specie in reaction where j goes from 1 to m

xj

Derivative of j-th specie where j goes from 1 to n

(2.7) 7

(2.7) 7

(2.7) 7
(3.2) 11

Greek Letters

ij

Number of molecules of i-th reactant in j-th equation

(2.7) 7

ij

Number of molecules of i-th product in j-th equation

(2.7) 7

Stoichiometric matrix whose elements are the stoichiometric


coefficients of the reacting substances

j-th stoichiometric vector, where j goes from 1 to s

xii

(3.16) 16
(2.8) 7

ABSTRACT
Numerical simulation of model equations of a dissipative dynamical system, using ILDM
method of Mass and Pope, is discussed in detail with all necessary background material
from mathematics and analytical chemistry. An example of chemical system, representing
a typical dissipative dynamical system involving five chemical species, is modeled
mathematically and then it is solved by reducing it to low dimensions using ILDM method.
Both one-dimensional and two-dimensional manifolds are calculated for the system. Also
the results of ILDM over other important methods are compared.

xiii

CHAPTER 1

INTRODUCTION

1.1 Introduction
In most cases chemical reactions go through two phases according to their speed of
occurring with respect to time. First they go through a quick process which relaxes very
soon. In second stage slow processes take place which relax very slowly (Tang, S. T.).
Geometrically it is said that the solution trajectories in phase space step down to lower
dimensions during their relaxation, and lastly they reach zero dimension, the equilibrium
point. Any of these lower dimensional trajectories is called Slow Invariant Manifold (SIM)
which is also a solution of the system. The word Invariant indicates that once the
trajectories reach slow manifold, they stay on it before reaching the equilibrium point
(Petrosyan, R. E., 2003). By computing the SIM we get whole information about the
chemical reaction process since computation of SIM has very low effect on the accuracy
of solution of the system. There are many numerical solutions or model reduction
techniques to approximate SIM. Some important techniques used as initial approximation
and refinement of SIM are Intrinsic Low Dimensional Manifold (ILDM), Quasi
Equilibrium Manifold (QEM), Spectral Quasi Equilibrium Manifold (SQEM),
Computational Singular Perturbation (CSP) and Method of Invariant Manifolds (MIM). In
this thesis ILDM is discussed in details with the aid of model examples. This method was
proposed by U. Mass and S. B. Pope in 1992. The main advantage of ILDM over other
techniques is that it provides highly accurate results even, in most cases, without using

refinement methods as long as the curvature of the manifold is not too large. In this method
manifold is constructed on the basis of Jacobian matrix eigenvectors which determine fast
and slow approximation of directions in phase space. Because these eigenvalues are
computed at every point in the manifold so ILDM method takes more computational time
than other methods to calculate higher order manifolds.

1.2 Aim and Scope


Aim of using ILDM method is to effectively reduce systems of higher number of species
to less number of species according to the required specific dimension of manifold, which
is achieved by introducing algebraic constraints to replace ordinary differential equations.
Thus with the help of ILDM method a complete description of chemical kinetics is
produced without sacrificing the necessary correctness of the results (Glassmaker, N. J.,
1999). Because of the presence of severe stiffness in most mechanical systems involving
reactive fluid with detailed gas phase chemical kinetics, it becomes impractical to construct
a fully resolved simulation of these systems. A chance of small intrinsic error holds for
considerably stiff system since ILDM is a numerical approximation. These chances of
errors get bigger for the greater time scales which can be found in some specific systems.
Furthermore, ILDM is more efficient method for exploiting the hierarchal order in which
chemical species relax during the chemical process.

1.3 Research Methodology


The mathematical model for a dissipative dynamic system is typically a system of nonlinear
ordinary differential equations. Elementary reactions in a dissipative dynamic system occur
2

at different time scales. Therefore to handle these time scales eigenvalues are determined
for the system of ODEs. The real parts of the eigenvalues influence the rate of exponential
decay for a stable system. A stable system has at least one equilibrium point. At this point
influence of each eigenvector is zero. Slowest eigenvectors determine the slow trajectory
on which the equilibrium point lies. All other trajectories are attracted towards the slow
trajectory, which is a one-dimensional space spanned by the single slowest eigenvector
which is the last space that attracts trajectories before they reach equilibrium.
Our next step is to find the component of velocity vector along the trajectories with fastevolving components tossed out. For this purpose Mass and Pope suggested to find the
space that is orthogonal to the trajectories. By taking this reduced space orthogonal to the
velocity vector one gets points for ILDM.

1.4 Thesis Outline


The current thesis consists of four chapters. The introductory chapter contains a brief
description of the work done and gives a brief description of the ILDM method and thesis
outline. The important background material related to ILDM method is considered in detail
in the second chapter of the thesis. Main topics include reaction rates, stoichiometry,
manifolds, significance of eigenvalues and Schur decomposition. In the third chapter, the
ILDM method is discussed in details with the aid of examples. Also ILDM results are
compared with results from some other important techniques. MATLAB programs for the
examples discussed in this thesis are given in the appendix.

CHAPTER 2

MATERIALS AND METHODS


2.1 Some Basic Definitions
The number that balances the number of species in both sides of a chemical reaction is
called Stoichiometric Coefficient (Chemwiki).
A dissipative dynamical system is a thermodynamically open dynamic system which is
operating out of, and often far from, thermodynamic equilibrium in an environment with
which it exchanges energy and matter (Wikipedia).
Phase Space is a space in which all possible states of a dynamical system are represented,
with each state corresponds to a unique point in the space. (Wikipedia).

2.2 Formulation of a Chemical System


When a chemical reaction occurs, a set of chemical materials (reactants) transform into
new substances (products) with different atomic structure. In a form of chemical equation,
it can be written as:
Reactant(s) Product(s).

(2.1)

In most of chemical reactions, reactants do not completely transform into products, instead
they reach to certain limit. This is because the products react themselves to give back the
original reactants and a time comes when there is no further change in composition of the
reaction concentrations. The reaction at this stage is said to be in equilibrium state, as
shown in fig 2.1. The reactions of this kind are referred as reversible reactions.

Fig 2.1. Reaction process of a typical reversible reaction

Speed of a chemical reaction is very important to a chemist. Fast reaction rates are required
to produce industrial chemicals. Rate of reaction is the change in concentration of reactants
of products in unit time. Consider a general reversible reaction:

aA bB

cC dD ,

(2.2)

where A and B are reactants while C and D are products, a, b, c and d are number of
molecules of the species A, B, C and D respectively. The rate of this reaction is written as:

R-

1 d A 1 d B 1 d C 1 d D

.
a dt
b dt
c dt
d dt

(2.3)

According to law of mass action the rate of forward reaction is proportional to the product
of molecular concentrations of A and B:
Forward reaction rate [ A][ B] ,

(2.4)

a
b
Forward reaction rate k [ A] [ B] ,

(2.5)

where k is rate constant for forward reaction, ( a + b ) is the order of reaction. The values
of a and b which may be equal to a and b respectively, depends on the order of reaction.
Also C and D act as reactants for backward reaction so reaction rate for backward reaction
is given by:

c
d
Backward reaction rate k [C ] [ D] ,

(2.6)

where k is rate constant for backward reaction, value of ( c + d ) is the order of reaction.
The values of c and d may be equal to c and d respectively, depends on the order of
reaction. At equilibrium, the rate of forward reaction becomes equal to the rate of backward
reaction.

2.3 Mathematical Model of a Chemical System


Chemical system can be modeled mathematically, while using algebra, differential
calculus, ordinary differential equations and partial differential equations. In addition to,
kinetics deals with the analysis of such models. The present work mainly deals with
reduction of system of non-linear ordinary differential equations, which is acquired by
stoichiometric properties of a chemical system. The construction of mathematical model is
described below in detail.
Consider a chemical system with m chemical species x1 ,..., xm forming s chemical
reactions then the system of equations for the chemical reaction system can be written as:

11 x1

1m xm

k1

21 x1

2 m xm

k2

s1 x1

where

sm xm

k1

k2

11 x1

1m xm ,

21 x1

2 m xm ,
(2.7)

ks

s1 x1

ks

sm xm ,

ij and ij are Number of molecules of reactants and products respectively and, ki

is the rate constant of forward reaction and ki is the rate constants of backward reaction,
i being the reaction index running from 1 to s. Stoichiometric vectors containing
stoichiometric coefficients of the system (2.7) are:

1 (11 11 , , 1m 1m ) ,
2 ( 21 21 , , 2 m 2 m ) ,

(2.8)

s ( s1 s1 , , sm sm ) .
The rate of reaction for each equation in the above system of chemical equations is obtained
by adding the forward and backward reactions as follows:

R1 k
R2 k

Rs k

j
j

j 1
m

x
j 1

x
j 1

j
j

j
j

x
j 1

x
j 1

x
j 1

j
j

(2.9)

j
j

If concentrations of species are represented by matrix X , then:

x1
X ,
xm

(2.10)

According to Law of Conservation of Mass:

X 1 R1

s Rs ,

(2.11)

The system of equations (2.11) can be written as:

X F(X ) ,

(2.12)

which is the mathematical model for the chemical system (2.7).

2.4 Slow Invariant Manifold


A slow invariant manifold is a surface in the phase space of a dissipative chemical system.
This surface is composed of all the solutions of the system that come to and stay on low
8

dimensional manifold after fast time scale events are equilibrated (Gorban, A. N., and
Karlin, I. V., 2003). The slow invariant manifold must be a solution itself in the case of a
first order manifold. In the case of the manifolds of second or higher order it must be
formed by a set of solutions containing first order manifold. This immediately follows from
the fact that if initial conditions are chosen to be on the slow manifold, the solution should
stay on it all the way to the equilibrium point, as shown in fig 2.2. This simple fact can be
used to obtain a functional equation for the slow invariant manifold.

Fig 2.2. Slow invariant manifold of a dissipative dynamical system in 3-D phase space
(Source: Singh, S. (2003). Rational reduction of reactive flow models and efficient
computation of their solutions)

2.5 Schur Decomposition


The Schur Decomposition (Tang, S. T., 2006) on any square matrix E will decompose it in
the form below:
9

QH EQ = T = D + V ,

where matrix Q is unitary, Q

(2.13)

conjugate transpose of Q , and T is triangular matrix

which is sum of diagonal matrix D and upper triangular matrix V . The matrix D
contains eigenvalues of E.

10

CHAPTER 3

SLOW INVARIANT MANIFOLD FOR DISSIPATIVE


DYNAMICAL SYSTEMS
3.1 ILDM Method
Before applying ILDM method (Chiavazzo, E., et al., 2007) to system of equations (2.12),
it should be reduced to less number of species. To find one-dimensional ILDM in 2-D
phase space the system should be reduced to two species. To find 1-D or 2-D ILDM in 3D phase space the system is reduced to three species involved. Number of equations in
system (2.12) are reduced by using values of constants determined by applying
conservation laws:

M .X const ,

(3.1)

on molecular matrix M. The molecular matrix M is formed by chemical balancing of


species. For this purpose initial conditions are imposed on equations (2.12). Thus system
(2.12) is reduced to n (say) number of equations of the form:

x1 G1 (x1 ,

, xn ) ,
(3.2)

xn Gn (x1 ,

or in compact form:

11

, xn ) ,

x G ( x) ,

(3.3)

where x denotes the vector of concentrations of reduced number of species. In a reduced


system number of equations and number of species are always same.
At each point of the solution space it is desirable to find corresponding time scales to
differentiate fast and slow eigenvectors. For this purpose eigenvalues of the Jacobian at
each point are calculated. A phase space with n dimensions has n eigenvectors. After
calculating eigenvectors they are rearranged from slowest eigenvectors to fastest
eigenvectors according to their corresponding eigenvalues. In an n-dimensional phase
space a trajectory is attracted to (n-1)-dimensional space spanned by the n-1 slowest
eigenvectors. In this (n-1) space, lies an (n-2)-dimensional space spanned by the slowest
n-2 eigenvectors. Following this pattern a one-dimensional manifold can be obtained in
two-dimensional space which will be spanned by a single slowest eigenvector. By
definition Jacobian for G is:

G1

x1

J G / x
Gn

x1

G1

xn

Gn
xn

(3.4)

The equilibrium point is taken as first known point to approximate next point of ILDM.
Therefore the values of equilibrium point are put in system (3.4) to calculate Jacobian. So
that the numeric values for entries of the Jacobian matrix are calculated to get the Jacobian
matrix:

12

j11

J
j
n1

j1n
,

jnn

(3.5)

vn ,
|

(3.6)

and the matrix E of eigenvectors of J is:


|
E v1
|

where v1 ,

, vn are column vectors representing eigenvectors. Using timescales provided

by slowest eigenvector one can move to both forward and backward directions of
equilibrium point to find more points of manifold. The slowest eigenvector is
corresponding vector to minimum absolute eigenvalue. Then the next point to equilibrium
point in forward direction will be:

r P hb ,

(3.7)

where P is previous point, which is equilibrium point when finding our first point in
forward direction or backward point, h represents small constant value and b is slowest
eigenvector extracted from E. In order to find points in backward direction the following
equation is used:

r P hb .

(3.8)

Now we have to find the orthogonal directions associated with each eigenvalue in phase
space. This set of orthogonal directions is represented by transition matrix Q which is
constructed by decomposing matrix of eigenvectors E. Let Q be the column vectors matrix
13

having eigenvectors of E arranged from fastest eigenvector to slowest eigenvector such


that:

|
Q q1
|

qn d

qn d 1

where d is the required dimension of the manifold, and q1 ,

qn ,
|

(3.9)

, qnd are the fast eigenvectors

of the jaocobian matrix. Inverse of matrix Q will be:


q1

q
Q 1 n-d .
qn -d 1

qn

(3.10)

Let us denote the column matrix of fast eigenvectors of Q 1 by Q f , that is:

q1

,
Qf

q
n -d

(3.11)

Q f .G ( x) 0 ,

(3.12)

then by the definition of ILDM:

which determines the required manifold.

14

3.2 Two-Dimensional ILDM


Each ILDM above one-dimensional ILDM contains all the lower dimensional ILDMs. This
hierarchical nature of ILDMs of different orders leads us to the method of computing
second order ILDM. For this purpose, one-dimensional ILDM is divided into small
intervals. Each point of subdivision is considered as starting point to advance in both
forward and backward direction. Rest of procedure is similar to the procedure described
above for the computation one-dimensional ILDM. For the computation of each curve on
subdivision points of one-dimensional manifold, d = 2 is taken in equation (3.9).

3.3 Temkin-Boudrat Mechanism: A Model Reaction


Consider the following Temkin-Boudrat mechanism (Yablonskii, G. v., et al., 1991)
involving five-chemical species:

A Z
AZ B

k1

AZ

k1
k2
k2

AB Z

(3.13)

Let us denote chemical species A, B, Z, AZ and AB by 1 , 2 , 3, 4 and 5 in the system


(3.13), so that the system looks like:

x1 x3

k1

x4 x2

k2

k1
k2

x4
x5 x3

(3.14)

To construct the mathematical model for the system (3.14) each specie from the system is
considered to observe its behavior on the basis of its distinct properties and variations

15

occurred during chemical reaction. Stoichiometric vectors for the above system, as defined
in equations (2.8), are:

1 (1, 0, 1,1, 0) ,

2 (0, 1,1, 1,1) .

(3.15)

The stoichiometric matrix whose elements are the stoichiometric coefficients of the
reacting substances, is given by:
1 0

0 1
1 1 .

1 1
0 1

(3.16)

The rate of reaction for first equation in above chemical mechanism is given by:

R1 R1 R1 ,

(3.17)

where R1 is the rate of reaction for forward reaction and is given as below:

R1 k1 x1x3 .

(3.18)

Similarly, for backward reaction the rate of reaction will be:

R1 k1 x4 .
Using the equations (3.18) and (3.19) in the equation (3.17):

16

(3.19)

R1 k1 x1x3 k1 x4 .

(3.20)

Similarly, for the second reaction, the rate of reaction will be:

R2 R2 R2 k2 x2 x4 k2 x3 x5 ,

(3.21)

where k1 and k2 are the rate coefficients for forward reactions and k1 and k2 are the rate
coefficients for backward reactions. Using the law of conservation of mass:
F(X) = X 1R1 2 R2 ,

(3.22)

x1 1
0


x2 0
1

x3 1 ( k1 x1 x3 k1 x4 ) 1 (k2 x2 x4 k2 x3 x5 ) .


x4 1
1
1
x 0

5

(3.23)

Thus kinetic equation of the five component vectors for concentration can be written as:

F1 x1 k1 x4 k1 x1x3 ,
F2 x2 k2 x3 x5 k2 x2 x4 ,

F3 x3 k1 x4 k1 x1x3 k2 x2 x4 k2 x3 x5 ,
F4 x4 k1 x1x3 k1 x4 k2 x2 x4 k2 x3 x5 ,

F5 x5 k2 x2 x4 k2 x3 x5 .
Consider following parameters for the equilibrium point for the system:

17

(3.24)

k1 1,
k2 0.5,
x1 0.5, x 2 0.1, x 3 0.1, x 4 0.4, x 5 0.1,

(3.25)

k ?
k2 ?
If the system is in equilibrium state then forward reaction and backward reaction are equal,
so that:

k1 x1 x3 k1 x4 ,
k2 x2 x4 k2 x3 x5 .

(3.26)

Using the values from (3.25) in equations (3.26), the value of reaction constants k1 and k 2
are computed as:

k1 0.125,
k2 2.

(3.27)

To find 1-D ILDM, it is necessary to reduce the system to two species, let say x1 and x5 .
According to the Law of Conservation of Mass:

Mx const ,

(3.28)

where M is molecular matrix found by balancing of equation for each atom as follows:
1 0 1 0 1
M 0 1 1 0 0 ,
0 0 0 1 1

Note that each row of M contains balancing parameters:

18

(3.29)

bA 1, 0, 0,1,1

Balancing for x1 ,

bB 0,1, 0, 0,1

Balancing for x2 ,

bZ 0,0,1,1,0

Balancing for x3 .

(3.30)

so that equation (3.28) becomes:


x1

1 0 1 0 1 x2 const
0 1 1 0 0 x const .

0 0 0 1 1 x4 const
x5

(3.31)

The values of constants are found by using the values of , at the equilibrium point as
follows:
x1 x4 x5 constant

x1 x4 x5 0.10 ,
x2 x5 constant

(3.32)

x2 x5 0.2 ,
x3 x4 constant

x3 x4 0.5 .

19

To find one-dimensional ILDM in two-dimensional phase space, the system of equations


(3.24) should be reduced to two equations with two variables. Using x3 0.5 x4 ,
x5 0.1 x1 x4 and x2 0.2 x5 in equations (3.24):

x1 x4 /8 + x1 (x 4 - 1/2) ,

(3.33)

and
x4 (x 4 -1/2)(2x1 +2x 4 -2) - x 4 /8 - x1 (x 4 -1/2) - x 4 /2(x1 +x 4 - 4/5) .

(3.34)

Equation (3.33) and equation (3.34) show a reduced system of equations of the form:

x1 G1 (x1 , x 4 )
x4 G2 (x1 , x 4 )

(3.35)

Thus the system of five chemical equations having five species is reduced to a system of
two equations having two species. Our new system of equations is not only in steady state,
but also by giving different initial values their convergence can be observed (Maas, U., and
Pope, S. B.). Fig. 3.1 shows the steady state of x1 and x4 for particular initial conditions, and
fig. 3.2 shows convergence of the system (3.35) for the different initial conditions. This
system is solved using MATLAB code, given in appendix.

20

Fig. 3.1: Species x1 and x4 go for steady state.

Jacobian for system (3.35) is given by:

G1 x1
J G
2
x1

x -1 / 2

G2
x4 x / 2 - 1 / 2
G1

x4

- 109 / 40 .

x1 1 / 8
x1 / 2 3 x4

Now putting all xi, s in (3.36) to calculate the Jacobian at equilibrium point:

21

(3.36)

-0.1000 0.6250
J
.
-0.3000 -1.2750

(3.37)

Fig. 3.2: Phase diagram for possible trajectories of the solution at discrete initial conditions

Matrix with eigenvalues of J in its diagonal is given below. Note that the eigenvalue
encircled is minimum of two eigenvalues if absolute is taken:

22

0
-0.2904
D
.
-1.0846
0

(3.38)

The matrix of eigenvectors of J eq is given below:

0.9566 -0.5359
V
.
-0.2915 0.8443

(3.39)

Eigenvectors in V are column vectors in the above matrix. The slowest eigenvector is the
corresponding column of matrix V to the column of matrix D containing minimum absolute
value. Thus the slowest eigenvector will be:
0.9566
b
.
-0.2915

(3.40)

Fig. 3.3 shows the plot for each eigenvalue against time at every discrete point of the
manifold when moving forward and backward directions of the equilibrium point.

23

Fig. 3.3: Absolute values of eigenvalues for the Jacobian at each discrete point

To move forward direction to get discrete points for the manifold an appropriate constant
is chosen to multiply with b each time next point of the manifold is computed. Let this
0.5
constant increment be h 0.03 . Then for P equation (3.7) gives:
0.4
0.5287
r
.
0.3913

(3.41)

The matrix of fast eigenvectors, Q f , as described in section (3.1), is calculated by applying


Schur Decomposition on J :
24

Q f 0.2915 0.9566 .

(3.42)

By the definition of ILDM:


0.9566(x 4 -0.5)(2x1 +2x 4 -2)- 0.0831x 4 - 0.6651x1 (x 4 -0.5)
-0.4783x 4 (x1 +x 4 - 0.8)=0.

(3.43)

Equation (3.43) is a single equation with two variables so it is necessary to discard one of
the two variable with less variation. If expression on the left side of above equation is
represented by R then variation for x1 and x4 will be

dR
dR
and
respectively. By
dx1
dx4

computing these variations we found that the variation of x4 is less than variation of x1 .
Thus by substituting previous value of x4 in R, R is solved for x1 , so that first point of
manifold next to equilibrium point is:
P1 (0.5287, 0.3912) .

(3.44)

To find next point we adopt the procedure as stated from relation (3.36) to (3.44). This time
P1 is put in Jacobean matrix and also replace by P in equation (3.7). First five points in

forward direction of equilibrium point are given below;

25

P1 (0.5287, 0.3912) ,
P2 (0.5573, 0.3821) ,
P3 (0.5859, 0.3727) ,

(3.45)

P4 (0.6144, 0.3630) ,
P5 (0.6428, 0.3530) .

To find points in backward direction, the values of equilibrium point P are put in equation
(3.8). Here are first five points of one-dimensional ILDM in backward direction from the
equilibrium point;

P1 (0.4713, 0.4087) ,
P2 (0.4425, 0.4171) ,
P3 (0.4137, 0.4253) ,

(3.46)

P4 (0.3849, 0.4332) ,
P5 (0.3560, 0.4409) .

26

Fig. 3.4: 1-D ILDM approximation for SIM w.r.t. x1 and x4

Plot of one-dimensional ILDM in two-dimensional phase space for the example in


consideration, is given in fig. 3.4. Fig 3.2 shows the solution trajectories calculated by
numerical integration of the system. By combining this figure with fig. 3.4 it can be noted
that ILDM approximation is very accurate and there is no need for refinement, as shown
in (Fig.3.5).

27

Fig. 3.5: 1-D ILDM approximation along with solution trajectories

Fig. shows the ILDM curve against x1 and x5 along with solution trajectories.

28

Fig. 3.6: 1-D ILDM approximation along with solution trajectories

3.4 Two-Dimensional ILDM for Temkin-Boudrat Mechanism


The procedure to find two-dimensional ILDM is similar to the method described for onedimensional ILDM. System (3.24) consists of five equations with five variables. To
compute two-dimensional ILDM we need to draw projection curves. Combining the
discrete nodes of projection curves, nodes for two-dimensional slow manifold are
constructed. Since three dimensional phase space is required to find two-dimensional
ILDM so using x3 0.5 x4 and x2 0.2 x5 calculated from equations (3.32), the system
(3.24) is reduced to the form:

29

x1 G1 (x1 , x 4 , x 5 ),
x4 G2 (x1 , x 4 , x 5 ),

(3.47)

x5 G3 (x1 , x 4 , x 5 ).

Plot for solution trajectories for two-dimensional ILDM which are calculated using
equations (3.35) is given in fig. 3.7.

Fig. 3.7: Solution trajectories in three dimensional phase space

Using two fastest vectors of Q f first projection curve is drawn by putting equilibrium point
of 1-D ILDM as shown in fig. 3.8.

30

Fig. 3.8: A single projection curve passing through equilibrium point of 1-D ILDM

Similarly, each point of one-dimensional ILDM is used as equilibrium point to construct


each projection curve. Fig. 3.9 shows the projection curves along with 1-D ILDM. Joining
the discrete points of these curves, two-dimensional manifold can be sketched, as shown
in fig. 3.10.

31

Fig. 3.9: Projection curves are drawn with discrete nodes

32

Fig. 3.10: 2-D ILDM in 3-D phase space

3.5 Comparison of ILDM Results to QEM and SQEM Results


SQEM curves for the example in section 3.3 are given in fig. 3.11 and fig. 3.12. Clearly
ILDM is very accurate as initial approximation than the SQEM.

33

Fig. 3.11: Comparing SQEM and ILDM for concentrations x1 and x4

34

Fig. 3.12: Comparing SQEM and ILDM for concentrations x1 and x5

Consider the following chemical system:


O2 2 Z
OZ SO2

k1 1

2OZ

k1
k2 0.5
k2

SO3 Z

(3.48)

Let concentrations for species O2 , Z , OZ , SO2 and SO3 be c1 , c2 , c3 , c4 and c5 respectively


with the following parameters;

c1eq 0.5, c2eq 0.1, c3eq 0.1, c4eq 0.4, c5eq 0.1 .

35

Fig. 3.13: 1-D ILDM along with numerical solution of the reduced system

One-dimensional ILDM along with solution trajectories are given in fig. 3.13. Clearly
ILDM manifold curve lies on the path predicted by solution trajectories. Fig. 3.14 shows
the manifold constructed using QEM method. By comparison it can be easily noted that
QEM calculates left branch of manifold accurately but it fails in case of right branch of the
slow manifold. Also SQEM method gives inaccurate results for the system as shown in fig.
3.15. Therefore both QEM and SQEM solutions need refinement for the system of
reversible equations (3.48).

36

Fig. 3.14: QEM 1-D curve for the working example

Fig. 3.15: SQEM 1-D curve for the working example

37

Now consider the system with four reactions of three species, where solution of ILDM and
SQEM match to original solution without applying further refinement:

A
B
C

k1 1
k1
k2 1
k2

B
C

k3 1

k3

A B

(3.49)

k4 50
k4

2C

Let concentrations for species A, B and C are denoted by C A , BC and CC respectively with
the parameters c1eq 0.5, c2eq 0.1, c3eq 0.1, c4eq 0.4 and c5eq 0.1. Plots of ILDM and
SQEM are shown in fig. 3.16 and fig. 3.17 respectively. The solution curves shown in these
plots match exactly with the solution curve predicted by the numerical integration of the
mathematical model for the chemical system.

38

Fig. 3.16: 1-D ILDM along with possible solution trajectories

Fig. 3.17: 1-D SQEM plot in 2D phase space. (Source: Chiavazzo, E., and Karlin, I. V. (2008).
Quasi-equilibrium grid algorithm: Geometric construction for model reduction)

39

Conclusion

In this thesis two main goals are accomplished: explaining theory behind the ILDM method
and geometrical construction of two-dimensional ILDM. The ILDM definition was
implemented on a closed chemical system of five species and two reactions. More complex
system can be solved by following the footprints of scheme used in the model example. In
our example, also it is noted that ILDM exploits the hierarchical relaxation order of system
efficiently to find slow time scales. In ILDM method eigenvalues decomposition is made
at each point so this method takes more time than other model reduction techniques,
especially when finding two-dimensional ILDM, but at the end of the day it gives very
accurate results without need of refinement. MATLAB code is used to solve the model
systems and it is noted that, unlike most of model reduction methods, the procedure to find
ILDM does not need any analytical work and can be done fully with the help of MATLAB.

40

REFERENCES
Aydin, E. (2005). The Use of Computers in Mathematics Education: A Paradigm Shift
from" Computer Assisted Instruction" towards" Student Programming". Online
Submission, 4(2).
Bykov, V., Goldfarb, I., Gol'Dshtein, V., and Maas, U. (2006). On a modified version of
ILDM approach: asymptotic analysis based on integral manifolds.IMA journal of
applied mathematics, 71(3), 359-382.
Chemwiki. Stoichiometry and Balancing Reactions, http://chemwiki.ucdavis.edu/Core
/Analytical_Chemistry/Chemical_Reactions/Stoichiometry_and_Balancing_React
ions (accessed Feb 26, 2016)
Chiavazzo, E., and Karlin, I. V. (2008). Quasi-equilibrium grid algorithm: Geometric
construction for model reduction. Journal of Computational Physics,227(11),
5535-5560.
Chiavazzo, E., Gorban, A. N., & Karlin, I. V. (2007). Comparison of invariant manifolds
for model reduction in chemical kinetics. Commun. Comput. Phys,2(5), 964-992.
Glassmaker, N. J. (1999). Intrinsic Low-Dimensional Manifold Method for Rational
Simplification of Chemical Kinetics. University of Notre Dame, Department of
Aerospace and Mechanical Engineering, 1-37.
Golub, G. H., and Van Loan, C. F. (1996). Matrix computations. 1996. Johns Hopkins
University, Press, Baltimore, MD, USA, 374-426.
Gorban, A. N., and Karlin, I. V. (2003). Method of invariant manifold for chemical
kinetics. Chemical Engineering Science, 58(21), 4751-4768.
41

Gorban, A. N., Karlin, I. V., and Zinovyev, A. Y. (2004). Invariant grids for reaction
kinetics. Physica A: Statistical Mechanics and its Applications, 333, 106-154.
Gorban, A. N., and Yablonsky, G. S. (2011). Extended detailed balance for systems with
irreversible reactions. Chemical Engineering Science, 66(21), 5388-5399.
Kee, R. J., Miller, J. A., Evans, G. H., and Dixon-Lewis, G. (1989, December). A
computational model of the structure and extinction of strained, opposed flow,
premixed methane-air flames. In Symposium (International) on Combustion(Vol.
22, No. 1, pp. 1479-1494). Elsevier.
Lebiedz, D., and Siehr, J. (2014). An optimization approach to kinetic model reduction for
combustion chemistry. Flow, Turbulence and Combustion, 92(4), 885-902.
Maas, U., and Pope, S. B. (1992). Simplifying chemical kinetics: intrinsic low-dimensional
manifolds in composition space. Combustion and flame, 88(3), 239-264.
Marin, G., and Yablonsky, G. S. (2011). Kinetics of chemical reactions. John Wiley and
Sons.
Paolucci, S., Powers, J. M., and Singh, S. (2001, November). On Computing Reactive
Flows Using Slow Manifolds. In APS Division of Fluid Dynamics Meeting
Abstracts (Vol. 1).
Petrosyan, R. E. (2003). Developments of the intrinsic low dimensional manifold method
and application of the method to a model of the glucose regulatory system (Doctoral
dissertation, University of Notre Dame).
Shahzad, M., Arif, H., Gulistan, M., and Sajid, M. (2015). Initially Approximated Quasi
Equilibrium Manifold. Journal of the Chemical Society of Pakistan, 37(2).

42

Singh, S. (2003). Rational reduction of reactive flow models and efficient computation of
their solutions (Doctoral dissertation, University of Notre Dame).
Stahl, G., and Warnatz, J. (1991). Numerical investigation of time-dependent properties
-air flamelets.Combustion and
Flame, 85(3), 285-299.
Tang, S. T. (2006). A rapid method for approximating invariant manifolds of differential
equations (Doctoral dissertation, Lethbridge, Alta.: University of Lethbridge,
Faculty of Arts and Science, 2006).
Tomlin, A. S., Turnyi, T., and Pilling, M. J. (1997). Mathematical tools for the
construction,

investigation

and

reduction

of

combustion

mechanisms.Comprehensive chemical kinetics, 35, 293-438.


Warnatz, J., and Maas, U. Calculation of the detailed structure of premixed and nonpremixed flame fronts and some applications. IMACS Transactions on Scientific
Computing, 88, 151.
Wikipedia.

Dissipative

system,

https://en.wikipedia.org/wiki/Dissipative_system

(accessed Feb 26, 2016)


Wikipedia. Phase Space, https://en.wikipedia.org/wiki/Phase_space (accessed Feb 26,
2016)
Yablonskii, G. V., Bykov, V. I., Elokhin, V. I., & Gorban, A. N. (1991).Kinetic models of
catalytic reactions (Vol. 32). Elsevier.
Yang, D. G. (2009). An Invariant Manifold Theory for ODEs and Its Applications. arXiv
preprint arXiv:0909.1103.

43

Appendix
MATLAB Programs

Listing 1: MATLAB program to calculate 1D ILDM for Temkin-Boudrat Mechanism


% A + Z

<=====> AZ

% AZ + B <=====> AB + Z
% Let A=c1, B=c2, Z=c3, AZ=c4 and AB=c5
% c1 + c3 <=====> c4
% c4 + c2 <=====> c5 + c3
clc; clear
syms c1 c2 c3 c4 c5 x1 x2
syms k1p k2p k1n k2n %positive and negative k's
%Stoichiometric Vectors
r1 = [-1; 0; -1; 1; 0];
r2 = [0; -1; 1; -1; 1];
%Parameters
k1p=1; k2p=0.5;
EP=[.5 .1 .1 .4 .1]; %Equilibrium Point
C1=EP(1); C2=EP(2); C3=EP(3); C4=EP(4); C5=EP(5);
%Finding k1n, k2n ((((((((((((((((((((((((((((((((
%Reaction Rates
w1 = k1p*C1*C3 - k1n*C4;
w2 = k2p*C4*C2 - k2n*C5*C3;
%solving for k1n and k2n
k1n=solve(w1==0, k1n);
k2n=solve(w2==0, k2n);
%)))))))))))))))))))))))))))))))))))))))))))))))))

44

%Molecular Matrix [1 0 0 1 1; 0 1 0 0 1; 0 0 1 1 0]
bA = C1+C4+C5;

%for A

bB = C2+C5;

%for B

bZ = C3+C4;

%for Z

%Reducing the system for species c1=A, c4=AZ


c3 = bZ - c4;
c5 = bA - c1 - c4;
c2 = bB - c5;
%Reaction Rates
w1 = k1p*c1*c3 - k1n*c4;
w2 = k2p*c4*c2 - k2n*c5*c3;
%Using Law of Conservation of Mass
G = r1*w1 + r2*w2;
%Reduced System
F = [G(1); G(4)];
F = subs(F,[c1,c4],[x1,x2]);
EP = [C1; C4];
m=20; n=17; %no of points forward and backward to the equilibrium point
h=0.03; %constant increment
%Finding points above EP
P=EP; r=P;
for forward = 1:m
J = ILDM1D_jacobian(F,r);
b = ILDM1D_slowest(J);
r = P + h*b;
Q = ILDM1D_projection(J);
P = ILDM1D_manifold(Q,F,r);
allForward(forward,:) = P;
% allForward matrix stores all forward points
end
%Finding points below EP

45

P=EP; r=P;
for backward = 1:n
J = ILDM1D_jacobian(F,r);
b = ILDM1D_slowest(J);
r = P - h*b;
Q = ILDM1D_projection(J);
P = ILDM1D_manifold(Q,F,r);
allBackward(backward,:) = P;
%allBackward matrix stores all backward points
end
%Plotting
plot(EP(1),EP(2),'ks');hold on;
plot(allForward(:,1),allForward(:,2),'+k-');
plot(allBackward(:,1),allBackward(:,2),'*k-');
grid on;
axis([0 1 0 .7]);
xlabel('A'); ylabel('AZ');
legend('Equilibrium point', 'Forward direction', 'Backword direction')

function J = ILDM1D_jacobian(F,r)
syms x1 x2
J = jacobian(F);
J = subs(J, [x1, x2], [r(1),r(2)]);
J = eval(J);

function b = ILDM1D_slowest(J)
[V,D] = eig(J);
if min(abs(diag(D))) == abs(D(1))
b = [V(1);V(2)];
else
b = [V(3);V(4)];

46

end

function Q = ILDM1D_projection(J)
[Q,D] = schur(J);
if min(diag(D)) == D(1)
Q = [Q(1) Q(2)];
else
Q = [Q(3) Q(4)];
end

function P = ILDM1D_manifold(Q,F,r)
syms x1 x2
R = Q*F;
var = ILDM1D_variation(R,r); %Returns var=[var_x1,var_x2]
if min(var) == var(1) % i.e. if var_x1 < var_x2
S = subs(R,x1,r(1));
x2 = vpasolve(S==0);
P = double([r(1); x2(1)]);
else
S = subs(R,x2,r(2));
x1 = vpasolve(S==0);
P = double([x1(1); r(2)]);
end

function var = ILDM1D_variation(R, r)


syms x1 x2 dx1 dx2
Rx1=diff(R,x1); Rx2=diff(R,x2);
x1 = r(1); x2 = r(2);
% ******** 1st possibility

47

dR = Rx1 + Rx2*dx2;
S = vpasolve(dR==0, dx2);
var_x1 = abs(eval(S));
% ******** 2nd possibility
dR = Rx1*dx1 + Rx2;
S = vpasolve(dR==0, dx1);
var_x2 = abs(eval(S));
var = [var_x1, var_x2];

Listing 2: MATLAB program to calculate and plot solution trajectories


clc;clear;hold on;
axis([0 1 0 .7]);
for x=0:.1:1
[T,Y] = ode45(@ode_c1c4,[0 20],[x 0]);
plot(Y(:,1),Y(:,2), 'k')
[T,Y] = ode45(@ode_c1c4,[0 20],[x .7]);
plot(Y(:,1),Y(:,2), 'k')
end
plot(.5,.4,'ks')
xlabel('x1');ylabel('x4');

function dy = ode_c1c4(t,y)
dy = zeros(2,1);
dy(1) =y(2)/8 + y(1)*(y(2) - 1/2);
dy(2) = (y(2) - 1/2)*(2*y(1) + 2*y(2) - 2) - y(2)/8 - ...
y(1)*(y(2) - 1/2) - (y(2)*(y(1) + y(2) - 4/5))/2;

48

Listing 3: MATLAB program to calculate and plot steady state


clc;clear;grid on;hold on;
[T,Y] = ode45(@ode_c1c4,[0 20], [.7 0]);
plot(T,Y(:,1),'-k+',T,Y(:,2),'-k*');
xlabel('time')
legend('c1','c4')

function dy = ode_c1c4(t,y)
dy = zeros(2,1);
dy(1) =y(2)/8 + y(1)*(y(2) - 1/2);
dy(2) = (y(2) - 1/2)*(2*y(1) + 2*y(2) - 2) - y(2)/8 - ...
y(1)*(y(2) - 1/2) - (y(2)*(y(1) + y(2) - 4/5))/2;

Listing 4: MATLAB program to calculate and plot eigenvalues


clc;clear
syms c1 c2 c3 c4 c5 x1 x2
syms k1p k2p k1n k2n %positive and negative k's
%Stoichiometric Vectors
r1 = [-1; 0; -1; 1; 0];
r2 = [0; -1; 1; -1; 1];
%Parameters
k1p=1; k2p=0.5;
EP=[.5 .1 .1 .4 .1]; %Equilibrium Point
C1=EP(1); C2=EP(2); C3=EP(3); C4=EP(4); C5=EP(5);
%Finding k1n, k2n ((((((((((((((((((((((((((((((((
%Reaction Rates
w1 = k1p*C1*C3 - k1n*C4;
w2 = k2p*C4*C2 - k2n*C5*C3;
%solving for k1n and k2n

49

k1n=solve(w1==0, k1n);
k2n=solve(w2==0, k2n);
%)))))))))))))))))))))))))))))))))))))))))))))))))
%Molecular Matrix [1 0 0 1 1; 0 1 0 0 1; 0 0 1 1 0]
bA = C1+C4+C5;

%for A

bB = C2+C5;

%for B

bZ = C3+C4;

%for Z

%Reducing the system for species c1=A, c4=AZ


c3 = bZ - c4;
c5 = bA - c1 - c4;
c2 = bB - c5;
%Reaction Rates
w1 = k1p*c1*c3 - k1n*c4;
w2 = k2p*c4*c2 - k2n*c5*c3;
%Using Law of Conservation of Mass
G = r1*w1 + r2*w2;
%Reduced System
F = [G(1); G(4)];
F = subs(F,[c1,c4],[x1,x2]);
EP = [C1; C4];
m=20; n=17; %no of points forward and backward to the equilibrium point
h=0.03; %constant increment
%Finding points above EP
P=EP; r=P;
for forward = 1:m
J = ILDM1D_jacobian(F,r);
[b,eig_slow,eig_fast] = ILDM1D_slowest(J);
r = P + h*b;
Q = ILDM1D_projection(J);
P = ILDM1D_manifold(Q,F,r);
eig_slow_forward(forward,1) = abs(eig_slow);

50

eig_fast_forward(forward,1) = abs(eig_fast);
end
%Finding points below EP
P=EP; r=P;
for backward = 1:n
J = ILDM1D_jacobian(F,r);
[b,eig_slow,eig_fast] = ILDM1D_slowest(J);
r = P - h*b;
Q = ILDM1D_projection(J);
P = ILDM1D_manifold(Q,F,r);
eig_slow_backward(backward,1) = abs(eig_slow);
eig_fast_backward(backward,1) = abs(eig_fast);
end
%Plotting
hold on;
x=linspace(.5,1, forward);
plot(x,eig_slow_forward(:,1),'+k-');
plot(x,eig_fast_forward(:,1),'sk-');
x=linspace(.5,0, backward);
plot(x,eig_slow_backward(:,1),'*k-');
plot(x,eig_fast_backward(:,1),'ok-');
grid on;
xlabel('Time'); ylabel('Eigenvalue');
legend('Slow eigens forward','fast eigens forward',...
'slow eigens backward', 'fast eigens backward', 'Location',
'Best');

function [b,eig_slow,eig_fast] = ILDM1D_slowest(J)


[V,D] = eig(J);

51

if min(abs(diag(D))) == abs(D(1))
b = [V(1);V(2)];
eig_slow = D(1);
eig_fast = D(4);
else
b = [V(3);V(4)];
eig_slow = D(4);
eig_fast = D(1);
end

Rest of user-defined functions called in Listing 4 are same as defined in Listing 1.

Listing 5: MATLAB program to calculate and plot 2D ILDM


clc,clear;
PAUSE=.5;
% 1D ILDM points calculated using program in Listing 1.
E =[
0.3143

0.0087

0.0056

0.4944

0.1913

0.3455

0.0268

0.0187

0.4813

0.1732

0.3768

0.0439

0.0328

0.4672

0.1561

0.4080

0.0598

0.0482

0.4518

0.1402

0.4393

0.0746

0.0647

0.4353

0.1254

0.4705

0.0882

0.0823

0.4177

0.1118

0.5018

0.1007

0.1011

0.3989

0.0993

0.5330

0.1121

0.1209

0.3791

0.0879

0.5643

0.1225

0.1417

0.3583

0.0775

0.5955

0.1320

0.1635

0.3365

0.0680

0.6268

0.1407

0.1861

0.3139

0.0593

0.6580

0.1485

0.2095

0.2905

0.0515

0.6893

0.1556

0.2336

0.2664

0.0444

0.7205

0.1621

0.2584

0.2416

0.0379

0.7518

0.1680

0.2838

0.2162

0.0320

0.7830

0.1734

0.3096

0.1904

0.0266

0.8143

0.1782

0.3360

0.1640

0.0218

52

0.8455

0.1827

0.3628

0.1372

0.0173

0.8768

0.1868

0.3899

0.1101

0.0132

0.9080

0.1906

0.4174

0.0826

0.0094

0.9393

0.1940

0.4452

0.0548

0.0060

0.9705

0.1972

0.4733

0.0267

0.0028

];
Esize=size(E);Esize=Esize(1);
for k=1:Esize
k
EP=E(k,:);
[Pplus,Pminus]=ILDM2D3P_ABZ(EP);
PplusSize=size(Pplus);PplusSize=PplusSize(1);
PminusSize=size(Pminus);PminusSize=PminusSize(1);
Pplus2(1:PplusSize,:,k)=Pplus(:,:);
Pminus2(1:PminusSize,:,k)=Pminus(:,:);
end
%%%%%%%%%%%%%%% Plotting %%%%%%%%%%%%%%%%%
grid on; hold on;
xlabel('x1'); ylabel('x2'); zlabel('x5')
plot3(E(:,1),E(:,2),E(:,5),'sk-');
%Projection Curves
Esize=size(E);Esize=Esize(1);
for k=1:Esize
Pplus=Pplus2(:,:,k);
Pminus=Pminus2(:,:,k);
Pplus=Pplus(any(Pplus~=0,2),:);
Pminus=Pminus(any(Pminus~=0,2),:);
pause(PAUSE);
Jplus(1,1)=E(k,1);
Jplus(1,2)=E(k,2);
Jplus(1,3)=E(k,5);
Jplus(2,:)=Pplus(1,:);
plot3(Jplus(:,1),Jplus(:,2),Jplus(:,3),'*b-');
plot3(Pplus(:,1),Pplus(:,2),Pplus(:,3),'*b-');

53

Jminus(1,1)=E(k,1);
Jminus(1,2)=E(k,2);
Jminus(1,3)=E(k,5);
Jminus(2,:)=Pminus(1,:);
plot3(Jminus(:,1),Jminus(:,2),Jminus(:,3),'*b-');
plot3(Pminus(:,1),Pminus(:,2),Pminus(:,3),'*b-');
end
%Joining discrete points of projection curves
size2D=size(Pplus2(:,:,1));size2D=size2D(1);
lim=size2D;
for k=1:Esize
for n=1:size2D
Pplus3(k,:,n)=Pplus2(n,:,k);
if Pplus3(k,1,n)==0 && n<=lim+1
lim=n-1;
end
end
end
size2D=lim;
for k=1:size2D
Pplus=Pplus3(:,:,k);
pause(PAUSE);
plot3(Pplus(:,1),Pplus(:,2),Pplus(:,3),'*k-');
end
size2D=size(Pminus2(:,:,1));size2D=size2D(1);
lim=size2D;
for k=1:Esize
for n=1:size2D
Pminus3(k,:,n)=Pminus2(n,:,k);
if Pminus3(k,1,n)==0 && n<=lim+1
lim=n-1;
end
end
end
size2D=lim;

54

for k=1:size2D
Pminus=Pminus3(:,:,k);
pause(PAUSE);
plot3(Pminus(:,1),Pminus(:,2),Pminus(:,3),'*k-');
end

function [Pplus, Pminus] = ILDM2D3P_ABZ(EP)


syms c1 c2 c3 c4 c5 x1 x2 x3
syms k1p k2p k1n k2n %positive and negative k's
h=0.03;
%Stoichiometric Vectors
r1 = [-1; 0; -1; 1; 0];
r2 = [0; -1; 1; -1; 1];
%Initial Conditions
k1p=1; k2p=0.5;
C1=EP(1); C2=EP(2); C3=EP(3); C4=EP(4); C5=EP(5);
%Finding k1n, k2n ((((((((((((((((((((((((((((((((
%Reaction Rates
w1 = k1p*C1*C3 - k1n*C4;
w2 = k2p*C4*C2 - k2n*C5*C3;
%solving for k1n and k2n
k1n=solve(w1==0, k1n);
k2n=solve(w2==0, k2n);
%)))))))))))))))))))))))))))))))))))))))))))))))))
%Molecular Matrix [1 0 0 1 1; 0 1 0 0 1; 0 0 1 1 0]
bA = C1+C4+C5;

%for A

bB = C2+C5;

%for B

bZ = C3+C4;

%for Z

%Reducing for species x1=A, x2=B and x3=Z


c4 = bA - c1 - c5;
c3 = bZ - c4;

55

%Reaction Rates
w1 = k1p*c1*c3 - k1n*c4;
w2 = k2p*c4*c2 - k2n*c5*c3;
%Using Law of Conservation of Mass
G = r1*w1 + r2*w2;
%Reduced System
F = [G(1); G(2); G(5)];
F = subs(F,[c1,c2,c5],[x1,x2,x3]);
EP = [C1; C2; C5];
m=60; n=5; %no of points to be drawn above and below the equillibrium
point
%Finding points above EP
P=EP; r=P;
for Plus = 1:m
J = ILDM2D3P_jacobian(F,r);
b = ILDM2D3P_slowest(J);
r = P + h*b;
Q = ILDM2D3P_projection(J);
P = ILDM2D3P_manifold(Q,F,r);
if P(1)~=abs(P(1)) || P(2)~=abs(P(2)) || P(3)~=abs(P(3))
break;
end
Pplus(Plus,:) = P;
end
%Finding points below EP
P=EP; r=P;
for Minus = 1:n
J = ILDM2D3P_jacobian(F,r);
b = ILDM2D3P_slowest(J);
r = P - h*b;
Q = ILDM2D3P_projection(J);
P = ILDM2D3P_manifold(Q,F,r);

56

if P(1)~=abs(P(1)) || P(2)~=abs(P(2)) || P(3)~=abs(P(3))


break;
end
Pminus(Minus,:) = P;
end

function J = ILDM2D3P_jacobian(F,r)
syms x1 x2 x3
J = jacobian(F);
J = subs(J, [x1,x2,x3], [r(1),r(2),r(3)]);
J = eval(J);

function b = ILDM2D3P_slowest(J)
[V,D] = eig(J);
if min(abs(diag(D))) == abs(D(1))
b = [V(1);V(2);V(3)];
elseif min(abs(diag(D))) == abs(D(5))
b = [V(4);V(5);V(6)];
else
b = [V(7);V(8);V(9)];
end

function Q = ILDM2D3P_projection(J)
[E,D] = schur(J);
if max((diag(D))) == (D(1))
if (E(5)) > (D(9))
Q = [E(4) E(5) E(6); E(7) E(8) E(9)];
else

57

Q = [E(7) E(8) E(9); E(4) E(5) E(6)];


end
elseif max((diag(D))) == (D(5))
if (D(1)) > (D(9))
Q = [E(1) E(2) E(3); E(7) E(8) E(9)];
else
Q = [E(7) E(8) E(9); E(1) E(2) E(3)];
end
else
if (D(1)) > (D(5))
Q = [E(1) E(2) E(3); E(4) E(5) E(6)];
else
Q = [E(4) E(5) E(6); E(1) E(2) E(3)];
end
end

function P = ILDM2D3P_manifold(Q,F,r)
syms x1 x2 x3
R = Q*F;
var = ILDM2D3P_variation(R,r); %Returns var=[var_x1,var_x2,var_x3]
if min(var) == var(1) % i.e. if var_x1 < var_x2
S = subs(R,x1,r(1));
[x2,x3] = solve(S==0);
P = double([r(1); x2(1); x3(1)]);
elseif min(var) == var(2)
S = subs(R,x2,r(2));
[x1,x3] = solve(S==0);
P = double([x1(1); r(2); x3(1)]);
else
S = subs(R,x3,r(3));
[x1,x2] = solve(S==0);
P = double([x1(1); x2(1); r(3)]);
end

58

function var = ILDM2D3P_variation(R, r)


syms x1 x2 x3 dx1 dx2 dx3
M = R(1); N = R(2);
Mx1=diff(M,x1); Mx2=diff(M,x2); Mx3=diff(M,x3);
Nx1=diff(N,x1); Nx2=diff(N,x2); Nx3=diff(N,x3);
x1 = r(1); x2 = r(2); x3 = r(3);
% ******** 1st possibility
dM = Mx1 + Mx2*dx2 + Mx3*dx3; %Derivative of M wrt x1
dN = Nx1 + Nx2*dx2 + Nx3*dx3; %Derivative of N wrt x1
S = vpasolve([dM==0, dN==0], [dx2, dx3]);
VARx1 = (eval(S.dx2))^2 + (eval(S.dx3))^2;
% ******** 2nd possibility
dM = Mx1*dx1 + Mx2 + Mx3*dx3; %Derivative of M wrt x2
dN = Nx1*dx1 + Nx2 + Nx3*dx3; %Derivative of N wrt x2
S = vpasolve([dM==0, dN==0], [dx1, dx3]);
VARx2 = (eval(S.dx1))^2 + (eval(S.dx3))^2;
% ******** 3rd possibility
dM = Mx1*dx1 + Mx2*dx2 + Mx3; %Derivative of M wrt x3
dN = Nx1*dx1 + Nx2*dx2 + Nx3; %Derivative of N wrt x3
S = vpasolve([dM==0, dN==0], [dx1, dx2]);
VARx3 = (eval(S.dx1))^2 + (eval(S.dx2))^2;
var = [VARx1, VARx2, VARx3];

Listing 6: MATLAB program to calculate and plot solution trajectories in 3D phase space
clc;clear;grid on;hold on;

axis([0 1 0 1]);
for x1=0:.2:1
for x2=0:.2:1
for x3=0:.2:1
[T,Y] = ode45(@ode_full,[1,2,3,4,5],[x1 x2 x3]);

59

plot3(Y(:,1),Y(:,2),Y(:,3), 'k')
end
end
end
xlabel('x1'); ylabel('x2'); zlabel('x5');

function dy = ode_full(t,y)
dy = zeros(3,1);

dy(1) = 1/8 - y(3)/8 - y(1)*(y(1) + y(3) - 1/2) - y(1)/8;


dy(2) = y(2)*(y(1)/2 + y(3)/2 - 1/2) + 2*y(3)*(y(1) + y(3) - 1/2);
dy(3) = - y(2)*(y(1)/2 + y(3)/2 - 1/2) - 2*y(3)*(y(1) + y(3) - 1/2);

60

Das könnte Ihnen auch gefallen