Transformer Ratio API
Ideal-transformer relations as an API, computed locally and deterministically. The transformer endpoint works from the turns ratio a = Np/Ns = Vp/Vs = Is/Ip: give any ratio-defining pair — the primary and secondary turns, voltages or currents — and it derives the rest, classifies the transformer as step-up, step-down or 1:1 isolation, and reports the primary and secondary apparent power (which are equal for an ideal transformer, so a step-down in voltage is a step-up in current). The power endpoint applies the power balance with an efficiency, Ps = η·Pp, from the primary or secondary power (given directly or as voltage times current) and reports the power loss. The impedance endpoint reflects an impedance across the transformer, Zp/Zs = (Np/Ns)² = a² — the basis of impedance matching, so an 8 Ω speaker on a 10:1 transformer looks like 800 Ω to the source. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical and electronics-engineering tools, power-supply and audio-amplifier design, impedance-matching and EE-education apps. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is ideal-transformer ratios; for Ohm's law, reactance and series/parallel components use an Ohm's-law API.
api.oanor.com/transformer-api