Project 6
Ising model
Consider a 2D square lattice of N × N atoms. They have a spin σ = ±1,
either pointing up or down. The lattice sites can be labelled with some index.
Take N = 50. The energy of this system is defined as
X
E = −J σi σj (1)
i,j
Here σi , σj are the spins at nearest neighbor lattice sites i and j. Take
J = 1. Each neighboring pair is counted only once, each site has four nearest
neighbors. Take periodic boundary conditions for the grid.
Start with a random initialization of the spins on the lattice. The prob-
ability of finding a particular configuration of spins, denoted by s, depends
on it’s energy Es by the Boltzmann relation
Es
P (s) ∝ exp − (2)
kB T
Randomly flip spins according to this probability and generate a bunch of
configurations that follow this probability distribution using the Metropolis
algorithm. Continue this till you have sampled a broad range of energies and
the magnetization becomes steady. The magnetization is defined as
X
M =( σi )/(N 2 ) (3)
i
Perform this simulation for different values of kB T ranging from 0.1 to
10. Calculate the magnetization in the equilibriated state. Analyze how the
magnetization varies with kB T and see if there is a phase transition with
temperature.