Inside VoltaLab: Real Numerical SPICE & RK4 Architecture

How VoltaLab solves linear, reactive, and nonlinear semiconductor circuits and classical Lagrangian mechanics in real time inside your browser.

1. Modified Nodal Analysis (MNA) & Trapezoidal Companion Models

Every animation frame runs 16 numerical substeps solving [G]{x} = {z} via partial-pivoting Gaussian elimination. Capacitors and inductors are discretized with 2nd-order A-stable Trapezoidal integration, while wires automatically split at mid-segment T-junctions to measure exact branch currents.

2. Berkeley SPICE3 pnjlim Newton-Raphson Semiconductor Convergence

Nonlinear PN junctions (Silicon diodes, multi-bandgap LEDs, reverse-breakdown Zeners, and 3-terminal Ebers-Moll BJT transistors) iterate to sub-microvolt convergence using logarithmic voltage-step damping so exponential Shockley currents never overflow.

3. 4th-Order Runge-Kutta (RK4) Physics & Ray Optics

Classical mechanics experiments integrate coupled nonlinear differential equations (including the full Euler-Lagrange chaotic double pendulum and quadratic aerodynamic drag) with <0.001% energy drift.