Free (Joule) Expansion of a Gas — 2D
Interactive 2D free-expansion box: an insulated gas confined to one side of a partition rushes into a vacuum when the wall is removed. A live density profile and a time-series graph track occupied length, pressure and entropy while mean molecular speed — proportional to temperature — stays exactly flat, the classic proof that ideal-gas internal energy depends only on temperature.
An insulated box holds an ideal gas confined to one side of a removable partition, with vacuum on the other side. Because the surroundings do no work on the gas and no heat crosses the walls, the first law forces the internal energy — and therefore the temperature of an ideal gas — to stay exactly constant through the whole expansion, even though the process is thoroughly irreversible and generates real entropy. This 2D simulator renders the gas as bouncing molecules confined by a real partition line in a pannable, zoomable box view, alongside a live density-profile histogram and a time-series graph, while readouts track occupied length, relative pressure, mean molecular speed and the entropy generated, converging on the textbook result ΔS = N kB ln(L₂/L₁).
Interactive 2D free-expansion box: an insulated gas confined to one side of a partition rushes into a vacuum when the wall is removed. A live density profile and a time-series graph track occupied length, pressure and entropy while mean molecular speed — proportional to temperature — stays exactly flat, the classic proof that ideal-gas internal energy depends only on temperature.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install