In this repository, we present the study of the two-dimensional classical Ising model through numerical simulation. By implementing the Monte Carlo method, we obtain the characteristic quantities of the system and analyze their behaviour around the ferromagnetic phase transition. We determine critical exponents and examine the effect of finite-size scaling.
The structure of the repository is as follows:
class_lattice.h
:This header contains the lattice class from which the Ising lattice is instantiated. The class includes a Metropolis update method and an incorporated Pseudo Random Number Generator.
main_*.cpp
:These programs call the simulation subroutine for all betas and sides, collecting average energy and magnetization measures in the
Data_simulations
folder.data_analysis.cpp
:This program, located in the
Data_processing
directory, computes the quantities of interest and their errors. The computation and error analysis results are stored in theData_analysis
folder.cumulant_and_plots.py
andcritical_exponents.py
:These programs, also located in the
Data_processing
directory, utilize the data in theData_analysis
folder to plot the physical quantities and fit the cumulant and critical exponents. The fit parameters and their errors are stored in thecumulant_results.txt
andcritical_exponents.txt
files.Plots_and_fit
:All produced plots are stored in this folder. Here we can find plots of the main physical quantities, scaling relations and Binder cumulant.
Tests
:This directory contains easy-to-use examples for testing the lattice class and verifying that the Monte Carlo algorithm has thermalized.
Here are some of the plots generated from the analysis:
Plot of the main physical quantities:
Susceptibility scaling plot:
Fit to find the critical point:
Binder cumulant:
Feel free to explore the repository and use the provided programs for further analysis and investigation.
This repository is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for more information.