### Java Simulations for Statistical and Thermal Physics

These programs were written for the Statistical and Thermal Physics curriculum development project and are part of the Open Source Physics project. The programs are released under the GNU General Public License. The source code is available at <stp.clarku.edu>, where you can run these programs as applets in a browser.

To see the introduction and problems for a topic click on a topic to the left. To run the simulation double click on the topic.

The goal of the simulations and calculations is to illustrate some of the fundamental concepts in statistical mechanics. They can be used as standalone programs, or in conjunction with a text such as Daniel Schroeder, An Introduction to Thermal Physics, Addison-Wesley (2000), or in conjunction with the online notes by Harvey Gould and Jan Tobochnik.

The programs were developed by Kipton Barros, Joshua Gould, Harvey Gould, Natali Gulbahce, Peter Sibley, Jan Tobochnik, and most recently by Hui Wang and Ranjit Chacko.

1. Approach to Equilibrium. Explore some of the qualitative properties of macroscopic systems.
2. An ideal thermometer. Why is an extra degree of freedom called the demon an ideal thermometer?
3. Random walks. What happens to a drunken sailor?
4. Sensitivity to initial conditions. A molecular dynamics simulation of a Lennard-Jones system in a specially prepared state.
5. Number of states of a particle in a box. A comparison of the actual number of states to the asymptotic expression.
6. Multiple coin toss. Monte Carlo simulation of the statistical properties of the outcome of the tosses of many coins.
7. Binomial distribution. The plots illustrate how the width and relative width depend on N, the number of steps.
8. Central limit theorem. A demonstration of the probability distribution of a random additive process.
9. Monte Carlo estimation. Estimation of the area under a curve using the "hit or miss" method.
10. A simple multiplicative random process. The simulation illustrates the importance of rare events.
11. Boltzmann probability. A Monte Carlo simulation of an ideal classical gas in one dimension in equilibrium with a heat bath.
12. Simple thermal interaction. Calculation of the number of states of two harmonic solids that can exchange energy.
13. Einstein solid at temperature T. Simulation of Einstein (harmonic) solid in equilibrium with a heat bath at temperature T using the Metropolis algorithm.
14. Entropy and temperature. Calculation of the entropy of two harmonic solids that can exchange energy.
15. Thermal equilibrium. A molecular dynamics simulation of two solids in thermal contact. What quantity becomes the same in thermal equilibrium?
16. Lennard-Jones fluid. A molecular dynamics simulation of a liquid in two dimensions. Output includes the mean pressure, temperature, and heat capacity.
17. Hard disks. A molecular dynamics simulation of hard disks. Output includes the mean pressure, the mean free path, and the mean collision time.
18. The Ising model.
    - 1D Ising model. A Monte Carlo simulation of the one-dimensional Ising model. Output includes mean energy and heat capacity.
    - 2D Ising model. A Monte Carlo simulation of the two-dimensional Ising model. Output includes the mean energy, heat capacity, and the susceptibility.
    - Simulation of the Ising antiferromagnet on a square lattice.
    - Simulation of the Ising antiferromagnet on a triangular lattice.
    - Mean-field solution. Plot of the numerical solutions to the usual self-consistent equation and the corresponding free energy.
    - Density of states of the 2D Ising model. A Monte Carlo estimation of the density of states using the Wang-Landau algorithm.
    - Partition function of the 2D Ising model. A Monte Carlo estimate of the partition function using a novel algorithm.
19. Ideal gas integrals
    - Ideal Bose gas. Calculation of the chemical potential as a function of temperature for fixed density for an ideal Bose gas.
    - Ideal Fermi gas. Calculation of the chemical potential as a function of temperature for fixed density. The calculated chemical potential is used to determine the mean energy.
20. XY or planar model. A simulation of the two-dimensional XY model. See the development of vortices below the Kosterlitz-Thouless transition.
21. Generalized demon algorithm. A generalization of the demon algorithm that yields the chemical potential as well as the temperature.
22. Ising lattice gas. A simulation of a lattice gas with different chemical potentials.
23. Chemical potential. An estimation of the chemical potential of a Lennard-Jones fluid using the Widom insertion method
24. Fermi-Pasta-Ulam problem. Simulation of a chain of oscillators coupled by anharmonic springs.
25. Percolation. The nature of the geometrical phase transition for site percolation on a square lattice is illustrated.
26. Quantum Monte Carlo. A Monte Carlo simulation of an ideal quantum gas in one, two, or three dimensions.
27. Diffusion in a solid. A simple Monte Carlo simulation of particles on a lattice with a maximum of one particle per site.

The Open Source Physics Java code library is described in Wolfgang Christian, Open Source Physics: A User's Guide with Examples, © Addison-Wesley, 2007.

Updated 5 March 2008.