PRACTICAL : 2D Ising Model using MC method
In this practical session, you are going to model the behaviour of ferromagnetic and anti-
ferromagnetic systems, including the ferromagnetic-paramagnetic transition. The model system
is a 2 two dimensional lattice of atoms (square grid). Each atom k has a spin Sk, that can
take two values Sk = 1 (spin up) or Sk = 1 (spin down). The energetic model chosen in
order to describe the energy of this system is the Ising model (see course material). Each spin is
interacting with its four neighbours. This interaction is characterized by the coupling constantJ.
J > 0 characterizes ferromagnetic materials whereas J , The mean value of the magnetic momentum, per site.
Emean : , The mean value of the energy, per site.
Mmean2 : , The mean value of the magnetic momentum squared, per site.
Emean2 : , The mean value of the energy squared, per site.
1. Here, ‘mean’ is to be understood as the mean value in time, which is nearly constant once the algorithm has
converged. This is the macroscopic quantity that a measurement device would indicate. This is also the stochastic
mean value (expected value) according to the theory of probabilities. If Ak is measured for the system at iteration
k, the mean value A of A after i iterations is A(i) = P
k=0::iAk.1
This function helps simulating the evolution towards equilibrium of a 2D magnetic system at
a given temperature T (and possibly submitted to an external magnetic field H).
At each iteration, the state of the system can be pictured in order to monitor the evolution
of the domains shapes (we saw how to draw the content of an array...).
It is also very interesting to plot the instantaneous value M(i) versus iteration i (time here
being measured in terms of MC iterations). The same can be done for E.
The main program can call the function for several values of T (or H), and store the values
of , , and in an array.
Then it is possible, for example, to plot and versus T :
plt.subplot(121)
plt.plot(Ts, Es, ’ro’);
plt.ylabel(’energy per site’);
plt.xlabel(’Temperature’);
plt.subplot(122)
plt.plot(Ts, Ms, ’bo’);
plt.ylabel(’Magnetization per site’);
plt.xlabel(’Temperature’);
To save the picture :
plt.savefig("results/myfig1.pdf") # saving the result as a pdf
Note that the directory results has to be created first in this case.
To save the results in an ascii file :
myrestable = np.vstack((Ts, Es)).T
np.savetxt("results/output.dat", myrestable, delimiter="\t")
General observations
Notethattherelevantparameterinthisproblemisthenon-dimensionalparameter kTJ .Hence,
k can be taken as 1 J=K and J = 1J.
Once you get the basic function working, start by observing the behaviour of ferromagnetic
and anti-ferromagnetic systems, initially unordered, when they are submitted to low temperature
(kT=J = 0:1) or at high temperature (kT=J = 10). What do you observe in each case?
Curie temperature
The start point for this study is a ferromagnetic system at low temperature in one of its
fundamental state. So start with a concentration equal to 1 (all spins up) or -1 (all spins
down). Determine the variation of the mean magnetic momentum per site and of the
mean energy per site as a function of temperature, for a temperature varying between
0.1 and 4. Determine from this curve the Curie temperature of the system.
What do you observe regarding the fluctuations of the instantaneous magnetic momentum
M(t) and the size of the ‘up’ and ‘down’ spin domains when the temperature is close to the
transition (Curie) temperature?
Plot the magnetic susceptibility as well as the specific heat at constant volume cv as a
function of temperature. How is it evolving, especially near the Curie temperature? Check the
agreement with the expression given in the course material.
Influence of an external magnetic field
Start with a ferromagnetic system at high temperature : kT/J=4.0. Compute the mean
magnetic momentum for increasing intensities of the applied magnetic field : H/J=0; 0.1; 0.2;
0.3; 0.4 (wait for momentum stabilization before doing each measurement). How is the magnetic
susceptibility influenced? Same question for the specific heat.
Curie law gives the variation of susceptibility as a function of temperature for systems sub-
mitted to high temperatures : M = CH=T. Check this law, for example for a fixed value of
the field H=J. The temperature can be increased from kT=J = 4:0 to kT=J = 8:0. Compute C.