Soap Bubble Physics (3D)

An iridescent bubble above a wand: colours drift as the film drains, then it pops.

Presets

Playback

Solution

Bubble and environment

Time and swirl

Camera

Layers

Quality

Model check

The science

The bubble studio

The bubble above the wand is a Three.js sphere whose physical material has iridescence switched on: the film-thickness map is regenerated from the same drainage model as the 2D page and mapped onto the sphere, so the colours you see are the thin-film interference of a film that is thick at the bottom and thin at the top. The window, jar, dish, wand and plant are Blender models; the window light is what the bubble reflects. Bubble size is scaled to the radius slider.

Why a bubble is round, and why it has extra pressure inside

A soap film has two surfaces, each pulling with surface tension gamma. The total surface energy of a sphere is E = 2 gamma 4 pi R^2. Letting the bubble grow by dV costs dE, and the pressure that pays for it is dP = dE/dV, which gives the Laplace law for a bubble dP = 4 gamma / R (a plain droplet with one surface has 2 gamma / R). A 3 cm bubble has only about 3 Pa of excess pressure, but a small bubble has more: the pressure doubles when the radius halves.

Why a bubble shows colours: thin-film interference

Light reflects from the front surface (with a phase flip) and from the back surface of the film. The two reflections interfere. With Fresnel amplitude r = (n - 1)/(n + 1) (n = 1.33 for water) the Airy reflectance is R = 2 r^2 (1 - cos d) / (1 + r^4 - 2 r^2 cos d) where the phase is d = 4 pi n h cos(theta_t) / lambda. The reflectance is largest when 2 n h = (k + 1/2) lambda and zero for a vanishingly thin film, which is why the thinnest part of a bubble looks black just before it pops. The simulator integrates the reflectance over 21 wavelengths with the CIE colour-matching functions to get the colour of every point, and the colour sequence (gold, magenta, blue, green, pastel bands) is the Newton colour series.

Drainage, evaporation and bursting

Gravity pulls liquid down the film, so the top thins while the bottom thickens: the model takes a thickness profile h(phi) ~ exp(b (1 - cos phi)/2) that steepens with time, with the total liquid volume decaying by viscous drainage V = V0 / sqrt(1 + t/tau) (tau grows with viscosity and as gravity falls) and by evaporation at a rate proportional to the film area. A thinner film at the same radius means less liquid, since h R^2 is constant when the bubble is inflated. When the top reaches about 8 nm the film ruptures. Glycerin raises viscosity and so lengthens the life; pure water has such a high surface tension and so little surfactant that real films rupture almost at once, which the preset exaggerates.

What is simplified

The thickness profile is a one-parameter family, not a solution of the lubrication equations; marginal regeneration and surfactant (Marangoni) flow appear only as a decorative swirl; evaporation is a constant rate; reflectance uses normal-incidence Fresnel amplitudes and the refraction angle only through the path length; the bubble does not move through the air; and bursting at 8 nm is a threshold, not a stochastic nucleation process. Educational model.

What to try

  • Run the everyday bubble: the colours slide upward as the top thins, then turn silver and black before it pops.
  • Set gravity near zero (the ISS preset): the film stays almost uniform and lasts much longer.
  • Compare dry air with the humid greenhouse preset, or add glycerin.
  • Watch the Laplace graph: a tiny bubble is held at ten times the pressure of a large one.
Loading model...
Loading Blender model...
Film thickness vs age
Reflectance spectrum
Thickness vs polar angle
Laplace pressure vs radius
Made with 🟠 Blender · Three.js