The U.S. Navy has brought an old science-fiction concept to life: the rail gun.

A rail gun is actually more like a train: it is made of two long metal rails connected to an electric power supply. The projectile is another piece of conductive material. When the current is switched on, it goes up one rail, across the projectile, and down the other. That generates a magnetic field that pushes the projectile out of the gun.

On Friday it tested a version of a rail gun that fired a projectile using 33 megajoules of energy, or about 9,166 kilowatt hours. That's a bit less electricity than the average American home consumes in a year. 

The 33-megajoule shot means the Navy can fire projectiles at least 110 nautical miles, placing Sailors and Marines at a safe standoff distance and out of harm's way, and the high velocities achievable are tactically relevant for air and missile defense, said Rear Admiral Nevin Carr, chief of naval research, in a statement.

Designs for rail guns date back to the 1920s, and the German military also tried designing one during World War II. But while there have been experimental designs they are difficult to build for practical use.

One problem is the current going through the system. To fire a heavy round (on the order of a few pounds) required prodigious amounts of electricity. Then there is the problem of friction along the rails, and the fact that the current has to be so strong that there are few materials that can stand up to it without melting.

The Navy didn't say exactly how it circumvented these issues, but Roger Ellis, EM Railgun Program Manager at the Office of Naval Research, said using advanced materials and altering the configuratgion of the inside of the gun are two methods being studied.

One reason the Navy has been looking at the technology is that it allows firing rounds without explosives in them, as the energy they hit a target with is so great. The projectile is moving at up to five times the speed of sound, or about 3,840 miles per hour (6,180 kph). That is faster than the fragments from an explosive round, Ellis noted.

The lack of explosives -- or even fuel, as is required by a missile -- eliminates a big safety problem. The rounds in the gun are essentially just lumps of metal.

Rail guns have been proposed for other applications as well besides artillery. NASA looked at them as a way of launching satellites. The big problem has always been building one that would accelerate at a pace that humans could survive; to do that the rails would have to be 30 miles long.

The Navy has been studying rail guns for several years; a test shot was fired in 2008 at 10 megajoules.  This demonstration moves us one day closer to getting this advanced capability to sea, Carr said.