What are the possible magnetic fields with constant magnitude? A now-deleted answer to this recent question prompted me to wonder about this and I can't find a clear answer in the top layer of google results, so I thought I'd ask here.
What are the possible magnetic fields with constant magnitude?
That is to say, suppose that $\mathbf B: \mathbb R^3 \to \mathbb R^3$ is


*

*solenoidal, so $\nabla \cdot \mathbf B = 0$, and

*with constant magnitude $|\mathbf B(\mathbf r)| \equiv B_0$.


What can be said about $\mathbf B$? Is the solenoidality condition strong enough to imply that $\mathbf B(\mathbf r)$ must be a constant vector field? Or is it possible for the direction of the vector field to change from point to point? If so, can a general description of this class of fields be formulated?
 A: Partial answer: if there are no currents, all such magnetic fields must be constant.
In the absence of currents, we have
$$\nabla \cdot \mathbf{B} = 0, \quad \nabla \times \mathbf{B} = 0.$$
The curl-free condition is equivalent to $\partial_i B_j = \partial_j B_i$, as is clear by writing it in terms of differential forms. As a result, the Laplacian of any field component vanishes,
$$\partial^2 B_i = \partial_j \partial_j B_i = \partial_j \partial_i B_j = \partial_i (\partial_j B_j) = 0.$$
The Laplacian of the magnitude squared is hence
$$\partial^2 |\mathbf{B}|^2 = 2B_i \partial^2 B_i + 2 (\partial_j B_i)(\partial_j B_i) = 2 (\partial_j B_i)^2.$$
Since $|\mathbf{B}|^2$ is constant, the left-hand side is zero and so is every term on the right-hand side. But then $\partial_j B_i = 0$, so $\mathbf{B}$ is constant.
When there are currents, we pick up an extra term,
$$\partial^2 B_i \sim (\nabla \times \nabla \times \mathbf{B})_i \sim (\nabla \times \mathbf{J})_i.$$
Hence the argument also goes through if $\nabla \times \mathbf{J} = 0$. I'm not sure what the answer is for general $\mathbf{J}$.
A: The energy of a magnetic field is [Jackson, Classical Electrodynamics (1975) p. 216, converted to SI units]
$$ W = \frac{1}{2}\int \mathbf{H}\cdot\mathbf{B} d^3 x. $$
In a vacuum,
$$ \mathbf{H} = \mathbf{B} / \mu_0, $$
so 
$$ W = \frac{1}{2}\int B^2 d^3 x. $$
Integrated over all space, the energy of a field with constant $B^2$ is infinite unless $B=0$. Thus, the only possible magnetic field with constant magnitude is identically zero. Note that the direction of $\mathbf{B}$ doesn't matter because it is in a dot product with itself.
In a diamagnetic or paramagnetic body, replace $\mu_0$ by $\mu$ and you get the same result. Not that there are any infinite diamagnetic or paramagnetic bodies!
