Sie sind auf Seite 1von 6

Simulation of the 2D Ising Model

Robert Knegjens May 13, 2008

Introduction

The aim of this project was to simulate the 2D Ising model in equilibrium with the use of Monte Carlo algorithms. To this end, interesting properties of both the model and the algorithms were observed and are presented in this report. Concerning the Ising model, particular attention is given to the thermalization of the lattice, correlations in measurement, phase transitions and the determination of the universal critical exponents and using nite size scaling. The Monte Carlo algorithms used for the simulation were those of Metropolis[2] and Wol[3], whose relative accuracy and eciency are discussed as they become evident in data presented along the way. The Ising model considered is a square lattice of spin sites with periodic boundary conditions, ranging in size from 20 20 to 100 100 with the standard Hamiltonian. The coupling constant J and the Boltzmann constant kB are both set to 1, such that J = T 1 is referred to as the inverse temperature. Spin sites are assigned a value of 1 to represent spin up/down respectively. Thus, the total magnetization M is simply the integer sum of all lattice spin sites, and the total energy E is dened as minus the coupling constant J times all the neighbouring spin pairs that are alligned. The Metropolis algorithm works by randomly picking a single site on the lattice and ipping it. Wol, on the other hand, is a cluster-ipping algorithm, meaning that it grows and then ips a whole cluster around a random seed site. Care must therefore be taken in dening units of time, as both of these operations occur in one Monte Carlo step. In this report (unless explicitly stated otherwise), a step will refer to a lattice sweep (steps per site) in Metropolis or a single cluster-ip with respect to Wol. Clearly little attempt has been made so far to explain the theory or details of the Ising model or the Monte Carlo algorithms, and this trend is set to continue. The reader is kindly referred to the book by Barkema and Newman[1] for these details.

Thermalization

Thermalization is the process of bringing the lattice to equilibrium at a given temperature T (1/J). This is achieved by taking some initial conguration for the lattice (usually T = ), and then applying the Monte Carlo algorithm of choice until equilibrium is reached. The question is; after how many steps is it certain that the system has equilibriated? The method used to estimate this equilibration time eq , was to study the behaviour of the total energy and magnetization of the lattice, as these reach a steady state at equilibrium. Figure 1 gives the behaviour of the total energy and magnetization for a 40 40 lattice using the Metropolis algorithm. It can be seen that equilibrium was reached at eq = 600 lattice sweeps (steps per site) for all temperatures. For the Wol algorithm (not shown) equilibrium is typically reached within eq = 50 cluster ips for the same lattice size. As a safe limit, the equilibration time for both Metropolis

and Wol (in lattice sweeps and cluster ips respectively) was chosen to be the number of spin sites N of the lattice, eq = N , as suggested by Barkema and Newman[1].
Thermalization of Magnetization (Metropolis Algorithm)
500 0

1500

Thermalization of Energy (Metropolis Algorithm)


J = 0.30 J = 0.37 J = 0.43 J = 0.50

Magnetization (M)

1000

Energy (E)
J = 0.30 J = 0.37 J = 0.43 J = 0.50 0 200 400 600 800 1000 1200 1400 1600

500 0 -500 -1000 -1500

-500 -1000 -1500 -2000 -2500 -3000 0 200 400

Time [lattice sweeps]

Time [lattice sweeps]

600

800

1000

1200

1400

1600

Figure 1: Thermalization of total magnetization (left) and total energy (right) using Metropolis algorithm on a 40 40 lattice at various temperatures

Independent Measurements

Once the system has reached equilibrium, measurements of quantities such as energy and magnetization become interesting. However, as is evident in gure 1, these measurements suer from periodic uctuations. In order to distinguish independent measurements from those correlated to each other, a time displaced autocorrelation function (t) = dt[m(t)m(t + t) m 2 ] (1) (2)

et/

is calculated for each step t1 , where m(t) is the measured quantity (refer to Barkema and Newman for further details[1]). Figure 2 illustrates the exponential decay (2) of the autocorrelation function for a 40 40 lattice using the Metropolis algorithm at a range of inverse temperatures. As a consequence of this exponential decay, the correlation time can be calculated by integrating over the autocorrelation functions, (t) (3) = et/ = (0) 0 0 Independent measurements of energy and magnetization are then assured by taking measurement intervals of 2 for their respective correlation times . For instances where the correlation time was found to be small, the measurement interval was adjusted to conform to a chosen upperbound on the number of independent measurements (in most simulations 1000). Figure 3 gives the magnetization correlation times for a range of inverse temperatures using the Metropolis and Wol algorithms. The Metropolis algorithm is seen to have its correlation times diverge close to a critical (inverse) temperature. As we will see in section 4, this critical temperature marks the occurence of a phase transition, and this critical slowing-down strongly suggests the Metropolis algorithm
1

Here a step is a lattice sweep (steps per site) in the Metropolis Algorithm or a cluster ip in the Wol Algorithm

1 0.9 0.8 0.7

Correlations of Magnetization (Metropolis Algorithm)

1 0.9 0.8 0.7

Correlations of Energy (Metropolis Algorithm)


J = 0.30 J = 0.37 J = 0.43 J = 0.50

(t)/(0)

0.5 0.4 0.3 0.2 0.1 0 0 20 40

(t)/(0)
140

0.6

J = 0.30 J = 0.37 J = 0.43 J = 0.50

0.6 0.5 0.4 0.3 0.2 0.1 0

Time [lattice sweeps]

60

80

100

120

10

Time [lattice sweeps]

15

20

25

30

35

40

Figure 2: Autocorrelation functions for magnetization (left) and energy (right) on a 40 40 lattice using the Metropolis algorithm is not well suited for making accurate measurements close to this phenomenon. The Wol Algorithm on the other hand has a minima at this same temperature, suggesting exactly the opposite; namely that it is very well suited to making accurate measurements close to a phase transition. The Wol correlation times are also given scaled in terms of Metropolis lattice sweeps, scaled = n N (4)

where n is the average number of cluster ips, to further demonstrate the superior eciency of the Wol algorithm.
Correlation Time (Metropolis Algorithm) Correlation Time (Wolff Algorithm)
Cluster Flips Lattice Sweeps (scaled)

1200

50 40 30 20 10 0

Time [lattice sweeps]

1000 800 600 400 200 0 0.3 0.35 0.4 0.45 0.5

Time

Inverse Temperature (J)

0.3

0.35

Inverse Temperature (J)

0.4

0.45

0.5

Figure 3: Magnetization correlation times for various inverse temperatures on a 40 40 lattice using the Metropolis (left) and Wol (right) algorithms

Phase Transition

The motivation for computing the correlation functions in section 3 was to allow accurate measurements of quantities involving the magnetization and energy of the lattice. With these measurements now in hand, 3

we proceed to consider the behaviour of the absolute magnetization |M | and magnetic susceptibility = ( |M |2 |M | 2 ) N (5)

as functions of inverse temperature J. Figures 4 and 5 give |M | and for a 40 40 lattice using both the Metropolis and Wol algorithms. From the absolute magnetization, it is evident a phase transition occurs from minimal to maximal magnetization at a critical temperature c J 0.43 or Tc 2.3. Similarly, the susceptibility strongly peaks at this temperature, also indicating a phase transition (see Barkema and Newman[1]).
Absolute Magnetization (Metropolis Algorithm) Absolute Magnetization (Wolff Algorithm)

1600 1400 1200 1000 800 600 400 200 0 0.3

1600 1400 1200 1000 800 600 400 200

0.35

Inverse Temperature (J)

0.4

0.45

0.5

0.3

0.35

Inverse Temperature (J)

0.4

0.45

0.5

Figure 4: Absolute magnetization at various inverse temperatures for a 40 40 lattice using the Metropolis (left) and Wol (right) algorithms
Magnetic Susceptibility (Metropolis Algorithm) Magnetic Susceptibility (Wolff Algorithm)

50 40 30 20 10 0

50 40 30 20 10 0

0.3

0.35

Inverse Temperature (J)

0.4

0.45

0.5

0.3

0.35

Inverse Temperature (J)

0.4

0.45

0.5

Figure 5: Magnetic susceptibility at various inverse temperatures for a 40 40 lattice using the Metropolis (left) and Wol (right) algorithms The error bars included in gures 4 and 5 illustrate the superior accuracy of the Wol algorithm over Metropolis close to the phase transition. The errors for the magnetic susceptibility were calculated using the jack-knife method [1].

Finite Size Scaling

The absolute magnetization and magnetic susceptibility measured in section 4 were for a 40 40 lattice, so it follows to ask how these quantities scale with dierent lattice sizes. In gure 6 absolute magnetization and susceptibility are shown plotted for various lattice sizes. It is clear that the phase transition observed in section 4 is still present, and at about the same critical temperature. The absolute magnetization crosses over from minimal to maximal at the phase transition for every lattice size considered, therefore scaling this quantity for an arbitrarily large lattice size is straight forward. The magnetic susceptibilitys peak at the critical temperature increases with larger lattice sizes, making it less trivial to scale for a given lattice size.
Absolute Magnetization for Varying Lattice Sizes (Wolff Algorithm)
9000 8000 7000 6000 5000 4000 3000 2000 1000 0 0.3 0.35 20x20 30x30 50x50 60x60 100x100

Absolute Magnetization (|M|)

10000

160 140

Susceptibility for Varying Lattice Sizes (Wolff Algorithm)


20x20 30x30 50x50 60x60 100x100

Susceptibility ()
0.4 0.45 0.5

120 100 80 60 40 20 0 0.3

Inverse Temperature (J)

0.35

Inverse Temperature (J)

0.4

0.45

0.5

Figure 6: Absolute magnetization (left) and magnetic susceptibility (right) for various lattice sizes To scale the magnetic susceptibility we use the nite size scaling method[1]. This method makes use of the universal critical exponents and , which give the correlation length and susceptibility in terms of the reduced temperature t; T Tc Tc = |t| t = = |t|

(6) (7) (8)

As detailed in Barkema and Newman[1], it is possible to write the susceptibility as = L/ (L1/ t) (9)

for an unknown scaling function (x), which by construction has no L dependence. Hence, by nding the scaling function for a given L, can be calculated for any arbitrary lattice size, provided the critical exponents and are known. Equation (9) can also be used to determine the critical exponents using a method of trial and error. By starting with a set of dierent lattice sizes L, L a/b is plotted against L1/b t for some constants a and b. By varying a and b, the curves corresponding to the dierent lattice sizes will all collapse onto the function precisely at a = , b = and for a unique value of T c . This process is called data collapse. Figure 7 shows data collapse of the magnetic susceptibility for the critical values = 1.77, = 1.00 and Tc = 2.265. As already stated, these values were found by trial and error, with the point of data collapse chosen by eye. Using this rudimentary method, all three critical values had a range of approximately 5

0.05 within which the data still appeared to collapse. More precise methods for achieving data collapse are discussed in Barkema and Newman[1].
0.05 0.045 -/ 0.04 0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 -4 -2 0 2 4 6 8 10

Data Collapse of Magnetic Susceptibility


20x20 30x30 50x50 60x60 100x100

Scaled susceptibility (*L

Scaled difference from critical temperature (t*L1/)

Figure 7: Data collapse of magnetic susceptibility for the critical values = 1.77, = 1.00 and T c = 2.265

References
[1] M. E. J. Newman and G. T. Barkema, Monte Carlo methods in statistical physics, (Oxford University Press, Oxford, 1999). [2] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, Equation of state calculations by fast computing machines, (J. Chem. Phys., 21, 1953) pp. 1087-1092. [3] U. Wol, Collective Monte Carlo updating for spin systems, (Phys. Rev. Lett., 62, (1989)) pp. 361-364.