Magnetohydrodynamics

1 Comment

Happy New Year!

I recently wrote about how the Parker Solar Probe crossed the Sun’s ‘Alfvén surface’: the surface outside which the outflowing solar wind becomes supersonic.

This is already pretty cool—but even better, the ‘sound’ here is not ordinary sound: it consists of vibrations in both the hot electrically conductive plasma of the Sun’s atmosphere and its magnetic field! These vibrations are called ‘Alfvén waves’.

To understand these waves, we need to describe how an electrically conductive fluid interacts with the electric and magnetic fields. We can do this—to a reasonable approximation—using the equations of ‘magnetohydrodynamics’:

• Wikipedia, Magnetohydrodynamics: equations.

These equations also describe other phenomena we see in stars, outer space, fusion reactors, the Earth’s liquid outer core, and the Earth’s upper atmosphere: the ionosphere, and above that the magnetosphere. These phenomena can be very difficult to understand, combining all the complexities of turbulence with new features arising from electromagnetism. Here’s an example, called the Orzag–Tang vortex, simulated by Philip Mocz:

I’ve never studied magnetohydrodynamics—I was afraid that if I learned a little, I’d never stop, because it’s endlessly complex. Now I’m getting curious. But all I want to do today is explain to you, and myself, what the equations of magnetohydrodynamics are—and where they come from.

To get these equations, we assume that our system is described by some time-dependent fields on 3-dimensional space, or whatever region of space our fluid occupies. I’ll write vector fields in boldface and scalar fields in non-bold:

• the velocity of our fluid, \mathbf{v}

• the density field of our fluid, \rho

• the pressure field of our fluid, P

• the electric current, \mathbf{J}

• the electric field, \mathbf{E}

• the magnetic field, \mathbf{B}

You may have noticed one missing: the charge density! We assume that this is zero, because in a highly conductive medium the positive and negative charges quickly even out unless the electric field is changing very rapidly. (When this assumption breaks down we use more complicated equations.)

So, we start with Maxwell’s equations, but with the charge density set to zero:

\begin{array}{lll}     \nabla\cdot\mathbf{E}= 0 & \qquad \quad &     \displaystyle{   \nabla\times\mathbf{E}= -\frac{\partial\mathbf{B} }{\partial t} } \\ \\     \nabla\cdot\mathbf{B}=0  & &  \displaystyle{   \nabla\times\mathbf{B}= \mu_0 \mathbf{J}+ \epsilon_0 \mu_0 \frac{\partial\mathbf{E} }{\partial t} }  \end{array}

I’m writing them in SI units, where they include two constants:

• the electric permittivity of the vacuum, \epsilon_0

• the magnetic permeability of the vacuum, \mu_0

The product of these two constants is the reciprocal of the square of the speed of light:

\mu_0 \epsilon_0 = 1/c^2

This makes the last term Maxwell added to his equations very small unless the electric field is changing very rapidly:

\displaystyle{ \nabla\times\mathbf{B}= \mu_0 \mathbf{J} + \epsilon_0 \mu_0 \frac{\partial\mathbf{E} }{\partial t} }

In magnetohydrodynamics we assume the electric field is changing slowly, so we drop this last term, getting a simpler equation:

\displaystyle{ \nabla\times\mathbf{B}= \mu_0 \mathbf{J} }

We also assume a sophisticated version of Ohm’s law: the electric current \mathbf{J} is proportional to the force on the charges at that location. But here the force involves not only the electric field but the magnetic field! So, it’s given by the Lorentz force law, namely

\mathbf{E} + \mathbf{v} \times \mathbf{B}

where notice we’re assuming the velocity of the charges is the fluid velocity \mathbf{v}. Thus we get

\eta \mathbf{J} = \mathbf{E} + \mathbf{v} \times \mathbf{B}

where \eta is the electrical conductivity of the fluid.

Next we assume local conservation of mass: the increase (or decrease) of the fluid’s density at some point can only be caused by fluid flowing toward (or away from) that point. So, the time derivative of the density \rho is minus the divergence of the mass current \rho \mathbf{v}:

\displaystyle{ \frac{\partial \rho}{\partial t} =   - \nabla \cdot (\rho \mathbf{v}) }

This is analogous to the equation describing local conservation of charge in electromagnetism: the so-called continuity equation.

We also assume that the pressure is some function of the density:

\displaystyle{ P = f(\rho) }

This is called the equation of state of our fluid. The function f depends on the fluid: for example, for an ideal gas P is simply proportional to \rho. We can use the equation of state to eliminate P and work with \rho.

Last—but not least—we need an equation of motion saying how the fluid’s velocity \mathbf{v} changes with time! This equation follows from Newton’s law \mathbf{F} = m \mathbf{a}, or more precisely his actual law

\displaystyle{ \frac{d}{d t} \mathbf{p} = \mathbf{F}}

where \mathbf{p} is momentum. But we need to replace \mathbf{p} by the momentum density \rho \mathbf{v} and replace \mathbf{F} by the force density, which is

\displaystyle{ \mathbf{J} \times \mathbf{B} - \nabla P + \mu \nabla^2 \mathbf{v}}

The force density comes three parts:

• The force of the magnetic field on the current, as described by the Lorentz force law: \mathbf{J} \times \mathbf{B}.

• The force caused by the gradient of pressure, pointing toward regions of lower pressure: - \nabla P

• the force caused by viscosity, where faster bits of fluid try to speed up their slower neighbors, and vice versa: \mu \nabla^2 \mathbf{v}.

Here \mu is called the coefficient of viscosity.

Thus, our equation of motion is this:

\displaystyle{ \frac{D}{D t} (\rho \mathbf{v}) = \mathbf{J} \times \mathbf{B} - \nabla P + \mu \nabla^2 \mathbf{v} }

Here we aren’t using just the ordinary time derivative of \rho \mathbf{v}: we want to keep track of how \rho \mathbf{v} is changing for a bit of fluid that’s moving along with the flow of the fluid, so we need to add in the derivative of \rho \mathbf{v} in the \mathbf{v} direction. For this we use the material derivative:

\displaystyle{ \frac{D}{Dt} = \frac{\partial}{\partial t} + \mathbf{v} \cdot \nabla   }

which also has many other names like ‘convective derivative’ or ‘substantial derivative’.

So, those are the equations of magnetohydrodynamics! Let’s see them in one place. I’ll use the equation of state to eliminate the pressure by writing it as a function of density:

MAGNETOHYDRODYNAMICS

Simplified Maxwell equations:

\begin{array}{lll}     \nabla\cdot\mathbf{E}= 0 & \qquad \quad &     \displaystyle{ \nabla\times\mathbf{E}= -\frac{\partial\mathbf{B} }{\partial t} } \\ \\     \nabla\cdot\mathbf{B}=0  & &  \displaystyle{  \nabla\times\mathbf{B}= \mu_0 \mathbf{J} }  \end{array}

Ohm’s law:

\eta \mathbf{J} = \mathbf{E} + \mathbf{v} \times \mathbf{B}

Local conservation of mass:

\displaystyle{ \frac{\partial \rho}{\partial t} = - \nabla \cdot (\rho \mathbf{v}) }

Equation of motion:

\displaystyle{ \left( \frac{\partial}{\partial t} + \mathbf{v} \cdot \nabla  \right) (\rho \mathbf{v}) = \mathbf{v} \times \mathbf{J} - \nabla (f(\rho)) +  \mu \nabla^2 \mathbf{v}}

Notice that in our simplified Maxwell equations, two terms involving the electric field are gone. That’s why these are called the equations of magnetohydrodynamics. You can even eliminate the current \mathbf{J} from these equations, replacing it with \mu_0 \nabla \times \mathbf{B}. The magnetic field reigns supreme!

Magnetic diffusion

It feels unsatisfying to quit right after I show you the equations of magnetohydrodynamics. Having gotten this far, I can’t resist showing you a couple of cool things we can do with these equations!

First, we can use Ohm’s law to see how the magnetic field tends to ‘diffuse’, like heat spreads out through a medium.

We start with Ohm’s law:

\eta \mathbf{J} = \mathbf{E} + \mathbf{v} \times \mathbf{B}

We take the curl of both sides:

\displaystyle{ \eta \nabla \times \mathbf{J} = \nabla \times \mathbf{E} + \nabla \times( \mathbf{v} \times \mathbf{B}) }

We can get every term here to involve \mathbf{B} if we use two of our simplified Maxwell equations:

\displaystyle{ \mathbf{J} = \frac{1}{\eta} \nabla \times \mathbf{B}, \qquad  \nabla\times\mathbf{E}= -\frac{\partial\mathbf{B} }{\partial t} }

We get this:

\displaystyle{ \frac{\eta}{\mu_0} \nabla \times (\nabla \times \mathbf{B}) = -\frac{\partial\mathbf{B} }{\partial t} + \nabla \times( \mathbf{v} \times \mathbf{B}) }

Then we can use this vector identity:

\displaystyle{ \nabla \times (\nabla \times \mathbf{B}) = \nabla (\nabla \cdot \mathbf{B}) - \nabla^2 \mathbf{B} }

Since another of the Maxwell equations says \nabla \cdot \mathbf{B} = 0, we get

\displaystyle{ \nabla \times (\nabla \times \mathbf{B}) = - \nabla^2 \mathbf{B} }

and thus

\displaystyle{ - \frac{\eta}{\mu_0}  \nabla^2 \mathbf{B} = -\frac{\partial\mathbf{B} }{\partial t} + \nabla \times( \mathbf{v} \times \mathbf{B}) }

and finally we get

THE MAGNETIC DIFFUSION EQUATION

\displaystyle{ \frac{\partial\mathbf{B} }{\partial t}  = \frac{\eta}{\mu_0}  \nabla^2 \mathbf{B} \, + \, \nabla \times( \mathbf{v} \times \mathbf{B}) }

Except for the last term, this is the heat equation—but not for temperature, which is a scalar field, but for the magnetic field, which is a vector field! The constant \eta / \mu_0 says how fast the magnetic field spreads out, so it’s called the magnetic diffusivity.

The last term makes things more complicated and interesting.

Magnetic pressure and tension

Second, and finally, I want to give you more intuition for how the magnetic field exerts a force on the conductive fluid in magnetohydrodynamics. We’ll see that the magnetic field has both pressure and tension.

Remember, the magnetic field exerts a force

\mathbf{F}_m = \mathbf{J} \times \mathbf{B}

More precisely this is the force per volume: the magnetic force density. We can express this solely in terms of the magnetic field using one of our simplified Maxwell equations

\nabla \times \mathbf{B} = \mu_0 \mathbf{J}

We get

\displaystyle{ \mathbf{F}_m = \frac{1}{\mu_0} (\nabla \times \mathbf{B}) \times \mathbf{B} }

Next we can use a fiendish vector calculus identity: for any vector fields \mathbf{A}, \mathbf{B} in 3d space we have

\begin{array}{ccl}   \nabla (\mathbf{A} \cdot \mathbf{B}) &=&   (\mathbf{A} \cdot \nabla) \mathbf{B} + (\mathbf{B} \cdot \nabla) \mathbf{A} \\  & & +\mathbf{A} \times (\nabla \times \mathbf{B}) + \mathbf{B} \times (\nabla \times \mathbf{A})   \end{array}

When \mathbf{A} = \mathbf{B} this gives

\nabla (\mathbf{B} \cdot \mathbf{B}) = 2(\mathbf{B} \cdot \nabla) \mathbf{B} + 2 \mathbf{B} \times (\nabla \times \mathbf{B})

or what we actually need now:

(\nabla \times \mathbf{B}) \times \mathbf{B} = (\mathbf{B} \cdot \nabla) \mathbf{B} - \frac{1}{2} \nabla (B^2)

where B^2 = \mathbf{B} \cdot \mathbf{B}.

This identity gives a nice formula for

THE MAGNETIC FORCE DENSITY

\displaystyle{ \mathbf{F}_m = \frac{1}{\mu_0}(\mathbf{B} \cdot \nabla) \mathbf{B} \, - \, \frac{1}{2\mu_0} \nabla (B^2) }

The point of all these manipulations was not merely to revive our flagging memories of vector calculus—though that was good too. The real point is that they reveal that the magnetic force density consists of two parts, each with a nice physical intepretation.

Of course the force acts on the fluid, not on the magnetic field lines themselves. But as you dig deeper into magnetohydrodynamics, you’ll see that sometimes the magnetic field lines get ‘frozen in’ to the fluid—that is, they get carried along by the fluid flow, like bits of rope in a raging river. Then the first term above tends to straighten out these field lines, while the second term tends to push them apart!

The second term is minus the gradient of

\displaystyle{ \frac{1}{2\mu_0} B^2 }

Since minus the gradient of ordinary pressure creates a force density on a fluid, we call the quantity above the magnetic pressure. Yes, the square of the magnitude of the magnetic field creates a kind of pressure! It pushes the fluid like this:

The other more subtle term is called magnetic tension:

\displaystyle{ \frac{1}{\mu_0}(\mathbf{B} \cdot \nabla) \mathbf{B}  }

It points like this:

Its magnitude is \kappa B^2/\mu_0 where 1/\kappa is the radius of curvature of the circle that best fits the magnetic field lines at the given point. And it points toward the center of that circle!

I’m getting tired of proving formulas, so I’ll leave the proofs of these facts as puzzles. If you get stuck and want a hint, go here.

There’s a lot more to say about this, and you can find a lot of it here:

• Gordon I. Ogilvie, Lecture notes: astrophysical fluid dynamics.

I might or might not say more—but if I don’t, these notes will satisfy your curiosity about exactly when magnetic field lines get ‘frozen in’ to the motion of an electrically conductive fluid, and how magnetic pressure then tends to push these field lines apart, while magnetic tension tends to straighten them out!

All of this is very cool, and I think this subject is a place where all the subtler formulas of vector calculus really get put to good use.



Read the whole story
jlvanderzwan
8 hours ago
reply
Suspiciously specifically relevant xkcd https://xkcd.com/1851/
Share this story
Delete

Saturday Morning Breakfast Cereal - Ex

1 Comment


Click here to go see the bonus panel!

Hovertext:
Sadly, the patreon subscriber ideas were all better than mine.


Today's News:
Read the whole story
jlvanderzwan
1 day ago
reply
I think "incellent" might have different unintended connotations though
Share this story
Delete

Saturday Morning Breakfast Cereal - Capital

3 Shares


Click here to go see the bonus panel!

Hovertext:
The complex derivative guys are given AAA ratings then surprised that they still sink.


Today's News:
Read the whole story
jlvanderzwan
4 days ago
reply
acdha
7 days ago
reply
Washington, DC
Share this story
Delete

Health Insurance Trolley

1 Comment and 4 Shares
PERSON:
Read the whole story
jlvanderzwan
4 days ago
reply
"The needs of the many outweigh the needs of the few" may have its problems and counter-arguments, but I don't think "imagine that "the few" are literally Hitler" is one of them
Share this story
Delete

Saturday Morning Breakfast Cereal - Cupcake

1 Comment and 3 Shares


Click here to go see the bonus panel!

Hovertext:
Was reading a book that pointed out that everything kid understands the idea of 'that's mine,' but has to be taught 'that's yours'


Today's News:
Read the whole story
jlvanderzwan
4 days ago
reply
“Innocent" in the sense of "no real concept of death" is still innocent, just not mutually exclusive with cruelty
acdha
12 days ago
reply
Washington, DC
Share this story
Delete

Saturday Morning Breakfast Cereal - Elegant

1 Comment and 2 Shares


Click here to go see the bonus panel!

Hovertext:
Max Tegmark is reading this in his office, shaking his fist and shouting 'Weinersmith!'


Today's News:
Read the whole story
jlvanderzwan
14 days ago
reply
bonus panel: no, but I have noticed something similar with people talking about more "elegant" programming languages than the ones being used.
Share this story
Delete
Next Page of Stories