©
Random towards kinetics
From reactants with random composition, computes products.
2024.Jul.03 19:27:30
tf Time, final.
Rate constants Kinetic rate constants.
Concentrations μ Initial concentrations: μ.
Concentrations 'cv' * Initial conc.s: coefficients of variation. If one: all =.
Incumbent (∈ [1 .. 'n. of components']) Incumbent component for Monte Carlo.
Tolerance Tolerance in concentration of incumbent.
Trials,** seed   Monte Carlo trials and seed (0: unrepeatable).
Points N. of points in plot (from 0)
Show values Show graph coordinates.

Performs a chemical reaction from given initial reactant concentrations, with randomness, to compute product concentrations at final time, tf. The reaction is A → B → C, with kinetic mechanism: a'(t) = −k1a, b'(t) = −k2b + k1a, c'(t) = k2b ([Winkel, 2011]). Integration is through Python 'scipy' module solver solve_ivp.

* If only one 'cv' is given, all are made equal. ** Caution: Trials > ~1.e+5 can lead to time out failure.

Files involved: P-randKinet.php (this one), RandKinet.php, randKinet.py.

Draws plots of: the kinetics (compositions vs. time); and the random behavior of the resulting composition of the incumbent component.


Python file (download): randKinet.py

Computation structure — A PHP file (this page: 'P-ranKin.php') calls (via 'action=...') an intermediate PHP file ('RanKin.php'), which (through $_POST) sends the problem data as command line arguments to a Python script. This last does the computing, and makes 'system' call(s) to 'gnuplot', for the final (temporary) webpage.

Keywords: PHP, command line arguments, Python script, gnuplot.

References: Plate: RanKin

• (Wikipedia) PHP (from Personal Home Page) • Python (programming language)

• Python module 'scipy' solver scipy.integrate.solve_ivp, accessed 02-Oct-2023.

• Winkel, B. (pdf), 2011, International Journal of Mathematical Education in Science and Engineering, 42(1), 37–51. DOI  10.1080/0020739X.2010.500806.

• 1895-09-29: Hotelling, Harold (†1973-12-26, 78 yrs.).

 
 
Valid HTML 5! IST http://web.ist.utl.pt/~ist11038/compute/explore/RanKin/P-ranKin.php
Created: 2024-01-29 — Last modified: 2024-06-18