|
| 1 | +# VoltOps Core Philosophy |
| 2 | + |
| 3 | +VoltOps delivers **physics-aware computation for everyday electronics and signal-analysis workflows**. Each public API corresponds to a concept that practicing engineers recognize—Ohm's Law, impedance, FFT-based measurement, and so on. Rather than replicating generic math helpers, VoltOps focuses on wiring realistic metadata, guardrails, and educational context into every computation. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Guiding Assumptions |
| 8 | + |
| 9 | +- **Linear, time-invariant, lumped elements** unless explicitly stated. |
| 10 | +- **Steady-state analysis** is the default; transient behavior must be modeled consciously. |
| 11 | +- **Closed-form expressions first**. Numerical solvers and optimizers stay in delegated libraries (e.g., SciPy) until they can be wrapped with clear physics-aware semantics. |
| 12 | +- **Quantities, not scalars**. VoltOps manipulates `Voltage`, `Current`, `Power`, etc., keeping track of waveform kind (DC, AC RMS, AC peak), phase references, and carrier frequency. |
| 13 | + |
| 14 | +## Non‑Goals (for now) |
| 15 | + |
| 16 | +Reinforcing explicit "no" statements builds trust: |
| 17 | + |
| 18 | +- VoltOps is **not** a SPICE replacement or a general-purpose circuit simulator. |
| 19 | +- **No real-time execution guarantees**—runtime safety belongs to your embedded toolchain. |
| 20 | +- **No nonlinear semiconductor device physics**. Analytical helpers for BJTs/FETs may arrive later, but they will remain closed-form. |
| 21 | +- **No blind duplication of SciPy/NumPy** utilities. We wrap them only when physics-aware metadata adds value. |
| 22 | + |
| 23 | +## Design Principles |
| 24 | + |
| 25 | +1. **Quantities over scalars** – Type-safe values that guard against invalid operations and attach waveform metadata everywhere. |
| 26 | +2. **Physical invariants as tests** – Unit tests assert conservation laws, scaling behavior, and dimensional consistency instead of memorizing golden numbers. |
| 27 | +3. **Layered architecture** – Packages are separated into `core/` (metadata + quantities), `formulas/`, `signal_processing/`, and future `circuits/` or `numeric/` layers. Lower layers never depend on higher ones. |
| 28 | +4. **Context-rich results** – APIs return annotated objects. Even FFT helpers yield spectra with sampling metadata rather than naked arrays. |
| 29 | +5. **Delegation with intent** – Expensive numerical kernels continue to live in SciPy/NumPy; VoltOps focuses on keeping the surrounding context faithful to the underlying physics. |
| 30 | + |
| 31 | +## Roadmap Snapshot |
| 32 | + |
| 33 | +| Theme | Why it matters | Current Status | |
| 34 | +| --- | --- | --- | |
| 35 | +| Quantity primitives | Enforce metadata, catch misuse early | (`voltage`, `current`, `resistance`, etc.) | |
| 36 | +| Circuit abstractions | Series/parallel, dividers, equivalents | planned | |
| 37 | +| Measurement helpers | ADC quantization, SNR, aliasing guards | planned | |
| 38 | +| Signal-aware DSP | FFTs that return annotated spectra | foundational transforms | |
| 39 | +| Symbolic hooks | Bridge SymPy for derivations | future exploration | |
| 40 | + |
| 41 | +## How This Shapes Implementation |
| 42 | + |
| 43 | +- **APIs describe intent**: instead of `voltage = i * r`, users call `BasicFormulas.ohms_law(current=i, resistance=r)` and receive a `Voltage` object tied to the originating metadata. |
| 44 | +- **Docs teach, not just list**: each recipe explains the physical context, common pitfalls, and how VoltOps keeps track of assumptions. |
| 45 | +- **Architecture anticipates acceleration**: should we swap in C++ kernels later, the Python-facing API remains unchanged because all metadata plumbing lives in `core/`. |
| 46 | + |
| 47 | +## Delegations |
| 48 | + |
| 49 | +| Capability | Preferred Library | |
| 50 | +| --- | --- | |
| 51 | +| Large-scale linear algebra | NumPy / SciPy | |
| 52 | +| Nonlinear solvers & optimizers | SciPy | |
| 53 | +| Symbolic manipulation | SymPy (optional future layer) | |
| 54 | +| Plotting / visualization | Matplotlib, Plotly, etc. (kept outside VoltOps) | |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +VoltOps succeeds when it saves engineers from re-deriving the same relationships, documents the assumptions behind every helper, and keeps metadata honest from input to output. Depth over breadth, physics over convenience, meaning over speed. |
0 commit comments