loading...
running...
How to use
A round-bottom flask sits on a heating mantle. Dial the temperature, activation energy, enthalpy and catalyst; molecules (red A, blue B, green C) fly in 3D, bounce off the glass and react when an A and a B meet with enough energy along their line of centres. The thermometer and the mantle glow follow the temperature. Presets set up contrasting runs; the graphs show the amounts against the rate-law ODE, the speed distribution against Maxwell's law, and the Arrhenius plot. Drag to orbit, wheel to zoom, Space pauses.
The round-bottom flask (double-walled glass), heating mantle with its coil, clamp stand, thermometer, controller and bench were modelled and baked (PBR textures) in Blender 5.2 as named parts; Three.js r160 draws the molecules as instanced spheres at the positions of the hard-sphere simulation, makes the glass transmissive, flashes each reaction and drives the mantle glow, mercury column and dial from the temperature.
The science
This flask builds a chemical reaction from the ground up with collision theory. The molecules are hard spheres of diameter d and masses mA = mB = 1, mC = 2 (reduced units, kB = 1). They fly freely, collide elastically and, when an A meets a B, the pair can react to a single C if the energy of the collision along the line joining their centres is large enough. This is the textbook line-of-centres model:
En = ½ μ (g · n)2 ≥ Ea, μ = mAmB/(mA + mB), g = vB − vA, n = unit vector between centres
Only the normal component of the relative velocity counts, so a glancing hit of a fast pair does not react. For a gas at temperature T the Maxwell distribution makes the normal collision energy exponentially distributed, which gives the central results (the page checks both numerically):
fraction of A–B collisions that react = e−Ea/kT (Arrhenius factor)
2D: k = d √(2π kT/μ) e−Ea/kT 3D: k = π d2 √(8 kT/πμ) e−Ea/kT
The prefactor is the collision frequency; the exponential is why a small temperature rise can speed a reaction enormously (the "heat it up" preset: the Boltzmann factor at Ea = 3 grows from 0.25 % at kT = 0.5 to 22 % at kT = 2). The reaction rate per area is k nA nB — second order, so squeezing the vessel (smaller area) speeds it up. Because real gases are not infinitely dilute, the contact rate is multiplied by the pair-correlation value at contact g(d) = (1 − φ/2)/(1 − φ)3 (Carnahan–Starling, hard spheres, φ = volume fraction).
Reverse reaction and equilibrium. C dissociates with an Arrhenius rate kr = ν e−Ea,r/kT with Ea,r = Ea − ΔH. The system relaxes to dC/dt = 0, i.e. the mass-action ratio [C]/([A][B]) = kf/kr (detailed balance). The white dashed curves are the rate-law ODE dA/dt = −kf A B/area + kr C integrated alongside the simulation. A catalyst lowers both barriers by the same amount, so both rates grow but K does not change. The thermostat rescales velocities so the temperature stays fixed while heat is released or absorbed.
Numerical checks run in the page (hard-sphere and hard-disk gas in a periodic box, reactions switched to "count only"): (1) the A–B contact frequency against the kinetic-theory value at kT = 1 and (2) at kT = 2; (3) the reactive fraction against exp(−Ea/kT) at both temperatures; (4) conservation of kinetic energy by the collision rule; (5) the 3D contact frequency of hard spheres against π d2√(8kT/πμ) g(d); (6) the reversible reaction against its rate-law ODE; (7) detailed balance kf/kr at the end of that run.
Simplifications. The reacting pair merges into a single particle instantly; no internal degrees of freedom (a real unimolecular step has a more elaborate energy dependence, e.g. RRKM theory); reaction heat goes straight into the thermostat; collisions are resolved in small time steps rather than exactly; the flask is a perfect sphere with elastic walls and the thermometer reads the set temperature of the thermostat, not a heat balance of the mantle. When reaction is fast compared with collisional thermalization the fastest molecules are used up faster than collisions refill them, so the real rate falls below the equilibrium collision-theory value; in the reversible runs here that shows up as a shortfall of roughly 10 to 15 %, which is why the ODE comparisons use a 15 % tolerance. Energies are in units of the thermal scale, not in kJ/mol, and the numbers are illustrations of the mechanism, not measured rate constants for a specific reaction.