Using a demon to determine the temperature and the chemical potential

Introduction

We have already considered an extra degree of freedom called the demon and found it to be an ideal thermometer. In this applet/application we generalize the demon so that it can give us information about the temperature and the chemical potential.

    We can picture the usual demon as carrying a sack of energy. The demon makes a trial change in the system and computes the resultant change in energy ΔE of the system. If ΔE ≤ 0, the change is accepted and the demon takes the extra energy. If ΔE > 0, the change is accepted if the demon has sufficient energy to give to the system. The only constraint is that the demon cannot go into debt, that is, Ed ≥ 0. The energy of the system plus that of the demon is a constant. The probability P(Ed) of finding the demon with energy Ed is given by

P(Ed) ∝ exp(-βEd),

where β = 1/kT. Hence, the demon measures the temperature T, and because it is only one degree of freedom, it does not significantly disturb the system of interest.

    We now generalize the demon algorithm so that it carries two sacks, one for energy and one for particles. The idea is to use this generalized demon algorithm to determine the chemical potential μ. Consider a demon that exchanges energy and particles with a system of particles. For simplicity, the particles are located on a one-dimensional lattice. We also take the momentum degrees of freedom to be discrete. Thus, the phase space of this system is two-dimensional, with position in one dimension and momentum in the other. The demon exchanges energy and particles with the system as described below. From the probability distribution of the demon energy and particle number, we can extract the temperature and chemical potential, which is given by the Gibbs distribution:

P(Ed, Nd) ∝ exp[-β(Ed - μNd)].

Algorithm

  1. Set up an initial microstate of the system with the desired energy E and number of particles N. The N particles are randomly placed on the phase space lattice with no more than one particle on a lattice site. Initially the demon energy and particle number is set to zero (for convenience).
  2. Choose a random site in the phase space lattice. If there is no particle at that site, take a particle from the demon and add it to the site if the demon has sufficient energy to do so and at least one particle. The energy for adding to a site may include an infinite hard core if two particles are at the same location in position space or a negative unit of energy if there is an occupied nearest neighbor site in position space.


        If there is a particle at the random site, remove the particle and give it to the demon if the system energy is lowered or if the demon has sufficient energy to give to the system. Removing a particle can lower the energy of the system because particles have positive kinetic energy or can raise the energy if there is an attractive interaction with a neighboring particle.
  3. Repeat step 2 many times.
  4. Compute the probability of the demon having energy Ed and particle number Nd once the system and the demon have reached equilibrium.

Note that the total energy of the demon plus the system is fixed, and the total number of particles is fixed. The demon is a facilitator and allows the system's energy and particle number to change by exchanging particles. We could consider a separate Monte Carlo move to move a particle from one phase space lattice site to another, but this move is equivalent to removing and adding a particle in two steps and thus is not necessary.

    We expect the demon to act like a system in equilibrium with a heat bath and a particle reservoir and the demon energy and particle number to be distributed according to the Gibbs distribution.

Problems

  1. Run the simulation with number of particles N = 100, energy E = 200, position space dimension L = 100, and maximum momentum pmax = 10. Begin with no hard core or attractive nearest neighbor potential so that the particles do not interact. We have chosen the mass m of a particle to be m = 1/2 and units such that Boltzmann's constant k = 1, and lattice spacings so that ΔxΔp = 1. In this way momentum and energy are integers. Discuss the phase space plot. Is pmax large enough so that particles do not reach the edge of the lattice? Are there particles that have the same position? Where are most of the particles located? Rerun the simulation for different values of E but the same values for the other parameters. Do the phase space plots show what you expect? Explain.
  2. Explain why the simulation in Problem 1 is identical to a simulation of an ideal gas in the semiclassical limit. Show that the chemical potential is given by

    μ = -T ln[(L/N)(πT)1/2].

    In our units ΔxΔp = 1. Use the default parameters in Problem 1, and run for about 200 Monte Carlo steps per particle (mcs) for equilibration. Then click Zero Averages and average over at least 1000 mcs. (You can speed up the simulation by increasing the steps per display to 10 or 100.) After stopping the simulation press Calculate to compute the demon energy and particle number distributions. The plot of ln P(Ed, Nd = 1) versus Ed should be approximately linear for small Ed. The inverse slope is related to the temperature. The plot of ln P(Ed = 1, Nd) versus Nd should give a slope equal to μ/T. Compare your results with the exact result. Are there any aspects of the simulation that are not assumed in the usual textbook derivations? What does a negative chemical potential mean?
  3. Repeat your simulations in Problem 2 for L = 1000. For this value of L the phase space visualization will be blank because the particle size is too small. Calculate the distributions. Are the results closer to the exact result? The default setting computes the distributions P(Ed,1) and P(1,Nd). Use other values for the energy for P(Ed, Nd) versus Nd and the particle number for P(Ed, Nd) versus Ed. Do you obtain approximately the same values for temperature and chemical potential? Should you? Vary the values of E and compare with exact results for other sets of parameters.
  4. Repeat Problem 1 with an added hard core. Thus, no two particles can be at the same location in position space. How can you tell this condition is satisfied by looking at the phase space plot? Repeat the hard core simulation with the other parameters as given in Problem 2. How does the chemical potential change? Vary the total energy until the temperature is about the same as in Problem 2. Is the chemical potential greater or less than that found for no hard core. Explain your results.
  5. Repeat Problem 4 but with an attractive well in addition to the hard core.
  6. Because no two particles are allowed to be in the same state (at the same time), the particles actually obey Fermi-Dirac statistics. If the system is dense enough, then it should show the properties of a low temperature gas of fermions for which the chemical potential is positive. Choose L = N = 200 and E = 50. Do the simulation and determine the distributions. Are both curves linear? Compute the slope of the linear part of the curve if such a part exists. If the plot is not linear, what shape is it? Why does it have this shape? The value of μ/T could be defined as the slope of the ln P(N) curve in the limit as N vanishes. Is this limiting slope positive or negative?

References

Java Classes Used

Updated 27 February 2007.