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 theDatafolder.plots.py: Produces plots for the data that were collected fromcollect_data.py. Saves them in thefiguresfolder.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 = Trueincollect_data.pyfor Metropolis Algorithm.metropolis_bool = Falseincollect_data.pyfor Wolff Algorithm.
- Run
plots.pyto plot average absolute magnetisation, energy, susceptibility, and specific heat.method = 'metropolis'inplots.pyfor Metropolis Algorithm.method = 'wolff'inplots.pyfor Metropolis Algorith.
- Python 3
- numpy
- scipy
- matplotlib
- Smit Chaudhary
- Ignacio Fernández Graña
- Georgios Sotiropoulos