Tesla Coil Pt.2, Simulation
Multi-physics simulation of my Tesla Coil. The inductance and coupling of coils are calculated, and used with a time-domain electronic solver.
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 article, 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 z02 = 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 inductance 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 Ohms
L (analytic) = 28.1104 μH
L (simulation) = 28.4587 μH
=== COIL 2 ===
Length = 376.9913 m
R = 74.0496 Ohms
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 are the parameters of the circuit model below.
Electronic part
A spark-gap Tesla coil is two coupled resonant circuits. A neon-sign transformer (NST) slowly charges a capacitor; when its voltage reaches the breakdown voltage of the spark gap, the gap fires and the capacitor rings through the primary coil. Over a few cycles the energy moves into the secondary and its top-load, where the voltage is stepped up by two orders of magnitude until a streamer (the lightning) breaks out.
Small notes. The model is physically consistent, but it is not fitted to measurements. The secondary losses and the streamer use typical values from the Tesla-coil literature. But it is fine, it is able to reproduce the typical Tesla Coil cycle !
The circuit
| symbol | value | |
|---|---|---|
| NST | peak voltage, , | 10 kV, 50 kΩ, 300 H |
| Primary | , | 28.5 µH, 19.6 nF |
| Secondary | , (AC), | 32.84 mH, 222 Ω, 17 pF |
| Coupling | , | 0.142, 136.9 µH |
| Resonance | 213 kHz | |
| Spark gap | static breakdown | 6.5 kV |
is chosen so that . Kirchhoff's voltage law around the two loops gives the coupled coils, the core of the model:
with , the spark-gap resistance and the current into the streamer. The supply is .
For a tuned ideal circuit, the energy moves from the primary to the secondary in about µs (about 3.5 primary cycles), and energy conservation bounds the secondary voltage:
The spark gap
The gap is the only discrete part of the model. It is modelled as a Cassie arc in series with a Mayr arc, so it conducts for several cycles and then extinguishes by itself instead of by an imposed rule.
- Open: no current, .
- Fires when an ignition state reaches 1. is a 0 → 1 counter that fills while the gap voltage exceeds the breakdown voltage and leaks otherwise, so the gap needs some overvoltage and some time:
- Arc: , a Cassie (constant arc voltage) and a Mayr (constant cooling power) resistance in series. Near a current zero both grow exponentially and the arc dies, so the gap quenches at a notch that the dynamics decides, not a rule.
The streamer
The streamer is a series branch – on the top-load, whose capacitance grows with its length :
with the amplitude of the top-load voltage.
- The streamer grows until the tip voltage falls to the breakout voltage kV ( V/cm of voltage drop along it, growth time µs).
- It loads the secondary more and more, then fades slowly ( µs) because the hot channel cools slowly.
- kΩ and pF/m are typical literature values.
The 14 states variables are normalised and integrated together (Radau while the gap conducts, LSODA while it is open); two mains cycles take about 9 s.
Simulation results
Several mains cycles
With the NST connected, the capacitor charges slowly, the gap fires, and the cycle repeats: 13 discharges in 40 ms, nearly identical because the supply recharges the capacitor to the same voltage each time. Each discharge produces a burst of top-load voltage and a streamer.
Zoom on one discharge
The first discharge, from 40 µs before the gap fires () to 100 µs after.
- The primary rings for 3.7 cycles and the gap quenches at 17.6 µs, close to the 16.6 µs predicted for a tuned pair.
- The spark gap is an open circuit () until it fires, then drops to about and climbs back as the arc dies. The streamer is in series with a capacitance that grows with its length, so its impedance (at 213 kHz) falls from about to as it grows.
- The secondary reaches 161 kV (ideal lossless: 221 kV).
- The streamer grows to 54 cm in about 25 µs and drains the secondary.
- At most 57 % of the energy sits in the secondary (at 12 µs). Final split: 58 % streamer, 35 % spark gap, 7 % winding.
Tuning
The optimal tuning is very close to the analytic value with a maximum efficiency of 57 % for .
// related projects

