Introduction
The Potts model is a generalization of the Ising model in which each site or "spin" can have one of q states. The energy between two sites is 0 if their states are different, and -K if the states are the same. The q = 2 Potts model is equivalent to the Ising model, with half the critical temperature, because the energy difference between two like and two unlike states is half what it is when the spins in the Ising model take on values of ±1.
One of the important features of the Potts model is that the nature of the phase transition from a disordered to ordered state changes with q. For small q the transition is continuous as it is in the Ising model (in zero magnetic field). For q > 4 on the square lattice the transition becomes first order, with a jump in the energy at the transition temperature.
We use the Wang-Landau algorithm to generate an approximate density of states g(E). Because the energy is a discrete variable in the Potts model, g(E) becomes the number of microstates of energy E. The probability that the system has energy E is given by P(E) = g(E)exp(-ßE), where ß = 1/kT. The program uses units such that k = 1 and K = 1.
The program plots ln [(g(E)/g(E0)] versus E, where E0 = -2N is the lowest possible energy for a system of N sites on a square lattice. The program also plots the unnormalized value of ln P(E) for the value of the temperature T specified by the user and the histogram of energies for each pass of the Wang Landau algorithm. Also shown is the specific heat as a function of temperature, which can be computed from P(E).
Problems
Java Classes
Updated 28 December 2009.