\documentstyle[a4wide,12pt]{article}

\begin{document}
\section*{Introduction to numerical projects}

Here follows a brief recipe and recommendation on how to write a report for each
project.
\begin{itemize}
\item Give a short description of the nature of the problem and the eventual 
numerical methods you have used.
\item Describe the algorithm you have used and/or developed. Here you may find it convenient
to use pseudocoding. In many cases you can describe the algorithm
in the program itself.

\item Include the source code of your program. Comment your program properly.
\item If possible, try to find analytic solutions, or known limits
in order to test your program when developing the code.
\item Include your results either in figure form or in a table. Remember to
       label your results. All tables and figures should have relevant captions
       and labels on the axes.
\item Try to evaluate the reliabilty and numerical stability/precision
of your results. If possible, include a qualitative and/or quantitative
discussion of the numerical stability, eventual loss of precision etc. 

\item Try to give an interpretation of you results in your answers to 
the problems.
\item Critique: if possible include your comments and reflections about the 
exercise, whether you felt you learnt something, ideas for improvements and 
other thoughts you've made when solving the exercise.
We wish to keep this course at the interactive level and your comments can help
us improve it.
\item Try to establish a practice where you log your work at the 
computerlab. You may find such a logbook very handy at later stages
in your work, especially when you don't properly remember 
what a previous test version 
of your program did. Here you could also record 
the time spent on solving the exercise, various algorithms you may have tested
or other topics which you feel worthy of mentioning.
\end{itemize}



\section*{Format for electronic delivery of report and programs}
%
The preferred format for the report is a PDF file. You can also
use DOC or postscript formats. 
As programming language we prefer that you choose between C/C++ and Fortran90/95.
You could also use Java or Python as programming languages. 
Matlab/Maple/Mathematica/IDL are not allowed as programming
languages for the handins, but you can use them to check your results where possible.
The following prescription should be followed when preparing the report:
\begin{itemize}
\item Use Classfronter to hand in your projects, log in  at 
blyant.uio.no and choose 'fellesrom fys3150 og fys4150'.
Thereafter you will see an icon to the left with 'hand in' or 'innlevering'.
Click on that icon and go to the given project. 
There you can load up the files within the deadline.
\item Upload {\bf only} the report file and the source code file(s) you have developed.
The report file should include all of your discussions and a list of the codes you have developed. 
Do not include library files which are available at the course homepage, unless you have
made specific changes to them.
\item Comments  from us on your projects, approval or not, corrections to be made 
etc can be found under
your Classfronter domain and are only visible to you and the teachers of the course.

\end{itemize}
Finally, 
we do prefer that you work two and two together. Optimal working groups consist of 
2-3 students. You can then hand in a common report. 

\section*{Project 4, Potts model in two dimensions, deadline  31 october  12pm (midnight)}
For this project you can build upon program programs/chapter10/ising\_2dim.cpp (or the f90 version).

The Potts model has been, in addition to the Ising model, widely used in studies
of phase transitions in statistical physics. The so-called two-dimensional 
$q$-state Potts
model has an energy given by
\[
  E=-J\sum_{<kl>}^{N}\delta_{s_l,s_k},
\]
where the spin $s_k$ at lattice position $k$ can take the values
$1,2,\dots,q$. The Kroneckr delta function $\delta_{s_l,s_k}$ equals 
unity if the spins are equal and is zero otherwise.
$N$ is the total number of spins.
For $q=2$ the Potts model corresponds to the Ising model. To see that 
we can rewrite the last equation as
\[
  E=-\frac{J}{2}\sum_{<kl>}^{N}2(\delta_{s_l,s_k}-\frac{1}{2})-\sum_{<kl>}^{N}\frac{J}{2}.
\]
Now, $2(\delta_{s_l,s_k}-\frac{1}{2})$ is +1 when $s_l=s_k$ and $-1$ 
when they are different. This model is thus equivalent to the Ising model  
except a trivial difference in the energy minimum given by a an additional
constant and a factor $J\rightarrow J/2$.
One of the many applications of the Potts model is to helium absorbed on 
the surface of graphite.

The Potts model exhibits a second order phase transition for low values
of $q$ and a first order transition for larger values of $q$.
Using Eherenfest's definition of a phase transition, 
a second order phase transition has second derivatives
of the free energy that diverge (the heat capacity and susceptibility
in our case) while a first order transition has first derivatives
like the mean energy that diverge.
Since the calculations are done with a finite lattice it is always
difficult to find the order of the phase transitions. 
In this project we will limit ourselves to find the temperature region
where a phase transition occurs and see if the numerics allow
us to extract enough information about the order of the transition.

\begin{enumerate}
\item[a)] Write a program which simulates the $q=2$ Potts model 
for two-dimensional lattices with $10\times 10$, $40\times 40$
and $80\times 80$ spins and compute the average energy and specific
heat. Compute also the absolute value of the mean magnetization
and the susceptibility.
Establish an appropriate temperature range for where you see a sudden change
in the heat capacity and susceptibility. 
To get appropriate statistics you should
allow for at least $10^5$ Monte Carlo cycles. 
In setting up this code you need to find an effecient way to simulate the
energy differences between different microstates.  
\item [b)]
Compare these results with those obtained with the two-dimensional Ising model.
The exact critical temperature for the Ising model is $T_C=2.269$.
Here you can eventually use the abovementioned program from the lectures
or write your own code for the Ising model.
\item[c)] Extend the calculations to the Potts model with 
$q=3, 6$ and $q=10$. 
Make a table of the possible values of $\Delta E$ for each 
value of $q$.
Establish first the location of the peak in the 
specific heat and study the behavior of the mean energy and magnetization 
as functions 
of $q$. Do you see a noteworthy change in behavior from the $q=2$ case?
For larger $q$ values you may need lattices of at least $50 \times 50$
in size.
\end{enumerate}


\end{document}



