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

Commit id: a588bf66ac978192527d0213f1162e40baa69256

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} . 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 initiate an array of spins with each spin initiated 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.