## Simulation of a Lorentz (Thompson) Coilgun

Here are partial results of a simulation of a Lorentz coilgun, using FEMM
for the magnetics and Matlab for the time simulations.

### Simulation algorithm

- Force on armature is determined with test currents at varying distances
- Flux coupled through armature from driver coil is determined at varying distances
- Inductance of driver coil is determined from integral(A.J) with test current
- Inductance of armature (Cu ring) is determined, varying with position
- Resistance of armature is determined
- All of the above data is loaded into Matlab
- Supply C and series R is chosen for approximately critically damped discharge of driver coil
- Iterating over time:

- Coil current is simulated as a lumped LRC system; L varies (a little) with armature position
- Flux through the armature is calculated, change in flux gives armature EMF
- Armature current is simulated as a lumped LR system with a voltage source and L varying with position
- Force is determined from the two simulated currents and the current armature position
- Acceleration, velocity and position are found from force

The complete source (geometry, lua scripts, matlab source, simulation data) is
here. It is released under
GPL2.

### Bad Assumptions

Steady-state magnetic simulation with no eddy currents. Test currents in magnetic sims were not very high,
so iron may not have been as saturated (3T peak) as it will be in real life; these sims will be rerun.
### Test Geometries

The simulations have been run with air core (no iron) and a long steel bar core passing through the driver
coil and armature. Also planning on looking at more complex situations (fully shielded, tapering shields,
ferromagnetic armatures, etc). Pictures when I get around to taking screenshots. In most of the
simulations below, projectile mass is set at 6.1g (the mass of a Cu ring of the same size as in the
FEMM simulations).
### Results: Air Core

Probably I picked bad parameters, but the performance in this sim sucked. With relatively high coil
inductance (27uH), you can see that the coil current pulse is too long (1.5ms) compared to the armature
time constant (~0.3ms) and so the impulse is minimal:

With a
smaller inductance (6.8uH), the coil current correlates better with the armature current, but still not
well. The main problem appears to be insufficient armature inductance; a heavier armature would reduce
its Q and perhaps work a little better.

### Results: Steel Core

With a steel core, flux coupling is much better though probably overestimated in the simulation due to the
relatively small test currents used in FEMM. Very few turns are used and the driver pulses are much
longer (nearly 2ms), but the increased inductance of the armature means that its time constant is much
closer to that of the driver coil:

Better flux coupling gives similar peak armature currents, despite the slower coil current rise. Higher
armature inductance and therefore longer current duration means that the repulsive force lasts much longer
and the net impulse is much greater.

More coil turns, therefore more flux, higher EMF and higher armature Q, resulting in some suckback:

Fewer turns, armature a bit overdamped:

### Observations

Back-EMF in the armature due to velocity has a significant effect on armature current - adjusting the
speed via varying mass has significant effect on the armature current's Q. More mass => lower velocity
=> less back-EMF => lower Q. Lowering mass far enough can cause suckback due to dramatic armature current
overshoot, even to the point where the armature will smack back into the coil at high speed.
### Not Yet On This Webpage

Iterating results over varying armature mass, coil turns and source C. Results for other geometries:
planar coils, more shielding, lower armature mass, increased armature diameter (including discs).