Explores the properties of the generalized Ising Model in 2 dimensions. The spins are arranged in a square lattice and interact with the nearest neighbours only. Periodic boundardary conditions are imposed in both directions. Video demo of 2d ising visualization for monte carlo algorithm applied over time here.
The ising2D.m uses the Monte Carlo algorithm to simulate the behaviour of a General 2D Ising Model under specified conditions. If the plot flag is set to 1 then it will show the real time change of the cell matrix over time.
T = Temperature
N = linear lattice size
J = Ising coupling
plot_flag - 1 to have the script plot the cell matrix evolution in real time
These scripts graph the energy, magnetization, heat capacity, and magnteic susceptibility as temperature changes. The difference between them is that T_C_investigation.m focuses more on the range around the critical temperature.
The thermalization time is how long it takes for the algorithm to reach an equilibrium.
thermalization_relationship plots the thermalization time of the simulated ising models as the value of N is increased. This script is dependant on the thermalization.m script.
Predetermined all the possible probabilities for the Metropolis algorithm. This way the code does not have to execute the relatively taxing ‘exp’ function every iteration.