NewVersion 1.1
Entropy & the Second Law
Count the ways coins can land and molecules can sit, watch a gas spread and never come back, let two solids share energy until their temperatures match, and stretch a rubber band that warms.

About this simulation
Why does a gas spread but never gather itself back into a corner? Students lift a partition in a box of a few to a few hundred molecules, of one gas or two, watch the fraction on the left drift to a half while the entropy of the halves climbs, then reverse every velocity to see whether the gas finds its way back. A guided walkthrough at two levels runs from a film that only runs one way through coins and their microstates, S = k ln Ω, free expansion and two blocks sharing quanta to the second law, ΔS = Q/T and the rubber band; the Advanced track adds Einstein solids, Stirling’s approximation, temperature from counting, mixing and Gibbs’ paradox, the Boltzmann factor and the arrow of time. A Microstate Counter flips up to 1,000 coins against their exact chances, Two Solids lets two Einstein solids trade quanta until the split settles at its peak, and a Rubber Band stretches a chain that warms when stretched fast. A concept challenge and a prediction lab with fresh numbers round it out.
What you'll learn
- Explain that a macrostate, such as the number of heads or of molecules on the left, is made of many microstates, and that the middle macrostate has by far the most, so with many particles it is all you ever see.
- Use S = k_B ln Ω, in which multiplying the number of microstates adds to the entropy, to show that a gas let into twice the volume gains nR ln 2.
- Explain why energy shared between two bodies settles at the split with the most microstates, where their temperatures match, and use ΔS = Q/T for a reservoir to show that the total entropy never falls.
- Explain why gases mix and never unmix, a stretched rubber band warms and a film run backward looks wrong, although the laws of motion run both ways: the start was special.
What you can do
- Guided walkthroughStep-by-step, in Intro and Advanced tracks.
- SandboxEvery control of the model, to explore freely.
- Virtual labA realistic experiment with measurement noise and data analysis.
- Concept checksQuestions about ideas and vocabulary, with no calculating.
- PredictionCommit to a prediction, then see the result.
- Classroom demoProjector mode and recordable clips for slides.
- Works offlineA single downloadable file, verified to run without a network.
Before you start
- Basic probability, counting and factorials
- Heat, temperature in kelvins, and the ideal gas
- For the Advanced track: logarithms and their rules, derivatives, and binomial coefficients
Run or download
Run it in your browser
Nothing to install and no account. Works on laptops, Chromebooks, tablets, and phones.
Launch Entropy & the Second LawDownload for offline use
One HTML file (719 kB) that opens in any modern browser with no network: for rooms with unreliable Wi-Fi, or to keep a copy.
Download the fileFile details and checksum
- File
entropy-second-law-v1.1.html- Version
- 1.1, released November 15, 2026
- Build
827b50a- Size
- 736,123 bytes
- SHA-256
cd5df3e7a77d3dca5abe105d14bd8f021fefb05836c36f63f74a5c3203c4e5b5- Offline
- Checked to run with all network access blocked.
The model and its limits
What the model assumes
- Multiplicities are counted exactly, with ln n! computed exactly below 512 and by Stirling’s series above; an Einstein solid of N oscillators and q quanta has Ω = C(q + N − 1, q).
- The gas is equal-mass hard disks in two dimensions with elastic walls and collisions, so kinetic energy is conserved to rounding; the entropy shown counts only which half each molecule is in.
- Reversing every velocity retraces the path exactly without collisions; with them, rounding errors grow with every collision, so a late reversal returns only part of the way.
- Two Solids is a Monte Carlo in which every microstate is equally likely in the long run, with each block’s temperature found by adding one quantum; the distribution beside the random run is exact.
- The rubber band is a one-dimensional freely jointed chain of 100 links whose tension comes from counting its arrangements; the lattice heat capacity that sets how much it warms is illustrative.
What it leaves out
- The gas is two-dimensional, with no attractions between molecules and no unequal masses.
- No quantum statistics beyond Gibbs’ counting of identical particles, and no zero of entropy (the third law).
- The solids’ oscillators share one frequency and do not interact, unlike the vibrations of a real solid.
- Real rubber’s cross-links, three dimensions, crystallization under strain and bond energy are left out, as are engines, Carnot’s limit and Maxwell’s demon.
Cite this simulation
APA 7
Meier, D. (2026). Entropy & the Second Law (Version 1.1) [Computer simulation]. Glidepath Science. https://glidepathscience.org/simulations/entropy-second-law/
MLA 9
Meier, David. Entropy & the Second Law. Version 1.1, Glidepath Science, 2026, glidepathscience.org/simulations/entropy-second-law/.
AIP
D. Meier, Entropy & the Second Law, version 1.1 (Glidepath Science, 2026), https://glidepathscience.org/simulations/entropy-second-law/.
BibTeX
@misc{meier2026entropythesecondlaw,
author = {Meier, David},
title = {{Entropy & the Second Law}},
year = {2026},
publisher = {Glidepath Science},
version = {1.1},
note = {Interactive simulation, version 1.1},
howpublished = {\url{https://glidepathscience.org/simulations/entropy-second-law/}},
url = {https://glidepathscience.org/simulations/entropy-second-law/}
}Credits and license
Created by Dr. David Meier, Glidepath Science.
Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may share and adapt it for noncommercial purposes, such as teaching, with credit and under the same license. Licensing and reuse
AI tools (Claude, from Anthropic, and ChatGPT, from OpenAI) were used in developing Glidepath Science and its simulations. Dr. David Meier reviewed, edited, and modified every release version.
