milliseconds

Radial Distribution Function

The radial distribution function describes on the average, the particles in a system and how they are packed around each other. In our system, hard sphere gas, the arrangement is random. To construct the radial distribution function choose a particle and draw concentric spheres around it (at fixed distances apart, delr in the program) and count the particles in each shell. This is almost like a histogram except that you divide by the volume of each shell and the average density of the particles in the system. One particle at a time is moved randomly within a box of side delta centered on the chosen one,and all the others held fixed for each counting of the numbers in each shell; then another particle is randomly selected and so on. There are NM particles in a three dimensional cube of side XL. The particles can not come closer to each other than a diameter; if they do then the previous configuration is restored and another random particle makes another random move. Acceptance or rejection is based on value of q=exp((-V(r')-V(r))/kT). For the hard sphere V(r)=infinite for r < diameter and V(r)=0 for r > diameter. This gives only two values for q: 1 (acceptance) and 0 (rejection). Periodic boundary conditions are used; when a particle moves past the box on one side, it appears at the same position less the width of the box on the other side.

The radial distribution function is zero at short separations, less than a diameter. The first peak occurs when particles pack as tight as possible around the chosen one. Then there is a broad peak reflecting motion of the other particles. At very long range the radial distribution function tends to 1. The radial distribution function can be thought of as the ratio of local density to global density. Other thermodynamic quantities that can be calculated are the structure function(the Fourier transform of g(r)), the internal energy, specific heat, pressure, and free energy for this type of constant N,V,T ensemble.


%RDFnew.m
% evr at u.washington.edu
%radial distribution function via monte carlo method
%


THIS CODE IS DOWN FOR REJUVENATION


%
  toc