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.
@article{arxiv.physics/0411161,
title = {Understanding the temperature and the chemical potential using computer simulations},
author = {Jan Tobochnik and Harvey Gould and Jonathan Machta},
journal= {arXiv preprint arXiv:physics/0411161},
year = {2009}
}