©
Random towards kinetics
From reactants with random composition, computes products.
2024.Jul.03 13:32:56
tf Time, final.
Rate constants Kinetic rate constants.
Concentrations, μ Initial concentrations, μ.
Concentrations, σ Initial concentrations, σ.
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.

* Caution: Trials > ~1.e+5 can lead to excessive run time and 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-randKinet.php') calls (via 'action=...') an intermediate PHP file ('RandKinet.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: RandKinet

• (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.tecnico.ulisboa.pt/~mcasquilho/compute/explore/randKinet/P-randKinet.php
Created: 2023-09-29 — Last modified: 2024-06-18