Spherical magnetostatic pressure balance (source code)

= Spherical magnetostatic pressure balance
{title2=$\Delta_*\chi+\psi\psi'=-\mu_0r^2\sin^2\theta\,p'$}

For an axisymmetric <magnetic field> $\mathbf B=\psi\mathbf e_\phi/(r\sin\theta)+\nabla\times[\chi\mathbf e_\phi/(r\sin\theta)]$, the <poloidal magnetic flux function> gives $B_r=\chi_\theta/(r^2\sin\theta)$ and $B_\theta=-\chi_r/(r\sin\theta)$. Force balance implies locally $p=p(\chi)$ and $\psi=\psi(\chi)$ on regular connected flux surfaces. Direct calculation gives $(\nabla\times\mathbf B)\times\mathbf B=-(\Delta_*\chi+\psi\psi')\nabla\chi/(r^2\sin^2\theta)$, with $\Delta_*\chi=\chi_{rr}+\sin\theta\,\partial_\theta(\chi_\theta/\sin\theta)/r^2$. Equating this to $\mu_0\nabla p$ proves the displayed <magnetostatic equilibrium> equation, including its sign and dimensions.