Closed Konjkov closed 4 years ago
I don't think there's a convenience function to do this but the following works for example https://github.com/bjodah/chempy#chemical-kinetics-system-of-ordinary-differential-equations
Run the entire example code
Now you can access result.yout
which is a numpy.ndarray containing concentrations for every species (columns) at every timestep (rows). Select the two species you're interested in and add them summed_concentration = result.yout[:,index_A] + result.yout[:,index_B]
Simple plot: plt.plot(summed_concentration)
Thank you @niklastoe for helping out here! (and sorry @Konjkov for my radio silence, I have been, and am, quite busy with some projects taking nearly all of my time).
I found this wonderful package ideal for modeling the kinetics of well known iodine clock reaction - https://arxiv.org/pdf/1808.06010.pdf """ H+ + OH- -> H2O; 1.4e+11 H2O -> H+ + OH-; 2.5e-5 I- + H2O2 -> HIO + OH-; 0.0115 I- + HIO -> I2 + OH-; 3.6e+9 I2 + OH- -> I- + HIO; 1.8e+11 I2 + I- -> I3-; 6.2e+9 I3- -> I2 + I-; 8.5e+6 I2 + C6H8O6 -> 2 H+ + 2 I- + C6H6O6; 1.2e+5 I3- + C6H8O6 -> 2 H+ + 3 I- + C6H6O6; 5.9e+5 """ However, due to reversibility in the reaction I- + I2 <-> I3- it is much more convenient to plot the total concentration iodine as sum of I2 and I3- it is possible to plot not only the concentration of individual reagents, but also the sum of concentration or difference? Best Vladimir.