Henry Daniels-Koch edited section_Implementation_of_Code_label__.tex  over 8 years ago

Commit id: 4711bd2d7941082de1664542ea48b6d1bbfbc56e

deletions | additions      

       

\section{Implementation of Code}  \label{Code}  To implement the two-dimensional Ising model, we create a class that stores an \textit{m} x \textit{m} array with a total number of N spins where N = \textit{m} ^{2} \textit{m}^{2}  The initial parameters consist of a range of temperatures at which to analyze, the increment at which we analyze, the size of M, and the number of sweeps be conducted. We find a critical temperature of about 2.39 and thus choose a range of temperatures from 1.5 to 2.7 and increment by 0.01. All temperatures below 1.5 quickly reach an equilibrium of 1.0 or very close to it. All temperatures above 3.5 quickly reach an equilibrium of 0.0 or very close to it. We choose M to be 128 due to limited computational time. We choose 1000 sweeps because all equilibria occur before 1000 sweeps. For each temperature, we call the function "sweep" which initiates an array of spins with each spin set to +1. At each temperature we find the average energy and average magnetization in equilibrium by "sweeping" though the array until the array reached equilibrium.