Capacitor API
Capacitor maths as an API, computed locally and deterministically. The energy endpoint computes the stored energy and charge of a capacitor from any two of the capacitance, the voltage and the charge — E = ½CV² = ½QV and Q = CV — in joules, millijoules and coulombs. The charging endpoint models the RC charging and discharging transient: the time constant τ = RC, the voltage at a given time, V(t) = Vs(1 − e^(−t/RC)) when charging or V(t) = V₀·e^(−t/RC) when discharging, and the percent charged, or — given a target voltage — the time to reach it; a capacitor reaches about 63 % of the way in one time constant and over 99 % in five. The combination endpoint computes the total capacitance of capacitors in series (1/C = Σ1/Cᵢ) or parallel (C = ΣCᵢ). Capacitance accepts farads or the handy µF/nF/pF units. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, maker, embedded and circuit-design app developers, power-supply and timing tools, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is capacitor maths; for AC reactance and resonance use a resonance API and for LED resistor sizing an LED-resistor API.
api.oanor.com/capacitor-api