Multi-physics simulation of my Tesla Coil. The inductance and coupling of coils ate calculated, and used with a time-domain electronic solver.
Tesla Coil Pt.2, Simulation
Introduction
For my previous Tesla Coil project, I wanted to better understand the physical principles behind the machine, and to experiment with the effect of geometry and component choices on its behaviour.
In this artical, concise and technical, I study the inductive coupling between coil geometries, then use this data to build a real-time electronic simulation of the full Tesla Coil cycle.
The Inductance and Magnetic coupling
Parametrization
A general coil geometry can be described by the following parametrization, where :
This allows for a conical coil (when ) that reduces to a standard cylindrical coil when . The parameter controls the number of turns and the total length of the coil.
In the case of my DIY Tesla Coil, the system is modelled with the following parameters, where coil 1 is the primary and coil 2 is the secondary:
r1 = 0.1 r2 = 0.05
R1 = 0.25 R2 = 0.05
n1 = 9 n2 = 1200
L1 = 0 L2 = 2*w2*n2 = 0.4
w1 = 0.01 w2 = 0.000165
z01 = 0.02 z01 = 0.
It is useful to reparametrize the curve with an arc-length parametrization, one where the "speed" is constant. This ensures that when the curve is discretized numerically, all segments have the same length, which may be important for the accuracy of finite element methods.
The arc length as a function of is:
If we can express , then is arc-length parametrized. While can in principle be computed analytically for our coil, the expression is complicated and cannot be inverted in closed form. We therefore compute the reparametrization numerically:
def equinorm_integral(f):
"""Compute cumulative arc length along a discretized curve f of shape (N, 3)."""
d_dist = np.sqrt(np.diff(f[..., 0])**2 +
np.diff(f[..., 1])**2 +
np.diff(f[..., 2])**2)
return np.concatenate(([0.], np.cumsum(d_dist)))
def equinorm_param(t, f):
"""Return values of t that produce uniformly spaced arc-length samples."""
s_of_t = equinorm_integral(f)
s_of_t /= s_of_t[-1]
t_of_s = interp1d(s_of_t, t, axis=0)
s_uniform = np.linspace(0, 1, len(t))
return t_of_s(s_uniform)Physical model
A coil is electrically described by its self-inductance and its coupling to other coils. This coupling arises from the variation of magnetic fields generated by other coils. Concretely, the voltage across coil is:
where the coupling depends on the mutual inductance through:
The mutual inductance between two coils and can be calculated using the Neumann formula:
The magnetic field generated by a coil is given by the Biot–Savart law:
Magnetic field
We model each coil as a series of straight segments, where each segment is located at , oriented along unit vector , and has length . The exact magnetic field generated by a single such segment is:
The total field of the coil is then obtained by summing the contributions of all segments, this is essentially a finite element approach.
Coupling
Deriving an exact closed-form solution for the mutual inductance integral between two arbitrary coils is generally intractable. We therefore approximate the Neumann double integral as a double sum over segment midpoints , where is the vector representing each segment (encoding both direction and length):
Analytical induction and coupling
For validation, we can also use a theoretical result for the mutual inductance of two coaxial loops of radii , separated by a distance :
where and are the complete elliptic integrals of the first and second kind, respectively.
The self-inductance of a single loop of radius with wire radius is:
From these two results, the total self-inductance of a coil (summing each loop's self-inductance and all mutual interactions between loops) and the total mutual inductance between two coils can be reconstructed by summing the appropriate and terms.
When the winding density is high (many turns per unit length), the coil can be modelled as a continuous cylindrical sheet of conductor. In this limit, the self-inductance becomes:
where is the number of turns, is the coil radius, and is the physical length of the coil. The factor is the Nagaoka correction, which accounts for the finite length of the coil (this is itself an approximation of the exact Nagaoka function).
Results
For the studied coil configuration, we obtain the magnetic field and the self and mutual inductance.



=== COIL 1 ===
Length = 9.8972 m
R = 0.0005 Omhs
L (analytic) = 28.1104 μH
L (simulation) = 28.4587 μH
=== COIL 2 ===
Length = 376.9913 m
R = 74.0496 Omhs
L (analytic) = 31950.6411 μH
L (analytic continuous) = 31937.5963 μH
L (simulation). = 32840.9457 μH
=== COUPLING ===
M (analytic) = 139.8130 μH -> k = 0.1475
M (simulation) = 136.9115 μH -> k = 0.1416These numerical results can be used as parameters in my circuit simulation of my Tesla Coil.