essenmein said:
This has been noodling in the back of my mind ever since I read about the field strength in magnetars etc.
Magnetic fields store energy.
Magnetic fields in magnetars are inconceivably large (~10^11T).
This inconceivably large magnetic field contains ~4x10^27J/m3
From that famous guy whose name escapes me this works out to 4x10^10kg/m3 mass energy equivalence.
There is no material we can touch even close to that mass density.
Therefore, does a 10^11T mag field exert gravity?
More specifically another way of looking at it, is the thing we describe as mass, actually the effect of an extremely high concentration of energy (ie m=E/c2), then does a different high concentration of energy (eg mag field) also start to exhibit properties of mass, like inertia?
Yes. The source of gravity in GR is the stress energy tensor. Wiki writes this tensor in terms of the E and B fields in
<<link>>
wiki said:
$$
T^{\mu\nu} =\begin{bmatrix} \frac{1}{2}\left(\epsilon_0 E^2+\frac{1}{\mu_0}B^2\right) & S_\text{x}/c & S_\text{y}/c & S_\text{z}/c \\
S_\text{x}/c & -\sigma_{xx} & -\sigma_\text{xy} & -\sigma_\text{xz} \\
S_\text{y}/c & -\sigma_{yx} & -\sigma_\text{yy} & -\sigma_\text{yz} \\
S_\text{z}/c & -\sigma_{zx} & -\sigma_\text{zy} & -\sigma_\text{zz} \end{bmatrix}$$
S is the Poynting vector, which will be zero if E=0. The ##\sigma_{ij}## are the presssure terms Peter mentioned, if E=0 they will be given by
$$
\sigma_{ij} = \frac{1}{{\mu _0}}B_i B_j - \left( \frac{1}{2\,\mu _0}B^2 \right)\delta _{ij}
$$
If we chose the B-field to be oriented around the X axis, I get:
$$T^{\mu\nu} = \begin{bmatrix} K & 0 & 0 & 0 \\ 0 & -\frac{K}{2} & 0 & 0 \\ 0 & 0 & \frac{K}{2} & 0 \\ 0 & 0 & 0 & \frac{K}{2} \end{bmatrix}$$
with ##K = \frac{B^2}{\mu_0}##
The term in the upper left is the energy density term, the diagonal terms are the pressures Pete mentioned. So we can identify the terms according to ##\rho = K, P_x = -K/2, P_y=k, P_z=K/2## - if I haven't made a sign error, which is unfortunately quite possible. This is important because the sum of ##\rho + P_x + P_y + P_z## determines what happens to a ball of coffee grounds surrounding the area containg the "stuff" described by the stress-energy tensor. It determines whether the coffee ground wind up shrinking in volume, changing it's shape without changing volume, or expanding, as explained in Baez's paper
https://arxiv.org/pdf/gr-qc/0103044.pdf.
I would loosely describe the state of affairs where the volume of the coffee grounds shrinks with time (the second derivative of the volume with time is less than zero) as being a gravitational contribution to collapse. If I haven't made a sign error, the relevant sum is positive and equal to 2K = ##2 \, B^2 / \mu_0## and a ball of uncharged coffee grounds in a strong magnetic field will shrink due to gravitational effects.
[add]
For instance, if you have a ball of coffee grounds surrounding a mass m, they're attracted to the mass, and the ball shrinks. If you have a ball of coffee grounds in empty space, away from any mass, the volume doesn't change. If the grounds are in empty space but close to a large mass, tidal forces will distort the shape of the ball of coffee grounds, but the volume won't change - not in the same way as it will due to gravity. More preceisely, the second derivative of the volume with respect to time will be zero in empty space, while the second derivative of the volume with respect to time will be negative if the grounds surround some mass.
We can see the importance of pressure - in general relativity, pressure makes the ball of coffee grounds shrink just as mass does. So it's a mistake to think of only mass causing gravity if one is doing GR. That used to be true in Newtonian gravity, but GR is not Newtonian gravity, the rules are slightly different.
Unfortunately, I'm not quite sure I didn't get the sign of the pressure terms wrong.