Download presentation
Presentation is loading. Please wait.
Published byPatricia Austin Modified over 8 years ago
1
www.lzu.edu.cn/~southern
3
Monte Carlo Simulation of the Ising Model Consider a system of N classical spins which can be either up or down. The total number of microstates is M = 2 N nearest neighbour spins interact with an exchange interaction -JS i S j in one dimension the spin configurations in the ground state are energy is E ground = -(N)J periodic bcs
5
Computer Simulation The equilibrium properties are obtained from the partition function Z= e - E(i) where E(i) is the total energy of configuration i, =1/kT and the sum is over all 2 N configurations the sum over all configurations is like a 2 N dimensional integral the Metropolis algorithm is used to simulate the problem numerically and is a cornerstone of computational physics
7
1-d Ising Model Metropolis algorithm starts with an arbitrary spin configuration and then produces a new one the sequence of configurations it produces is an example of a Markov sequence t=0 t>0 at finite temperature T the initial state is unstable to the formation of domains these domains destroy long range order
8
Metropolis Algorithm All spins up T>0 Equilibrium configuration
9
Metropolis Algorithm Pick a site at random old calculate energy change if spin is flipped new in this case E=0 old new in this case E<0
10
Metropolis Algorithm If E<0 or E=0 we accept the new configuration old new here E>0 we accept the new configuration with probability p=exp(- E/kT) choose a random number 0 r 1 if r p then accept new configuration if r > p then keep the old configuration repeat over and over again
11
Program Ising Implicit none Integer max Parameter(max=100) Integer element, i, spins(max), seed, t Real*8 drand48, energy, kt, new, j, old c define number temperature, exchange energy, random seed Parameter(kt=100, j=-1, seed=68111) c open files, seed generator Open(8, FILE='spin-up.dat', Status='Unknown') Open(9, FILE='spin-do.dat', Status='Unknown') Call seed48(seed) c c First generate a uniform configuration of spins Do 10 i=1,max spins(i) = 1 10 Continue c
12
c step through time Do 20 t=1, 500 c energy of the system old=energy(spins, j, max) c pick one element element=drand48()*max+1 c change spin spins(element)=spins(element)*(-1) c calculate new energy new=energy(spins, j, max) c reject change if new energy is greater and the Boltzmann factor c is less than another random number If ((new.GT.old).AND. (exp((-new+old)/kt).LT.drand48())) Then spins(element)=spins(element)*(-1) Endif
13
c save a map of spins Do 30 i=1,max If (spins(i).EQ.1) Then Write(8,*) t, i Endif If (spins(i).EQ.(-1)) Then Write(9,*) t, i Endif 30 Continue 20 Continue Close(8) Close(9) Stop 'data saved in spin-up.dat, spin-do.dat' End
14
c function calculates energy of the system Function energy(array, j, max) Implicit none Integer array(max), i, max Real*8 energy, j energy=0 Do 22 i=1,(max-1) energy=energy+array(i)*array(i+1) 22Continue Return End energy=array(max)*array(1)
15
Monte Carlo Simulation of the 1-d Ising Model
16
Order-Disorder This is a general feature of order-disorder transitions The ordered phase becomes unstable towards the formation of defects Ising model: defects are domain walls d c =1 --> no finite T phase transition in d=1 similar to 1-d percolation where p c =1 that is, any defect in 1-d destroys order for d=2 defects are compact clusters and a finite temperature phase transition occurs
17
Wall at T=0Wall at T>0 Cluster at T>0
18
Monte Carlo Simulation of the 2-d Ising Model
19
Specific heat and magnetic susceptibility C v = - 2 kT 2 = = - 2 kT Structure Factor
20
L= L finite
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.