Ising Model

A simple nontrivial model that has a phase transition is the Ising model, one of most important models in statistical mechanics. The model consists of spins located on a lattice such that each spin can take on one of two values designated as up and down or ±1. The interaction energy between two neighboring spins is -J if the two spins are in the same state and +J if they are in opposite states. The Ising model undergoes a phase transition between an ordered and a disordered phase in two dimensions or more. Physicists usually consider the Ising model in the context of magnetism, but many other systems can be understood in terms of this model.

The model was proposed by Wilhelm Lenz (1888–1957) in 1920 and was solved exactly for the one-dimensional case by his student Ernst Ising in 1925. The one-dimensional case does not have a phase transition. Lars Onsager (1903–1976) solved the Ising model exactly in 1944 for two dimensions in the absence of an external magnetic field and showed that there was a phase transition in two dimensions. No exact solution is available in two dimensions in an arbitrary magnetic field and in three dimensions. Hence, simulations of the Ising model are essential.

The total energy can be expressed in the form

Ising equation

where si =±1 and J is the exchange constant and H is the external magnetic field. We will refer to s as the spin.

The Ising Model program was developed by Wolfgang Christian at Davidson College using the Open Source Physics Java code library. It is based on a Java program from An Introduction to Computer Simulation Methods. It was converted from Java to JavaScript using the SwingJS system developed at St. Olaf College and Robert Hanson.


  1. H. Gould, J. Tobochnik, and W. Christian, An Introduction to Computer Simulation Methods: Applications to Physical Systems, Addison-Wesley (2007), Chapter 15.