Presets
Playback
Rain
Glass and water
Camera
Layers
Quality
Model check
The science
Why drops stick to a window until they are big enough. A drop on glass is held by the contact line: on the advancing (lower) side the contact angle can rise to theta_a and on the receding (upper) side it can fall to theta_r before the line moves. That difference, the contact-angle hysteresis, gives a pinning force; gravity along the pane wins only when the drop is heavy enough. Rain adds drops, drops merge, and the merged drop suddenly exceeds the threshold and runs down, sweeping up and shedding smaller drops as it goes.
Equations used by the page
- Spherical cap with contact angle
theta:V = (pi/3) R^3 (2 + cos theta)(1 - cos theta)^2, footprint radiusa = R sin theta, heighth = R (1 - cos theta). - Pinning (Furmidge, Dussan-Chow):
F_pin = (48/pi^3) gamma (2a) (cos theta_r - cos theta_a). A drop slides whenrho g V sin(alpha) > F_pin, i.e. above the critical radiusR_c^2 = 6 k gamma sin theta Delta / (pi rho g sin(alpha) (2 + cos theta)(1 - cos theta)^2)withk = 48/pi^3. For clean glass in the page defaults this is a few millimetres; on a skylight it is much larger. - Motion:
m dv/dt = rho g V sin(alpha) - F_pin - c a vwith the wedge-flow (Cox-Voinov type) viscous coefficientc = 2 pi (3 mu ln(a/l_s) / theta), slip lengthl_s = 1 nm. The page integrates the exact exponential solutionv = v_t + (v_0 - v_t) exp(-t/tau),v_t = (rho g V sin(alpha) - F_pin)/(c a),tau = m/(c a). - Water properties from temperature:
mu(T) = 2.414e-5 * 10^(247.8/(T - 140)) Pa s(T in K), surface tension from the IAPWS correlation, capillary lengthl_c = sqrt(gamma/(rho g)) = 2.7 mm. Bond numberBo = rho g R^2 / gamma. - Coalescence conserves volume and momentum:
V = V1 + V2,v = (V1 v1 + V2 v2)/V, new centre volume-weighted. Trail drops: every 5 footprint radii a sliding drop leaves a fraction of its volume behind (empirical shedding fraction, set by the slider).
Honest simplifications
The contact angle is one constant for every drop and each drop gets a random +-15% pinning factor to mimic dirt and defects; a real drop is not a spherical cap once it runs (it grows a tail and corner), and the viscous coefficient is a scaling law, not a fit. Trail shedding is a model parameter, not derived. Impacts are placed uniformly with a log-normal volume distribution; splashing, wind and evaporation are ignored. The magnified, inverted city seen in each drop is drawn from the same rendered plate as the backdrop (a drop is a strong lens); it is a picture of the effect, not a ray trace.
Checks run in the page
(1) Sliding onset of a growing drop run through the actual integrator for five tilt/hysteresis/contact-angle combinations against the closed-form critical volume. (2) Volume bookkeeping over 40 simulated seconds of rain with coalescence, shedding and drainage. (3) The exponential speed update against an RK4 integration, and the capillary length against the textbook 2.70 mm.