Field evaluation, flux integration, induction, load response, and electromechanical quantities in a deterministic simulation chain
Spinning Magnets Lab predicts generator behaviour by evaluating the magnetic field generated by
rotating permanent magnets, integrating that field across finite coil apertures, deriving flux linkage,
and propagating the result into induced voltage, load current, electrical power, and torque-related quantities.
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, time variation of flux linkage produces induced voltage,
and electrical state equations determine how a load responds.
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 → induced voltage → load response → electrical power → reaction torque and mechanics → 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.
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 aperture is defined by the surface integral
$$ \Phi = \iint_A \mathbf{B} \cdot \mathbf{n}\, dA $$
where
\mathbf{B} is the magnetic flux density vector,\mathbf{n} is the unit normal vector of the coil surface,A is the active coil aperture area.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.
\mathbf{B} \cdot \mathbf{n} substantially, even when the same magnet geometry is used.
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.
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 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.
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.
Coil flux is obtained from weighted spatial field samples across the finite aperture, not from a single-point approximation.
Multi-turn coil behavior is represented through \lambda = N\Phi, which then feeds the induction runtime.
Voltage follows the time derivative of linkage and therefore scales with both geometry and rotor speed.
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.
Open-circuit voltage alone is not enough for generator analysis. Once induced voltage is known, the simulator can propagate it into a load model that determines current response. The simplest case is resistive loading, where current follows Ohm’s law:
$$ I = \frac{V}{R} $$
for a purely resistive effective load resistance R.
This produces instantaneous current, from which electrical power can be derived.
For dynamic RL-style behaviour, the simulator uses the standard first-order differential equation
$$ L\frac{dI}{dt} + RI = V $$
or equivalently
$$ \frac{dI}{dt} = \frac{V - RI}{L} $$
where L represents effective inductance and R represents effective resistance of the coil-plus-load path.
This allows current to lag behind voltage and gives the machine a more realistic dynamic response.
A practical runtime simulator must step the current forward over small time intervals. A simple explicit update can be written as
$$ I_{k+1} = I_k + \Delta t \,\frac{V_k - R I_k}{L} $$
where I_k is the current at the present step and \Delta t is the simulation time increment.
Equivalent filtered first-order forms can also be used when expressed in terms of the RL time constant
$$ \tau = \frac{L}{R} $$
which helps explain how rapidly the current can respond to the changing induced voltage waveform.
Instantaneous electrical power is computed in the standard way:
$$ P_{\mathrm{elec}} = VI $$
For purely resistive cases this is identical to
$$ P_{\mathrm{elec}} = I^2R = \frac{V^2}{R} $$
when interpreted instantaneously under the same model assumptions. Average power is then obtained by averaging over time or over one mechanical revolution.
Mechanical input power at the shaft is described by the classical torque-speed relation
$$ P_{\mathrm{mech}} = \tau \omega $$
where \tau is shaft torque and \omega is angular velocity.
This is one of the key bridges between electromagnetic prediction and generator-style machine analysis.
Once electrical loading exists, the simulator can associate that loading with an opposing electromechanical effect. At the most general level, this appears as a reaction torque term that resists the applied shaft motion. The exact model may be simplified, but the governing interpretation is the same: electrical energy extracted from the machine must be reflected in the mechanical balance.
A useful comparison is therefore
$$ \eta_{\mathrm{apparent}} = \frac{P_{\mathrm{elec}}}{P_{\mathrm{mech}}} $$
used as an instrument-style comparison metric between electrical output and mechanical input. This does not replace a full multiphysics efficiency model, but it is highly useful for deterministic machine comparison.
Rotor sweep evaluates the machine over a complete mechanical revolution rather than at one display angle only.
Formally, the simulator samples quantities such as
\lambda(\theta), V(\theta), I(\theta), P(\theta),
and torque-related quantities at a deterministic set of rotor angles.
This produces angle-resolved signatures from which one can compute:
Because the sweep samples a full cycle, it is especially useful for comparing machine presets and identifying asymmetric effects.
Besides instantaneous voltage and current, the simulator also derives practical instrument-style metrics such as peak voltage, RMS voltage, peak current, and related summary values. RMS is interpreted in the usual energy-equivalent sense:
$$ V_{\mathrm{RMS}} = \sqrt{\frac{1}{T}\int_0^T v^2(t)\,dt} $$
and similarly for current:
$$ I_{\mathrm{RMS}} = \sqrt{\frac{1}{T}\int_0^T i^2(t)\,dt} $$
In the runtime implementation, these are approximated over a rolling time window so that the display behaves like a measurement instrument rather than a one-shot analytical report.
The simulator uses SI units internally. This is a foundational assumption of the project and keeps the equations dimensionally consistent. Representative internal units include:
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, perhaps the load resistance 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.