General Method for Speeding Up Kinetic Monte Carlo Simulations - Rego, Artur S. C; Brandão, Amanda L. T (Industrial & engineering chemistry research, 2020)
Kinetic Monte Carlo (MC) is the main stochastic strategy used to simulate polymerization systems, as it gives good results with simple formulation. Normally, the algorithm used in this method presents high computational times, being necessary to choose suitable control volume sizes, which gives reliable results in moderate simulation times. The use of high-level languages (Python, MATLAB) over low-level languages (C, Fortran) usually aggravates this scenario, as it is slower despite being easier to use. The current study presents a simple method for speeding up the MC simulation of polymerization reactions. First, the code itself is optimized to reduce by half the computational time required compared with the original code, and then a benchmark of pure Python and Python with Numba is made. The results show a drop in the computational times above 99% when using Numba instead of pure Python codes.