#fluid-mechanics
8 APIs with this tag
Viscosity API
Fluid-viscosity physics as an API, computed locally and deterministically. The sutherland endpoint gives the dynamic viscosity of a gas at any temperature from Sutherland’s law, μ(T) = μ_ref·(T/T_ref)^1.5·(T_ref+S)/(T+S), with built-in constants for air, nitrogen, oxygen, carbon dioxide, hydrogen, helium and argon (or your own μ_ref, T_ref and S) — air comes out at about 1.72×10⁻⁵ Pa·s at 0 °C, 1.84×10⁻⁵ at 25 °C and 2.17×10⁻⁵ at 100 °C, returned in Pa·s, micro-Pa·s and centipoise. The kinematic endpoint converts between dynamic viscosity μ and kinematic viscosity ν through the density, ν = μ/ρ and μ = ν·ρ, so water at 1.002 cP and 998 kg/m³ becomes about 1.004 cSt. The convert endpoint handles viscosity units both ways — dynamic between Pa·s, centipoise and poise (1 Pa·s = 1000 cP = 10 P) and kinematic between m²/s, centistokes and stokes (1 m²/s = 10⁶ cSt = 10⁴ St). Temperatures are in °C or kelvin. Everything is computed locally and deterministically, so it is instant and private. Ideal for fluid-mechanics, CFD, process-engineering, lubrication, HVAC and chemical-engineering app developers, viscosity-correlation and unit-conversion tools, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This computes viscosity; for the Reynolds number that uses it use a Reynolds API.
api.oanor.com/viscosity-api
Particle Settling API
Particle settling-velocity maths as an API, computed locally and deterministically. The stokes endpoint computes the terminal settling velocity of a small spherical particle by Stokes' law, vt = (ρp − ρf)·g·d²/(18·μ), from the particle diameter and density, the fluid density and the dynamic viscosity, and checks the particle Reynolds number to tell you whether the creeping-flow assumption (Re < 1) still holds — a negative velocity means a buoyant particle that rises. The terminal endpoint computes the drag-based terminal velocity for larger, faster particles, vt = √(4·g·d·(ρp − ρf)/(3·Cd·ρf)), from a drag coefficient (≈0.44 in the turbulent Newton regime). The time endpoint computes the time for a particle to settle through a given depth, t = height/vt, taking the velocity directly or deriving it from the particle properties via Stokes. Everything is computed locally and deterministically, so it is instant and private. Ideal for water- and wastewater-treatment, mineral-processing and environmental-engineering tools, clarifier and settling-tank design, sediment and aerosol analysis, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is particle sedimentation; for pipe-flow Reynolds/Froude/Mach numbers use a Reynolds API.
api.oanor.com/settling-api
Reynolds Number API
Dimensionless flow-number maths for fluid-mechanics similitude as an API, computed locally and deterministically. The reynolds endpoint computes the Reynolds number, Re = v·L/ν = ρvL/μ — the ratio of inertial to viscous forces — from the velocity, a characteristic length (pipe diameter) and either the kinematic viscosity or the density and dynamic viscosity, and classifies the flow as laminar (< 2300), transitional (2300–4000) or turbulent (> 4000). The froude endpoint computes the Froude number, Fr = v/√(g·L) — the ratio of inertia to gravity used for open-channel and ship flows — together with the critical velocity, and tells you whether the flow is subcritical (tranquil), critical or supercritical (shooting). The mach endpoint computes the Mach number, M = v/c, with the sound speed taken directly or worked out from the air temperature, c = √(γRT), and classifies the speed as subsonic, transonic, supersonic or hypersonic. Everything is computed locally and deterministically, so it is instant and private. Ideal for fluid-mechanics, aerodynamics and hydraulics tools, model-scaling and wind-tunnel similitude, pipe-flow and open-channel analysis, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is dimensionless-number similitude; for pipe friction pressure drop use a Darcy-Weisbach API and for open-channel uniform flow use a Manning API.
api.oanor.com/reynolds-api
Valve Flow Coefficient API
Control-valve flow-coefficient (Cv / Kv) maths as an API, computed locally and deterministically. The liquid endpoint sizes a control valve for liquid service using Q = Kv·√(ΔP/SG): give any two of the flow rate (m³/h), the pressure drop across the valve (bar) and the flow coefficient Kv, and it returns the third — the required Kv to size a valve, the flow a valve passes, or the pressure drop it develops — together with the equivalent Cv. The convert endpoint converts between the three flow coefficients in use around the world: the metric Kv, the US Cv = 1.156·Kv, and the SI Av = 2.4e-5·Cv. The opening endpoint computes how far a valve must open to pass an operating Kv against its rated Kvs, for both a linear trim (opening = Kv/Kvs) and an equal-percentage trim (opening = 1 + ln(Kv/Kvs)/ln(R) for a rangeability R), so you can keep the valve in its controllable 20–80 % travel band. Everything is computed locally and deterministically, so it is instant and private. Ideal for process, instrumentation and HVAC engineering tools, control-valve selection and commissioning, hydronic-balancing and plant-design apps, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is control-valve sizing; for pump power and head use a pump API and for orifice-plate metering use an orifice API.
api.oanor.com/valveflow-api
Weir Flow API
Weir flow maths for open-channel discharge measurement as an API, computed locally and deterministically. The rectangular endpoint computes the flow over a rectangular sharp-crested weir, Q = (2/3)·Cd·b·√(2g)·H^1.5, from the crest width and the head of water above the crest — and solves the head back from a known discharge. The vnotch endpoint computes the flow over a triangular V-notch weir, Q = (8/15)·Cd·√(2g)·tan(θ/2)·H^2.5, from the notch angle and head, the most accurate weir for small flows because the discharge varies with the head to the power 2.5. The broadcrested endpoint computes the flow over a broad-crested weir, Q = Cd·(2/3)^1.5·√g·b·H^1.5 ≈ Cd·1.705·b·H^1.5, the rugged field structure used for river gauging. Each device carries its standard discharge coefficient (rectangular 0.62, V-notch 0.58, broad-crested 0.85) which you can override, and each solves either the discharge from a measured head or the head required for a target discharge. Everything is computed locally and deterministically, so it is instant and private. Ideal for hydrology, irrigation and civil-engineering tools, flow gauging in channels and treatment plants, stormwater and water-resource apps, and fluid-mechanics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is weir overflow discharge; for uniform open-channel flow use a Manning API and for differential-pressure pipe metering use an orifice API.
api.oanor.com/weir-api
Orifice Flow Meter API
Differential-pressure flow-meter maths (ISO 5167) as an API, computed locally and deterministically for orifice plates, venturi tubes and flow nozzles. The flow endpoint computes the mass and volumetric flow rate from the measured pressure drop across the meter, qm = Cd·ε·E·A·√(2·ρ·ΔP), where E = 1/√(1−β⁴) is the velocity-of-approach factor, β = d/D the diameter ratio and A the bore area — and it reports the throat velocity and the permanent (unrecovered) pressure loss. The pressure endpoint works the other way: from a known flow it returns the differential pressure the meter will develop, ΔP = (qm/(Cd·ε·E·A))²/(2ρ), and the permanent loss. The sizing endpoint solves the meter geometry: from a target flow and an allowable pressure drop it iterates the required bore diameter and diameter ratio, and flags whether β falls in the ISO-recommended 0.2–0.75 range. Each device type carries its standard discharge coefficient (orifice 0.61, venturi 0.984, nozzle 0.96) which you can override. Everything is computed locally and deterministically, so it is instant and private. Ideal for process, HVAC and instrumentation engineering tools, flow-meter selection and commissioning, and fluid-mechanics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is differential-pressure flow metering; for pipe continuity (Q=A·v) use a flow-rate API and for friction pressure drop use a Darcy-Weisbach API.
api.oanor.com/orifice-api
Pipe Pressure Drop API
Darcy-Weisbach pipe pressure-drop and head-loss as an API, computed locally and deterministically. The friction endpoint gives the Darcy friction factor: laminar flow uses f = 64/Re, and turbulent flow uses the explicit Swamee-Jain approximation of the Colebrook-White equation, f = 0.25/[log₁₀(ε/3.7D + 5.74/Re⁰·⁹)]², from a Reynolds number (given directly, or computed from velocity, diameter and fluid) and the relative roughness, classifying the flow as laminar, transitional or turbulent. The headloss endpoint computes the major head loss hf = f·(L/D)·v²/(2g) from a friction factor (given or derived) and the pipe length, diameter and velocity, and — given the fluid density — the pressure drop Δp = ρ·g·hf in pascals, kilopascals and bar. The pipe endpoint does the whole calculation end to end: from a flow rate or velocity, the pipe diameter, length, fluid (water, seawater, air, oil and more, or a custom density and viscosity) and roughness material, it returns the velocity, Reynolds number, friction factor, head loss, pressure drop and the pumping power needed to overcome friction. Everything is computed locally and deterministically, so it is instant and private. Ideal for plumbing, HVAC and process-piping tools, hydraulics and pump-sizing apps, irrigation and fire-protection design, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is pipe friction pressure drop; for the continuity relation and Reynolds number use a pipe-flow API and for pump power and head use a pump API.
api.oanor.com/darcy-api
Torricelli Efflux API
Torricelli efflux and orifice-discharge maths as an API, computed locally and deterministically. The velocity endpoint applies Torricelli's law, v = √(2·g·h) — the speed at which fluid jets from an orifice under a head h equals that of a body that has fallen the same height — and returns the ideal and the actual jet velocity (corrected by a coefficient of velocity), and, if you give the orifice diameter or area, the ideal and actual volumetric discharge Q = Cd·A·√(2gh) in litres per second and minute, cubic metres per hour and US gallons per minute. The drain-time endpoint computes how long a vertical cylindrical tank takes to empty through an orifice, t = (2·A_tank)/(Cd·A_orifice·√(2g))·(√h0 − √h1), from the tank and orifice sizes, the starting head and an optional final head, with the initial flow rate. The range endpoint gives the horizontal distance a jet from a side orifice travels before it lands, x = 2·Cv·√(h·y), from the head above the orifice and the orifice's height above the ground, with the jet velocity and time of flight. The discharge and velocity coefficients default to 0.62 and 0.97 and can be overridden, as can gravity. Everything is computed locally and deterministically, so it is instant and private. Ideal for fluid-mechanics and hydraulics tools, tank-drainage, irrigation and process-engineering apps, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is orifice efflux and tank drainage; for pipe continuity Q = A·v use a flow-rate API and for tank volume and fill level use a tank API.
api.oanor.com/torricelli-api