The "lines" you see when viewing iron filings around a magnet have more to do with the fact that they are tiny slivers of iron, and less to do with magnetic field lines as one normally talks about them.

Also, over the length scale of one of these slivers, the magnetic field is largely constant, and a ferromagnet (or magnetic dipole) placed in a constant magnetic field will not accelerate (it will, however, align itself with the field). Once two slivers line themselves up head to tail, the field they create around them makes it more favorable for other slivers to join the chain rather than to lie haphazard, because the filings distort the field around them. So it is simply energetically preferred for these slivers to line up head to tail and form longer chains, but if you look closely, the chains break and merge.

Magnetic field lines are just a way of visualizing magnetic fields, in the same way that electric field lines are used to visualize electric fields (lines of force). There are no "gaps" between true magnetic field lines -- they occupy all space. We just draw them that way to convey a sense of their intensity.

I also don't quite agree with the statement that friction prevents them from clustering on the magnet. It's a bit more complicated than that, and, indeed, you can watch the same behaviour in air by suspending a magnet above the filings and allowing them to lift up. Once the filings start attaching themselves to the magnet, a magnetic circuit is created which changes how the field looks.

There are two parts to this question (even when you cut out the bonus bits).

- How much energy is stored in the earth's magnetic field (ramp up the magnet)
- How much power to keep that field going (drive current through big loop)

The former is given by the $\frac12 L I^2$ - so we need to estimate the inductance of the coil needed and its current.

A single loop around the equator would have an inductance approximately

$$L = \mu_0 b \log(\frac{b}{a})$$

where b = radius of coil, and a = radius of wire. For a 1 cm thick wire we get

$$L = 4 \pi \cdot 10^{-7} \cdot 6.3 \cdot 10^6 \log(6.3 \cdot 10^8)\\
\approx 160 H$$

Now for a field of 0.5 Gauss, we would need

$$I = \frac{2\pi r B}{\mu_0} = \frac{4\cdot 10^7\cdot 0.5\cdot 10^{-4}}{4\pi\cdot 10^{-7}}1.6GA$$

Wow - Giga amperes. I may have to rethink that 1 cm copper wire... if it has about 0.2 ohms resistance per km (from resistivity of 17 nOhm meter), resistance of the loop is 4 kOhm. So power to keep the current flowing would be about $I^2 R = 1.5 E 22 W$. That's a bit steep. Let's increase the copper wire by 100,000 (making it a 10 square meter section) and drop that to a more reasonable (?) 1.5 E 17 W. Because that thin wire would need 100x more power per second than is used by the USA in a year... With a tip of the hat to @CuriousOne who noticed I had a few zeros missing.

But that's not yet estimating the power to ramp the magnetic field up... because that's given by $\frac12 L I^2$, so from the above requires an energy of

$$W = 0.5 \cdot 160 \cdot (1.6 \cdot 10^9)^2 = 2 \cdot 10^{20} J$$

Interestingly, according to Wolfram alpha that's almost exactly twice the total energy use of the USA per year. Better turn off that air conditioning unit and start saving for Armageddon.

That's a whole lot of power... somewhat more than David Hammen estimated in the similar question. And David knows a thing or two about these things, so I'm hoping he will find this and fix my mistake. You will need a very thick wire (or more turns) to keep the power dissipation to something that can be handled by, say, boiling the ocean. Actually, using the ocean as your conductor might just work - as long as you can prevent the current from short circuiting. Conductivity of sea water is about 20 million times worse than for copper, but suddenly it's not so hard to have a conductor with a cross section of $10 km^2$

**Superconductors**

The question was asked "how about using superconductors"? Here are a couple of thoughts.

First - superconductors have a critical current density above which they stop working. A typical value is $20 kA/cm^2$. At that value, you need 8 square meters of cross section to carry 1.6 GA (whether you do this as a single turn or multi turn), so the volume of conductor is $4\cdot 10^7 \cdot 8 = 3.2\cdot 10^8 m^3$. And you need to cool that volume of conductor to supercooling temperature (and then keep it there...). Thermodynamics is not your friend, and although heat capacity drops with temperature, the energy needed to get 1 J of heat from 4 K to 300 K is about 100 J (75 for "perfect" heat engine, but who has one of those). So getting that much superconductor might be a problem, and cooling it to liquid helium temperatures would be a big problem too... Oh - and keeping it cool: that would be a problem too.

As for the cost; according to http://large.stanford.edu/courses/2011/ph240/kumar1/docs/62-03.pdf cable carrying 200A costs $20/m. So that's 10 cents per amp-meter. We need 1.6 GA x 40,000 km, which is 6 E 16 amp meter, or a cost of 6 E 15 US dollars. The fact that the US GDP is about 1.6E13 dollars means that this would be 400 years of total economic output - not counting the fact that there is just not that much material available.

I think we need another plan...

**PS** After thinking about this some more, I have come to the conclusion that I should not have ignored the presence of significant amounts of iron in the core of the earth - this changes the magnetic properties, as we no longer have an "air core" magnet. This probably reduces the steady state current requirements significantly but my EM is rusty when it comes to stored energy for that situation.

## Best Answer

This is a more complicated problem than you may realize.

For

electrostaticattraction the statement is nice and neat. You want the gravitational force $$ F_g = G\frac{M_\text{earth}M_\text{moon}}{r^2} $$ to be equal to an electrostatic force $$ F_e = \frac1{4\pi\epsilon_0}\frac{q_\text{earth}q_\text{moon}}{r^2}. $$ If you ask that the charge ratio $q_\text{moon}/q_\text{earth}$ be equal to the mass ratio $M_\text{moon}/M_\text{earth} \approx 1/80$, you find $$ q_\text{earth} = M_\text{earth}\sqrt{4\pi\epsilon_0 G} \approx 5\times10^{13}\,\mathrm C. $$ This is a lot of charge, but it's not alotof charge. It's about $5\times10^8$ moles of fundamental charges, which is only 500 tons of extra protons, or a quarter-ton of extra electrons.If you want to do a

magneticforce, the problem is a lot thornier. The earth's magnetic field would be $$ \vec B = \frac{\mu_0}{4\pi} \frac1{r^3} \left( (\vec m_\text{earth} \cdot \hat r)\hat r - \vec m_\text{earth} \right) $$ where $\vec m_\text{earth}$ is the earth's dipole moment, $r$ is the distance from the dipole center, and $\hat r$ is a unit vector pointing away from the dipole center. In order to have a constant field over the orbit of our magnet-moon, it must orbit around the earth's magnetic equator. The force on the moon is $$ \vec F = \vec \nabla (\vec m_\text{moon}\cdot\vec B) = m_\text{moon} \vec\nabla |B| $$ where can make the second approximation only if we demand that the moon's dipole moment always be parallel to the local magnetic field. Luckily for us this is the way that the moon's dipolewantsto align: two dipoles in the same plane want to orient antiparallel and come close to each other.In this very restricted case, the total force is $$ \vec F = -\hat r\frac{3\mu_0}{4\pi} \frac{m_\text{earth}m_\text{moon}}{r^4}. $$ Setting the two dipole moments $m$ equal to each other and the force equal to the gravitational force, we find $$ m = r\sqrt{G M_\text{earth} M_\text{moon} 4\pi/3\mu_0} = 4\times10^{23}\,\mathrm{A\,m^2} $$ This is a huge dipole moment! Suppose you wanted to make this with an electromagnet that was the same size as the Earth. The cross-section of the Earth at the equator is $\pi R_\text{earth}^2 \approx 10^{14}\,\mathrm m^2$; to make this dipole moment you'd need to wrap a million turns of wire around the equator and run 4000 amps through each turn! Plus you'd need the same magnetic dipole moment at the moon.

I haven't addressed what I consider a detail in your question, that the moon would be an

inducedmagnetic dipole, because ferromagnetism is another layer of messiness. I can tell you with confidence that you wouldn't be able to induce $m_\text{moon} = m_\text{earth}$, so you'd need an even bigger dipole at the earth to make the product $m_\text{moon}m_\text{earth}$ come out right. It might be that the strength of the induced dipole wouldalsodepend on the earth-moon separation, in which case it's quite possible that there would be no stable orbit at all.It's also worth pointing out again that if we relax our assumptions that the lunar dipole is

exactlyantiparallel the the terrestrial dipole, and that the orbit takes placeexactlyin the plane of the equator, we lose the "nice" $1/r^4$ force. I have no idea whether this "nice" orbit is stable either.What's happening here is that the magnetic force is a second-order effect of electromagnetism. It makes a huge difference that the force between two dipoles falls off like $1/r^4$ instead of $1/r^2$.

It occurs to me that it'd make more sense to compare this magnetic dipole to another astrophysical magnetic field, rather than to a laboratory field made of coils and currents. Typically the Earth's natural magnetic field is about 50 μT at the surface (about half a gauss). If the dynamo generating the "earth's" magnetic field were smaller than the radius of the earth, so that we could use the dipole field approximation at the surface, the field I've computed above would have strength $\sim 10^{3}$ T at one $R_\text{earth}$ from the center. This is essentially the same field strength as a magnetar: a magnetar may have a surface field of $10^8$–$10^{11}$ T, but they also typically have radii of $10^{-3}R_\text{earth}$.