D Implementation of the Particle System

The majority of my work this year has been spent implementing these particle systems in Python. They are available online:
https://github.com/Tom271/InteractingParticleSystems/releases

There are currently three versions, and in this section each will be briefly described. Throughout the three versions the algorithm for solving the system consists of the Euler-Maruyama method. When simulating particle systems, a good rule of thumb is to choose the step size of the scheme such that 10 interactions can be resolved per particle collision. For example, if a particle is moving with velocity 1 and \(\gamma=0.1\), one should choose \(\Delta t \approx 0.01\). The difficulty arises in the high dimensionality of the system and simulating for long times.

v0.1

The first version developed was a basic implementation with limited functionality. It was able to simulate the full system, but it was difficult to run multiple experiments automatically. This prompted the development of an automated process to allow for easier computation. A custom plotting package was also developed to produce animations of the system on the torus.

v0.2

Version 0.2 moved towards an object-oriented approach for increased readability. It also introduced processing.py, a file for automated experiments. This meant we could pass a range of parameters to be tested. Then the list would be stored, and all subsets of the parameters would be evolved in the particle system. The position and velocity data is then stored with a random filename, while the parameters and file name is stored in separate YAML file. Then, when running any analysis, the YAML file is searched for matching parameters. The file name is then retrieved which then automatically loads in the trajectory data ready for analysis. This allowed for the automatic execution of 100 systems at once, such as those used to produce the heatmaps such as and the average velocity plots such as . However, this code was rather slow and often took a few days to run.

v0.3

In version 0.3 (the current iteration), we moved away from an object-oriented style. This was so that we could exploit Numba, a just-in-time (JIT) compiler to massively increase computation speed [20]. Implementing a JIT compiler allows for tests that previously took days to run in less than an hour. When interested in long time dynamics, this proves very useful!

[1] Xie, Y. (2016). Bookdown: Authoring books and technical documents with R markdown. Chapman; Hall/CRC, Boca Raton, Florida.

[2] Bonner, J. T. (2009). The social amoebae: The biology of cellular slime molds. Princeton University Press.

[3] Sumpter, D. J. T. (2010). Collective animal behavior. Princeton University Press.

[4] Schelling, T. C. (1971). Dynamic models of segregation. The Journal of Mathematical Sociology 1 143–86.

[5] Hegselmann, R. and Krause, U. (2002). Opinion dynamics and bounded confidence: Models, analysis and simulation. Journal of Artificial Societies and Social Simulation 5 1–24.

[6] Ballerini, M., Cabibbo, N., Candelier, R., Cavagna, A., Cisbani, E., Giardina, I., Orlandi, A., Parisi, G., Procaccini, A., Viale, M. and Zdravkovic, V. (2008). Empirical investigation of starling flocks: A benchmark study in collective animal behaviour. Animal Behaviour 76 201–15.

[7] Buttà, P., Flandoli, F., Ottobre, M. and Zegarlinski, B. (2019). A non-linear kinetic model of self-propelled particles with multiple equilibria. Kinetic & Related Models 12(4) 791–827.

[8] Blondel, V. D., Hendrickx, J. M. and Tsitsiklis, J. N. (2007). On the 2R conjecture for multi-agent systems. In 2007 european control conference (ecc) pp 874–81.

[9] Garnier, J., Papanicolaou, G. and Yang, T.-W. (2019). Mean field model for collective motion bistability. Discrete & Continuous Dynamical Systems - B 24 851.

[10] Nagapetyan, T., Duncan, A. B., Hasenclever, L., Vollmer, S. J., Szpruch, L. and Zygalakis, K. (2017). The true cost of stochastic gradient langevin dynamics.

[11] Goddard, B., Nold, A. and Kalliadasis, S. (2017). 2DChebClass.

[12] Nold, A., Goddard, B. D., Yatsyshin, P., Savva, N. and Kalliadasis, S. (2017). Pseudospectral methods for density functional theory in bounded and unbounded domains. Journal of Computational Physics 334 639–64.

[13] Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I. and Shochet, O. (1995). Novel type of phase transition in a system of self-driven particles. Phys. Rev. Lett. 75 1226–9.

[14] Cucker, F. and Smale, S. (2007). Emergent behavior in flocks. IEEE Transactions on Automatic Control 52 852–62.

[15] Couzin, I. D., Krause, J., James, R., Ruxton, G. D. and Franks, N. R. (2002). Collective memory and spatial sorting in animal groups. Journal of Theoretical Biology 218 1–11.

[16] Czirok, A., Barabasi, A.-L. and Vicsek, T. (1997). Collective motion of self-propelled particles: Kinetic phase transition in one dimension.

[17] Mattingly, J. and Stuart, A. M. (2002). Geometric ergodicity of some hypo-elliptic diffusions for particle motions. Markov Processes and Related Fields 8 199–214.

[18] Bellet, L. R. (2006). Ergodic properties of markov processes. In Open quantum systems ii: The markovian approach (S. Attal, A. Joye and C.-A. Pillet, ed) pp 1–39. Springer Berlin Heidelberg, Berlin, Heidelberg.

[19] Bernardi, S., Estrada-Rodriguez, G., Gimperlein, H. and Painter, K. J. (2019). Macroscopic descriptions of follower-leader systems.

[20] Lam, S. K., Pitrou, A. and Seibert, S. (2015). Numba: A llvm-based python jit compiler. In Proceedings of the second workshop on the llvm compiler infrastructure in hpc LLVM ’15. Association for Computing Machinery, New York, NY, USA.

References

[20] Lam, S. K., Pitrou, A. and Seibert, S. (2015). Numba: A llvm-based python jit compiler. In Proceedings of the second workshop on the llvm compiler infrastructure in hpc LLVM ’15. Association for Computing Machinery, New York, NY, USA.