The following programs were written for the Statistical and Thermal
Physics curriculum development project and are part of the Open Source Physics
project. These Java programs were first released under the **GNU
General Public License**. The source code is available for download from GitHub.

This Java code was converted from Java to JavaScript by Wolfgang Christian (Davidson College) and Robert Hanson (St. Olaf College) using the SwingJS system developed at St. Olaf College. Examples of converted STP programs are shown below.

The goal of STP 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 Harvey Gould and Jan
Tobochnik, *Statistical and Thermal Physics: With Computer Applications*, Princeton University Press (2010). This text is also available online as a pdf file.

**Approach to equilibrium**. Explore some of the qualitative properties of macroscopic systems.**Simple Monte Carlo simulation**. A Monte Carlo simulation of noninteracting particles initially confined to one half of the box.**Three partitions**. A molecular dynamics simulation of a Lennard-Jones fluid initially confined in the middle third of the simulation cell.**Two partitions**. A molecular dynamics simulation of a Lennard-Jones fluid initially confined to one half of the simulation cell.

**An ideal thermometer**. Why is an extra degree of freedom called the demon an ideal thermometer?**Ideal gas**. The demon exchanges energy with an ideal gas. Illustrates that the demon can be interpreted as a thermometer.**Einstein solid**. The demon exchanges energy with an Einstein solid. Illustrates a universal property of the demon.**Lennard-Jones fluid**. Simulation shows the relation of the temperature as determined by the demon and the mean kinetic energy per particle.

Additional STP programs are being converted.

STP Java programs were developed by Kipton Barros, Ranjit Chacko, Joshua Gould, Harvey
Gould, Natali Gulbahce, Peter Sibley, Jan Tobochnik, and Hui Wang. The Open Source Physics Java code library used in these programs was developed by Wolfgang Christian
and is described in, *Open Source Physics: A User's Guide with Examples*,
© Addison-Wesley, 2007. A PDF of the User Guide is available in the AAPT-Compadre digital library at https://www.compadre.org/osp/items/detail.cfm?ID=7153

JavaScript simulation update by W. Christian, 20 March 2020.