I've been playing around with a few simulations of a coil and switch, with and without a capacitor. I've left off the secondary coil at this stage, once the spark gap breaks down the circuit ceases to be linear. The first circuit is with just a coil and a MOSFET used as a switch. The opamp is in circuit because the freebie simulator I'm using will not do a transient analysis unless there is an IC in the circuit. The MOSFET is driven from a 1kHz square wave. The voltage at VF1 is thus:
The waveform looks remarkably like that in the link referred to by Martin. I agree that this spike is caused by the voltage rising in an attempt to keep the current in the inductor flowing. The magnitude of the spike depends on the factors mentioned by Martin. For simple solenoid type coils the multi-layer Wheeler formula can be used to calculate a value of inductance from the mechanical parameters of the coil and the number of turns.
Now if we add a capacitor across the switch we get a different result:
We still have a fairly high voltage, but the overall waveform is clearly a damped sinusoid. I'd argue that the voltage is now due to the resonance of the series LC circuit, not to the rapid current change in the inductor caused by turning off the switch. As Martin correctly says the impedance of a series resonant circuit, at resonance, is small, and real, being essentially the resistance of the inductor. However, we are not driving the circuit at resonance, we're driving it from a DC source, so with the switch open the impedance seen by the supply is large. While the overall impedance at resonance might be low it tells us nothing about what is happening on internal nodes. There's nothing to say that the internal voltages cannot exceed the nominal supply.
As an aside I learnt this the hard way, as I received a hefty shock picking up a coil that was part of a series resonant circuit. The circuit was being driven at the resonant frequency (30Hz) by an amplifier fed from a 12V power rail, but the voltage on the internal node was nearly 150V.
The diode in the circuit is a fudge. The MOSFET contains a body diode between drain and source, and if the point VF1 goes negative this diode conducts, thus distorting the waveform. So the diode is added to prevent this.
Now for a caveat. Personally I remain highly dubious of simulation results; there's nowt like actually building the circuit and measuring things to be sure. So to this end I have a relay and a selection of high voltage capacitors on order from Farnell, so that I can experiment using the coil that I wound for use in my afermentioned experiments.
Regards,
Andrew