Computational Physics - Department of Physics

(Axel Boer) #1
452 13 Monte Carlo Methods in Statistical Physics

LocalEnergy --;
if(SpinFlip == Spin[periodic(x,N,-1)][y])
LocalEnergy --;
if(SpinFlip == Spin[x][periodic(y,N,1)])
LocalEnergy --;
if(SpinFlip == Spin[periodic(x,N,1)][y])
LocalEnergy --;
dE = LocalEnergy - LocalEnergy0;
if(dE<=0){
Spin[x][y] = SpinFlip;
E += J*dE;
}
else if(ran1(&seed)<Boltzmann[dE-1]){
Spin[x][y] = SpinFlip;
E += J*dE;
In the calculation of the energy difference from one spin configuration to the other, we
have for theq= 2 Potts two possible values only. When we change one of the values such as
flipping a spin we start with an energyE=− 4 J. Now we flip this spin as shown below. The
energy of the new configuration isE= 0 J, yielding∆E= 4 J.

E=− 4 J


↑ ↑↑


=⇒ E= 4 J


↑ ↓↑


However, whenqbecomes large the standard Metropolis algorithm becomes inefficient.
Assume thatq= 100. At highTthe acceptance probability is close to 1 and our algorithm is
efficient.
When we cool down the systemT→TC, more and more ’spins’ will take the same value
and we build up cluster/domains with equally valued ’spins’. If the spins are aligned with its
neigbours it has lower energy and thereby larger weighte−βE.
The problem comes whenqis large. If our value is one of the other 96 values, we need on
average 100 / 4 = 25 steps to find a desired state. This can result in a very long time to find
state with lower energy.
If we start at low temperatures, there is an extra cost to excite, leading to smaller accep-
tance probability. We can easily end up in situation where wehave almost 96 out 100 moves
rejected. This means that we need a better algorithm. Such improvements are discussed in
the chapter on advanced statistical physics problems (not available in this version).

13.9 Exercises.


13.1.Convince yourself that the values listed in Table 13.4 are correct.
13.2.Calculate the internal energy and heat capacity of the one-dimensional Ising model
using periodic boundary conditions and compare the resultswith those for free ends in the
limitN→∞.
13.3.In this project we will use the Metropolis algorithm to generate states according to the
Boltzmann distribution. Each new configuration is given by the change of only one spin at the
time, that issk→−sk. Use periodic boundary conditions and set the magnetic fieldB= 0.


  1. Write a program which simulates the one-dimensional Ising model. ChooseJ> 0 , the number
    of spinsN= 20 , temperatureT= 3 and the number of Monte Carlo samplesmcs= 100. Let

Free download pdf