From 7afb51357ea425079e0c179b9106d48a20d21f08 Mon Sep 17 00:00:00 2001 From: Janita Willumsen Date: Wed, 22 Nov 2023 11:46:59 +0100 Subject: [PATCH] Add notes from draft into latex files, needs sorting and rewriting! --- latex/references.bib | 138 ++++++++++++++++++-------------- latex/sections/introduction.tex | 20 ++++- latex/sections/methods.tex | 30 +++++++ latex/sections/results.tex | 22 +++++ 4 files changed, 148 insertions(+), 62 deletions(-) diff --git a/latex/references.bib b/latex/references.bib index 391436b..2c406fb 100644 --- a/latex/references.bib +++ b/latex/references.bib @@ -1,86 +1,102 @@ # Ising model related literature +@misc{britannica:2023:ferromagnetism, + author = {Britannica, The Editors of Encyclopaedia}, + title = {ferromagnetism}, + url = {https://www.britannica.com/science/ferromagnetism}, + urldate = {2023-11-21} +} -# Math related literature +@article{onsager:1944, + author = {Lars Onsager}, + title = {Crystal statistics. I. A two-dimensional model with an order-disorder transition}, + journal = {Physical review}, + year = {1944}, + volume = {65}, + number = {3--4}, + pages = {117--149} +} +@misc{obermeyer:2020:ising, + author = {Johannes Obermeyer}, + title = {The Ising Model in One and Two Dimensions}, + year = {2020}, + url = {https://www.thphys.uni-heidelberg.de/~wolschin/statsem20_3s.pdf}, + urldate = {2023-11-13}, + pages = {16}, + note = {Seminar on Statistical Physics at the University of Heidelberg, summary} +} + +# Math and statistics @inbook{lindstrom:2016:ch3, - author = {Tom Lindstrøm}, - title = {Kalkulus}, - publisher = {Universitetsforlaget}, - year = {2016}, - edition = {4}, - pages = {133--137} + author = {Tom Lindstrøm}, + title = {Kalkulus}, + publisher = {Universitetsforlaget}, + year = {2016}, + edition = {4}, + pages = {133--137} } @inbook{lindstrom:2016:ch10:5, - author = {Tom Lindstrøm}, - title = {Kalkulus}, - publisher = {Universitetsforlaget}, - year = {2016}, - edition = {4}, - pages = {589--606} + author = {Tom Lindstrøm}, + title = {Kalkulus}, + publisher = {Universitetsforlaget}, + year = {2016}, + edition = {4}, + pages = {589--606} } @inbook{gjevik:2014:appendix, - author = {Bjørn Gjevik and Morten Wang Fagerland}, - title = {Feltteori og vektoranalyse}, - publisher = {Farleia Forlag}, - year = {2018}, - pages = {162--163} + author = {Bjørn Gjevik and Morten Wang Fagerland}, + title = {Feltteori og vektoranalyse}, + publisher = {Farleia Forlag}, + year = {2018}, + pages = {162--163} +} + +@book{springer:2012:modernstat, + author = {Jay L. Devore and Kenneth N. Berk}, + title = {Modern Mathematical Statistics with Application}, + publisher = {Cham: Springer International Publishing AG}, + year = {2021}, + edition = {3} } # Python libraries @article{hunter:2007:matplotlib, - author = {Hunter, J. D.}, - title = {Matplotlib: A 2D graphics environment}, - journal = {Computing in Science \& Engineering}, - volume = {9}, - number = {3}, - pages = {90--95}, - abstract = {Matplotlib is a 2D graphics package used for Python for - application development, interactive scripting, and publication-quality - image generation across user interfaces and operating systems.}, + author = {Hunter, J. D.}, + title = {Matplotlib: A 2D graphics environment}, + journal = {Computing in Science \& Engineering}, + volume = {9}, + number = {3}, + pages = {90--95}, + abstract = {Matplotlib is a 2D graphics package used for Python for + application development, interactive scripting, and publication-quality + image generation across user interfaces and operating systems.}, publisher = {IEEE COMPUTER SOC}, - doi = {10.1109/MCSE.2007.55}, - year = 2007 + doi = {10.1109/MCSE.2007.55}, + year = 2007 } @article{waskom:2021:seaborn, - author = {Michael L. Waskom}, - title = {seaborn: statistical data visualization}, - journal = {Journal of Open Source Software}, - volume = {6}, - number = {60}, - publisher = {The Open Journal}, - year = {2021}, - doi = {10.21105/joss.03021}, - url = {https://doi.org/10.21105/joss.03021}, - pages = {3021} + author = {Michael L. Waskom}, + title = {seaborn: statistical data visualization}, + journal = {Journal of Open Source Software}, + volume = {6}, + number = {60}, + publisher = {The Open Journal}, + year = {2021}, + doi = {10.21105/joss.03021}, + url = {https://doi.org/10.21105/joss.03021}, + pages = {3021} } # C++ libraries @misc{openmp:2018, - author = {OpenMP}, - title = {OpenMP Application Programming Interface}, - year = {2018}, - url = {https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf}, - urldate = {2023-10-22} + author = {OpenMP}, + title = {OpenMP Application Programming Interface}, + year = {2018}, + url = {https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf}, + urldate = {2023-10-22} } # Miscellaneous things -@misc{obermeyer:2020:ising, - author = {Johannes Obermeyer}, - title = {The Ising Model in One and Two Dimensions}, - year = {2020}, - url = {https://www.thphys.uni-heidelberg.de/~wolschin/statsem20_3s.pdf}, - urldate = {2023-11-13}, - pages = {16}, - note = {Seminar on Statistical Physics at the University of Heidelberg, summary} -} - -@book{springer:2012:modernstat, - author = {Jay L. Devore and Kenneth N. Berk}, - title = {Modern Mathematical Statistics with Application}, - publisher = {Cham: Springer International Publishing AG}, - year = {2021}, - edition = {3} -} \ No newline at end of file diff --git a/latex/sections/introduction.tex b/latex/sections/introduction.tex index 62d86ae..cea1be1 100644 --- a/latex/sections/introduction.tex +++ b/latex/sections/introduction.tex @@ -2,6 +2,24 @@ \begin{document} \section{Introduction}\label{sec:introduction} -\cite{openmp:2018} +We can study individual atoms +At a microscopic level we can study individual atoms, using microscopic theory. When a system consist of several atoms, we can study the atoms physical properties of matter using statistical physics. To determine quantities such as heat capacity and susceptibility, we have to use ... + +Some uncharged materials have the ability to acquire attractive powers, that is the atomic spins align as well as the magnetic moment. Neighboring spins interact, and the spins magnetic moment can influence each other. This physical phenomenon is called ferromagnetism \cite{britannica:2023:ferromagnetism}. + +The Ising model is a mathematical description of a physical system, of a ferromagnet. At a certain teperature, the critical point, the behavior of the ferromagnet changes. We want to study the phase transition of a ferromagnet, and find the critical temperature. + +However, as the lattice size increase, so does the number of calculations. Since computational resources are finite, we use parallelization to decrease runtime and required resources. In parallelizing our implementation, we can approximate the critical temperature of a material. + +In Section \ref{sec:methods}, we will state the theoretical background for this experiment, as well as the implementation and tools used. Continuing with the results in Section \ref{sec:results}, in addition to a discussion of our results. Lastly, we will conclude our findings in Section \ref{sec:conclusion}. + +\subsection{Draft} +Study physical processes, phase transition and their behavior near critical points. That is, study how a magnetic material changes properties when exposed to thermal energy. The Ising model was originally a mathematical description meant to simulate ferromagnets. Has found many uses like hemoglobin in absorbing oxygen. + +Ferromagnets exhibit long-range ordering phenomenon at atomic level, line up spins with each other by locking the magnetic moments. Thermal agitation randomizes. Critical temperature of iron is 1043 K. Ising model simply describes how a magnetic material responds to thermal energy and an external magnetic field. The direction of the spins influences the total potential energy. + +Def: Ensemble is a collection of microphysics systems from which we derive expectation values and thermodynamic properties related to experiment. + +Statistical physics bridge the gap between microscopic and macroscopic world, using microscopic theory we can derive thermodynamic quantities. \end{document} diff --git a/latex/sections/methods.tex b/latex/sections/methods.tex index a9fc293..9db3ea5 100644 --- a/latex/sections/methods.tex +++ b/latex/sections/methods.tex @@ -137,6 +137,36 @@ The Ising model and MCMC methods are implemented in C++, and parallelized using \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} +Def: Correlation length $\xi$ of phase transition, and is related to the spin-correlation function which defines the magnetic susceptibility. The spin-correlation function is the covariance of the magnetization, expressing the degree of correlation between spins. $\xi$ is normally finite at critical points. Proportional to the lattice size at the critical point, can be used to relate behavior for infinitly large lattice $T_{C}(L) - T_{C}(L = \infty) = \propto \alpha T^{-1}$ + +Implementation: The metropolis algo only consider ratio, not necessary to calculate partition function. + +Metropolis algo: +\begin{algorithm}[H] + \caption{Metropolis algorithm p. 435 in lecture notes} + \label{algo:metropolis_algo} + \begin{algorithmic} + \Procedure{Metropolis algorithm}{$args$} + \State $E_{\text{before}} \leftarrow \text{Set initial random state}$ + \State $ \text{Flip spin}$ + \State $E_{\text{after}} \text{Calculate energy}$ + \State $\Delta E \leftarrow E_{\text{after}} - E_{\text{before}}$ + \If{$\Delta E \leq 0$} Accept new config if + \State $\text{Update expectation values}$ + \ElsIf{$\Delta E > 0$} + \State $\text{Calculate}$ + \EndIf + \EndProcedure + \end{algorithmic} +\end{algorithm} + +Probability: Using the expectation value require a stochastic random variable X (stoch being that it is tied to an event), a function from the "utfallsrommet" to the real numbers. + +Understanding a systems properties close to a critical point. For the 2D ising model, where L is large, we can observe discontinuity in $C_{V}$ and $\chi$. They diverge at the critical point in the thermosynamic limit, meaning the variance in energy and magnetization diverge. For lattice of finite size the variance scale as $1 / \sqrt{M}$ where $M = 2^{N}$ is the number of microstates. +\begin{align*} + e^{-\beta \Delta E} &= \frac{p_{after}}{p_{before}} = \frac{e^{-\beta E_{after}}}{e^{-\beta E_{before}}} +\end{align*} \end{document} diff --git a/latex/sections/results.tex b/latex/sections/results.tex index 26924a0..4d1836a 100644 --- a/latex/sections/results.tex +++ b/latex/sections/results.tex @@ -3,4 +3,26 @@ \begin{document} \section{Results}\label{sec:results} +\subsection{Draft} +Test that the numerical stuff gets close to the analytical +- validate implementation a given number of times, find average number of cycles + +Initial state ordered vs random +- start ordered both at up=1 and random + +burn-in time +- burn-in 5000 vs 10000 mc cycles, only mention how a longer burn-in time can in some cases result in better cv and x + +probability using histogram of samples +- Comparing the histogram of $T_1 = 1.0$ and $T_2 = 2.4$. For $T_1 = 1.0$ we see a lower acceptance of flips, resulting in a low variance. The histogram looks more like an exponential function + +parallelization +- temp mpi +- each mpi process spawn thread that make own ising model +- each ising model goes through burn in time (no benefit) +- sampling done in parallel +- mcmc sampling openmp + +phase transition +critical temperature \end{document}