Skip to content

Simulation of the 2D Ising model on a finite-sized lattice with toroidal boundary conditions using NumCPP.

Notifications You must be signed in to change notification settings

auan0001/2D-Ising-Model-NumCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Ising Model NumCPP Implementation

Running the simulations

This is a Markov Chain Monte Carlo simulation of the 2D Ising Model in C++. The dependencies are NumCPP and CMake (for building, using GCC). Build and compile the project by changing the the build directory

% cd build
% cmake ..

Running the binary with parameters $L=32$, $J=1$, $B=0$ using Metropolis-Hastings and saving the results in run.dat

./ISING metropolis 32 1.0 0.0 run.dat

or the Heat bath method

./ISING heatbath 32 1.0 0.0 run.dat

If number of args are incorrect, the console will display

USAGE: <metropolis/heatbath> <lattice dim> <J> <B> <file>

Results

These plots are excerpts generated from the simulation data

Spin lattice configurations over different temperatures

alt text

Varying the field with a negative spin coupling

alt text

About

Simulation of the 2D Ising model on a finite-sized lattice with toroidal boundary conditions using NumCPP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published