This repository includes:
- pdf with an analytic analysis of the model and an exploration of the Monte Carlo simulation results.
- Python code to run MC simulations of the model (for the case of zero field).
This was initally developed as a project for my Statistical Physics course, but I later revisited the project and improved it.
- Simply run main.py . You will be asked to input the number of spins and the number of Monte Carlo steps to perform (see pdf). Higher values result in slower simulations, I recommend starting with 50 spins and 10000 steps to experiment.
- The progress is displayed in real-time.
- Once finished, a folder is created with the results of the run: A file with the mean magnetization per spin and total energy of each of the MC samples, for each of the temperatures. Attention: the file name only depends on N, so be careful with over-writing previous results.
An example of the outout is found in the folder N50.
Some of the relevant equations found in the project: