Project-4/latex/sections/methods.tex
2023-11-09 10:28:33 +01:00

81 lines
2.9 KiB
TeX

\documentclass[../ising_model.tex]{subfiles}
\begin{document}
\section{Methods}\label{sec:methods}
\subsection{The Ising model}\label{sec:ising_model}
% Add definitions
We will assume a $2 \times 2$ lattice to study the possible system states, and
to find analytical expressions necessary in the Markov Chain Monte Carlo method.
These results are used to test our code during implementation.
% Problem 1
\begin{equation}\label{eq:partition_function}
Z = 4 \cosh (8 \beta J) + 12,
\end{equation}
%
\begin{equation}\label{eq:energy_spin_first}
\langle \epsilon \rangle = \frac{-2J \sinh(8 \beta J)}{ \cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:energy_spin_second}
\langle \epsilon^{2} \rangle = \frac{4 J^{2} \cosh(8 \beta J)}{\cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:magnetization_spin_first}
\langle |m| \rangle = \frac{e^{8 \beta J} + 1}{2( \cosh(8 \beta J) + 3)}
\end{equation}
%
\begin{equation}\label{eq:magnetization_spin_second}
\langle |m|^{2} \rangle = \frac{e^{8 \beta J} + 1}{2( \cosh(8 \beta J) + 3)}
\end{equation}
%
\begin{equation}\label{eq:energy_total_first}
\langle E \rangle = \frac{-8 J \sinh(8 \beta J)}{\cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:energy_total_first_squared}
\langle E \rangle^{2} = \frac{64 J^{2} \sinh(8 \beta J)}{(\cosh(8 \beta J) + 3)^{2}}
\end{equation}
%
\begin{equation}\label{eq:energy_total_second}
\langle E^{2} \rangle = \frac{64 J^{2} \cosh(8 \beta J)}{\cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:magnetization_total_first}
\langle |M| \rangle = \frac{2 e^{8 \beta J}}{\cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:magnetization_total_first_squared}
\langle |M| \rangle^{2} = \frac{4e^{16 \beta J} + 16e^{8 \beta J} + 16}{(\cosh(8 \beta J) + 3)^{2}}
\end{equation}
%
\begin{equation}\label{eq:magnetization_total_second}
\langle M^{2} \rangle = \frac{8e^{8 \beta J} + 8}{\cosh(8 \beta J) + 3}
\end{equation}
%
\begin{equation}\label{eq:specific_heat_capacity}
C_{V} = \frac{64 J^{2}}{N k_{\text{B}} T^{2}} \Big( \frac{3 \cosh(8 \beta J) + \cosh^{2}(8 \beta J) - \sinh^{2}(8 \beta J)}{(\cosh(8 \beta J) + 3)^{2}} \Big)
\end{equation}
%
\begin{equation}\label{eq:sesceptibility}
\chi = \frac{1}{N k_{\text{B}} T} \Big( \frac{12e^{8 \beta J} + 4 e^{-8 \beta J} + 12}{(\cosh(8 \beta J) + 3)^{2}} \Big)
\end{equation}
The derivation of analytical expressions can be found in appendix \ref{sec:analytical_expressions}.
\subsection{Markov Chain Monte Carlo methods}\label{sec:mcmc_methods}
\subsection{Implementation}\label{sec:implementation}
\subsection{Tools}\label{sec: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.
\end{document}