ising model - trinity college, dublin...ising model 2d collinear lattice of spins assumption 2d...

19
Ising model

Upload: others

Post on 24-Feb-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

Page 2: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

You have notes from Prof Hutzler

● Chapter 6: Random numbers and Monte Carlo Integration

● Chapter 7: Statistical Methods

● Chapter 8: Monte-Carlo Simulations

http://www.tcd.ie/Physics/Foams/Lecture_Notes/PY3C01_computer_simulation_1_numerical_and_statistical_methods/py3c01_2016.pdf

Page 3: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

2D collinear lattice of spins

Assumption● 2D square lattice● Nearest neighbour interactions● h=0 (for now)● collinear

Page 4: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Probability the system is in state v

Page 5: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

2D collinear lattice of spins

Nearest neighbour sites

{i,j}

{i,j+1}

{i,j-1}

{i+1,j}

{i-1,j}

Contribution of site {i,j} to the total energy =

H i , j=−J S i , j .(Si+1, j+S i−1, j+Si , j+1+S i , j−1)+hSi

Page 6: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

2D collinear lattice of spins

Nearest neighbour sites

J J

J

J

Page 7: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

2D collinear lattice of spinsH i , j=−J Si , j .(S i+1, j+S i−1, j+S i , j+1+S i , j−1)+hSi

H i , j=−J 1.(−1−1−1+1)+0

H i , j=+2J

{1,1} {2+1}

{1,2}

{0,1}

{1,0}

E=∑i , jH i , j

= 1

= -1

Page 8: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Ising model

2D collinear lattice of spinsΔ E=H i , j(flip)−H i , j

{1,1} {2+1}

{1,2}

{0,1}

{1,0}

Hi,j

{2+1}

{1,2}

{0,1}

{1,0}

Hi,j(flip)

{1,1}

Δ E=−J (−1).(−1−1−1+1)−+2 J

Δ E=−4 J

Flipping the spin {1,1} lowers the total energy by 4J

Page 9: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Simulating the Ising model

Page 10: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Do we flip the spin

if ΔE < 0 i.e. flipping the spin lowers the energy of the system (accept the change)

Page 11: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Do we flip the spin

if ΔE > 0 i.e. flipping the spin increases the energy of the system:

accept based on the Boltzmann distribution

Page 12: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Boltzmann Distribution

Probability that the electron will have enough energy to flip = Pflip=e−ΔEK B T

Accept if Pflip>randomnumber in range 0-1 , what distribution should be chosen for the random number?

Page 13: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Updating the system

●Now we know how to update one spin you can evolve the system by scanning through the lattice and updating the spins.

Page 14: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Boundary conditions

We cannot have a infinite system so what happens at the edge?

Fixed boundary

Periodic boundary conditions

Page 15: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Think about numerical accuracy

● Has your system reached equilibrium before you collect statistics?

● How do the boundary conditions affect the results?● What about the size of the system?● As the system is evolving in time is one snapshot

enough?● What does time mean anyway for this model?● Does it matter how we initialize the matrix?● Can I reduce the computational resources required?

Page 16: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Physical interpretation

● Can you find a phase change with temperature?● What is the order of the phase change?● What is the critical exponent? ● What if J is negative?● What is the distribution of domain sizes?● What if the system was 1D or 3D?● Can this model be applied to systems other than

magnets?

Page 17: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Phase changes with the Ising model

Page 18: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

MarkingPassAttempted implementation of the Ising model demonstrating basic bash and python scripting. The code and report must be submitted through git.

2:2In addition the the pass requirement, a scientific investigation must have been completed looking into a simple aspect e.g. convergence.

2:1 In addition the the 2:2 requirement, a working implementation of the Ising model demonstrating good coding practices: version control history presented on gitlab; use of modules; objects and functions. Sections of the code should be wrapped up in modules or libraries where appropriate. The code should be well commented, documented and clean. A good quality report should be induced looking into a physical problem e.g. phase changes in magnetic systems; affect of different lattice dimensions and connectivity; domain formation.

1st In addition the the 2:1 requirement, the scientific investigation should be a high quality and novel investigation. e.g. annealing a solution to the travelling salesman problem; neural networks; lattice gas; machine learning to find the ground-state in frustrated lattices.

Page 19: Ising model - Trinity College, Dublin...Ising model 2D collinear lattice of spins Assumption 2D square lattice Nearest neighbour interactions h=0 (for now) collinear Probability the

Exercise

Create a flow chart for the 2D Ising model.

There are several flowchart drawing tools, draw.io provides a web based tool to draw flowcharts.