Chemical kinetics: the basics#

Written by Allan Leal (ETH Zurich) on Nov 16th, 2022

Attention

Always make sure you are using the latest version of Reaktoro. Otherwise, some new features documented on this website will not work on your machine and you may receive unintuitive errors. Follow these update instructions to get the latest version of Reaktoro!

In this first tutorial about chemical kinetics modeling using Reaktoro, we simulate the dissolution of a 1 cm³ cube of halite crystal, NaCl(s), in pure water at 25 °C and 1 bar. We make the following assumptions:

  1. The crystal remains a cube as it dissolves and its surface area over time can be computed as current crystal volume × 6 cm²/cm³.

  2. The reactions among aqueous species are much faster than that of the crystal dissolution. As a result, all aqueous species are assumed in equilibrium at all times.

Note

There is no need to define the aqueous reactions because Reaktoro uses a Gibbs energy minimization algorithm to compute the equilibrium state of all species in the system that are not restricted by chemical kinetics constraints.

Before anything else, let’s import the reaktoro Python package:

from reaktoro import *

For this simulation, we need a reaction rate model for the reaction NaCl(s) = Na+ + Cl-. Before we define it next, note that NaCl(s) will be referred as Halite, which is the name of this mineral in the PHREEQC database phreeqc.dat used in this tutorial.

# The surface area of a cube per volume (in m2/m3)
Abar = 6.0

def ratefn(props: ChemicalProps):
    aprops = AqueousProps(props)  # we need an AqueousProps object to compute the saturation ratio of the mineral
    k0 = pow(10.0, -0.21)  # the reaction rate constant at 25 °C from Palandri and Kharaka (2004)
    q = props.phaseProps("Halite").volume()  # the current volume of the mineral (in m3)
    Omega = aprops.saturationRatio("Halite")  # the current saturation ratio of the mineral Ω = IAP/K
    return q * Abar * k0 * (1 - Omega)  # (1 - Ω) is the current measure of disequilibrium! Ω < 1 implies mineral is undersaturated

Note

In Reaktoro, a reaction rate is a net reaction rate (i.e., forward rate minus reverse rate). A reaction rate model is a function that receives an object of class ChemicalProps (i.e., props) containing the current chemical and thermodynamic properties of the system and returns the calculated reaction rate corresponding to current conditions.

We’ll now define our chemical system for this simulation, which contains an aqueous solution, a mineral phase, and a reaction:

db = PhreeqcDatabase("phreeqc.dat")

system = ChemicalSystem(db,
    AqueousPhase("H2O H+ OH- Na+ Cl- NaOH").set(ActivityModelPhreeqc(db)),
    MineralPhase("Halite"),
    GeneralReaction("Halite = Na+ + Cl-").setRateModel(ratefn)  # define the reaction and set its reaction rate model!
)

Tip

Given that all aqueous species are assumed to react much faster than the mineral, we could also have defined the above reaction using just the mineral name GeneralReaction("Halite"). Try this and check the results, which should be very similar to the ones we get here.

With this alternative reaction definition, Reaktoro will use the assigned reaction rate model to determine how much the mineral dissolves over time and will use chemical equilibrium and mass conservation equations (because chemical elements and electrical charge are preserved in this problem!) to determine how the amounts of aqueous species change as the mineral reacts.

The next step is to define the initial condition of the system: 1 kg of pure water and 1 cm³ of halite mineral at 25 °C and 1 bar:

state = ChemicalState(system)
state.temperature(25.0, "C")
state.pressure(1.0, "bar")
state.set("H2O", 1.0, "kg")
state.scalePhaseVolume("Halite", 1.0, "cm3")  # start with 1 cm3 cube of halite crystal

Next, we’ll define the chemical kinetics solver and a few other things needed for the simulation (detailed in the comments), and then we’ll start the time stepping procedure to compute a sequence of chemical states, each obtained by letting the system react for a specified length of time:

solver = KineticsSolver(system)  # the chemical kinetics solver

table = Table()  # used to create table of data for later output and plotting

dt = 60.0  # time step (in seconds)

# Initiate the time stepping for the kinetics modeling
for i in range(501):
    result = solver.solve(state, dt)  # compute the chemical state of the system after it reacted for given time length

    assert result.succeeded(), f"Calculation did not succeed at time step #{i}."

    props = state.props()  # get the current thermodynamic and chemical properties of the system

    table.column("Time")   << i*dt / 60  # from seconds to minutes
    table.column("Halite") << props.phaseProps("Halite").volume() * 1e+6  # from m3 to cm3
    table.column("Na+")    << props.speciesAmount("Na+")  # in mol
    table.column("Cl-")    << props.speciesAmount("Cl-")  # in mol

The collected data above can be saved to a file:

table.save("data.txt")

And it looks like this:

print(table)
   Time |    Halite |         Na+ |         Cl-
0.00000 |  0.994020 | 0.000220647 | 0.000220647
1.00000 |  0.988077 | 0.000439974 | 0.000439974
2.00000 |  0.982168 | 0.000657990 | 0.000657990
3.00000 |  0.976296 | 0.000874703 | 0.000874703
4.00000 |  0.970458 |  0.00109012 |  0.00109012
5.00000 |  0.964655 |  0.00130425 |  0.00130425
6.00000 |  0.958887 |  0.00151710 |  0.00151710
7.00000 |  0.953153 |  0.00172867 |  0.00172867
8.00000 |  0.947454 |  0.00193898 |  0.00193898
9.00000 |  0.941788 |  0.00214803 |  0.00214803
10.0000 |  0.936157 |  0.00235584 |  0.00235584
11.0000 |  0.930559 |  0.00256240 |  0.00256240
12.0000 |  0.924995 |  0.00276772 |  0.00276772
13.0000 |  0.919464 |  0.00297182 |  0.00297182
14.0000 |  0.913966 |  0.00317470 |  0.00317470
15.0000 |  0.908501 |  0.00337636 |  0.00337636
16.0000 |  0.903068 |  0.00357682 |  0.00357682
17.0000 |  0.897668 |  0.00377608 |  0.00377608
18.0000 |  0.892301 |  0.00397414 |  0.00397414
19.0000 |  0.886965 |  0.00417103 |  0.00417103
20.0000 |  0.881662 |  0.00436673 |  0.00436673
21.0000 |  0.876390 |  0.00456127 |  0.00456127
22.0000 |  0.871149 |  0.00475464 |  0.00475464
23.0000 |  0.865940 |  0.00494686 |  0.00494686
24.0000 |  0.860762 |  0.00513792 |  0.00513792
25.0000 |  0.855615 |  0.00532785 |  0.00532785
26.0000 |  0.850499 |  0.00551664 |  0.00551664
27.0000 |  0.845414 |  0.00570430 |  0.00570430
28.0000 |  0.840358 |  0.00589084 |  0.00589084
29.0000 |  0.835333 |  0.00607626 |  0.00607626
30.0000 |  0.830339 |  0.00626057 |  0.00626057
31.0000 |  0.825373 |  0.00644378 |  0.00644378
32.0000 |  0.820438 |  0.00662590 |  0.00662590
33.0000 |  0.815532 |  0.00680693 |  0.00680693
34.0000 |  0.810656 |  0.00698687 |  0.00698687
35.0000 |  0.805808 |  0.00716574 |  0.00716574
36.0000 |  0.800990 |  0.00734354 |  0.00734354
37.0000 |  0.796201 |  0.00752027 |  0.00752027
38.0000 |  0.791440 |  0.00769595 |  0.00769595
39.0000 |  0.786707 |  0.00787058 |  0.00787058
40.0000 |  0.782003 |  0.00804417 |  0.00804417
41.0000 |  0.777327 |  0.00821671 |  0.00821671
42.0000 |  0.772679 |  0.00838823 |  0.00838823
43.0000 |  0.768059 |  0.00855872 |  0.00855872
44.0000 |  0.763466 |  0.00872818 |  0.00872818
45.0000 |  0.758901 |  0.00889664 |  0.00889664
46.0000 |  0.754363 |  0.00906409 |  0.00906409
47.0000 |  0.749852 |  0.00923054 |  0.00923054
48.0000 |  0.745369 |  0.00939599 |  0.00939599
49.0000 |  0.740912 |  0.00956045 |  0.00956045
50.0000 |  0.736481 |  0.00972393 |  0.00972393
51.0000 |  0.732078 |  0.00988643 |  0.00988643
52.0000 |  0.727700 |   0.0100480 |   0.0100480
53.0000 |  0.723349 |   0.0102085 |   0.0102085
54.0000 |  0.719024 |   0.0103681 |   0.0103681
55.0000 |  0.714724 |   0.0105268 |   0.0105268
56.0000 |  0.710450 |   0.0106845 |   0.0106845
57.0000 |  0.706202 |   0.0108412 |   0.0108412
58.0000 |  0.701980 |   0.0109971 |   0.0109971
59.0000 |  0.697782 |   0.0111520 |   0.0111520
60.0000 |  0.693610 |   0.0113059 |   0.0113059
61.0000 |  0.689462 |   0.0114590 |   0.0114590
62.0000 |  0.685340 |   0.0116111 |   0.0116111
63.0000 |  0.681242 |   0.0117623 |   0.0117623
64.0000 |  0.677168 |   0.0119126 |   0.0119126
65.0000 |  0.673119 |   0.0120620 |   0.0120620
66.0000 |  0.669094 |   0.0122106 |   0.0122106
67.0000 |  0.665093 |   0.0123582 |   0.0123582
68.0000 |  0.661116 |   0.0125049 |   0.0125049
69.0000 |  0.657163 |   0.0126508 |   0.0126508
70.0000 |  0.653234 |   0.0127958 |   0.0127958
71.0000 |  0.649328 |   0.0129399 |   0.0129399
72.0000 |  0.645445 |   0.0130832 |   0.0130832
73.0000 |  0.641585 |   0.0132256 |   0.0132256
74.0000 |  0.637749 |   0.0133672 |   0.0133672
75.0000 |  0.633936 |   0.0135079 |   0.0135079
76.0000 |  0.630145 |   0.0136478 |   0.0136478
77.0000 |  0.626377 |   0.0137868 |   0.0137868
78.0000 |  0.622632 |   0.0139250 |   0.0139250
79.0000 |  0.618909 |   0.0140624 |   0.0140624
80.0000 |  0.615208 |   0.0141990 |   0.0141990
81.0000 |  0.611529 |   0.0143347 |   0.0143347
82.0000 |  0.607873 |   0.0144696 |   0.0144696
83.0000 |  0.604238 |   0.0146038 |   0.0146038
84.0000 |  0.600625 |   0.0147371 |   0.0147371
85.0000 |  0.597033 |   0.0148696 |   0.0148696
86.0000 |  0.593463 |   0.0150014 |   0.0150014
87.0000 |  0.589915 |   0.0151323 |   0.0151323
88.0000 |  0.586387 |   0.0152625 |   0.0152625
89.0000 |  0.582881 |   0.0153918 |   0.0153918
90.0000 |  0.579396 |   0.0155205 |   0.0155205
91.0000 |  0.575931 |   0.0156483 |   0.0156483
92.0000 |  0.572487 |   0.0157754 |   0.0157754
93.0000 |  0.569064 |   0.0159017 |   0.0159017
94.0000 |  0.565662 |   0.0160272 |   0.0160272
95.0000 |  0.562279 |   0.0161521 |   0.0161521
96.0000 |  0.558917 |   0.0162761 |   0.0162761
97.0000 |  0.555575 |   0.0163994 |   0.0163994
98.0000 |  0.552253 |   0.0165220 |   0.0165220
99.0000 |  0.548951 |   0.0166439 |   0.0166439
100.000 |  0.545668 |   0.0167650 |   0.0167650
101.000 |  0.542405 |   0.0168854 |   0.0168854
102.000 |  0.539162 |   0.0170051 |   0.0170051
103.000 |  0.535938 |   0.0171241 |   0.0171241
104.000 |  0.532734 |   0.0172423 |   0.0172423
105.000 |  0.529548 |   0.0173598 |   0.0173598
106.000 |  0.526382 |   0.0174767 |   0.0174767
107.000 |  0.523234 |   0.0175928 |   0.0175928
108.000 |  0.520106 |   0.0177083 |   0.0177083
109.000 |  0.516996 |   0.0178230 |   0.0178230
110.000 |  0.513904 |   0.0179371 |   0.0179371
111.000 |  0.510831 |   0.0180505 |   0.0180505
112.000 |  0.507777 |   0.0181632 |   0.0181632
113.000 |  0.504741 |   0.0182753 |   0.0182753
114.000 |  0.501722 |   0.0183866 |   0.0183866
115.000 |  0.498722 |   0.0184973 |   0.0184973
116.000 |  0.495740 |   0.0186074 |   0.0186074
117.000 |  0.492776 |   0.0187168 |   0.0187168
118.000 |  0.489829 |   0.0188255 |   0.0188255
119.000 |  0.486901 |   0.0189336 |   0.0189336
120.000 |  0.483989 |   0.0190410 |   0.0190410
121.000 |  0.481095 |   0.0191478 |   0.0191478
122.000 |  0.478218 |   0.0192539 |   0.0192539
123.000 |  0.475359 |   0.0193594 |   0.0193594
124.000 |  0.472517 |   0.0194643 |   0.0194643
125.000 |  0.469691 |   0.0195686 |   0.0195686
126.000 |  0.466883 |   0.0196722 |   0.0196722
127.000 |  0.464091 |   0.0197752 |   0.0197752
128.000 |  0.461316 |   0.0198776 |   0.0198776
129.000 |  0.458557 |   0.0199794 |   0.0199794
130.000 |  0.455815 |   0.0200806 |   0.0200806
131.000 |  0.453090 |   0.0201812 |   0.0201812
132.000 |  0.450381 |   0.0202812 |   0.0202812
133.000 |  0.447688 |   0.0203805 |   0.0203805
134.000 |  0.445011 |   0.0204793 |   0.0204793
135.000 |  0.442350 |   0.0205775 |   0.0205775
136.000 |  0.439705 |   0.0206751 |   0.0206751
137.000 |  0.437076 |   0.0207721 |   0.0207721
138.000 |  0.434462 |   0.0208686 |   0.0208686
139.000 |  0.431864 |   0.0209644 |   0.0209644
140.000 |  0.429282 |   0.0210597 |   0.0210597
141.000 |  0.426715 |   0.0211544 |   0.0211544
142.000 |  0.424163 |   0.0212486 |   0.0212486
143.000 |  0.421627 |   0.0213422 |   0.0213422
144.000 |  0.419106 |   0.0214352 |   0.0214352
145.000 |  0.416600 |   0.0215277 |   0.0215277
146.000 |  0.414109 |   0.0216196 |   0.0216196
147.000 |  0.411633 |   0.0217110 |   0.0217110
148.000 |  0.409172 |   0.0218018 |   0.0218018
149.000 |  0.406725 |   0.0218921 |   0.0218921
150.000 |  0.404293 |   0.0219818 |   0.0219818
151.000 |  0.401875 |   0.0220710 |   0.0220710
152.000 |  0.399472 |   0.0221597 |   0.0221597
153.000 |  0.397084 |   0.0222478 |   0.0222478
154.000 |  0.394709 |   0.0223354 |   0.0223354
155.000 |  0.392349 |   0.0224225 |   0.0224225
156.000 |  0.390003 |   0.0225091 |   0.0225091
157.000 |  0.387671 |   0.0225952 |   0.0225952
158.000 |  0.385353 |   0.0226807 |   0.0226807
159.000 |  0.383049 |   0.0227657 |   0.0227657
160.000 |  0.380759 |   0.0228502 |   0.0228502
161.000 |  0.378482 |   0.0229343 |   0.0229343
162.000 |  0.376219 |   0.0230178 |   0.0230178
163.000 |  0.373969 |   0.0231008 |   0.0231008
164.000 |  0.371733 |   0.0231833 |   0.0231833
165.000 |  0.369510 |   0.0232653 |   0.0232653
166.000 |  0.367301 |   0.0233468 |   0.0233468
167.000 |  0.365104 |   0.0234279 |   0.0234279
168.000 |  0.362921 |   0.0235084 |   0.0235084
169.000 |  0.360751 |   0.0235885 |   0.0235885
170.000 |  0.358594 |   0.0236681 |   0.0236681
171.000 |  0.356450 |   0.0237472 |   0.0237472
172.000 |  0.354319 |   0.0238259 |   0.0238259
173.000 |  0.352200 |   0.0239041 |   0.0239041
174.000 |  0.350094 |   0.0239818 |   0.0239818
175.000 |  0.348001 |   0.0240590 |   0.0240590
176.000 |  0.345920 |   0.0241358 |   0.0241358
177.000 |  0.343851 |   0.0242121 |   0.0242121
178.000 |  0.341795 |   0.0242880 |   0.0242880
179.000 |  0.339752 |   0.0243634 |   0.0243634
180.000 |  0.337720 |   0.0244384 |   0.0244384
181.000 |  0.335701 |   0.0245129 |   0.0245129
182.000 |  0.333693 |   0.0245870 |   0.0245870
183.000 |  0.331698 |   0.0246606 |   0.0246606
184.000 |  0.329715 |   0.0247338 |   0.0247338
185.000 |  0.327743 |   0.0248065 |   0.0248065
186.000 |  0.325783 |   0.0248788 |   0.0248788
187.000 |  0.323835 |   0.0249507 |   0.0249507
188.000 |  0.321899 |   0.0250222 |   0.0250222
189.000 |  0.319974 |   0.0250932 |   0.0250932
190.000 |  0.318061 |   0.0251638 |   0.0251638
191.000 |  0.316159 |   0.0252340 |   0.0252340
192.000 |  0.314269 |   0.0253037 |   0.0253037
193.000 |  0.312390 |   0.0253731 |   0.0253731
194.000 |  0.310522 |   0.0254420 |   0.0254420
195.000 |  0.308665 |   0.0255105 |   0.0255105
196.000 |  0.306819 |   0.0255786 |   0.0255786
197.000 |  0.304985 |   0.0256463 |   0.0256463
198.000 |  0.303161 |   0.0257136 |   0.0257136
199.000 |  0.301348 |   0.0257805 |   0.0257805
200.000 |  0.299546 |   0.0258470 |   0.0258470
201.000 |  0.297755 |   0.0259131 |   0.0259131
202.000 |  0.295975 |   0.0259788 |   0.0259788
203.000 |  0.294205 |   0.0260441 |   0.0260441
204.000 |  0.292446 |   0.0261090 |   0.0261090
205.000 |  0.290697 |   0.0261735 |   0.0261735
206.000 |  0.288959 |   0.0262377 |   0.0262377
207.000 |  0.287231 |   0.0263014 |   0.0263014
208.000 |  0.285514 |   0.0263648 |   0.0263648
209.000 |  0.283806 |   0.0264278 |   0.0264278
210.000 |  0.282109 |   0.0264904 |   0.0264904
211.000 |  0.280423 |   0.0265527 |   0.0265527
212.000 |  0.278746 |   0.0266145 |   0.0266145
213.000 |  0.277079 |   0.0266760 |   0.0266760
214.000 |  0.275422 |   0.0267372 |   0.0267372
215.000 |  0.273775 |   0.0267980 |   0.0267980
216.000 |  0.272138 |   0.0268584 |   0.0268584
217.000 |  0.270511 |   0.0269184 |   0.0269184
218.000 |  0.268894 |   0.0269781 |   0.0269781
219.000 |  0.267286 |   0.0270374 |   0.0270374
220.000 |  0.265688 |   0.0270964 |   0.0270964
221.000 |  0.264099 |   0.0271550 |   0.0271550
222.000 |  0.262520 |   0.0272133 |   0.0272133
223.000 |  0.260950 |   0.0272712 |   0.0272712
224.000 |  0.259390 |   0.0273288 |   0.0273288
225.000 |  0.257839 |   0.0273860 |   0.0273860
226.000 |  0.256297 |   0.0274429 |   0.0274429
227.000 |  0.254764 |   0.0274995 |   0.0274995
228.000 |  0.253241 |   0.0275557 |   0.0275557
229.000 |  0.251727 |   0.0276116 |   0.0276116
230.000 |  0.250222 |   0.0276671 |   0.0276671
231.000 |  0.248725 |   0.0277223 |   0.0277223
232.000 |  0.247238 |   0.0277772 |   0.0277772
233.000 |  0.245760 |   0.0278317 |   0.0278317
234.000 |  0.244290 |   0.0278860 |   0.0278860
235.000 |  0.242830 |   0.0279399 |   0.0279399
236.000 |  0.241378 |   0.0279934 |   0.0279934
237.000 |  0.239934 |   0.0280467 |   0.0280467
238.000 |  0.238500 |   0.0280996 |   0.0280996
239.000 |  0.237074 |   0.0281523 |   0.0281523
240.000 |  0.235656 |   0.0282046 |   0.0282046
241.000 |  0.234247 |   0.0282566 |   0.0282566
242.000 |  0.232846 |   0.0283083 |   0.0283083
243.000 |  0.231454 |   0.0283596 |   0.0283596
244.000 |  0.230070 |   0.0284107 |   0.0284107
245.000 |  0.228694 |   0.0284615 |   0.0284615
246.000 |  0.227327 |   0.0285119 |   0.0285119
247.000 |  0.225968 |   0.0285621 |   0.0285621
248.000 |  0.224616 |   0.0286119 |   0.0286119
249.000 |  0.223273 |   0.0286615 |   0.0286615
250.000 |  0.221938 |   0.0287108 |   0.0287108
251.000 |  0.220611 |   0.0287597 |   0.0287597
252.000 |  0.219292 |   0.0288084 |   0.0288084
253.000 |  0.217981 |   0.0288568 |   0.0288568
254.000 |  0.216677 |   0.0289049 |   0.0289049
255.000 |  0.215382 |   0.0289527 |   0.0289527
256.000 |  0.214094 |   0.0290002 |   0.0290002
257.000 |  0.212814 |   0.0290475 |   0.0290475
258.000 |  0.211541 |   0.0290944 |   0.0290944
259.000 |  0.210276 |   0.0291411 |   0.0291411
260.000 |  0.209019 |   0.0291875 |   0.0291875
261.000 |  0.207769 |   0.0292336 |   0.0292336
262.000 |  0.206527 |   0.0292794 |   0.0292794
263.000 |  0.205292 |   0.0293250 |   0.0293250
264.000 |  0.204064 |   0.0293703 |   0.0293703
265.000 |  0.202844 |   0.0294153 |   0.0294153
266.000 |  0.201631 |   0.0294601 |   0.0294601
267.000 |  0.200426 |   0.0295046 |   0.0295046
268.000 |  0.199227 |   0.0295488 |   0.0295488
269.000 |  0.198036 |   0.0295928 |   0.0295928
270.000 |  0.196852 |   0.0296365 |   0.0296365
271.000 |  0.195675 |   0.0296799 |   0.0296799
272.000 |  0.194505 |   0.0297231 |   0.0297231
273.000 |  0.193342 |   0.0297660 |   0.0297660
274.000 |  0.192186 |   0.0298086 |   0.0298086
275.000 |  0.191037 |   0.0298510 |   0.0298510
276.000 |  0.189894 |   0.0298932 |   0.0298932
277.000 |  0.188759 |   0.0299351 |   0.0299351
278.000 |  0.187630 |   0.0299767 |   0.0299767
279.000 |  0.186508 |   0.0300181 |   0.0300181
280.000 |  0.185393 |   0.0300593 |   0.0300593
281.000 |  0.184284 |   0.0301002 |   0.0301002
282.000 |  0.183183 |   0.0301409 |   0.0301409
283.000 |  0.182087 |   0.0301813 |   0.0301813
284.000 |  0.180998 |   0.0302215 |   0.0302215
285.000 |  0.179916 |   0.0302614 |   0.0302614
286.000 |  0.178840 |   0.0303011 |   0.0303011
287.000 |  0.177771 |   0.0303406 |   0.0303406
288.000 |  0.176708 |   0.0303798 |   0.0303798
289.000 |  0.175651 |   0.0304188 |   0.0304188
290.000 |  0.174601 |   0.0304575 |   0.0304575
291.000 |  0.173557 |   0.0304960 |   0.0304960
292.000 |  0.172519 |   0.0305343 |   0.0305343
293.000 |  0.171488 |   0.0305724 |   0.0305724
294.000 |  0.170462 |   0.0306102 |   0.0306102
295.000 |  0.169443 |   0.0306479 |   0.0306479
296.000 |  0.168430 |   0.0306852 |   0.0306852
297.000 |  0.167423 |   0.0307224 |   0.0307224
298.000 |  0.166422 |   0.0307593 |   0.0307593
299.000 |  0.165427 |   0.0307961 |   0.0307961
300.000 |  0.164438 |   0.0308326 |   0.0308326
301.000 |  0.163454 |   0.0308688 |   0.0308688
302.000 |  0.162477 |   0.0309049 |   0.0309049
303.000 |  0.161505 |   0.0309408 |   0.0309408
304.000 |  0.160540 |   0.0309764 |   0.0309764
305.000 |  0.159580 |   0.0310118 |   0.0310118
306.000 |  0.158626 |   0.0310470 |   0.0310470
307.000 |  0.157677 |   0.0310820 |   0.0310820
308.000 |  0.156734 |   0.0311168 |   0.0311168
309.000 |  0.155797 |   0.0311514 |   0.0311514
310.000 |  0.154865 |   0.0311858 |   0.0311858
311.000 |  0.153939 |   0.0312199 |   0.0312199
312.000 |  0.153019 |   0.0312539 |   0.0312539
313.000 |  0.152104 |   0.0312877 |   0.0312877
314.000 |  0.151195 |   0.0313212 |   0.0313212
315.000 |  0.150291 |   0.0313546 |   0.0313546
316.000 |  0.149392 |   0.0313878 |   0.0313878
317.000 |  0.148499 |   0.0314207 |   0.0314207
318.000 |  0.147611 |   0.0314535 |   0.0314535
319.000 |  0.146728 |   0.0314861 |   0.0314861
320.000 |  0.145851 |   0.0315184 |   0.0315184
321.000 |  0.144979 |   0.0315506 |   0.0315506
322.000 |  0.144112 |   0.0315826 |   0.0315826
323.000 |  0.143250 |   0.0316144 |   0.0316144
324.000 |  0.142393 |   0.0316460 |   0.0316460
325.000 |  0.141542 |   0.0316774 |   0.0316774
326.000 |  0.140696 |   0.0317086 |   0.0317086
327.000 |  0.139854 |   0.0317397 |   0.0317397
328.000 |  0.139018 |   0.0317705 |   0.0317705
329.000 |  0.138187 |   0.0318012 |   0.0318012
330.000 |  0.137361 |   0.0318317 |   0.0318317
331.000 |  0.136539 |   0.0318620 |   0.0318620
332.000 |  0.135723 |   0.0318921 |   0.0318921
333.000 |  0.134911 |   0.0319221 |   0.0319221
334.000 |  0.134105 |   0.0319519 |   0.0319519
335.000 |  0.133303 |   0.0319814 |   0.0319814
336.000 |  0.132506 |   0.0320109 |   0.0320109
337.000 |  0.131713 |   0.0320401 |   0.0320401
338.000 |  0.130926 |   0.0320692 |   0.0320692
339.000 |  0.130143 |   0.0320980 |   0.0320980
340.000 |  0.129365 |   0.0321268 |   0.0321268
341.000 |  0.128591 |   0.0321553 |   0.0321553
342.000 |  0.127822 |   0.0321837 |   0.0321837
343.000 |  0.127058 |   0.0322119 |   0.0322119
344.000 |  0.126298 |   0.0322399 |   0.0322399
345.000 |  0.125543 |   0.0322678 |   0.0322678
346.000 |  0.124792 |   0.0322955 |   0.0322955
347.000 |  0.124046 |   0.0323230 |   0.0323230
348.000 |  0.123305 |   0.0323504 |   0.0323504
349.000 |  0.122567 |   0.0323776 |   0.0323776
350.000 |  0.121834 |   0.0324046 |   0.0324046
351.000 |  0.121106 |   0.0324315 |   0.0324315
352.000 |  0.120382 |   0.0324582 |   0.0324582
353.000 |  0.119662 |   0.0324848 |   0.0324848
354.000 |  0.118946 |   0.0325112 |   0.0325112
355.000 |  0.118235 |   0.0325374 |   0.0325374
356.000 |  0.117528 |   0.0325635 |   0.0325635
357.000 |  0.116825 |   0.0325895 |   0.0325895
358.000 |  0.116127 |   0.0326152 |   0.0326152
359.000 |  0.115433 |   0.0326409 |   0.0326409
360.000 |  0.114742 |   0.0326663 |   0.0326663
361.000 |  0.114056 |   0.0326917 |   0.0326917
362.000 |  0.113374 |   0.0327168 |   0.0327168
363.000 |  0.112696 |   0.0327418 |   0.0327418
364.000 |  0.112022 |   0.0327667 |   0.0327667
365.000 |  0.111353 |   0.0327914 |   0.0327914
366.000 |  0.110687 |   0.0328160 |   0.0328160
367.000 |  0.110025 |   0.0328404 |   0.0328404
368.000 |  0.109367 |   0.0328647 |   0.0328647
369.000 |  0.108713 |   0.0328888 |   0.0328888
370.000 |  0.108063 |   0.0329128 |   0.0329128
371.000 |  0.107417 |   0.0329366 |   0.0329366
372.000 |  0.106775 |   0.0329603 |   0.0329603
373.000 |  0.106136 |   0.0329839 |   0.0329839
374.000 |  0.105502 |   0.0330073 |   0.0330073
375.000 |  0.104871 |   0.0330306 |   0.0330306
376.000 |  0.104244 |   0.0330537 |   0.0330537
377.000 |  0.103620 |   0.0330767 |   0.0330767
378.000 |  0.103001 |   0.0330996 |   0.0330996
379.000 |  0.102385 |   0.0331223 |   0.0331223
380.000 |  0.101773 |   0.0331449 |   0.0331449
381.000 |  0.101164 |   0.0331674 |   0.0331674
382.000 |  0.100559 |   0.0331897 |   0.0331897
383.000 | 0.0999580 |   0.0332119 |   0.0332119
384.000 | 0.0993603 |   0.0332339 |   0.0332339
385.000 | 0.0987662 |   0.0332559 |   0.0332559
386.000 | 0.0981756 |   0.0332777 |   0.0332777
387.000 | 0.0975886 |   0.0332993 |   0.0332993
388.000 | 0.0970050 |   0.0333208 |   0.0333208
389.000 | 0.0964250 |   0.0333423 |   0.0333423
390.000 | 0.0958484 |   0.0333635 |   0.0333635
391.000 | 0.0952753 |   0.0333847 |   0.0333847
392.000 | 0.0947056 |   0.0334057 |   0.0334057
393.000 | 0.0941393 |   0.0334266 |   0.0334266
394.000 | 0.0935765 |   0.0334474 |   0.0334474
395.000 | 0.0930169 |   0.0334680 |   0.0334680
396.000 | 0.0924607 |   0.0334885 |   0.0334885
397.000 | 0.0919079 |   0.0335089 |   0.0335089
398.000 | 0.0913583 |   0.0335292 |   0.0335292
399.000 | 0.0908121 |   0.0335494 |   0.0335494
400.000 | 0.0902691 |   0.0335694 |   0.0335694
401.000 | 0.0897293 |   0.0335893 |   0.0335893
402.000 | 0.0891928 |   0.0336091 |   0.0336091
403.000 | 0.0886594 |   0.0336288 |   0.0336288
404.000 | 0.0881293 |   0.0336484 |   0.0336484
405.000 | 0.0876024 |   0.0336678 |   0.0336678
406.000 | 0.0870785 |   0.0336871 |   0.0336871
407.000 | 0.0865579 |   0.0337064 |   0.0337064
408.000 | 0.0860403 |   0.0337254 |   0.0337254
409.000 | 0.0855258 |   0.0337444 |   0.0337444
410.000 | 0.0850144 |   0.0337633 |   0.0337633
411.000 | 0.0845061 |   0.0337821 |   0.0337821
412.000 | 0.0840008 |   0.0338007 |   0.0338007
413.000 | 0.0834985 |   0.0338192 |   0.0338192
414.000 | 0.0829993 |   0.0338377 |   0.0338377
415.000 | 0.0825030 |   0.0338560 |   0.0338560
416.000 | 0.0820097 |   0.0338742 |   0.0338742
417.000 | 0.0815193 |   0.0338923 |   0.0338923
418.000 | 0.0810319 |   0.0339103 |   0.0339103
419.000 | 0.0805473 |   0.0339281 |   0.0339281
420.000 | 0.0800657 |   0.0339459 |   0.0339459
421.000 | 0.0795870 |   0.0339636 |   0.0339636
422.000 | 0.0791111 |   0.0339811 |   0.0339811
423.000 | 0.0786380 |   0.0339986 |   0.0339986
424.000 | 0.0781678 |   0.0340159 |   0.0340159
425.000 | 0.0777004 |   0.0340332 |   0.0340332
426.000 | 0.0772358 |   0.0340503 |   0.0340503
427.000 | 0.0767740 |   0.0340674 |   0.0340674
428.000 | 0.0763150 |   0.0340843 |   0.0340843
429.000 | 0.0758586 |   0.0341012 |   0.0341012
430.000 | 0.0754050 |   0.0341179 |   0.0341179
431.000 | 0.0749542 |   0.0341345 |   0.0341345
432.000 | 0.0745060 |   0.0341511 |   0.0341511
433.000 | 0.0740605 |   0.0341675 |   0.0341675
434.000 | 0.0736176 |   0.0341839 |   0.0341839
435.000 | 0.0731775 |   0.0342001 |   0.0342001
436.000 | 0.0727399 |   0.0342162 |   0.0342162
437.000 | 0.0723050 |   0.0342323 |   0.0342323
438.000 | 0.0718726 |   0.0342482 |   0.0342482
439.000 | 0.0714429 |   0.0342641 |   0.0342641
440.000 | 0.0710157 |   0.0342799 |   0.0342799
441.000 | 0.0705911 |   0.0342955 |   0.0342955
442.000 | 0.0701690 |   0.0343111 |   0.0343111
443.000 | 0.0697494 |   0.0343266 |   0.0343266
444.000 | 0.0693323 |   0.0343420 |   0.0343420
445.000 | 0.0689178 |   0.0343573 |   0.0343573
446.000 | 0.0685057 |   0.0343725 |   0.0343725
447.000 | 0.0680961 |   0.0343876 |   0.0343876
448.000 | 0.0676889 |   0.0344026 |   0.0344026
449.000 | 0.0672841 |   0.0344176 |   0.0344176
450.000 | 0.0668818 |   0.0344324 |   0.0344324
451.000 | 0.0664819 |   0.0344472 |   0.0344472
452.000 | 0.0660844 |   0.0344618 |   0.0344618
453.000 | 0.0656892 |   0.0344764 |   0.0344764
454.000 | 0.0652965 |   0.0344909 |   0.0344909
455.000 | 0.0649060 |   0.0345053 |   0.0345053
456.000 | 0.0645179 |   0.0345196 |   0.0345196
457.000 | 0.0641322 |   0.0345339 |   0.0345339
458.000 | 0.0637487 |   0.0345480 |   0.0345480
459.000 | 0.0633675 |   0.0345621 |   0.0345621
460.000 | 0.0629886 |   0.0345761 |   0.0345761
461.000 | 0.0626120 |   0.0345900 |   0.0345900
462.000 | 0.0622376 |   0.0346038 |   0.0346038
463.000 | 0.0618654 |   0.0346175 |   0.0346175
464.000 | 0.0614955 |   0.0346312 |   0.0346312
465.000 | 0.0611278 |   0.0346447 |   0.0346447
466.000 | 0.0607623 |   0.0346582 |   0.0346582
467.000 | 0.0603990 |   0.0346716 |   0.0346716
468.000 | 0.0600378 |   0.0346850 |   0.0346850
469.000 | 0.0596789 |   0.0346982 |   0.0346982
470.000 | 0.0593220 |   0.0347114 |   0.0347114
471.000 | 0.0589673 |   0.0347245 |   0.0347245
472.000 | 0.0586147 |   0.0347375 |   0.0347375
473.000 | 0.0582642 |   0.0347504 |   0.0347504
474.000 | 0.0579158 |   0.0347633 |   0.0347633
475.000 | 0.0575695 |   0.0347760 |   0.0347760
476.000 | 0.0572253 |   0.0347887 |   0.0347887
477.000 | 0.0568831 |   0.0348014 |   0.0348014
478.000 | 0.0565430 |   0.0348139 |   0.0348139
479.000 | 0.0562049 |   0.0348264 |   0.0348264
480.000 | 0.0558688 |   0.0348388 |   0.0348388
481.000 | 0.0555348 |   0.0348511 |   0.0348511
482.000 | 0.0552027 |   0.0348634 |   0.0348634
483.000 | 0.0548726 |   0.0348755 |   0.0348755
484.000 | 0.0545445 |   0.0348877 |   0.0348877
485.000 | 0.0542184 |   0.0348997 |   0.0348997
486.000 | 0.0538942 |   0.0349117 |   0.0349117
487.000 | 0.0535719 |   0.0349235 |   0.0349235
488.000 | 0.0532516 |   0.0349354 |   0.0349354
489.000 | 0.0529332 |   0.0349471 |   0.0349471
490.000 | 0.0526167 |   0.0349588 |   0.0349588
491.000 | 0.0523021 |   0.0349704 |   0.0349704
492.000 | 0.0519893 |   0.0349819 |   0.0349819
493.000 | 0.0516785 |   0.0349934 |   0.0349934
494.000 | 0.0513695 |   0.0350048 |   0.0350048
495.000 | 0.0510623 |   0.0350162 |   0.0350162
496.000 | 0.0507570 |   0.0350274 |   0.0350274
497.000 | 0.0504535 |   0.0350386 |   0.0350386
498.000 | 0.0501518 |   0.0350497 |   0.0350497
499.000 | 0.0498519 |   0.0350608 |   0.0350608
500.000 | 0.0495539 |   0.0350718 |   0.0350718

We can also make plots, using the plotting library reaktplot that was developed for use with Reaktoro:

from reaktplot import *

fig1 = Figure()
fig1.title("AQUEOUS SPECIES AMOUNTS OVER TIME")
fig1.xaxisTitle("Time [minute]")
fig1.yaxisTitle("Amount [mol]")
fig1.drawLine(table["Time"], table["Na+"], "Na<sup>+</sup>")
fig1.drawLine(table["Time"], table["Cl-"], "Cl<sup>-</sup>")
fig1.show()
fig2 = Figure()
fig2.title("CALCITE VOLUME OVER TIME")
fig2.xaxisTitle("Time [minute]")
fig2.yaxisTitle("Volume [m<sup>3</sup>]")
fig2.drawLine(table["Time"], table["Halite"], "Halite")
fig2.show()

You can also save these figures to one of several file formats (PNG, JPEG, WEBP, SVG, PDF, EPS, or HTML) and add them to your publication:

fig1.save("fig1.pdf")
fig2.save("fig2.pdf")

That’s it. This tutorial covered the basics of chemical kinetics modeling in Reaktoro. Continue reading to learn more!