How big/how many permanent magnets would it take to create a good Martian Magnetosphere

I was reading a question regarding building Mars's magnetosphere and one respondent proposed setting up a thousand or so permanent magnets equidistant all over the planet to build the magnetic field.

My question is how big the magnets would need to be to produce the field we would need? I was gonna start with a baseline of iron (magnitite) cylinder shaped magnets 1km in diameter and 3km long. I ran into a wall in that I couldn't figure out how to calculate the field strength.

Also, if anyone knows a more efficient geometry for the magnet shapes or placement, I'm all ears

TLDR

Comparing the magnetic field strength of a permanent magnet with that of a planet is naive. Such a comparison ignores the fact that magnetic fields dissipate with distance much as gravity does. If you compare their magnetic properties independent of distance, their magnetic moment in particular, you'll see that Earth's magnetic moment is 75 trillion times more powerful than industrial grade rare-earth magnets which simply outclasses permanent magnets entirely. Artificially generating a similar field for Mars requires similarly powerful engineering, or equally brilliant idea.

Permanent Magnets

Permanent magnets have a remanence (magnetic strength, $B_r$) of $0.2$ $T$ to $1.4$ $T$ depending on the composition. Ferrite magnets have a $B_r$ of $0.2$ $T$ - $0.4$ $T$ whereas sintered neodymium rare earth magnets have a $B_r$ of $1.0$ $T$ - $1.4$ $T$ [Wikipedia]

Earth

Earth's surface [magnetic field strength] ($B_s$) ranges from 25 to 65 microteslas ($25 \times 10^{-6}$ $T$ - $65 \times 10^{-6}$ $T$).

Relating the Two

Disclaimer: Please bear with me here. EM was not my strong suit.

Your source suggests the usage of permanent magnets because, on face value, permanent magnets appear stronger than planetary magnetic fields. Using the above values, one would think that permanent magnets are 26,000 to 17,000x more powerful than Earth's magnetic field. The naivete of this notion is that it ignores that magnetic field strength decreases with distance. In fact it does so similarly to gravity: $B \propto {{1}\over{r^2}}$, $G \propto {{1}\over{r^2}}$.

A better metric to compare the two 'magnets' would be to compare their magnetic moments. Magnetic moment is normally defined as a magnet's responsiveness to an external magnetic field; but, it's also used to define the magnet's magnetic field when it is known.

Permanent Magnet's Magnetic Moment

For permanent magnets, their magnetic moment is simply defined as:

$\vec{m} = {{1}\over{\mu_0}} \vec{B_r} V$

where $\mu_0$ is the vacuum permeability constant, $\vec{B_r}$ is the remanence (magnetic field strength) of the permanent magnet, and $V$ is its volume. Suppose, we're working with an industrial grade neodymium bar, IMNB1074 to be precise. Given its dimensions of 0.5 in x0.06 in x 0.13 in and remanence of 13200 Gauss, it's magnetic moment is:

$\vec{m} = {{1}\over{\mu_0}} \vec{B_r} V = (1.26\times10^{-6}) (1.48 T) (6.55\times 10^-5 m^3) = 77 Am^2$

Earth's Magnetic Moment

Since the magnetic field is generated by the geodynamo of the outer core, it may be simply modeled as a spinning shell of charge [Princeton]. Using the princeton paper cited, the magnetic field outside the shell (R>a) as a function of the magnetic moment is:

$\vec{B_s}(r) = {{3(\vec m \cdot \vec r)\vec r - \vec m}\over{r^3}}$

Here we make a simplifying assumption by focusing entirely on the magnitude of the magnetic moment. You'll see why that's okay in a minute. First shift the $r^3$ term to the other side of the equation, and rewrite $\vec B$ as $\bar B \hat B$ (Magnitude times unit vector):

$\bar B_s r^3 \hat B_s = {3(\vec m \cdot \vec r)\vec r - \vec m}$

and calculate that left hand side, using the average of the previously cited magnet field strengths of earth.

$\bar B_s r^3 \hat B_s = {1 \over 2}(25 \times 10^{-6} T + 65 \times 10^{-6} T) (6,353,000 m)^3 \hat B= 1.15 \times 10^{16} Tm^3 \hat B$

This gives us the magnitude of Earth's magnetic moment.

$1.15 \times 10^{16} \hat B = 3(\vec m \cdot \vec r)\vec r - \vec m$

Number of Neodymium magnets needed to simulate Earth's Magnetic Field

For completeness, I'll try to answer this when I get home tonight (I'm at work atm); but, as I'm sure you can see, artificially simulating Earth's magnetic field require an astronomical number of magnets.

I don't know about what would be needed for a ground-based magnets, but the proposed NASA magnetic shield in L1 (described in detail here) needs a single magnetic field: "1 or 2 Tesla (or 10,000 to 20,000 Gauss) as an active shield against the solar wind".

Further information and justification for the above numbers can be found here.

• 1-2 Tesla is what is deemed necessary for small inflatable habitats. The field intensity would not grow linearly with radius, but still you would need a much stronger field. Probably, you would have to resort to a lattice of point generators - superconducting coils, extending for a considerable distance in space. On the plus side, once established the field, the coils would only need a negligible energy supply (some interesting points for a story could be the shield ramp-up and the risk of catastrophic quench). – LSerni Aug 26 '17 at 9:35
• I was unable to find specific figures for the final dipole strength, but earth dipole at its core is just 25 gauss (.0025 T). I'm unsure how it builds up with magnet dimensions (Earth is huge!). magnetic fields >7T are normal in NMR medical apparatuses. Anyways NASA thinks it can be done and magnetic strength needed doesn't seem a concern. – ZioByte Aug 26 '17 at 10:36