Simulation of the two-dimensional square-lattice Lenz-Ising model in Python

Similar documents
Metropolis Monte Carlo simulation of the Ising Model

Numerical Analysis of 2-D Ising Model. Ishita Agarwal Masters in Physics (University of Bonn) 17 th March 2011

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm

The XY-Model. David-Alexander Robinson Sch th January 2012

A Monte Carlo Implementation of the Ising Model in Python

Physics 115/242 Monte Carlo simulations in Statistical Physics

J ij S i S j B i S i (1)

Monte Carlo Simulation of the Ising Model. Abstract

Lab 70 in TFFM08. Curie & Ising

Monte Carlo Simulation of the 2D Ising model

Phase transitions in the Ising model with random gap defects using the Monte Carlo method

Progress toward a Monte Carlo Simulation of the Ice VI-VII Phase Transition

Monte-Carlo simulation of small 2D Ising lattice with Metropolis dynamics

The Phase Transition of the 2D-Ising Model

Ising Model. Ising Lattice. E. J. Maginn, J. K. Shah

ABSTRACT. We measure the efficiency of the Metropolis, Swendsen-Wang, and Wolff algorithms in

Kinetic Monte Carlo (KMC) Kinetic Monte Carlo (KMC)

Electromagnetism II. Instructor: Andrei Sirenko Spring 2013 Thursdays 1 pm 4 pm. Spring 2013, NJIT 1

Lecture V: Multicanonical Simulations.

Numerical methods for lattice field theory

E = <ij> N 2. (0.3) (so that k BT

Any live cell with less than 2 live neighbours dies. Any live cell with 2 or 3 live neighbours lives on to the next step.

Parallel Tempering Algorithm in Monte Carlo Simulation

Physics Sep Example A Spin System

Critical Dynamics of Two-Replica Cluster Algorithms

c 2007 by Harvey Gould and Jan Tobochnik 28 May 2007

Quantum Integrability and Algebraic Geometry

Cluster Algorithms to Reduce Critical Slowing Down

Expectations, Markov chains, and the Metropolis algorithm

Graphical Representations and Cluster Algorithms

Computational Physics (6810): Session 13

Binder Cumulants for the Ising Model using Worm algorithms

WORLD SCIENTIFIC (2014)

Electromagnetism II. Cristina Lazzeroni Lecture 5

Copyright 2001 University of Cambridge. Not to be quoted or copied without permission.

LECTURE 10: Monte Carlo Methods II

2 B B D (E) Paramagnetic Susceptibility. m s probability. A) Bound Electrons in Atoms

Quantum annealing by ferromagnetic interaction with the mean-field scheme

Numerical Simulations of the Ising Model on the Union Jack Lattice

REVIEW: Derivation of the Mean Field Result

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below

Classical Monte Carlo Simulations

2D and 3D Ising model using Monte Carlo and Metropolis method

3.320 Lecture 18 (4/12/05)

Home Page ISING MODEL. Title Page. Contents. Lecture 12. Page 1 of 100. Go Back. Full Screen. Close. Quit

Evaluation of Wang-Landau Monte Carlo Simulations

Kyle Reing University of Southern California April 18, 2018

The mixed-spins 1/2 and 3/2 Blume Capel model with a random crystal field

Computational Simulations of Magnets at High Temperatures Utilizing the Ising Model and the Monte Carlo Technique

Introduction to the Renormalization Group

Parallel Tempering And Adaptive Spacing. For Monte Carlo Simulation

Monte Caro simulations

Paramagnetism and Diamagnetism. Paramagnets (How do paramagnets differ fundamentally from ferromagnets?)

Monte Carlo importance sampling and Markov chain

Generalized Ensembles: Multicanonical Simulations

Improvement of Monte Carlo estimates with covariance-optimized finite-size scaling at fixed phenomenological coupling

Stochastic series expansion (SSE) and ground-state projection

Solid State Physics MAGNETISM I. Lecture 27. A.H. Harker. Physics and Astronomy UCL

Monte Carlo (MC) Simulation Methods. Elisa Fadda

A New Algorithm for Monte Carlo Simulation of king Spin Systems* A. B. BORTZ M. H. KALOS J. L. LEBOWITZ

Phase Transition & Approximate Partition Function In Ising Model and Percolation In Two Dimension: Specifically For Square Lattices

Janus: FPGA Based System for Scientific Computing Filippo Mantovani

Monte Carlo study of the Baxter-Wu model

5. Simulated Annealing 5.1 Basic Concepts. Fall 2010 Instructor: Dr. Masoud Yaghini

Calculations of the Partition Function Zeros for the Ising Ferromagnet on 6 x 6 Square Lattice with Periodic Boundary Conditions

Monte Carlo Methods. PHY 688: Numerical Methods for (Astro)Physics

Advanced Sampling Algorithms

PHY331 Magnetism. Lecture 3

use the backs of pages as needed

Simulation of Hysteresis In Permalloy Films

Statistical Thermodynamics Solution Exercise 8 HS Solution Exercise 8

CHEMISTRY 4021/8021 MIDTERM EXAM 1 SPRING 2014

Their Statistical Analvsis. With Web-Based Fortran Code. Berg

Scaling Theory. Roger Herrigel Advisor: Helmut Katzgraber

Lecture Notes on Statistical Mechanics

Lecture B6 Molecular Orbital Theory. Sometimes it's good to be alone.

Superconductivity. Resistance goes to 0 below a critical temperature T c

Lecture 3: September 10

Ch. 28: Sources of Magnetic Fields

Quantum Phase Transition

DOMAIN GROWTH LAW VIOLATIONS IN A COMPRESSIBLE 2D ISING MODEL. Matthew Robert Wright. A senior thesis submitted to the faculty of

Stat 516, Homework 1

Chapter 5. Chemical potential and Gibbs distribution

The Oxford Solid State Basics

Spreadsheet analysis of stability and meta-stability of low-dimensional magnetic. particles using Ising approach accepted version

Potts And XY, Together At Last

Electrons in a periodic potential: Free electron approximation

Efficiency of Parallel Tempering for Ising Systems

Magnetism and Levitation

Chapter 2 Ensemble Theory in Statistical Physics: Free Energy Potential

PH4211 Statistical Mechanics Brian Cowan

CS 781 Lecture 9 March 10, 2011 Topics: Local Search and Optimization Metropolis Algorithm Greedy Optimization Hopfield Networks Max Cut Problem Nash

On Markov Chain Monte Carlo

THE INFLUENCE OF A SURFACE ON HYSTERESIS LOOPS FOR SINGLE-DOMAIN FERROMAGNETIC NANOPARTICLES

Principles of Equilibrium Statistical Mechanics

Advanced Monte Carlo Methods Problems

S j H o = gµ o H o. j=1

Unit III Free Electron Theory Engineering Physics

Phase Transitions and Renormalization:

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods: Markov Chain Monte Carlo

Transcription:

Senior Thesis Simulation of the two-dimensional square-lattice Lenz-Ising model in Python Author: Richard Munroe Advisor: Dr. Edward Brash 2012-10-17

Abstract A program to simulate the the two-dimensional square-lattice Lenz- Ising model with periodic boundary conditions and no external field was implemented in Python. The program uses the Metropolis-Hastings algorithm to quickly sample the distribution being investigated. The output of the program is a comma-separated list of values representing some parameters of interest at different lattice temperatures. These values can be examined to demonstrate several well-known properties of this version of the Lenz-Ising model. Introduction to the Lenz-Ising Model In 1920, Wilhelm Lenz proposed a new model of ferromagnetism which his student, Ernst Ising, later published a solution for in his 1924 dissertation. The Lenz-Ising model can be used to describe how the temperature of a ferromagnetic material affects its magnetic properties. This model treats the material as a lattice of elementary dipole magnets, such as electrons, each with their own spin magnetic moment. Ferromagnetic materials differ from other materials in that it is slightly energetically favorable for their constituent dipole moments to align with each other i. At high temperatures, the random movement of the molecules dominates and the spins become unaligned. However, at low temperatures the lack of thermal disturbance allows the spins to align. The key difference between the Lenz-Ising model and one proposed earlier by Pierre Weiss in 1907 was the treatment of spin orientations. In the Lenz-Ising model, the spins of the dipoles in the lattice are allowed occupy one of two possible orientations, either up or down. Additionally, the Lenz- Ising model considers only adjacent sites on the lattice to have any effect on one another, disregarding long-distance interactions.? In 1924, Ising published a solution for the one-dimensional case of the Lenz-Ising model, which displayed no phase transition, ii but he incorrectly extrapolated from this result that a three-dimensional lattice would display the same lack of a phase transition.?,? Later, in 1942, Lars Onsager published an exact solution to the two-dimensional Lenz-Ising model (with no external field) which did display a phase change, and later authors expanded on his work to find solutions to other versions of the model.? i This is due to the exchange interaction, an explanation of which can be found on pages 207-210 of Griffiths Introduction to Quantum Mechanics, second edition.? ii A phase transition is a change in a system s physical properties, such as the transition between a ferromagnetic state and a paramagnetic state. 1

Introduction to a Solution Ideally, parameters of interest such as specific heat capacity, magnetic susceptibility, average energy, and average magnetization could be calculated from the partition function of the system. Unfortunately, a method for calculating the partition function of such a system exactly is not currently possible for anything above the two dimensional case; however, there are techniques that allow study of lattices easily on consumer hardware with only a beginner s understanding of programming. For a given temperature, all that is required to make predictions about the future state of this spin lattice system is its current state, which means that the process by which the lattice changes configurations can be modeled as a Markov chain.? Let A and B represent two possible states of the system (configurations of the lattice). Let E represent the total energy of a configuration, which is the sum of all spin-spin interaction energies plus any external field component. Let Z represent the partition function, which is the sum over every possible lattice state of every state s associated Boltzmann factor. iii From this, p(a) and p(b) are the probabilities of finding the system in their respective states, p(a) = e E(A)/τ and p(b) = e E(B)/τ. (1) Z Z Let w(a, B) be the probability of transitioning from A to B. If the system is examined at equilibrium, then by the principle of detailed balance it is equally likely for the system to be in state A and then transition to B as for the system to be in state B and then transition to A. p(a)w(a, B) = p(b)w(b, A) (2) Using (??) and (??), the ratio of transition probabilities can be calculated as the ratio of Boltzman factors of the two states: w(a, B) w(b, A) = e (E(B) E(A))/τ (3) = e E/τ (4) This extremely convenient result is at the heart of the Monte Carlo Markov chain technique known as the Metropolis algorithm. The Metropolis algorithm is an importance sampling technique where instead of calculating values for a distribution itself, samples are calculated from a function proportional to it.? The Metropolis algorithm is implimented as follows: iii The Boltzmann factor of a state, s, is given by e E(s)/τ. Further explanation of Boltzmann factors and partition functions can be found on pages 58-62 of Kittel and Kroemer s Thermal Physics, second edition.? 2

1. A random spin site is chosen in the lattice. 2. A trial flip of the spin is made and the energy difference, E, is calculated. If E < 0 (flipping the spin leads to a lower energy state), the flip is made and the lattice is updated to the new configuration. 3. If E 0, a random number 0 x 1 is generated. Using (??) and comparing the randomly generated variable to this transition probability, the spin flip is only accepted if x e E/τ. Implementation At each temperature the program must determine which spins should get flipped and which should not. At sufficiently low temperatures, all the spins should be aligned, but as the temperature rises, the probability that sites might have sufficient energy to flip orientations increases. In this program, the lattice is represented by a two dimensional nested list of lists. Each element in the list is an integer (either -1 or 1) representing a spin down or spin up site. The lattice starts out very close to absolute zero with every spin site pointing in the same direction. In addition, several lists are initialized to store values of interest. At this point, the program enters a loop where the temperature will be increased by a set amount each cycle. For every increment of the temperature, the lattice is first brought to thermal equilibrium and then a random site is chosen to be investigated. With the lattice at thermal equilibrium, individual sites are chosen at random and flipped or not flipped according to the Metropolis algorithm. After the flip has been attempted, the difference in energy between the pre-step lattice and the current lattice is recorded, as well as the magnetization at that site. Each of these attempts constitutes one step. The number of steps carried out is proportional to the size of the lattice. After the appropriate number of steps are carried out, the average energy, average magnetization, and energy variance are calculated for this temperature from the data gathered at the end of each step for this temperature. Then, the temperature is increased by a set amount and the whole process is started over again. This is repeated up until some maximum specified temperature is reached. 3

Results The following data were obtained by running the Python simulation with the following parameters: columns = 100, rows = 100, maximum temperature = 6.0, temperature step size = 0.01, number of equlibrium steps = 3, number of sweeps = 1. I have used fundamental temperature, τ = T k B, in the simulation. 0.7 0.6 0.5 Specific Heat 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 Fundamental Temperature The phase transition causes a spike in the specific heat around τ = 2.3, which is close to the critical temperature of 2.269 obtained in the literature. 4

0.5 1 1.5 Average Energy 2 2.5 3 3.5 4 0 1 2 3 4 5 6 Fundamental Temperature The lowest energy state is associated with uniform spin alignment. As the lattice becomes disordered as the temperature increases, the average energy decreases. 5

1.1 10 4 1 0.9 Average Magnetization Per-Site 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0.1 0 1 2 3 4 5 6 Fundamental Temperature At low temperatures, the lattice exhibits near-uniform magnetization until the critical temperature is approached, at which point the magnetization drops sharply and the system turns to a disordered state. Additional Remarks This program could be optimized for speed, but it has been left in its current state so that it can be more easily followed by a student who is new to programming or to this subject. 6