Skip to content

Here is a short project of mine, just a matlab program that simulates the Ising spin lattice.

Notifications You must be signed in to change notification settings

Statici/Matlab-Ising-lattice-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

The Ising spin lattice is a problem from introductory thermodynamics, originally (in one dimension) suggested by Wilhelm Lenz to his student Ernst Ising in 1920. Ising discovered that in one dimension, there was no phase transition, but in 1944, Lars Onsager solved the two-dimensional lattice, and found that there is a paramagnetic-to-ferromagnetic phase transition with a critical temperature of 2.27.

The model works as follows: In a lattice with atoms locked into place, their magnetic moments are free to interact (but only with their neighbors); they will flip to the opposite configuration if it is energetically favorable, or with a probability given by the partition function. Specifically, the energy is calculated as (spin state of -1 or 1)*(sum of neighboring spins); if the energy is less than 0, then it is favorable to flip. Thermal energy in the lattice leads to probabilistic flips that are not necessarily energetically favorable (as predicted by the partition function).

Lattice sites are chosen randomly to be evaluated one at a time. Each time an amount of sites equal to the actual size of the lattice are evaluated, the current state is rendered as a black-and-white checkerboard, and saved as an image/displayed. A sum of the spin states (the overall magnetization of the lattice) is plotted to the right.

About

Here is a short project of mine, just a matlab program that simulates the Ising spin lattice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages