Hydrostatic Pressure API
Fluid-statics maths as an API, computed locally and deterministically. The pressure endpoint computes the pressure at a depth in a fluid — the gauge pressure ρ·g·h and the absolute pressure (gauge plus atmospheric) — in pascals, kilopascals, bar, psi and atmospheres, for water, seawater, oil, mercury and more, or a custom density; depths accept metres, feet or centimetres, which makes it handy for diving (about 10 m of seawater adds one atmosphere). The force endpoint computes the resultant hydrostatic force on a submerged vertical rectangular surface — an aquarium wall, a tank side, a dam face or a flood gate — as F = ρ·g·h_c·A from its width and the top and bottom depths, and gives the depth of the centre of pressure, which sits below the centroid. The buoyancy endpoint applies Archimedes' principle, F_b = ρ_fluid·g·V, to give the buoyant force and the displaced mass, and — if you supply the object's density or mass — tells you whether it floats or sinks and what fraction sits below the waterline. Everything is computed locally and deterministically, so it is instant and private. Ideal for civil and marine engineering tools, diving and aquarium apps, tank and dam design, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is fluid statics; for pump power and head use a pump API and for pipe flow rate use a pipe-flow API.
api.oanor.com/hydrostatic-api