loading...
Density versus height: oil curve (blue) and wax blobs (orange); a blob left of the curve is buoyant
running...
The science
What you are building. A lava lamp is a small heat engine. The bulb heats the floor, the floor heats a pool of wax, and when the pool becomes lighter than the oil above it, a blob lifts off, cools on the way up, becomes heavier and sinks back. Here you choose the bulb, the oil thickness, the wax recipe and the blob size, and the design goal scores the result.
Bulb to floor (energy balance). The base is one lumped thermal mass heated by the bulb and cooled to the room:
C dTfloor/dt = P − h A (Tfloor − Troom) ⇒ Tfloor(∞) = Troom + P / (h A), time constant C / (h A) = 150 s
with h A = 0.46 W/K and C = 69 J/K chosen so that a 25 W bulb gives a floor near 76°C. These two numbers are a plausible lumped fit, not measurements of a specific lamp.
Densities and blob motion.
ρoil(T) = ρ0 [1 − βf (T − 20°C)], ρwax(T) = ρ0 (1 + δ) [1 − βw (T − 20°C)], ρ0 = 950 kg/m³(ρwax + ½ ρoil) V dv/dt = (ρoil − ρwax) V g − 6π μ r (1 + 0.15 Re0.687) (v − uoil), Re = ρ |v − u| 2r / μ
Stokes limit: vt = 2 g (ρoil − ρwax) r² / (9 μ)
Heat exchange of a blob.
m c dT/dt = h A (Toil − T), h = Nu k / 2r, Nu = 2 + 0.6 Re1/2 Pr1/3 ⇒ τ = ρ c r² / (3 k) at rest
Release of a blob. A lighter layer under a heavier fluid is Rayleigh-Taylor unstable, but interfacial tension σ holds the pool surface flat until the Bond number Bo = Δρ g r² / σ exceeds 1; then a bulge grows and pinches off a blob of the chosen radius. The oil carries a large-scale roll with speed U = 0.3 (α/H) Ra1/2, Ra = g βf ΔT H³ / (ν α).
Design goal. At least three releases, a mean interval between 45 s and 200 s of lamp time, and a floor below 95°C (a safety margin for the oil). It is a teaching target, not a product specification. Try the Weak 12 W preset to see a lamp that never starts and Hot 40 W for one that works but runs too hot.
Honest limits. Blobs stay spheres (never stretched), the oil is not solved (prescribed temperature field, fixed convection roll), material properties are constants of order of paraffin wax and mineral oil, and the blob-pool pinch-off time is a fitted constant. No wax melting front or latent heat, no viscosity change with temperature. Tapping the glass adds small random velocity kicks to the blobs; in a real lamp, shaking or knocking it can emulsify the wax and cloud the oil permanently, so do not do that to a real one.
Numerical checks (run in this page). (1) Steady floor temperature at 25 W vs Troom + P/(h A); (2) time to 63.2 % of the rise vs C/(h A); (3) energy balance: heat in − heat lost vs stored CΔT; plus the shared checks: Stokes terminal speed, thermal e-folding time, wax volume conservation, merge radius and momentum, Rayleigh number and the projected silhouette area of one blob in this renderer.
The backdrop, base, heater disc and cap are rendered from the same Blender scene as the 3D page (orthographic side view, Cycles on the GPU, exported as small WebP sprites); the wax is drawn live in Canvas from the blob positions. The physics runs on the spheres, not on the drawn picture.
The 2D view. This page runs exactly the same lamp model as the 3D page (same lamp.js, same controls, readouts, graphs and checks); only the drawing is flat. The wax is drawn as the iso-line of the same Wyvill-kernel field the 3D mesher uses (same iso level 0.4), projected along the viewing axis, so blobs that sit behind one another overlap and a blob that is merging in depth can look merged here before it is. The backdrop, base, heater disc and cap are Cycles renders of the Blender scene used by the 3D page. Light and shading on the wax are a simple 2D normal from the field gradient, not a ray-traced image.