Monte Carlo technique II
[IMP.: Along with the plots I also want to see the programs you used]
1. For the problem 2 of Assignment 3 (random packing of circles) compute the structure factor and the correlation function for the final state of packing (at which you end the iterations) for a square box with sides of length 100 units. Also give the 2-D real space plot of the final state [i.e., of the circles located in the box].
Now try calculating the radial distribution function using the method suggested in Chaikin and Lubensky, Chap. 1 and compare with the above results.
Hint: to obtain structure factor, do 2-D FT of the configuration of circles (using fft2 function of MATLAB) and then take the square of the absolute value. To obtain correlation function, take FT of the structure factor. In order to get well-behaved FT, represent each circle with a gaussian distribution, having standard deviation = radius of circle and mean = centre of the circle.
2. Consider N=20 particles in a 1-dimensional lattice whose Potential Energy is given by a Lennard Jones function:
Hint: Create an array of length N to hold paticle locations and an array
of length Nbins (=300, say) to hold g. Initially space the particles evenly,
say at a distance of 1 unit from each other. Compute U for each particle:
e.g., for i=1:N, for j=1:i, u=u+F(x(i)-x(j));end;end;
Then at each step randomly displace particles (as long as there are
no more than one particle per site - be also mindful that particles can't
go through each other in a 1-D box).
Let the resultant energy change be dU. If dU < 0 (i.e., the energy
of the final configuration is lower than the initial configuration) accept
the move; otherwise accept the move only with a probability ~ exp (-dU/kBT)
. [Metropolis algorithm]
Iterate for 105 steps and then at every 20th step (say)
compute a new contribution to g
e.g., for i=1:N, for j=1:i, k = (int)(abs(x(i)-x(j))/L*Bins;g(k)=g(k)+1;end;end;
Find the correct normalization of g by checking that for inifinite
extent, g(x) goes to 1 as x goes to infinity (in case of any discrepancy
think about the effect of abs(x(i)-x(j))).
Carry out 105 MC steps for each of the two temperatures
and obtain the final g(x). Plot the figures.
Use the standard random number generator routine of MATLAB to simulate
the thermal motion.