This project aims to simulate the Ising Model with two different Monte Carlo algorithms: Metropolis algorithm and Wolff algorithm. A detailed explanation of both algorithms, as well as a comparison between them simulating a 20x20 Ising lattice, can be found in the report.pdf file.
skeleton.py
: Code that performs Monte Carlo experiment.observables.py
: Contains functions that calculate susceptibility and specific heat along with their errors.collect_data.py
: Collects data upon running for a sweep of temperatures and calculates observables and their errors. Saves all data in theData
folder.plots.py
: Produces plots for the data that were collected fromcollect_data.py
. Saves them in thefigures
folder.journal.md
: Contains our progress throughout the duration of the project.
- clone the repository
git clone https://gitlab.kwant-project.org/computational_physics/projects/Project-2---Ising_idonfernandezg_smitchaudhary_ysotiropoulos.git
- Run the simulation for your choice of algorithm
metropolis_bool = True
incollect_data.py
for Metropolis Algorithm.metropolis_bool = False
incollect_data.py
for Wolff Algorithm.
- Run
plots.py
to plot average absolute magnetisation, energy, susceptibility, and specific heat.method = 'metropolis'
inplots.py
for Metropolis Algorithm.method = 'wolff'
inplots.py
for Metropolis Algorith.
- Python 3
- numpy
- scipy
- matplotlib
- Smit Chaudhary
- Ignacio Fernández Graña
- Georgios Sotiropoulos