# Grad–Shafranov equation

The Grad–Shafranov equation (H. Grad and H. Rubin (1958); Vitalii Dmitrievich Shafranov (1966)) is the equilibrium equation in ideal magnetohydrodynamics (MHD) for a two dimensional plasma, for example the axisymmetric toroidal plasma in a tokamak. This equation takes the same form as the Hicks equation from fluid dynamics. This equation is a two-dimensional, nonlinear, elliptic partial differential equation obtained from the reduction of the ideal MHD equations to two dimensions, often for the case of toroidal axisymmetry (the case relevant in a tokamak). Taking $(r,\theta ,z)$ as the cylindrical coordinates, the flux function $\psi$ is governed by the equation,
${\frac {\partial ^{2}\psi }{\partial r^{2}}}-{\frac {1}{r}}{\frac {\partial \psi }{\partial r}}+{\frac {\partial ^{2}\psi }{\partial z^{2}}}=-\mu _{0}r^{2}{\frac {dp}{d\psi }}-{\frac {1}{2}}{\frac {dF^{2}}{d\psi }},$
where $\mu _{0}$ is the magnetic permeability, $p(\psi )$ is the pressure, $F(\psi )=rB_{\theta }$ and the magnetic field and current are, respectively, given by${\begin{aligned}\mathbf {B} &={\frac {1}{r}}\nabla \psi \times {\hat {\mathbf {e} }}_{\theta }+{\frac {F}{r}}{\hat {\mathbf {e} }}_{\theta },\\\mu _{0}\mathbf {J} &={\frac {1}{r}}{\frac {dF}{d\psi }}\nabla \psi \times {\hat {\mathbf {e} }}_{\theta }-\left[{\frac {\partial }{\partial r}}\left({\frac {1}{r}}{\frac {\partial \psi }{\partial r}}\right)+{\frac {1}{r}}{\frac {\partial ^{2}\psi }{\partial z^{2}}}\right]{\hat {\mathbf {e} }}_{\theta }.\end{aligned}}$
The nature of the equilibrium, whether it be a tokamak, reversed field pinch, etc. is largely determined by the choices of the two functions $F(\psi )$ and $p(\psi )$ as well as the boundary conditions.

## Derivation (in Cartesian coordinates)

In the following, it is assumed that the system is 2-dimensional with $z$ as the invariant axis, i.e. ∂/∂z {\textstyle {\frac {\partial }{\partial z}}} produces 0 for any quantity. Then the magnetic field can be written in cartesian coordinates as $\mathbf {B} =\left({\frac {\partial A}{\partial y}},-{\frac {\partial A}{\partial x}},B_{z}(x,y)\right),$ or more compactly, $\mathbf {B} =\nabla A\times {\hat {\mathbf {z} }}+B_{z}{\hat {\mathbf {z} }},$ where $A(x,y){\hat {\mathbf {z} }}$ is the vector potential for the in-plane (x and y components) magnetic field. Note that based on this form for B we can see that A is constant along any given magnetic field line, since $\nabla A$ is everywhere perpendicular to B. (Also note that -A is the flux function $\psi$ mentioned above.)
Two dimensional, stationary, magnetic structures are described by the balance of pressure forces and magnetic forces, i.e.: $\nabla p=\mathbf {j} \times \mathbf {B} ,$ where p is the plasma pressure and j is the electric current. It is known that p is a constant along any field line, (again since $\nabla p$ is everywhere perpendicular to B). Additionally, the two-dimensional assumption (∂/∂z=0{\textstyle {\frac {\partial }{\partial z}}=0}) means that the z- component of the left hand side must be zero, so the z-component of the magnetic force on the right hand side must also be zero. This means that $\mathbf {j} _{\perp }\times \mathbf {B} _{\perp }=0$, i.e. $\mathbf {j} _{\perp }$ is parallel to $\mathbf {B} _{\perp }$.
The right hand side of the previous equation can be considered in two parts: $\mathbf {j} \times \mathbf {B} =j_{z}({\hat {\mathbf {z} }}\times \mathbf {B_{\perp }} )+\mathbf {j_{\perp }} \times {\hat {\mathbf {z} }}B_{z},$ where the $\perp$ subscript denotes the component in the plane perpendicular to the $z$-axis. The $z$ component of the current in the above equation can be written in terms of the one-dimensional vector potential as $j_{z}=-{\frac {1}{\mu _{0}}}\nabla ^{2}A.$
The in plane field is $\mathbf {B} _{\perp }=\nabla A\times {\hat {\mathbf {z} }},$ and using Maxwell–Ampère's equation, the in plane current is given by $\mathbf {j} _{\perp }={\frac {1}{\mu _{0}}}\nabla B_{z}\times {\hat {\mathbf {z} }}.$
In order for this vector to be parallel to $\mathbf {B} _{\perp }$ as required, the vector $\nabla B_{z}$ must be perpendicular to $\mathbf {B} _{\perp }$, and $B_{z}$ must therefore, like $p$, be a field-line invariant.
Rearranging the cross products above leads to ${\hat {\mathbf {z} }}\times \mathbf {B} _{\perp }=\nabla A-(\mathbf {\hat {z}} \cdot \nabla A)\mathbf {\hat {z}} =\nabla A,$ and $\mathbf {j} _{\perp }\times B_{z}\mathbf {\hat {z}} ={\frac {B_{z}}{\mu _{0}}}(\mathbf {\hat {z}} \cdot \nabla B_{z})\mathbf {\hat {z}} -{\frac {1}{\mu _{0}}}B_{z}\nabla B_{z}=-{\frac {1}{\mu _{0}}}B_{z}\nabla B_{z}.$
These results can be substituted into the expression for $\nabla p$ to yield: $\nabla p=-\left[{\frac {1}{\mu _{0}}}\nabla ^{2}A\right]\nabla A-{\frac {1}{\mu _{0}}}B_{z}\nabla B_{z}.$
Since $p$ and $B_{z}$ are constants along a field line, and functions only of $A$, hence $\nabla p={\frac {dp}{dA}}\nabla A$ and $\nabla B_{z}={\frac {dB_{z}}{dA}}\nabla A$. Thus, factoring out $\nabla A$ and rearranging terms yields the Grad–Shafranov equation: $\nabla ^{2}A=-\mu _{0}{\frac {d}{dA}}\left(p+{\frac {B_{z}^{2}}{2\mu _{0}}}\right).$

## Derivation in contravariant representation

This derivation is only used for Tokamaks, but it can be enlightening. Using the definition of 'The Theory of Toroidally Confined Plasmas 1:3'(Roscoe White), Writing ${\vec {B}}$ by contravariant basis $(\nabla \Psi ,\nabla \phi ,\nabla \zeta )$: ${\vec {B}}=\nabla \Psi \times \nabla \phi +{\bar {F}}\nabla \phi ,$
we have ${\vec {j}}$: $\mu _{0}{\vec {j}}=\nabla \times {\vec {B}}=-\Delta ^{*}\Psi \nabla \phi +\nabla {\bar {F}}\times \nabla \phi \quad {\text{, where}}\ \Delta ^{*}=r\partial _{r}(r^{-1}\partial _{r})+\partial _{\phi }^{2}{\text{;}}$
then force balance equation: $\mu _{0}{\vec {j}}\times {\vec {B}}=\mu _{0}\nabla p{\text{.}}$
Working out, we have: $-\Delta ^{*}\Psi ={\bar {F}}{\frac {d{\bar {F}}}{d\Psi }}+\mu _{0}R^{2}{\frac {dp}{d\Psi }}{\text{.}}$