# Magnetic well

The magnetic well, along with the magnetic shear, is a fundamental concept for the stability of magnetically confined plasmas.  A toroidally confined plasma with given pressure has a tendency to expand. However, an ideal, collisionless plasma is bound to the magnetic field lines, and the flux in a magnetic flux tube is conserved. The plasma will therefore prefer to move to a location where the volume to flux ratio (the specific volume) is maximum.

Assuming the existence of nested (toroidal) flux surfaces, labelled by $\psi$, and with volume $V(\psi)$ and toroidal flux $\Phi(\psi)$, this specific volume is

$U = \frac{dV}{d\Phi}$

Noting that the mean value of the magnetic field can be written

$\bar B = \bar L \frac{d\Phi}{dV}$

where $\bar L$ is the length of the (toroidal) magnetic axis, one sees that the condition of maximum specific volume is equivalent to minimum B.

The vacuum magnetic well is defined via an average of the magnetic pressure over a flux surface:

$W = 2 \frac{V}{ \left \langle B^2 \right \rangle } \frac{d}{dV} \left \langle \frac{B^2}{2} \right \rangle$

where the average is defined as

$\left \langle f \right \rangle = \int{\frac{f dl}{B}} \bigg / \int{\frac{dl}{B}}$

where dl is an arc segment along the field line. The magnetic well is related to the average magnetic field line curvature κ. 

The relative magnetic well depth is defined as:

$w(\bar r) = \frac{(dV(0)/d\Phi - dV(\bar r)/d\Phi)}{dV(0)/d\Phi }$

where $\bar r$ is the average radius of a flux surface. A positive gradient of w corresponds to a magnetic well (stable), and a negative gradient to a magnetic hill (unstable).