diff --git a/latex/draft/draft.tex b/latex/draft/draft.tex index 8236f7d..2ec53bd 100644 --- a/latex/draft/draft.tex +++ b/latex/draft/draft.tex @@ -218,68 +218,68 @@ % \end{equation*} % The derivation of all analytical expressions can be found in Appendix \ref{sec:analytical_expressions}. -For scalability, we want to work with unitless spins. To obtain this, we introduce coupling constant $J$ as the base unit for energy. With the Boltzmann constant we derive the remaining units, which can be found in Table \ref{tab:units}. -\begin{table}[H] - \centering - \begin{tabular}{cccc} % @{\extracolsep{\fill}} - \hline - Value & Unit \\ - \hline - $[E]$ & $J$ \\ - $[T]$ & $J / k_{B}$ \\ - $[C_{V}]$ & $k_{B}$ \\ - $[\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.} - \label{tab:units} -\end{table} +% For scalability, we want to work with unitless spins. To obtain this, we introduce coupling constant $J$ as the base unit for energy. With the Boltzmann constant we derive the remaining units, which can be found in Table \ref{tab:units}. +% \begin{table}[H] +% \centering +% \begin{tabular}{cccc} % @{\extracolsep{\fill}} +% \hline +% Value & Unit \\ +% \hline +% $[E]$ & $J$ \\ +% $[T]$ & $J / k_{B}$ \\ +% $[C_{V}]$ & $k_{B}$ \\ +% $[\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.} +% \label{tab:units} +% \end{table} % \subsection{Phase transition and critical temperature}\label{subsec:phase_temp} -\subsection{The Markov chain Monte Carlo method}\label{subsec:mcmc} -We will generate samples from the Ising model, to approximate the probability distribution of the sample set. We sample using the Markov chain Monte Carlo method. Markov chains consist of a sequence of samples, where the probability of the next sample depend on the probability of the current sample. Whereas the Monte Carlo method, introduces randomness to the sampling to determine statistical quantities \cite{tds:2021:mcmc}. +% \subsection{The Markov chain Monte Carlo method}\label{subsec:mcmc} +% We will generate samples from the Ising model, to approximate the probability distribution of the sample set. We sample using the Markov chain Monte Carlo method. Markov chains consist of a sequence of samples, where the probability of the next sample depend on the probability of the current sample. Whereas the Monte Carlo method, introduces randomness to the sampling to determine statistical quantities \cite{tds:2021:mcmc}. -The Ising model is initialized in a random state, and the chain is evolved until it reaches an equilibrium. At this point we start sampling, as the distribution of the set of samples will tend toward the actual distribution. At each step of flipping a spin, the change in energy will be evaluated as -\begin{align*} - \Delta E &= E_{\text{after}} - E_{\text{before}} \ . -\end{align*} -We have to evaluate +% The Ising model is initialized in a random state, and the chain is evolved until it reaches an equilibrium. At this point we start sampling, as the distribution of the set of samples will tend toward the actual distribution. At each step of flipping a spin, the change in energy will be evaluated as +% \begin{align*} +% \Delta E &= E_{\text{after}} - E_{\text{before}} \ . +% \end{align*} +% We have to evaluate % The samples generated are microstates, each of which occur with some probability. Since the dependency between samples only apply to the neighboring samples, and the Markov chain is ergodic % Since we are generating samples from a stationary probability distribution, with a in % We will use use In addition, we Since t -\begin{figure}[H] - \begin{algorithm}[H] - \caption{Metropolis-Hastings Algorithm} - \label{algo:metropolis} - \begin{algorithmic} - \Procedure{Metropolis}{$lattice, energy, magnetization$} - \For{ Each spin in the lattice } - \State $ri \leftarrow \text{random index of the lattice}$ - \State $rj \leftarrow \text{random index of the lattice}$ - \State $dE \leftarrow 2 \cdot lattice_{ri,rj} \cdot (lattice_{ri,rj-1} + lattice_{ri,rj+1} - + lattice_{ri-1,rj} + lattice_{ri+1,rj} )$ +% \begin{figure}[H] +% \begin{algorithm}[H] +% \caption{Metropolis-Hastings Algorithm} +% \label{algo:metropolis} +% \begin{algorithmic} +% \Procedure{Metropolis}{$lattice, energy, magnetization$} +% \For{ Each spin in the lattice } +% \State $ri \leftarrow \text{random index of the lattice}$ +% \State $rj \leftarrow \text{random index of the lattice}$ +% \State $dE \leftarrow 2 \cdot lattice_{ri,rj} \cdot (lattice_{ri,rj-1} + lattice_{ri,rj+1} +% + lattice_{ri-1,rj} + lattice_{ri+1,rj} )$ - \State $rn \leftarrow \text{random number} \in [0,1)$ - \If{$rn \leq e^{- \frac{dE}{T}}$} - \State $lattice_{ri,rj} = -1 \cdot lattice_{ri,rj}$ - \State $magnetization = magnetization + 2 \cdot lattice_{ri,rj}$ - \State $energy = energy + dE$ - \EndIf - \EndFor - \EndProcedure - \end{algorithmic} - \end{algorithm} -\end{figure} +% \State $rn \leftarrow \text{random number} \in [0,1)$ +% \If{$rn \leq e^{- \frac{dE}{T}}$} +% \State $lattice_{ri,rj} = -1 \cdot lattice_{ri,rj}$ +% \State $magnetization = magnetization + 2 \cdot lattice_{ri,rj}$ +% \State $energy = energy + dE$ +% \EndIf +% \EndFor +% \EndProcedure +% \end{algorithmic} +% \end{algorithm} +% \end{figure} -\subsection{Implementation}\label{subsec:algo_implementation} +% \subsection{Implementation}\label{subsec:algo_implementation} -\subsection{Tools}\label{subsec:tools} -The Ising model and MCMC methods are implemented in C++, and parallelized using \verb|OpenMP| \cite{openmp:2018}. We used the Python library \verb|matplotlib| \cite{hunter:2007:matplotlib} to produce all the plots, and \verb|seaborn| \cite{waskom:2021:seaborn} to set the theme in the figures. +% \subsection{Tools}\label{subsec:tools} +% The Ising model and MCMC methods are implemented in C++, and parallelized using \verb|OpenMP| \cite{openmp:2018}. We used the Python library \verb|matplotlib| \cite{hunter:2007:matplotlib} to produce all the plots, and \verb|seaborn| \cite{waskom:2021:seaborn} to set the theme in the figures. % \subsection{Draft} % The Ising model correspond to a lattice with a number of spin sites, where @@ -441,37 +441,37 @@ The Ising model and MCMC methods are implemented in C++, and parallelized using % \end{align*} \section{Results}\label{sec:results} -We continue with a lattice where $L = 20$, to study the burn-in time, that is the number of Monte Carlo cycles necessary for the system to reach an equilibrium. We consider two different temperatures $T_{1} = 1.0 J/k_{B}$ and $T_{2} = 2.4 J/k_{B}$, where $T_{2}$ is close to the critical temperature. We can use the correlation time $\tau \approx L^{d + z}$ to determine time, where $d$ is the dimensionality of the system and $z = 2.1665 \pm 0.0012$ \footnote{This value was determined by Nightingale and Blöte for the Metropolis algorithm.} -% Need to include a section of Onsager's analytical result. -We show the numerical estimates for temperature $T_{1}$ of $\langle \epsilon \rangle$ in Figure \ref{fig:burn_in_energy_1_0} and $\langle |m| \rangle$ in Figure \ref{fig:burn_in_magnetization_1_0}. For temperature $T_{2}$, the numercal estimate of $\langle \epsilon \rangle$ is shown in Figure \ref{fig:burn_in_energy_2_4} and $\langle |m| \rangle$ in Figure \ref{fig:burn_in_magnetization_2_4}. The lattice is initialized in both an ordered and an unordered state. We observe that for $T_{1}$ there is no change in either expectation value with increasing number of Monte Carlo cycles, when we start with an ordered state. As for the unordered lattice, we observe a change for the first 5000 MC cycles, where it stabilizes. The approximated expected energy is $-2$ and expected magnetization is $1.0$, which is to be expected for temperature 0f $1.0$. T is below the critical and the pdf using $T = 1.0$ result in -\begin{align*} - p(s|T=1.0) &= \frac{1}{e^{-\beta \sum E(s)}} e^{-\beta E(s)} \\ - &= \frac{1}{e^{-(1/k_{B}) \sum E(s)}} e^{-(1/k_{B}) E(s)} -\end{align*} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/burn_in_time_magnetization_1_0.pdf} - \caption{$\langle |m| \rangle$ as a function of time, for $T = 1.0 J / k_{B}$} - \label{fig:burn_in_magnetization_1_0} -\end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/burn_in_time_energy_1_0.pdf} - \caption{$\langle \epsilon \rangle$ as a function of time, for $T = 1.0 J / k_{B}$} - \label{fig:burn_in_energy_1_0} -\end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/burn_in_time_magnetization_2_4.pdf} - \caption{$\langle |m| \rangle$ as a function of time, for $T = 2.4 J / k_{B}$} - \label{fig:burn_in_magnetization_2_4} -\end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/burn_in_time_energy_2_4.pdf} - \caption{$\langle \epsilon \rangle$ as a function of time, for $T = 2.4 J / k_{B}$} - \label{fig:burn_in_energy_2_4} -\end{figure} +% We continue with a lattice where $L = 20$, to study the burn-in time, that is the number of Monte Carlo cycles necessary for the system to reach an equilibrium. We consider two different temperatures $T_{1} = 1.0 J/k_{B}$ and $T_{2} = 2.4 J/k_{B}$, where $T_{2}$ is close to the critical temperature. We can use the correlation time $\tau \approx L^{d + z}$ to determine time, where $d$ is the dimensionality of the system and $z = 2.1665 \pm 0.0012$ \footnote{This value was determined by Nightingale and Blöte for the Metropolis algorithm.} +% % Need to include a section of Onsager's analytical result. +% We show the numerical estimates for temperature $T_{1}$ of $\langle \epsilon \rangle$ in Figure \ref{fig:burn_in_energy_1_0} and $\langle |m| \rangle$ in Figure \ref{fig:burn_in_magnetization_1_0}. For temperature $T_{2}$, the numercal estimate of $\langle \epsilon \rangle$ is shown in Figure \ref{fig:burn_in_energy_2_4} and $\langle |m| \rangle$ in Figure \ref{fig:burn_in_magnetization_2_4}. The lattice is initialized in both an ordered and an unordered state. We observe that for $T_{1}$ there is no change in either expectation value with increasing number of Monte Carlo cycles, when we start with an ordered state. As for the unordered lattice, we observe a change for the first 5000 MC cycles, where it stabilizes. The approximated expected energy is $-2$ and expected magnetization is $1.0$, which is to be expected for temperature 0f $1.0$. T is below the critical and the pdf using $T = 1.0$ result in +% \begin{align*} +% p(s|T=1.0) &= \frac{1}{e^{-\beta \sum E(s)}} e^{-\beta E(s)} \\ +% &= \frac{1}{e^{-(1/k_{B}) \sum E(s)}} e^{-(1/k_{B}) E(s)} +% \end{align*} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/burn_in_time_magnetization_1_0.pdf} +% \caption{$\langle |m| \rangle$ as a function of time, for $T = 1.0 J / k_{B}$} +% \label{fig:burn_in_magnetization_1_0} +% \end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/burn_in_time_energy_1_0.pdf} +% \caption{$\langle \epsilon \rangle$ as a function of time, for $T = 1.0 J / k_{B}$} +% \label{fig:burn_in_energy_1_0} +% \end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/burn_in_time_magnetization_2_4.pdf} +% \caption{$\langle |m| \rangle$ as a function of time, for $T = 2.4 J / k_{B}$} +% \label{fig:burn_in_magnetization_2_4} +% \end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/burn_in_time_energy_2_4.pdf} +% \caption{$\langle \epsilon \rangle$ as a function of time, for $T = 2.4 J / k_{B}$} +% \label{fig:burn_in_energy_2_4} +% \end{figure} However, when the temperature is close to the critical point, we observe an increase in expected energy and a decrease in magnetization. Suggesting a higher energy and a loss of magnetization close to the critical temperature. @@ -487,18 +487,18 @@ Depending on number of samples used in numerical estimates, using the samples ge We use the estimated burn-in time to set starting time for sampling, then generate samples to plot in a histogram for $T_{1}$ in Figure \ref{fig:histogram_1_0} and $T_{2}$ in Figure \ref{fig:histogram_2_4}. For $T_{1}$ we can see that most samples have the expected value $-2$, we have a distribution with low variance. -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/pd_estimate_1_0.pdf} - \caption{Histogram $T = 1.0 J / k_{B}$} - \label{fig:histogram_1_0} -\end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/pd_estimate_2_4.pdf} - \caption{Histogram $T = 2.4 J / k_{B}$} - \label{fig:histogram_2_4} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/pd_estimate_1_0.pdf} +% \caption{Histogram $T = 1.0 J / k_{B}$} +% \label{fig:histogram_1_0} +% \end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/pd_estimate_2_4.pdf} +% \caption{Histogram $T = 2.4 J / k_{B}$} +% \label{fig:histogram_2_4} +% \end{figure} For $T_{2}$ the samples are distributed across a wider range of energy values, the expected value is at approx -1.2, corresponding to what we observed the value at equilibrium in Figure \ref{fig:burn_in_energy_2_4}. In addition, the distribution has a higher variance for temperature close to critical. We also observe that the shape of sample distribution closely resemble the normal distribution. @@ -534,33 +534,33 @@ S_f &= \frac{s + p}{s + p/N} \\ When the speed-up was satisfactory, we investigated the phase transition for lattices of size $L = 20, 40, 60, 80, 100$. The result of $\langle \epsilon \rangle$ can be found in Figure \ref{fig:phase_energy}, $\langle |m| \rangle$ in Figure \ref{fig:phase_magnetization}, $C_{V}$ in Figure \ref{fig:phase_heat}, and $\chi$ in Figure \ref{fig:phase_susceptibility}. % Add observation around critical temp -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/energy.pdf} - \caption{$\langle \epsilon \rangle$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} - \label{fig:phase_energy} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/energy.pdf} +% \caption{$\langle \epsilon \rangle$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} +% \label{fig:phase_energy} +% \end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/magnetization.pdf} - \caption{$\langle |m| \rangle$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} - \label{fig:phase_magnetization} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/magnetization.pdf} +% \caption{$\langle |m| \rangle$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} +% \label{fig:phase_magnetization} +% \end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/heat_capacity.pdf} - \caption{$C_{V}$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} - \label{fig:phase_heat} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/heat_capacity.pdf} +% \caption{$C_{V}$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} +% \label{fig:phase_heat} +% \end{figure} -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/susceptibility.pdf} - \caption{$\chi$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} - \label{fig:phase_susceptibility} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/susceptibility.pdf} +% \caption{$\chi$ for $T \in [2.1, 2.4]$, 1000000 MC cycles.} +% \label{fig:phase_susceptibility} +% \end{figure} We include results using 10 million MC cycles in Appendix \ref{sec:extra} @@ -574,12 +574,12 @@ to estimate the critical temperatur for a lattize of infinte size. We also compa \end{equation} using linear regression. In Figure \ref{fig:linreg} we show the critical temperatures as function of the inverse lattice size. As size goes toward infinity we reach inv L = 0 and find the intercept which is equal to the estimated critical of L=infty. -\begin{figure} - \centering - \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/linreg.pdf} - \caption{Linear regression, where $\beta_{0}$ is the intercept $T_{c}(L = \infty)$ and $\beta_{1}$ is the slope.} - \label{fig:linreg} -\end{figure} +% \begin{figure} +% \centering +% \includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/linreg.pdf} +% \caption{Linear regression, where $\beta_{0}$ is the intercept $T_{c}(L = \infty)$ and $\beta_{1}$ is the slope.} +% \label{fig:linreg} +% \end{figure} \subsection{Draft} @@ -612,51 +612,51 @@ using linear regression. In Figure \ref{fig:linreg} we show the critical tempera \bibliography{ref} \appendix -\section{Ising model system states}\label{sec:system_states} -Units -\begin{table}[H] - \centering - \begin{tabular}[c]{cc} % @{\extracolsep{\fill}} - \hline - Value & Unit \\ - \hline - $[ E ]$ & $J$ \\ - $[ T ]$ & $J / k_{\text{B}}$ \\ - $[ M ]$ & $\dots$ \\ - $[ C_{\text{V}} ]$ & $k_{\text{B}}$ \\ - $[ \chi ]$ & $1 / J$ \\ - \hline - \end{tabular} - \caption{Units, given by the coupling constant $J$ and the Boltzmann constant $k_{\text{B}}$.} - \label{tab:units} -\end{table} +% \section{Ising model system states}\label{sec:system_states} +% Units +% \begin{table}[H] +% \centering +% \begin{tabular}[c]{cc} % @{\extracolsep{\fill}} +% \hline +% Value & Unit \\ +% \hline +% $[ E ]$ & $J$ \\ +% $[ T ]$ & $J / k_{\text{B}}$ \\ +% $[ M ]$ & $\dots$ \\ +% $[ C_{\text{V}} ]$ & $k_{\text{B}}$ \\ +% $[ \chi ]$ & $1 / J$ \\ +% \hline +% \end{tabular} +% \caption{Units, given by the coupling constant $J$ and the Boltzmann constant $k_{\text{B}}$.} +% \label{tab:units} +% \end{table} -To avoid counting duplicates, we used -\begin{figure}\label{fig:tikz_counting} - \centering - \begin{tikzpicture} - \draw (0, 0) grid (2, 2); - % \node[inner] (s1) at (0.5, 0.5) {s}; - \node (s1) at (0.5, 1.5) {$s_1$}; - \node (s2) at (1.5, 1.5) {$s_2$}; - \node (s3) at (0.5, 0.5) {$s_3$}; - \node (s4) at (1.5, 0.5) {$s_4$}; - \node[gray] (s12) at (2.5, 1.5) {$s_1$}; - \node[gray] (s34) at (2.5, 0.5) {$s_3$}; - \node[gray] (s13) at (0.5, -0.5) {$s_1$}; - \node[gray] (s24) at (1.5, -0.5) {$s_2$}; +% To avoid counting duplicates, we used +% \begin{figure}\label{fig:tikz_counting} +% \centering +% \begin{tikzpicture} +% \draw (0, 0) grid (2, 2); +% % \node[inner] (s1) at (0.5, 0.5) {s}; +% \node (s1) at (0.5, 1.5) {$s_1$}; +% \node (s2) at (1.5, 1.5) {$s_2$}; +% \node (s3) at (0.5, 0.5) {$s_3$}; +% \node (s4) at (1.5, 0.5) {$s_4$}; +% \node[gray] (s12) at (2.5, 1.5) {$s_1$}; +% \node[gray] (s34) at (2.5, 0.5) {$s_3$}; +% \node[gray] (s13) at (0.5, -0.5) {$s_1$}; +% \node[gray] (s24) at (1.5, -0.5) {$s_2$}; - \draw[red, ->] (s1.east) -- (s2.west); - \draw[red, ->] (s2.east) -- (s12.west); - \draw[red, ->] (s1.south) -- (s3.north); - \draw[red, ->] (s2.south) -- (s4.north); - \draw[red, ->] (s3.east) -- (s4.west); - \draw[red, ->] (s4.east) -- (s34.west); - \draw[red, ->] (s3.south) -- (s13.north); - \draw[red, ->] (s4.south) -- (s24.north); - \end{tikzpicture} - \caption{Rules for multiplying spin pairs.} -\end{figure} +% \draw[red, ->] (s1.east) -- (s2.west); +% \draw[red, ->] (s2.east) -- (s12.west); +% \draw[red, ->] (s1.south) -- (s3.north); +% \draw[red, ->] (s2.south) -- (s4.north); +% \draw[red, ->] (s3.east) -- (s4.west); +% \draw[red, ->] (s4.east) -- (s34.west); +% \draw[red, ->] (s3.south) -- (s13.north); +% \draw[red, ->] (s4.south) -- (s24.north); +% \end{tikzpicture} +% \caption{Rules for multiplying spin pairs.} +% \end{figure} \begin{figure}\label{fig:tikz_neighbor} \centering @@ -689,11 +689,11 @@ To avoid counting duplicates, we used %---------- % APPENDIX %---------- -\section{Analytical expressions}\label{sec:analytical_expressions} -The Boltzmann distribution is normalized using a partition function $Z$, given by -\begin{equation}\label{eq:partition} - Z = \sum_{\text{all possible } \mathbf{s}}^{N} -\end{equation} +% \section{Analytical expressions}\label{sec:analytical_expressions} +% The Boltzmann distribution is normalized using a partition function $Z$, given by +% \begin{equation}\label{eq:partition} +% Z = \sum_{\text{all possible } \mathbf{s}}^{N} +% \end{equation} % We use the values estimated for the $2 \times 2$ case, found in \ref{tab:lattice_config}, % and find the partition function % \begin{align*} diff --git a/latex/sections/abstract.tex b/latex/sections/abstract.tex index b69617c..b411074 100644 --- a/latex/sections/abstract.tex +++ b/latex/sections/abstract.tex @@ -2,6 +2,18 @@ \begin{document} \begin{abstract} - We did some amazing stuff! + We have used the Ising model to study the behavior in ferromagnets, when undergoing + a phase transition near a critical temperature. We generated samples using the + Markov chain Monte Carlo method, while utilizing methods of parallelization. + Finding the burn-in time to be approx. 3000 Monte Carlo cycles. For temperature + $T = 1.0 J / k_{B}$ we found a propability distrobution with an expected mean + value of $\mu \approx -1.9969$ and variation $\sigma^{2} = 0.0001$. Whereas the + pdf close to the critical temperature is $\mu \approx -1.2370$ and variation + $\sigma^{2} = 0.0203$. We estimated the expected energy and magnetization per spin, + in addition to the heat capacity and susceptibility. Using the values from + finite sized lattices, we approximated the critical temperature of an infinite + sized lattice. Using linear regression, we numerically estimated $T_{c}$ $T_{C}(L = \infty) \approx 2.2695$ + which is close to the analytical solution $T_{C}(L = \infty) \approx 2.269 J/k_{B}$ + found by Lars Onsager. \end{abstract} \end{document} diff --git a/latex/sections/appendices.tex b/latex/sections/appendices.tex index 9dec019..7eed19f 100644 --- a/latex/sections/appendices.tex +++ b/latex/sections/appendices.tex @@ -2,6 +2,39 @@ \begin{document} \appendix +\section{Total energy}\label{sec:energy_special} +When two spins have the orientation up, the total magnetization is zero. However, +the total energy of the system have two possible values, due to the location of +the spin up as visualized in Figure \ref{fig:tikz_neighbor}. +\begin{figure}\label{fig:tikz_neighbor} + \centering + \begin{subfigure}{0.4\linewidth} + \begin{tikzpicture} + \draw (0, 0) grid (2, 2); + \node (s1) at (0.5, 1.5) {$\uparrow$}; + \node (s2) at (1.5, 1.5) {$\uparrow$}; + \node (s3) at (0.5, 0.5) {$\downarrow$}; + \node (s4) at (1.5, 0.5) {$\downarrow$}; + \end{tikzpicture} + \caption{} + \label{fig:sub_tikz_neighbor_a} + \end{subfigure} + \ + \begin{subfigure}{0.4\linewidth} + \begin{tikzpicture} + \draw (0, 0) grid (2, 2); + \node (s1) at (0.5, 1.5) {$\uparrow$}; + \node (s2) at (1.5, 1.5) {$\downarrow$}; + \node (s3) at (0.5, 0.5) {$\downarrow$}; + \node (s4) at (1.5, 0.5) {$\uparrow$}; + \end{tikzpicture} + \caption{} + \label{fig:sub_tikz_neighbor_b} + \end{subfigure} + \caption{Possible spin configurations for two spins up.} + \label{fig:tikz_neighbor} +\end{figure} + \section{Partition function}\label{sec:partition_function} Using the values estimated for the $2 \times 2$ case, found in \ref{tab:lattice_config}, we find the partition function diff --git a/latex/sections/methods.tex b/latex/sections/methods.tex index 390f61b..69ebbc0 100644 --- a/latex/sections/methods.tex +++ b/latex/sections/methods.tex @@ -18,7 +18,7 @@ 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. -We count the neighboring spins as visualized in Fig. \ref{fig:tikz_boundary}, +We count the neighboring spins as visualized in Figure \ref{fig:tikz_boundary}, \begin{figure} \centering \begin{tikzpicture} @@ -58,8 +58,9 @@ We also find the total magnetization of the system, which is given by % Eq. \eqr \label{eq:magnetization_total} \end{equation} In addition, we have to consider the state degeneracy, the number of different -microstates sharing the same value of total magnetization. The derivation of the -analytical values can be found in Appendix % \ref{} +microstates sharing the same value of total magnetization. In the case where we +have two spins oriented up the total energy have two possible values, as shown in \ref{sec:energy_special}. +% The derivation of the analytical values can be found in Appendix \ref{} \begin{table}[H] \centering \begin{tabular}{cccc} % @{\extracolsep{\fill}}