The program solves the mean-field equation for the Ising model
m = tanh β(Jqm + B),
where β = 1/kT, T is the absolute temperature, k is Boltzmann's constant, B is the external magnetic field, q is the number of nearest neighbors of a given spin, J is the exchange constant, and m is the magnetization per spin. (A factor of μ has been absorbed into B.) This equation for m is a self-consistent transcendental equation. That is, the mean-field that influences the mean value of m depends on the mean value of m.
The program is relatively simple and uses Newton's method to find the zeros of the function g(m) = m - tanh β(Jqm + B).
The solutions correspond to the high temperature disordered paramagnetic state (m = 0) and the low temperature ordered ferromagnetic state (m ≠ 0). How do we know which solution to choose? The answer can be found by determining the free energy for both solutions and choosing the solution that gives the smaller free energy. It can be shown that the free energy per spin is
For simplicity we measure the temperature in units of J/k, which is equivalent to setting J = k = 1 in the program.
Mean-field solutions of the Ising model are frequently discussed in the context of the Curie-Weiss theory.
Java Classes Used
Updated 27 February 2007.