Mathematics

Field evaluation, flux integration, flux linkage, and induced voltage in a deterministic simulation chain

Spinning Magnets Lab predicts electromagnetic induction by evaluating the magnetic field generated by rotating permanent magnets and integrating that field across finite coil apertures. The mathematical structure of the simulator is intentionally explicit: geometry defines where objects exist in space, field models compute B(x,y,z), surface integration produces magnetic flux, and time variation of flux linkage produces induced voltage.

Mathematical intent. The simulator is built so that electrical observables are not guessed from visual overlap or proximity. They arise from the chain field evaluation → surface integration → flux linkage → time derivative.

Computation Pipeline

At the highest level, the simulator follows this physical and numerical sequence:

project state
→ geometry placement
→ magnetic field evaluation
→ coil surface sampling
→ flux integration
→ flux linkage
→ time derivative
→ induced voltage
→ instrument-style outputs

This one-way structure is important because it keeps the model auditable. Each stage has a clear physical meaning and a clear implementation owner.

Magnetic Field

The field solver provides the magnetic flux density vector B(x,y,z) at arbitrary spatial sample points. Depending on the selected solver, the field may come from a dipole approximation, a finite cuboid magnet model, or an analytic prism formulation. The rest of the simulator treats that solver as the authoritative source of magnetic field values.

Conceptually, the field vector is

$$ \mathbf{B}(x,y,z) = \begin{bmatrix} B_x(x,y,z) \\ B_y(x,y,z) \\ B_z(x,y,z) \end{bmatrix} $$

All later stages depend on this vector field, which is why solver quality directly affects predicted coil outputs.

Magnetic Flux Through a Coil

Magnetic flux through a coil aperture is defined by the surface integral

$$ \Phi = \iint_A \mathbf{B} \cdot \mathbf{n}\, dA $$

where

Only the component of the field normal to the coil surface contributes to the flux. If the local field vector is mostly tangent to the coil plane, the resulting flux becomes small even if the field magnitude itself is large.

Interpretation. Flux depends on both field strength and coil orientation. Changing a coil from axial to radial orientation can alter the sign and magnitude of \mathbf{B} \cdot \mathbf{n} substantially, even when the same magnet geometry is used.

Flux Linkage

For a winding with N turns, the simulator uses the standard relation

$$ \lambda = N\Phi $$

where \lambda is the flux linkage in weber-turn. Flux linkage is the more useful electrical state quantity because Faraday’s law is directly written in terms of the time derivative of linkage.

Faraday’s Law and Induced Voltage

The induced voltage of a coil follows Faraday’s law:

$$ V = -\frac{d\lambda}{dt} $$

The negative sign expresses Lenz’s-law polarity convention. Within the simulator, this derivative is evaluated numerically from successive flux-linkage samples taken as the rotor advances in time. This yields the instantaneous voltage prediction used by the coil table and scope-style displays.

Because the simulator operates with a rotating machine, it is often useful to think in terms of rotor angle as well:

$$ \frac{d\lambda}{dt} = \frac{d\lambda}{d\theta}\,\frac{d\theta}{dt} = \omega\,\frac{d\lambda}{d\theta} $$

So the induced voltage can also be understood as

$$ V = -\omega\frac{d\lambda}{d\theta} $$

which explains why rotor speed scales the generated voltage for the same geometric linkage pattern.

Rotor Motion

Rotor angular velocity is derived from rotational speed by

$$ \omega = \frac{2\pi\,\mathrm{RPM}}{60} $$

and the instantaneous rotor angle evolves as

$$ \theta(t) = \theta_0 + \omega t $$

At each simulation step, the rotor angle determines the current magnet positions, which in turn determine the magnetic field sampled by the coil integrator.

Numerical Surface Integration

The simulator does not estimate coil behavior from a single center point. Instead, it samples the field over the finite coil surface using deterministic quadrature rules. Two aperture interpretations are supported:

The mathematical idea is to approximate the surface integral by a weighted sum:

$$ \Phi \approx \sum_i \left( \mathbf{B}_i \cdot \mathbf{n} \right) w_i $$

where each sample point contributes with a deterministic area weight w_i. The simulator uses Gauss–Legendre quadrature rules because they provide high accuracy with comparatively few sample points.

Finite-Difference Voltage Estimation

The runtime induction system estimates voltage from recent linkage history rather than from symbolic differentiation. This is appropriate because the actual field waveform is produced numerically by the solver and the coil integrator. A finite-difference derivative provides a direct and deterministic way to obtain the voltage waveform from that sampled history.

In practical terms, this means voltage quality depends on three things:

Higher fidelity in these stages generally improves waveform smoothness and amplitude stability.

RMS and Peak Metrics

Besides instantaneous voltage, the simulator also derives practical instrument-style metrics such as peak voltage and RMS voltage. RMS is interpreted in the usual energy-equivalent sense:

$$ V_{\mathrm{RMS}} = \sqrt{\frac{1}{T}\int_0^T v^2(t)\,dt} $$

In the runtime implementation, this is approximated over a rolling time window so that the display behaves like a measurement instrument rather than a one-shot analytical report.

Units and Scientific Conventions

The simulator uses SI units internally. This is a foundational assumption of the project and keeps the equations dimensionally consistent. Representative internal units include:

Why This Mathematical Structure Matters

The purpose of the mathematics page is not just to show equations. It is to make clear that the simulator follows a scientifically interpretable chain. When a voltage waveform changes, the reason should be traceable: perhaps the field solver changed, perhaps the coil normal changed, perhaps the rotor speed changed, or perhaps the flux gradient with respect to angle became steeper.

That traceability is what turns a visual simulator into a useful engineering instrument.