diff --git a/latex/sections/introduction.tex b/latex/sections/introduction.tex index dfcf5a1..0c65060 100644 --- a/latex/sections/introduction.tex +++ b/latex/sections/introduction.tex @@ -24,6 +24,6 @@ estimate the critical temperature where the system experience phase transition. In Section \ref{sec:methods}, we will present the theoretical background for this experiment, as well as algorithms and tools used in the implementation. -Continuing with Section \ref{sec:results}, where we present our results and +Continuing with Section \ref{sec:results}, we will present our results and discuss our findings. Lastly, we conclude our findings in Section \ref{sec:conclusion}. \end{document} diff --git a/latex/sections/methods.tex b/latex/sections/methods.tex index db5deb3..4de3bc7 100644 --- a/latex/sections/methods.tex +++ b/latex/sections/methods.tex @@ -15,15 +15,15 @@ entire lattice, the system spin configuration is represented as a matrix $L \tim s_{L,1} & s_{L,2} & \dots & s_{L,L} \end{pmatrix} \ . \end{align*} % $\mathbf{s} = [s_{1}, s_{2}, \dots, s_{N}]$. -The total number of possible spin configurations, also called microstates, is $2^{N}$. +The total number of possible spin configurations, also called microstates, is +$|\mathbf{s}| = 2^{N}$. -A given spin $i$ can take one of two possible discrete values $s_{i} \in \{-1, +1\}$, -where $-1$ represent down and $+1$ spin up. The spins interact with its nearest neighbors, -and in a two-dimensional lattice each spin has up to four nearest neighbors. However, -the model is not restricted to this dimentionality \cite[p. 3]{obermeyer:2020:ising}. -In our experiment we will use periodic boundary conditions, meaning all spins -have exactly four nearest neighbors. To find the analytical expressions necessary -for validating our model implementation, we will assume a $2 \times 2$ lattice. +A given spin $i$ can take one of two possible discrete values $s_{i} \in \{-1, +1\}$. +The spins interact with its nearest neighbors, and in a two-dimensional lattice +each spin has up to four nearest neighbors. In our experiments we will use periodic +boundary conditions, resulting in all spins having exactly four nearest neighbors. +To find the analytical expressions necessary for validating our model implementation, +we will assume a $2 \times 2$ lattice. The hamiltonian of the Ising model is given by \begin{equation} @@ -37,8 +37,8 @@ where $B = 0$, and find the total system energy given by E(\mathbf{s}) = -J \sum_{\langle k l \rangle}^{N} s_{k} s_{l} \ . \label{eq:energy_total} \end{equation} -To avoid counting duplicated, we count the neighboring spins using the pattern -visualized in Figure \ref{fig:tikz_boundary}. +We count the neighboring spins using the pattern visualized in Figure \ref{fig:tikz_boundary}, +to avoid counting a given spin pair several times. \begin{figure} \centering \begin{tikzpicture} @@ -196,7 +196,7 @@ Boltzmann constant we derive the remaining units, which can be found in Table $[\chi]$ & $1 / J$ & \\ \hline \end{tabular} - \caption{Values of total energy, total magnetization, and degeneracy for the possible states of a system for a $2 \times 2$ lattice, with periodic boundary conditions.} + \caption{Values of the total energy, total magnetization, and degeneracy for the possible states of a system for a $2 \times 2$ lattice, with periodic boundary conditions.} \label{tab:units} \end{table} @@ -204,7 +204,7 @@ Boltzmann constant we derive the remaining units, which can be found in Table \subsection{Phase transition and critical temperature}\label{subsec:phase_critical} We consider the Ising model in two dimensions, with no external external magnetic field. At temperatures below the critical temperature $T_{c}$, the Ising model will -magnetize spontaneous. When increasing the temperature of the external field, +magnetize spontaneously. When increasing the temperature of the external field, the Ising model transition from an ordered to an unordered phase. The spins become more correlated, and we can measure the discontinous behavior as an increase in correlation length $\xi (T)$ \cite[p. 432]{hj:2015:comp_phys}. At $T_{c}$, the @@ -282,7 +282,7 @@ in an array. \end{algorithm} \end{figure} The Markov process reach an equilibrium after a certain number of Monte Carlo cycles, -where the system state is reflecting the state of a real system. After this burn-in time, +where the system state reflects the state of a real system. After this burn-in time, given by number of Monte Carlo cycles, we can start sampling microstates. The probability distribution of the samples will tend toward the actual probability distribution of the system. @@ -300,14 +300,15 @@ constants, where the first column contain the indices for neighbors to the left and up, and the second column right and down. This method avoids the use of if-tests, and takes advantage of the parallel optimization. -We parallelize our code using both a message passing interface (OpenMPI) and -multi-threading (OpenMP). First, we divide the temperatures into smaller ranges, -and each MPI process receives a set of temperatures. Every MPI process spawn a -set of threads, which initialize an Ising model and performs the Metropolis-Hastings -algorithm. We limit the number of times threads are spawned and joined, by using -single parallel regions, reducing parallel overhead. We used Fox \footnote{Technical -specifications for Fox can be found at \url{https://www.uio.no/english/services/it/research/platforms/edu-research/help/fox/system-overview.md}}, -a high-performance computing cluster, to run our program. +We parallelized our code using both message passing interface (OpenMPI) and +multi-threading (OpenMP). First, we divided the temperatures into smaller sub-ranges, +and each MPI process received a sub-range of temperatures. Every MPI initialize a +parallel region with a set of threads, which then initializes an Ising model and +performs the Metropolis-Hastings algorithm. We limited the number of times threads +are spawned and joined, by using single parallel regions, reducing parallel overhead. +We used Fox \footnote{Technical specifications for Fox can be found at \url{https://www.uio.no/english/services/it/research/platforms/edu-research/help/fox/system-overview.md}}, +a high-performance computing cluster, to run our program for $1$ and $10$ million +Monte Carlo cycles when analyzing phase transitions.