Several Monte Carlo algorithms and applications that are useful for understanding the concepts of temperature and chemical potential are discussed. We then introduce a generalization of the demon algorithm that measures the chemical potential and is suitable for simulating systems with variable particle number.

1.
Ralph
Baierlein
, “
The elusive chemical potential
,”
Am. J. Phys.
69
,
423
434
(
2001
).
See also Ralph Baierlein, Thermal Physics (Cambridge University Press, Cambridge, UK, 1999).
2.
Michael
Creutz
, “
Microcanonical Monte Carlo simulation
,”
Phys. Rev. Lett.
50
,
1411
1414
(
1983
).
3.
Harvey Gould and Jan Tobochnik, An Introduction to Computer Simulation Methods, 2nd ed. (Addison-Wesley, Reading, MA, 1996). This text discusses various Monte Carlo algorithms including the demon and Metropolis algorithms.
4.
The Monte Carlo Method in the Physical Sciences: Celebrating the 50th Anniversary of the Metropolis Algorithm, edited by James E. Gubernatis (AIP Conference Proceedings, Melville, NY, 2003), Vol. 690.
5.
If the demon energy is not continuous, then the initial demon energy should be consistent with the possible energies of the demon.
6.
The mean demon energy is given by 〈Ed〉=∫0Ed e−βEd/∫0e−βEd=kT if the possible demon energies are continuous. The upper bound can be taken to be infinite even though the total energy in our simulations is finite because the high energy states contribute a negligible amount to the integral.
7.
In this case the possible demon energies are not continuous and 〈Ed〉≠kT except in the limit of high temperature.
8.
See, for example, Daan Frenkel and Berend Smit, Understanding Molecular Simulation (Academic, San Diego, 1996).
The original paper is
B.
Widom
, “
Some topics in the theory of fluids
,”
J. Chem. Phys.
39
,
2802
2812
(
1963
).
9.
For a simulation of the Widom insertion method for hard disks, see 〈http://www.cheme.buffalo.edu/kofke/applets/Widom.html〉. The applet demonstrates the Widom insertion method for the estimation of the excess chemical potential, μe. For this model, the fraction of the attempts that find no overlap when another disk is added to the system gives exp(−μe/kT).
10.
See, for example, David L. Goodstein, States of Matter (Dover, Mineola, NY, 1985), p. 18.
11.
See, for example, Dan Schroeder, An Introduction to Thermal Physics (Addison-Wesley, Reading, MA, 2000).
This content is only available via PDF.
AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.