numerical modeling in chemistry

39
NUMERICAL MODELING IN CHEMISTRY NUMERICAL KINETIC CHEMISTRY (Lorentz JÄNTSCHI, Elena Maria PICĂ) NUMERICAL DESCRIPTION OF TITRATION (Lorentz JÄNTSCHI, Horea Iustin NAŞCU) CORRELATIONS AND REGRESSIONS WITH MATHLAB (Lorentz JÄNTSCHI, Mihaela UNGUREŞAN)

Upload: udell

Post on 25-Feb-2016

96 views

Category:

Documents


5 download

DESCRIPTION

NUMERICAL MODELING IN CHEMISTRY. NUMERICAL KINETIC CHEMISTRY (Lorentz JÄNTSCHI, Elena Maria PICĂ ) NUMERICAL DESCRIPTION OF TITRATION (Lorentz JÄNTSCHI, Horea Iustin NAŞCU) CORRELATIONS AND REGRESSIONS WITH MATHLAB (Lorentz JÄNTSCHI, Mihaela UNGUREŞAN). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: NUMERICAL MODELING IN CHEMISTRY

NUMERICAL MODELING IN CHEMISTRY

•NUMERICAL KINETIC CHEMISTRY(Lorentz JÄNTSCHI, Elena Maria PICĂ)

•NUMERICAL DESCRIPTION OF TITRATION

(Lorentz JÄNTSCHI, Horea Iustin NAŞCU)•CORRELATIONS AND REGRESSIONS WITH MATHLAB

(Lorentz JÄNTSCHI, Mihaela UNGUREŞAN)

Page 2: NUMERICAL MODELING IN CHEMISTRY

NUMERICAL KINETIC CHEMISTRY(Lorentz JÄNTSCHI, Elena Maria PICĂ)

Page 3: NUMERICAL MODELING IN CHEMISTRY

Concentration gradient in an oscillating reaction

The oscillating reactions are more than a laboratory curiosity.

If in the industrial processes they appear in few cases, in biochemical systems there are numerous examples of oscillating reactions.

For instance, the oscillating reactions maintain the rhythm.

All live processes are based on one or more oscillating reactions.

Page 4: NUMERICAL MODELING IN CHEMISTRY

The MathCad parameters for the animation:

r0 0.99 p0 0.01 k 4 p t( ) e t pp x y z( ) x y2 6 z

P x y z t( ) p t( ) pp x y z( ) R x y z t( ) r0 p0 P x y z t( )

tP x y z t( )d

dk R x y z t( ) P x y z t( ) solve t

1. ln .625 1. x 1. y2 6. z .125 25. 16. x 16. y2 96. z

1. ln .625 1. x 1. y2 6. z .125 25. 16. x 16. y2 96. z

ttt x y z( ) 1. ln .625 1. x 1. y2 6. z .125 25. 16. x 16. y2 96. z

l x( ) x 0.1

x 0 0.1 FRAME

i 0 1 10 j 0 1 10 t2i j ttt i10

j10

l x( ) t1i j ttt i10

j10

0.206

Page 5: NUMERICAL MODELING IN CHEMISTRY

Lotka – Volterra autocatalytic oscillator model

Phenomena:complex reaction, in homogeneous phase (stage), which

shows damped or undamped oscillations

Kinetic model:R + X → 2X, υ = κ1·[R]·[X] (a)X + Y → 2Y, υ = κ2·[X]·[Y] (b)Y → P, υ = κ3·[Y] (c)P → , υ = κ4·[P] (d)

Page 6: NUMERICAL MODELING IN CHEMISTRY

Mathematical model:

= υ(a) − υ(b) = κ1·[R]·[X] − κ2·[X]·[Y] (1)

= υ(b) − υ(c) = κ2·[X]·[Y] − κ3·[Y] (2)dt]Y[d

dt]X[d

Numerical model:

xn+1 = xn+ (tn+1-tn)·xn·(κ1·[R]-κ2·yn) (3)yn+1 = yn+(tn+1-tn)·yn·(κ2·xn-κ3) (4)x0 = [X]0 = 1, y0 = [Y]0 = 1, κ1 = 3, κ2 = 4, κ3 = 5, [R] = 2

Page 7: NUMERICAL MODELING IN CHEMISTRY

Graphs produced/generated the numerical series/systems (xn)n≥0 and (yn)n≥0 corresponding to the temporal series (tn)n≥0:

2.5

0.5

xn

yn

xyn

50 tn

0 1 2 3 4 50.5

1

1.5

2

2.5

The oscillation of the intermediaries in L-V mechanism

Page 8: NUMERICAL MODELING IN CHEMISTRY

The variation path ([X],[Y]) in the L-V mechanism

2.5

0.5

yn

2.50.5 xn

0.5 1 1.5 2 2.50.5

1

1.5

2

2.5

Page 9: NUMERICAL MODELING IN CHEMISTRY

Product evolution:

5

0

Pn

50 tn

0 1 2 3 4 50

2.5

5 8

0

pn

50 tn

0 1 2 3 4 50

4

8

The variation of the product concentration in L-

V mechanism

Product storage in L-V mechanism

Page 10: NUMERICAL MODELING IN CHEMISTRY

A model of damped oscillations

Phenomena:let it be a chemical process that takes place

according to the following model of a reaction mechanism:

Kinetic model:R1 → X, υ = κ1·[R1] (a)

2X + Y → 3Y, υ = κ2·[X]2·[Y] (b)

R2 + X → Y + P1, υ = κ3·[R2]·[X] (c)

Y → P2, υ = κ4·[Y] (d)

Page 11: NUMERICAL MODELING IN CHEMISTRY

Observation:As in Lotka – Volterra, model, the concentrations of the R1 and R2 reacting substances remain constant during the process.

Mathematical model:

= υ(a) − 2·υ(b) − υ(c) = (1)

= κ1·[R1] − 2·κ2·[X]2·[Y] − κ3·[R2]·[X]

= 2·υ(b) + υ(c) − υ(d) = (2)

= 2·κ2·[X]2·[Y] + κ3·[R2]·[X] − κ4·[Y]

dt]X[d

dt]Y[d

Page 12: NUMERICAL MODELING IN CHEMISTRY

Numerical model:xn+1 = xn+(tn+1-tn)·(κ1·[R1]-xn·(2·κ2·xn·yn+κ3·[R2]))

(3)

yn+1 = yn+(tn+1-tn)·(xn·(2·κ2·xn·yn+κ3·[R2])-κ4·yn)

(4)

Data output:x0 = 0, y0 = 1, κ1 = 3, κ2 = 4, κ3 = 5, κ4 = 7,

[R1] = 2, [R2] = 2,

tn = n/100000 with n = 0,1..300000

Page 13: NUMERICAL MODELING IN CHEMISTRY

The damped oscillations in chemical reactions (a) the conc. of the intermediary X

0.177

0.175

yn

30 tn

0 1 2 30.175

0.176

0.177

Page 14: NUMERICAL MODELING IN CHEMISTRY

The damped oscillations in chemical reactions (b) the concentration of the intermediary Y

2.32

2.31

xn

30 tn

0 1 2 32.31

2.315

2.32

Page 15: NUMERICAL MODELING IN CHEMISTRY

The damped oscillations in chemical reactions (c) the damped oscillation path ([X],[Y])

0.177

0.175

yn

2.322.31 xn

2.31 2.315 2.320.175

0.176

0.177

Page 16: NUMERICAL MODELING IN CHEMISTRY

Data results:

equilibrium concentration are[X] = 2.315 and [Y] = 0.176

and the equilibrium ratio are[X]/[Y] = 13.53

the dependence on time (tn)n≥0 of the accumulation of the

reaction products [P1] = (p1n)n≥0 and [P2] = (p2n)n≥0

is linear (see next graphs)

Page 17: NUMERICAL MODELING IN CHEMISTRY

The linear variation of the amount of products in damped oscillating reactions (products P1 and P2)

0.04

0

p1n

30 tn

0 1 2 30

0.02

0.04 6

0

p2n

30 tn

0 1 2 30

3

6

Conclusion: the concentration of the reaction products changes linearity even if the concentrations of the agents X and Y oscillate towards the equilibrium value

Page 18: NUMERICAL MODELING IN CHEMISTRY

The brussel model of autocatalytic oscillation

Remarks:The brussel model was initiated by a group from Bruxelles

directed by Ilya Prigogine (Nobel Prize) it introduce for the first time, mechanism of a reaction whose scheme of evolution converged on an attractor.

More authors have changed this variant and have studied the systems running according to this mechanism.

Simplified variant of kinetic model:R → X, υ = κ1·[R] (a)

X + 2Y → 3Y, υ = κ2·[X]·[Y]2(b)

Y → P, υ = κ3·[Y] (c)

Page 19: NUMERICAL MODELING IN CHEMISTRY

= υ(a) − υ(b) = κ1·[R1] − κ2·[X]·[Y]2 (1)

= υ(b) − υ(c) = κ2·[X]·[Y]2 − κ3·[Y] (2)

dt]X[d

dt]Y[d

Mathematical model:

Observations:Though the equations (1) and (2) seem simpler, at first sight, they are even more difficult to be solved by integration than previous cases. Moreover, the literature has not recorded their integration into the general case described by (1-2). Besides, the equations do not lead to an attractor model not matter by values of the constants of speed and of the concentrations [R], [X]0 and [Y]0.

Page 20: NUMERICAL MODELING IN CHEMISTRY

The attempt of solving (1-2) is full of surprises. For most of the values a system which develops towards a position of equilibrium is obtained; there are values for which damped oscillations to equilibrium are found again; the undamped periodical oscillations have also an important role, which is confirmed by the majority of the organisms in which the cellular biochemical processes are based on such oscillations.

The processes taking place within the heart are a conclusive example; the periodical heart beats are due to processes of this type. The importance of these processes is great.

This was the reason for which Ilya Prigogine was awarded the Nobel Prize for chemistry in 1977, namely for his theories on the dissipative systems.

Page 21: NUMERICAL MODELING IN CHEMISTRY

The equations (1-2) are simplified if [R] = 1, κ1 = 1 and κ3 = 1,

are chosen and when the differential system of equations becomes:x’ = 1 – κ2·x·y2; y’ = κ2·x·y2 – y (3)

However, the numerical simulation is made in the same way. Thus the iteration equation of variation for (3) is written:xn+1 = xn+(tn+1-tn)·(1-κ2·xn·yn

2),

yn+1 = yn+(tn+1-tn)·(κ2·xn·yn2-yn) (4)

Now choosing κ2 = 0.88 and taking into consideration two cases, the first one in which the initial concentrations of the agents are x10 = [X]1,0 = 1.5 and y10 = [Y]1,0 = 2 and second case in which x20 = [X]2,0 = 2 and y20 = [Y]2,0 = 2.5 and the series tn = n/100 with n = 0,1..150,

Page 22: NUMERICAL MODELING IN CHEMISTRY

following representations for the concentrations of the agents [X] = (xn)n≥0 and [Y] = (yn)n≥0 are obtained:

4

0

x1n

x2n

1.50 tn

0 0.75 1.50

2

44

0

y1n

y2n

1.50 tn

0 0.75 1.50

2

4

The concentrations of the intermediaries up to the attractor for two cases with different I.C.

Page 23: NUMERICAL MODELING IN CHEMISTRY

And the variation diagram of [Y] depending on [X] and the variation in time of the storage of reaction product is:

4

0

y1n

y2n

40 x1n x2n0 2 4

0

2

4

(a) The entrance of [Y] related to [X] on the same gravitational orbit for

(b) different product quantities obtained in two cases having different initial conditions

400

0

p1n

p2n

1.50 tn

0 0.75 1.50

200

400

Page 24: NUMERICAL MODELING IN CHEMISTRY

If the previous figures are not very conclusive and fig. 10b seems to confirm this, the figures shows that, though the two systems start from different values of the concentrations of the agents, in both cases the system comes to evolve rather early on the same trajectory.

Now, increasing the time interval by choosing another n = 0,1..3000 the following concentrations of the agents are obtained [X]1 = (x1n)n≥0, [X]2 = (x2n)n≥0, [Y]2 = (y2n)n≥0 and [Y]2 = (y2n)n≥0 for the two cases 1 and 2 of the chosen system (see next figures).

It is noticed that, even if they do not evolve according the same values, same period and amplitude of the oscillations are recorded.

Page 25: NUMERICAL MODELING IN CHEMISTRY

The periodical evolution having the same oscillation periodT = 0.226 of: (a) [X] and (b) [Y], for two cases having

different initial conditions

4

0

x1n

x2n

300 tn

0 15 300

2

4 4

0

y1n

y2n

300 tn

0 15 300

2

4

The dependence of [Y] under [X] for the cases as well as the accumulation of the product is printed in the next figures:

Page 26: NUMERICAL MODELING IN CHEMISTRY

(a) Convergence at atractor of brusselator system independent from initial conditions

and (b) different quantities of resulted product

4

0

y1n

y2n

40 x1n x2n0 2 4

0

2

4 3000

0

p1n

p2n

300 tn

0 15 300

1500

3000

atractor

start point

Page 27: NUMERICAL MODELING IN CHEMISTRY

Conclusion:

The difference between the Lotka-Voltera model and Bruxelles model one is the following:

The Lotka-Voltera model oscillates around the initial values of the concentrations of the agents, whereas the Bruxelles one converges, in time on the same variation equation irrespective of the initial values of the concentrations of the agents.

In fact the attractor does not appear for any of their values; for a given k2 there are minimum y0,min and x0,min values from which the periodical oscillations arise and the system tends towards the curve given in previous figures.

Page 28: NUMERICAL MODELING IN CHEMISTRY

References:

M. Diudea, I. Gutman, L. Jäntschi (2001), Molecular Topology, Nova Science, Huntington, New York, 332 p., ISBN 1-56072-957-0.

M. V. Diudea, Ed. (2001), QSPR / QSAR Studies by Molecular Descriptors, Nova Science, Huntington, New York, 438 p., ISBN 1-56072-859-0.

L. Jäntschi, M. Ungureşan (2001), Chimie Fizică. Cinetică şi Dinamică Moleculară, Mediamira, Cluj-Napoca, 159 p., ISBN 973-9358-71-3.

L. Jäntschi (2002), Studii Fitosanitare, Amici, Cluj-Napoca, 140 p., in press.

Page 29: NUMERICAL MODELING IN CHEMISTRY

NUMERICAL DESCRIPTION OF TITRATION

(Lorentz JÄNTSCHI, Horea Iustin NAŞCU)

Abstract:The analytical methods of qualitative and quantitative

determination of ions in solutions are very flexible to automation.

The process of titration is a recurrent process that can be watched by permanent measurement of a simple property such as mass, current intensity, tension, volume or a complex property such as adsorption, heat of reaction, which need a complex evaluation.

The present work is focused on modeling the process of titration and presents a numerical simulation of acid-base titration. Titration parameter selected is the pH.

The method permits to observe the titration process and identify the equivalence point of titration.

Page 30: NUMERICAL MODELING IN CHEMISTRY

Modeled reaction:

NH3 + H2O NH4+ + HO–,

Кb = ]NH[

]HO[]NH[

3

4 = 1.79∙10-5;

CH3COOH + H2O H3O+ + CH3COO–,

Кa = ]COOHCH[

]COOCH[]OH[

3

33 = 1.79∙10-5;

Page 31: NUMERICAL MODELING IN CHEMISTRY

If we consider that initially there exist 100 mmols of the first solution (NH3) and no reaction product (CH3COONH4) and we note with “a” letter quantities from first solution and with “b”, the quantities from second solution, initial conditions (IC) can be written as:

00100

:aaaabbbb

0

0

0

1aa1aabb

1bb:

aaaabbbb

n

n

n

1n

1n

1n

Integer values of substances from solution let be evolve by steps of 1 mmol added solution. The corresponding equation is:

Page 32: NUMERICAL MODELING IN CHEMISTRY

A correction is now necessary. The concentrations are of natural values (not negative numbers) and supplementary adding of one reactant in solution lead only to deplete the other one reactant. In conclusion, must reconsider previous equations with following corrections for iteration n:

)0,100aa,100aa(if)bb,aabb,0bb(if

)0,bb,0bb(if:

aabb

nn

0nn

nn

n

n

n

0,

abbkb

lg14,0bif0,ab

akalg,0aif:pH

n

nn

n

nnn

In every moment of titration, the pH is given by (where another environment condition was considered, the normal temperature, that make that pH + pOH = 14):

Page 33: NUMERICAL MODELING IN CHEMISTRY

The following step is now simple. Fitting the dependencies pHn for n = 0, 1, …, 200 with MathCad (as example) will be obtain a graphic in form:

12

4

pHn

2000 n0 40 80 120 160 200

456789

101112

Numerically fitted data in simulated titration

Page 34: NUMERICAL MODELING IN CHEMISTRY

Conclusions and remarks

The titration process is simple in appearance but shows to be complex in details. Even the simple case of titration of monobasic base ammonia with a monoprotic acid, such as acetic acid, hangs up unexpected difficulties in simulation process. The difficulties exists especially because is no approximations in model. Only one (so called) approximation is sequent adding of titrate, that are also perfectly possible in practice.

The method permits to investigate more complex processes such as titration of polyprotic acids and polybasic bases. If no approximation will be made, more complex equations will be necessary and superior rank equations will appear to be solved.

Page 35: NUMERICAL MODELING IN CHEMISTRY

CORRELATIONS AND REGRESSIONS WITH MATHLAB

(Lorentz JÄNTSCHI, Mihaela UNGUREŞAN)

Abstract:A MATHLab computer program is implemented. The

program presented demonstrates the power of MATHLab in working with statistical processing, and can be considered as an example for future applications.

The program draws an exportable figure of fitted data and regression curve and calculates the correlation coefficient r and sum of residues.

Page 36: NUMERICAL MODELING IN CHEMISTRY

Specifications:

The execution of the program makes the posting of a window like in the figures attached, in which we can modify the expression of the function (y = P(x)) or the form of posting (box or grid).

For exemplifying let’s consider a correlation study of efficiency time executing of numerical methods that are using a Runge-Kuta-Niström predictor – corrector:

1 2 3 4 5 6 7 8 time(s) 1.1 2.2 8.0 31 58 71 92 100 log(err) -1.7 -1.95 -3.8 -5.7 -7.3 -8.4 -9.9 -10.3

Page 37: NUMERICAL MODELING IN CHEMISTRY

There is an automatic calculus for every defined function the values of the correlation between Ŷ = P(X) and X and the value of residues sum given by the formula:

N

1iii yy)y,y(err

In first figure are presented fitted dates from table with a parabolic regression and program makes the corresponding correlations and sums of residues.

In second figure, in same execution, with same dates from table are fitted with a linear regression model and program makes rebuild corresponding correlations and sums of residues.

Page 38: NUMERICAL MODELING IN CHEMISTRY

Linear regression demo of the program

Page 39: NUMERICAL MODELING IN CHEMISTRY

Parabolic regression demo of the program