EMDyna Sandbox Scene Details
Overview Manual & Theory Validation Suite Python API Gallery Open Simulator

← Back to Scene Gallery

OfficialBasicArmature sliding on rails (Railgun)

A short conducting bar (the armature) rests on two parallel rails. Both ends of the armature are sliding contacts on the rails, and it can move only in the x direction. When you turn on the switch, current flows rail → armature → rail, and the armature receives a force from the magnetic field produced by the rail currents and accelerates away from the battery (it goes the same way even if you reverse the current). The faster the armature goes, the more the circuit area grows, producing a back EMF that reduces the current. Past the end of the rails the contacts separate and the current stops.

Oct 8, 2026 • 19 views

Launch & Remix in Simulator

Read the explanation, with equations and figures ↓

Modify this scene in the simulator, then open the "Scene" tab and click "Publish Current Scene to Gallery" to share your remix!

·

In short

Two parallel copper rails are connected to a battery, with a light metal bar (the armature) resting across them.

Top view of the railgun circuit
Top view. The current loop (orange) makes a magnetic field between the rails (green, into the page), and that field pushes the armature away from the breech.

What you are looking at

Two parallel copper rails (radius a=2a = 2 mm, centre spacing d=20d = 20 mm, 30 cm long) are connected at one end, the breech, to a 5 V battery through a switch. A short bar, the armature (mass m=2m = 2 g), rests across the rails. Its ends are sliding contacts, and it can move only along the rails. When the switch closes, current flows out along one rail, across the armature and back along the other. The armature is pushed away from the battery and leaves the rails at about 2.5 m/s.

Where the force comes from

Each rail carries the current II, so between the rails the two fields add up and point the same way (into the page in the figure). The armature carries the same current across that field, so it feels the Lorentz force F=I ℓ×B\mathbf{F} = I\,\boldsymbol{\ell}\times\mathbf{B}, directed along the rails and away from the breech.

Integrating B\mathbf{B} over the armature is awkward, because the field of a rail that ends at the armature is not uniform. An energy argument gives the answer more directly. The circuit's inductance grows as the armature moves, L(x)=L0+L′xL(x) = L_0 + L'x, where L′L' is the inductance per unit length of the rail pair. At constant current, the force is

F=12 dLdx I2=12 L′I2.F = \frac{1}{2}\,\frac{dL}{dx}\,I^2 = \frac{1}{2}\,L' I^2 .

Two things follow at once:

  • The force grows with the square of the current, so doubling the voltage gives about four times the force.
  • The force does not depend on the sign of the current. Reverse the battery and both II and B\mathbf{B} change sign, so the armature still flies away from the breech.

How big is the force here?

For two round rails carrying a uniform (DC) current, the inductance per unit length is

L′=μ0π[arcosh⁡d2a+14]=4×10−7 [arcosh⁡5+0.25]≈1.0 μH/m.L' = \frac{\mu_0}{\pi}\left[\operatorname{arcosh}\frac{d}{2a} + \frac{1}{4}\right] = 4\times10^{-7}\,\left[\operatorname{arcosh}5 + 0.25\right] \approx 1.0\ \mu\text{H/m}.

The simulator settles at I≈198I \approx 198 A, set by the 5 V battery and about 25 mΩ25\ \text{m}\Omega of total resistance: the battery's 5 mΩ5\ \text{m}\Omega, the rails, the armature and the sliding contacts. Then

QuantityFormulaSimulator
Force on the armature12L′I2≈20\tfrac12 L' I^2 \approx 20 mNabout 23 mN
AccelerationF/m≈10 m/s2F/m \approx 10\ \text{m/s}^2about 11.5 m/s211.5\ \text{m/s}^2
Speed after 27 cm of rail2axs≈2.3\sqrt{2 a_x s} \approx 2.3 m/s2.46 m/s

The two agree to within about 15 %, which is reasonable for such a simple formula. The formula assumes that the current runs along the rail axes right up to the armature. In the model, the sliding contacts and the thickness of the armature shape the current path where the force actually arises.

The railgun running in the simulator
In the simulator: field lines around the rails, force arrows (yellow) on the armature, and the speed rising in a straight line while the force stays near 24 mN.

Back-EMF, and why this railgun is so inefficient

As the armature moves, the loop grows and the circuit sees a motional EMF:

V=IR+d(LI)dt=IR+LdIdt+L′v I.V = I R + \frac{d(LI)}{dt} = IR + L\frac{dI}{dt} + L' v\,I .

The last term acts like an extra resistance L′vL'v that grows with speed. Of the power L′vI2L'vI^2 it takes from the battery, exactly half becomes mechanical work (Fv=12L′I2vFv = \tfrac12 L' I^2 v). The other half is stored in the growing magnetic field. The fraction of the battery's power that goes into motion is therefore

η=FvVI≈L′v2R=v2v∗,v∗=RL′.\eta = \frac{F v}{V I} \approx \frac{L' v}{2R} = \frac{v}{2 v^*}, \qquad v^* = \frac{R}{L'} .

Here v∗≈0.025 Ω/1.0 μH/m≈25v^* \approx 0.025\ \Omega / 1.0\ \mu\text{H/m} \approx 25 km/s. At 2.5 m/s, the back-EMF L′vIL'vI is well under 1 mV, which is negligible next to the 5 V battery. Almost all of the roughly 200 J that the battery delivers during the 0.22 s shot becomes heat in the resistance, and only about 6 mJ ends up as kinetic energy. The current does fall slightly during the shot (198 A → 193 A), but mostly because the current path along the rails gets longer and so more resistive, not because of back-EMF.

Practical railguns work in the opposite regime. They use very low resistance, currents of mega-amperes, and speeds of kilometres per second, so that L′vL'v becomes comparable to RR.

What the model leaves out

The simulator solves the circuit with the quasi-static PEEC method. It treats the sliding contacts as small resistances between the armature ends and the nearest rail nodes. There is no friction, no arcing at the contacts, no heating of the rails during this short shot, and no recoil force on the rails, which are fixed in place.

Try it

Comments