Noise strength

Particle number

Self propulsion speed

The Vicsek model is a foundational model in the study of active matter, showing how a system pushed out of equilibrium by a self-propulsion coupled with polar alignment with nearby neighbors has all of the ingredients needed to observe a transition from a disordered gas to a collective flocking swarm as the noise strength is lowered. Here we show the behavior of the so-called "vector-Vicsek" variation, a particular implementation of the polar alignment that generalizes well beyond two dimensions and is somewhat less sensitive to finite size effects.

Concretely, this simulation places N particles in a square simulation domain with periodic boundary conditions, and the size of the unit cell has been set so that the density is equal to one. At each time step every particle moves along a direction with a characteristic self-propulsion speed; it then looks for all neighbors (particles that are at most 1 unit of distance away). Particle directors are then aligned according to the vector-Vicsek rule: the vector sum of a particles director and those of its neighboring particles is added to a random unit vector who's magnitude is scaled by the noise strength and the number of neighbors. The resulting vector is normalized and set as the new director of the particle. The code here makes use of some computational accelerations so that small systems can run smoothly in your web browser (accelerated neighbor lists via cell lists, for example), but this is obviously meant more for educational purposes and visual demos. If you're interested in efficiently parallelized simulations of Vicsek-like models, check out some of the GPU-accelerated code for flocking models that our group has generated!

The simulation controls and buttons are hopefully intuitive: sliders (and editable) text boxes underneath the running animation of the model can be used to set the noise strength, particle number, and self-propulsion speed. The buttons can be used to (a) reset the simulation with uniformly random initial conditions, (b) pause or continue the current simulation, (c) download a text file with the current configuration, and (d) download a png snapshot of the current configuration. The text file is structured as series of rows with comma-separated entries. There should be a row for every particle, containing its position in the simulation domain (with both coordinates ranging from 0 to sqrt(N)) and a unit vector corresponding to the direction of its self-propulsion.

Concretely, this simulation places N particles in a square simulation domain with periodic boundary conditions, and the size of the unit cell has been set so that the density is equal to one. At each time step every particle moves along a direction with a characteristic self-propulsion speed; it then looks for all neighbors (particles that are at most 1 unit of distance away). Particle directors are then aligned according to the vector-Vicsek rule: the vector sum of a particles director and those of its neighboring particles is added to a random unit vector who's magnitude is scaled by the noise strength and the number of neighbors. The resulting vector is normalized and set as the new director of the particle. The code here makes use of some computational accelerations so that small systems can run smoothly in your web browser (accelerated neighbor lists via cell lists, for example), but this is obviously meant more for educational purposes and visual demos. If you're interested in efficiently parallelized simulations of Vicsek-like models, check out some of the GPU-accelerated code for flocking models that our group has generated!

The simulation controls and buttons are hopefully intuitive: sliders (and editable) text boxes underneath the running animation of the model can be used to set the noise strength, particle number, and self-propulsion speed. The buttons can be used to (a) reset the simulation with uniformly random initial conditions, (b) pause or continue the current simulation, (c) download a text file with the current configuration, and (d) download a png snapshot of the current configuration. The text file is structured as series of rows with comma-separated entries. There should be a row for every particle, containing its position in the simulation domain (with both coordinates ranging from 0 to sqrt(N)) and a unit vector corresponding to the direction of its self-propulsion.