Project 1 Ising em Latex
Project 1 Ising em Latex
Project 1 Ising em Latex
Here follows a brief recipe and recommendation on how to write a report for each project.
• Give a short description of the nature of the problem and the eventual numerical
methods you have used.
• Describe the algorithm you have used and/or developed. Here you may find it con-
venient to use pseudocoding. In many cases you can describe the algorithm in the
program itself.
• Include the source code of your program. Comment your program properly.
• If possible, try to find analytic solutions, or known limits in order to test your program
when developing the code.
• Include your results either in figure form or in a table. Remember to label your
results. All tables and figures should have relevant captions and labels on the axes.
• Try to evaluate the reliabilty and numerical stability/precision of your results. If pos-
sible, include a qualitative and/or quantitative discussion of the numerical stability,
eventual loss of precision etc.
• Critique: if possible include your comments and reflections about the exercise, whether
you felt you learnt something, ideas for improvements and other thoughts you’ve
made when solving the exercise. We wish to keep this course at the interactive level
and your comments can help us improve it.
• Try to establish a practice where you log your work at the computerlab. You may
find such a logbook very handy at later stages in your work, especially when you
don’t properly remember what a previous test version of your program did. Here you
could also record the time spent on solving the exercise, various algorithms you may
have tested or other topics which you feel worthy of mentioning.
1
Project 1, Phase transitions in spin systems using the
Potts Model, deadline march 5 12am (midnight)
For this project you can build upon the programs for the Ising model and the Potts model
on the webpage of the course, see the programs link. For a discussion of the Potts models,
see chapter 4.5 of Barkema and Newman.
The Potts model has been, in addition to the Ising model, widely used in studies of
phase transitions in statistical physics. The so-called two-dimensional q-state Potts model
has an energy given by
N
X
E = −J δsl ,sk ,
<kl>
where the spin sk at lattice position k can take the values 1, 2, . . . , q. The Kronecker delta
function δsl ,sk equals unity if the spins are equal and is zero otherwise. N is the total
number of spins. For q = 2 the Potts model corresponds to the Ising model. To see that
we can rewrite the last equation as
N N
J X 1 X J
E=− 2(δsl ,sk − ) − .
2 <kl> 2 <kl> 2
Now, 2(δsl ,sk − 12 ) is +1 when sl = sk and −1 when they are different. This model is thus
equivalent to the Ising model except a trivial difference in the energy minimum given by a
an additional constant and a factor J → J/2. One of the many applications of the Potts
model is to helium absorbed on the surface of graphite.
The Potts model exhibits a second order phase transition for low values of q and a first
order transition for larger values of q. Using Eherenfest’s definition of a phase transition, a
second order phase transition has second derivatives of the free energy that diverge or are
discontinuous (the heat capacity and susceptibility in our case) while a first order transition
has first derivatives like the mean energy that are discontinuous.
a) Write a program which simulates the q = 2 Potts model for a two-dimensional lattice
with 40 × 40 spins and compute the average energy and specific heat. Compute also
the absolute value of the mean magnetization, the susceptibility and the correlation
function
Gij = hsi sj i − hsi ihsj i. (1)
(See Eq. (3.50) in the text of Barkema and Newman). Establish an appropriate
temperature range for where you see a sudden change in the heat capacity and
susceptibility. To get appropriate statistics you should allow for at least 106 Monte
Carlo cycles. In setting up this code you need to find an effecient way to simulate
the energy differences between different microstates.
In the first part of this project we limit ourselves to the Metropolis algorithm.
Compare these results with those obtained with the two-dimensional Ising model.
The exact critical temperature for the Ising model is TC = 2.269. For the Potts
2
model with q = 2 it is half this value. For the Ising model you can use the program
from the lectures or write your own code for the Ising model.
b) Here we study the time autocorrelation function, defined by Eq. (3.21) from the text
of Newman and Barkema. We use again the square lattice with L = 40 spins in the x
and y directions. Choose first a temperature below the assumed critical temperature
(in units of kT /J) and study the mean energy and magnetisation (absolute value)
as functions of the number of Monte Carlo cycles. Use both an ordered (all spins
pointing in one direction or have the same value) and a random spin orientation as
starting configuration. How many Monte Carlo cycles do you need before you reach
an equilibrium situation? Can you extract an equilibration measure? Repeat this
analysis for a temperature above the critical . Try also different seeds for the ran-
dom number generators. The evaluation of the autocorrelation function should be
included in all your further calculations.
hM(T )i ∼ (T − TC )β , (2)
where β = 1/8 is a so-called critical exponent. A similar relation applies to the heat
capacity
CV (T ) ∼ |TC − T |α , (3)
and the susceptibility
χ(T ) ∼ |TC − T |γ , (4)
with α = 0 and γ = 7/4. Another important quantity is the correlation length,
which is expected to be of the order of the lattice spacing for T >> TC . Because the
spins become more and more correlated as T approaches TC , the correlation length
increases as we get closer to the critical temperature. The divergent behavior of ξ
near TC is
ξ(T ) ∼ |TC − T |−ν . (5)
A second-order phase transition is characterized by a correlation length which spans
the whole system. Since we are always limited to a finite lattice, ξ will be proportional
with the size of the lattice. Through finite size scaling relations, see chapter 8.3 of
Newman and Barkema, it is possible to relate the behavior at finite lattices with the
results for an infinitely large lattice. The critical temperature scales then as
with a a constant and ν defined in Eq. (5). The correlation length is given by
3
and if we set T = TC one obtains
a heat capacity
CV (T ) ∼ |TC − T |−γ → Lα/ν , (9)
and susceptibility
χ(T ) ∼ |TC − T |−α → Lγ/ν . (10)
For all productions runs, you should parallelize the code at this stage. When doing
this, be sure that you obtain the same results as with the serial code.
c) We will now study the behavior of the q = 2 Potts model in two dimensions close to
the critical temperature as a function of the lattice size L. Calculate the expectation
values for hEi and |hMi|, the specific heat CV , the susceptibility χ and the correlation
function G(r) as functions of T for L = 20, L = 40, L = 60, L = 80 and L =
100 for T near the critical temperature TC ≈ 1.1345 for small temperature steps
∆T = 0.01 − 0.05. Plot hEi, hMi, CV and G(r) as functions of T . Can you see
an indication of a phase transition? Try to extract the correlation length ξ from the
formal definition of the correlation function
∂
ξ −1 = − r→∞
lim lnG(r), (11)
∂r
with r = |i − j|.
d) Use Eq. (6) and the exact result ν = 1 in order to estimate TC in the thermodynamic
limit L → ∞ using your simulations with L = 20, L = 40, L = 60, L = 80 and
L = 100.
√
e) We use the exact result kTC /J = 1/ln(1 + 2) ≈ 1.1345 and ν = 1. Determine the
numerical values of CV , χ and M at the exact value T = TC for L = 20, L = 40,
L = 60, L = 80 and L = 100. Plot log10 (M) and log10 (χ log10 ) as functions of
log10 (L) and use the scaling relations of Eqs. (8) and (10) in order to determine the
constants β and γ. Are your log-log plots close to straight lines? The exact values
are β = 1/8 and γ = 7/4. Can you extract a behavior for the correlation function?
f) Use the exact value of TC and compute the correlation time τ ∼ Lz (Eq. (4.7)) for
the above lattices and make a log-log plot as in Figure 4.2 of Newman and Barkema.
Comment your results for the Metropolis algorithm.
g) The last result shows that the Metropolis algorithm is inefficient close to the critical
temperature. Repeat the analysis of [d-f)] using the Wolff algorithm discussed in
chapters 4.2 and 4.3. Discuss your results.
4
h) Extend the calculations to the Potts model with q = 3 and q = 6. Establish first the
location of the peak in the specific heat and study the behavior of the mean energy
and magnetization as functions of q. Do you see a noteworthy change in behavior
from the q = 2 case? Here you need only to find a region where you see that these
variables change dramatically. These results are simply used for the refined search
in the next exercise.
i) We study closer the behavior of the q = 3, 6 Potts models in two dimensions close
to the critical temperature as a function of the lattice size L × L. Use the Wolff
and Metropolis algorithms. Calculate the expectation values for hEi and |hMi|, the
specific heat CV and the correlation function G(r) as functions of T for L = 20,
L = 40, L = 60, L = 80 and L = 100 for T near the established critical temperature
from the previous step. Plot hEi, hMi, CV and G(r) as functions of T . Can you
see an indication of a phase transition? What is its character? Comment your
results. Compare your critical temperature with the values from the literature, see
for example the references listed below. (If you have time, consider also introducing
the Heat-Bath algorithm discussed in chapter 4.5 of Barkema and Newman.)
For a reference on the critical temperatures of the Potts Models, see J. L. Monroe, Physical
Review E 66, 066129 (2002) and http://prola.aps.org/abstract/PRE/v66/i6/e066129. See
also Challa and Landau at http://link.aps.org/abstract/PRB/v34/p1841.