

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(deadline: Monday, May 14)
More about the deadline: the practical Monte Carlo exercise I want you to do in this homework assignment would be of no value if done in rush. Itās not a particularly time-consuming task, but it may be time-consuming for the computer you employ for the job. And ā imagine such a situation: you feed the computer with input data and leave it to do the job overnight. But something goes wrong, say, you have made a small error in the input data file. You get a lot of worthless data. So, you have to figure out what was wrong, re-run the program, and so on. Therefore, it seems reasonable to give you an extra āsafety marginā in this particular assignment, and set a two-week deadline (Monday, May 8) instead of the customary one-week deadline. But please please please!, start working on the simulation problem ASAP! Not on Sunday, May 13!!!
Problem 1 ā 1 pt. Prove that the āMetropolis Algorithm recipeā given at the beginning of Chapter 4 in the book by D. Landau and K. Binder (āBook Fourā in the Webpage material) is consistent with the Detalied Balance Principle.
Problem 2 ā 10 pts. I hope you have already got familiar with the Monte Carlo programs I have prepared for you. Now there is time to do some simple exercises. The 2D Ising magnet is the only known magnetic system that has an exact solution. The critical temperature Tc for such a system can be obtained from the expression:
sinh
kTc
or kTc/J = 2. 269185.... The spontaneous magnetization m (m = M/N , where M is the total magnetization, and N is the number os spins) vs. T is given by:
m(T ) =
[ 1 ā (1ātanh
(^2) K) 4 16 tanh^4 K
] 1 / 8 for T < Tc
= 0 for T > Tc
where K ā” J/kT. I would like you to run the program ising2d.c to check how well the Monte Carlo simulation reproduces the analythical solution. Keep in mind that the temperature the program uses is in units of J/k, so that the (program temperature)ā^1 is the same as K in the Eq. (2). Prepare an input data file. Before you do that, I recommend to spen some time playing with the ising2ds.c program. You will notice that well below Tc the magnetization is āwell behavedā, but it starts strongly fluctuaing when you get close to the transition point. You have to use your own judgement to decide how many cycles are needed at each temperature to obtain a trustworthy average of m. If you think that the data from ising2ds.c are not enough conclusive, you may do someting else: when you run the ising2d.c program, instead of performing a single run for each temperature, make several runs at the same temperature. If the m values produced by each cycle do not differ very much, it means that the cycle is ālong enoughā; but if the values differ considerably, you may want to increase the number of steps. Actually, very close to Tc as many as ā¼ 105 or even more steps may be ālong enoughā; but, of course, I donāt want you to run into such extremes; use your common sense to decide when āenough is enoughā.
Iād like to remind you that you donāt need to sit all the time at the computer. All you need to do is to prepare the input data file, start the program, and then ask the computer to ārun it in the backgroundā. Then you may simply log out; the computer will keep working. When you log in next morning, the output data file will be there waiting for you (if you donāt know how to switch into the ābackground modeā, ask me).
Problem 3 ā 4 pts. The Ising magnet is one important model in the theory of magnetism; another one is the Heisenberg magnet. Ising spins have only two states, āupā and ādownā; in contrast, Hiesenberg spins may assume any orientation in the 4Ļ solid angle. In Monte Carlo simulations of Heisenberg systems we usually approximate the spins by unit classical vectors. One of the steps in the Metropolis algorithm is to generate a ānew random orientationā of the spin we are working on. In the Ising model this is an easy task because there is only one choice ā to flip the spin. But in the case of Heisenberg spins the situation is more complicated. There is an infinite number of possible ānew orientationsā, and one of them has to be selected using a procedure that is completely random. Inexperient Monte Carlo novices often use the following method that seems quite ānaturalā: using a standard generator they create three random numbers from the (0,1) range: rx, ry, and rz ; then, using a simple operation, convert all three of them to random numbers from the (-1,1) range: Rx = 2Ćrx ā1, etc.; and then, normalize them to obtain three coordinates of a unit vector:
xĖ =
Rx ā R^2 x + R^2 y + R^2 z
, etc.
However, it is easy to see that such a procedure is biased. Each triad Rx, Ry, Rz can be thought of as a point inside a cube whose corners are at the (1,1,1), (-1,1,1),... positions. If the random num- ber generator generates truly random numbers, these points should be uniformly distributed inside the cube. So, itās clear that the probability of obtaining a point located on the cubeās main diagonal is
3 times larger than of a point located on the cubeās edge; consequently, (1/
unit vectors will be generated
3 times more often than (1,0,0) vectors. There is probably more than one method of obtaining an āunbiasedā distribution. One idea is to use the angular coordinates. Letās take Ļ = 2Ļ Ćr. But what with Īø? If we take Īø = (2rā1)ĆĻ/2, we again would have a non-uniform distribution, even āmuch more badly biasedā that the previous one! So, what would you propose instead for the other coordinate? (Hint: how about cylindrical coordinates? Why donāt you try?).