Ising/Potts model applet: Metropolis and Wolff cluster algorithms
This applet implements both the Metropolis and Wolff cluster algorithms. The Metropolis algorithm is based on single-spin updates: one spin is updated at a time, then the attempted move is accepted with a probability given by min(1, exp(-dE/kT)), where dE represents the change in energy resulting from the move update. In the Wolff algorithm, first a cluster of spin is grown (that is, spins are glued together with a probability p=1-exp(-1/kT)), then the cluster is flipped (detailed balance shows that, if no external field is present, this particular choice for the probability of bonding spins together yields a 100% acceptance rate). Ref: Wolff, U. Lattice field theory as a percolation process Phys. Rev. Lett., 1988 , 60 , 1461 also, for a slightly distinct approach, Swendsen, R.H. & Wang, J. Nonuniversal critical dynamics in Monte Carlo simulations Phys. Rev. Lett., 1987 , 58 , 86 Applet help: The "temperature" button let you configure many things regarding the simulation, e.g. temperature sweep, number of thermalization steps, number of measurements, autocorrelation times, ... if the applet runs too slowly, reduce the "Latency". If still slow, deselect the "Animate" checkbox. The south-panel displays charts of thermodymical averages as a funtion of temperature. You can add a new point at any time during a simulation by clicking on the "Add point" button. If a temperature sweep is carried out, charts are filled automatically. Download source code : montecarlo.zip

S. Reynal (ENSEA/UCP)