/vicsek_model

Vicsek simulation in 2D and 3D with periodic boundaries

Primary LanguagePython

Vicsek Model

The Vicsek model is a mathematical model that illustrates the collective motion of particles. The dynamics of the particles in them model depend on the particle density and instensity of noise in the system. Every particle in the model is initialized with a random angle θ between [-π, π]. At every time step, the particle will find all of its neighbor particles, defined as any particle within a specified radius r. It will average its angle vector with all of its neighbors. The particle will then move in the direction of the new angle plus a random perturbation. The instensity of the random perturbation is defined by η.

Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I. & Shochet, O. Novel Type of Phase Transition in a System of Self-Driven Particles. Phys. Rev. Lett. 75, 1226–1229 (1995).

Equations

v̂(t + 1) = < v̂(t) > r + η̂

η̂ = (cos θ, sin θ )

Parameters

Parameter Definition Range
N number of particles any positive integer
η noise intensity [0,1]
r radius to look for neighbors [0,1]

How to run the simulation

sh. run.sh [N] [η] [r]

Notes

-Periodic boundary conditions

-Boundaries of box are assumed to be 1

Requirements

numpy (1.8.1)

matplotlib (1.3.1)