Ezek illusztrációk az FHJ-elmélethez

At first we have to initialize the package. This package is being developed by David Papp.

In[2]:=

<<ReactionKinetics`ReactionKinetics`

We can define our sample reactions in stoichimetric form using the ToStoichiometry function.

In[3]:=

Reakcio0 = ToStoichiometry[{2A_1→A_2}, {}]

Out[3]=

In[4]:=

Reakcio1 = ToStoichiometry[{A_1 + A_2↔2 A_4, A_1↔A_2→A_3→A_1}, {}]

Out[4]=

In[5]:=

Reakcio2 = ToStoichiometry[{A_1 + A_2↔2 A_3, A_1↔A_2→A_3→A_1}, {}]

Out[5]=

In[6]:=

Reakcio3 = ToStoichiometry[{A_1 + A_2→2 A_4, A_1→A_2→A_3}, {}]

Out[6]=

In[7]:=

Reakcio4 = ToStoichiometry[{A_1 + A_2→2 A_3, A_1→A_2→A_3}, {}]

Out[7]=

In[8]:=

Reakcio5 = ToStoichiometry[{A_1→A_2→A_3→A_1, A_3→A_4→A_2}, {}]

Out[8]=

I construct a list of the reactions to make it easier to handle.

In[9]:=

Reakcioim = {Reakcio0, Reakcio1, Reakcio2, Reakcio3, Reakcio4, Reakcio5} ;

The Deficiency function will compute the deficiencies of all the reactions given in stochiometric form.

Deficiency/@Reakcioim

{0, 0, 1, 0, 1, 0}

Other examples

Triangle model

We define the reaction model:

In[10]:=

triangleReactionDraft2 = {y→x→z→y} ;

We construct the stoichiometric model:

In[11]:=

triangleReaction2 = ToStoichiometry[triangleReactionDraft2, {}]

Out[11]=

In[13]:=

MatrixForm[β/.triangleReaction2]

Out[13]//MatrixForm=

( {{0, 1, 0}, {0, 0, 1}, {1, 0, 0}} )

We can define the rate constants of the reactions.

In[14]:=

Deficiency[triangleReaction2]

Out[14]=

0

ReactionRatesNotebook[triangleReaction2]

Leeds oxidációs mechanizmus, 1.5

In[15]:=

reac = ReadList["chem.txt", String, RecordLists→True]

Out[15]=

In[18]:=

f[{a_, b_}] := b

In[16]:=

Partition[reac[[1]], 2]

Out[16]=

In[19]:=

ff = f/@Partition[reac[[1]], 2]

Out[19]=

In[20]:=

Map[StringReplace[#, "="→"↔"] &, ff]

Out[20]=

In[21]:=

te = ToExpression[%]

Out[21]=

In[22]:=

tsm = ToStoichiometry[te]

Out[22]=

In[23]:=

ts = ToStoichiometry[te, {M}]

Out[23]=

M megfelelően van kezelve?

In[24]:=

Deficiency[tsm]

Out[24]=

15

In[25]:=

Deficiency[ts]

Out[25]=

15

In[26]:=

FHJComponents[ts]

Out[26]=

In[27]:=

FHJStrongComponents[ts]

Out[27]=

ReactionRatesNotebook[ts]

In[29]:=

myReactionRates2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 4, 5, 6, 7, 7, 4, 5, 2, 3, 4, 5, 7, 8, 7, 6, 5, 3, 4, 1, 2, 3, 3, 4} ;

In[35]:=

kezdbal = Through[variables/.ts/.x_→x[0]]

Out[35]=

{c_H[0], c_H2[0], c_H2O[0], c_H2O2[0], c_HO2[0], c_O[0], c_O2[0], c_OH[0]}

In[33]:=

SeedRandom[100] ; kezdjobb = Array[Random[] &, 8]

Out[33]=

{0.185898, 0.242848, 0.20331, 0.0515874, 0.440317, 0.239615, 0.817663, 0.23069}

: xH2 = 0.2958, xO2 = 0.1479, xN2 = 0.5563, a többi 0

(sztöchiometrikus hidrogén - levegő keverék) . p = 1atm, T = 1200K . Remekül be

fog robbanni 1ms alatt .

In[36]:=

ini = Equal@@@Transpose[{kezdbal, kezdjobb}]

Out[36]=

{c_H[0] == 0.185898, c_H2[0] == 0.242848, c_H2O[0] == 0.20331, c_H2O2[0] == 0.0515874, c_HO2[0] == 0.440317, c_O[0] == 0.239615, c_O2[0] == 0.817663, c_OH[0] == 0.23069}

In[39]:=

cc = Concentrations[ts, myReactionRates2, kezdjobb, 0, 10]

Out[39]=

In[40]:=

Plot[Evaluate[{c_H[t], c_H2[t], c_H2O[t], c_H2O2[t]}/.cc], {t, 0, 0.2}, PlotStyle→ {RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[0, 0, 1], RGBColor[0, 0, 0]}] ;

[Graphics:HTMLFiles/deficiency_62.gif]

Mi van a csomagban?

Names["ReactionKinetics`*"]


Created by Mathematica  (September 29, 2006) Valid XHTML 1.1!