Capillary & Surface Tension API
Surface-tension and small-scale fluid-physics maths as an API, computed locally and deterministically. The capillary-rise endpoint applies Jurin's law, h = 2γ·cosθ / (ρ·g·r), to give the height a liquid climbs (or, for a contact angle above 90° like mercury, is depressed) in a narrow tube from its surface tension, the tube radius, the liquid density and the contact angle — and can solve the surface tension back from a measured rise. The laplace-pressure endpoint computes the Young-Laplace excess pressure across a curved interface: a liquid droplet ΔP = 2γ/r, a soap bubble ΔP = 4γ/r (two surfaces) and a cylindrical jet ΔP = γ/r. The poiseuille endpoint applies the Hagen-Poiseuille law, Q = π·r⁴·ΔP / (8·μ·L), for laminar flow in a pipe, returning the volumetric flow rate, the average velocity and the peak centreline velocity (twice the average) from the radius, the pressure drop, the fluid viscosity and the length. Surface tension is in N/m, lengths in m, density in kg/m³, viscosity in Pa·s and pressures in Pa; water is γ ≈ 0.0728 N/m at 20 °C. Everything is computed locally and deterministically, so it is instant and private. Ideal for microfluidics, fluid-engineering, lab-on-a-chip, inkjet and coating app developers, capillary-action and wicking tools, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is surface tension and capillarity; for incompressible Bernoulli flow use a Bernoulli API and for pipe friction a Darcy API.
api.oanor.com/capillary-api