We report our development and subsequent analysis of a Monte-Carlo Markov-Chain (MCMC) simulation for a 2-dimensional
lattice following the Ising model, capable of studying the thermodynamic properties of the system. We reproduced plots for the
magnetisation, susceptibility, magnetic susceptibility, and specific heat per spin for a system with external magnetic field,
- We define x_i as a state of the system (e.g. the position and velocity of all particles. Or the spin configuration). That’s what the integral runs over.
- We assume that the "next” state x_{i+1} in a chain only depends on the current state x_i, not on whatever happened before. (The system has no memory)
- We define T(x → x') the probability to go from state x to state x'. (e.g. the probability to flip 1 spin in our lattice)
The following are themeasured quantities that this code gives as an output, and in addition plots them against the corresponding temperature of the system.
main_file.py
: Main program contains the simulation and relevant parameters. It allows the user to measure
thermodynamic properties of a lattice following the Ising Model, for different numbers of
particles and values of the coupling constant and external magnetic field. For more information regarding
its proper use we refer to its docstring description.
functions.py
: File contains all the relevant functions used by the simulation. We note that the
ising_mc_simu function performs the simulation on its own and can be used idependently.