In statistical physics, Glauber dynamics is a way to simulate the Ising model (a model of magnetism) on a computer . The algorithm is named after Roy J. Glauber who proposed it in 1963.. Glauber dynamics is also used in the non-equilibrium phenomena and diffusion anomaly in those conditions .
Algorithm The Ising model is an abstract model for the magnetic interaction of neighboring atoms. It is conventionally considered on a two-dimensional square lattice, with magnetic interactions occurring only between nearest neighbors. In this model, each lattice site is given a spin σ x , y {\displaystyle \sigma _{x,y}} that is either up (+1) or down (-1); the x and y are the grid coordinates. Glauber's algorithm becomes:
Choose a location x , y {\displaystyle x,y} at random. Sum the spins of the nearest-neighbors. For a 2D square lattice, there are four: S = σ x + 1 , y + σ x − 1 , y + σ x , y + 1 + σ x , y − 1 {\displaystyle S=\sigma _{x+1,y}+\sigma _{x-1,y}+\sigma _{x,y+1}+\sigma _{x,y-1}} . Compute the change in energy if the spin at x, y were to flip. This is given by the Hamiltonian for the Ising model; it is Δ E = 2 σ x , y S . {\displaystyle \Delta E=2\sigma _{x,y}S.}
Flip the spin with probability given by the Fermi function p ( Δ E ) = 1 / ( 1 + e Δ E / T ) , {\displaystyle p(\Delta E)=1/(1+e^{\Delta E/T}),} where T is the temperature. Go To Step 1. In Glauber algorithm, if the energy change in flipping a spin is zero, Δ E = 0 {\displaystyle \Delta E=0} , then the spin would flip with probability p ( Δ E ) = 0.5 {\displaystyle p(\Delta E)=0.5} . Similarly, if the temperature is very high, then e Δ E / T ≈ 1 {\displaystyle e^{\Delta E/T}\approx 1} and again, the probability of a flip is one-half. If the temperature is very low, then a flip to a higher-energy state almost never happens, while a flip to a lower energy state almost always happens.
Comparison to Metropolis algorithm
The Glauber algorithm can be compared to the Metropolis–Hastings algorithm. These two differ in how a spin site is selected (step 1), and in the probability of a spin-flip (step 4). In the Glauber dynamic, every spin has an equal chance of being chosen at each time step, and the decision to flip that spin, or not, is given by the Fermi function, as given above. By contrast, the Metropolis algorithm considers a spin site with a probability given by the Boltzmann weight e − Δ E / T {\displaystyle e^{-\Delta E/T}} , but if it is accepted, then it always flips a spin in favor of lowering the energy. Thus, the total spin-flip probability is:
p ( Δ E ) = { 1 , Δ E ⩽ 0 e − Δ E / T , Δ E > 0 {\displaystyle p(\Delta E)=\left\{{\begin{matrix}1,\ \ \ \ \ \ \ \ \ \Delta E\leqslant 0\\e^{-\Delta E/T},\ \Delta E>0\\\end{matrix}}\right.}
… excerpt ends here. Continue reading the full article.


