SPEC 3.20
Stepped Pressure Equilibrium Code
Plasma Currents

Functions/Subroutines

subroutine curent (lvol, mn, Nt, Nz, iflag, ldItGp)
 Computes the plasma current, \(I \equiv \int B_\theta \, d\theta\), and the "linking" current, \(G \equiv \int B_\zeta \, d\zeta\). More...
 

Detailed Description

Function/Subroutine Documentation

◆ curent()

subroutine curent ( integer, intent(in)  lvol,
integer, intent(in)  mn,
integer, intent(in)  Nt,
integer, intent(in)  Nz,
integer, intent(in)  iflag,
real, dimension(0:1,-1:2), intent(out)  ldItGp 
)

Computes the plasma current, \(I \equiv \int B_\theta \, d\theta\), and the "linking" current, \(G \equiv \int B_\zeta \, d\zeta\).

enclosed currents

  • In the vacuum region, the enclosed currents are given by either surface integrals of the current density or line integrals of the magnetic field,

    \begin{eqnarray} \int_{\cal S} {\bf j}\cdot d{\bf s} = \int_{\partial \cal S} {\bf B}\cdot d{\bf l}, \end{eqnarray}

    and line integrals are usually easier to compute than surface integrals.
  • The magnetic field is given by the curl of the magnetic vector potential, as described in e.g. bfield() .
  • The toroidal, plasma current is obtained by taking a "poloidal" loop, \(d{\bf l}={\bf e}_\theta \, d\theta\), on the plasma boundary, where \(B^s=0\), to obtain

    \begin{eqnarray} I \equiv \int_{0}^{2\pi} \! {\bf B} \cdot {\bf e}_\theta \, d\theta = \int_{0}^{2\pi} \! \left( - \partial_s A_\zeta \; \bar g_{\theta\theta} + \partial_s A_\theta \; \bar g_{\theta\zeta} \right) \, d\theta, \end{eqnarray}

    where \(\bar g_{\mu\nu} \equiv g_{\mu\nu} / \sqrt g\).
  • The poloidal, "linking" current through the torus is obtained by taking a "toroidal" loop, \(d{\bf l}={\bf e}_\zeta \, d\zeta\), on the plasma boundary to obtain

    \begin{eqnarray} G \equiv \int_{0}^{2\pi} \! {\bf B}\cdot {\bf e}_\zeta \, d\zeta = \int_{0}^{2\pi} \! \left( - \partial_s A_\zeta \; \bar g_{\theta\zeta} + \partial_s A_\theta \; \bar g_{\zeta\zeta} \right) \, d\zeta. \end{eqnarray}

Fourier integration

  • Using \(f \equiv - \partial_s A_\zeta \; \bar g_{\theta\theta} + \partial_s A_\theta \; \bar g_{\theta\zeta}\), the integral for the plasma current is

    \begin{eqnarray} I = {\sum_i}^\prime f_i \cos(n_i \zeta) 2\pi, \label{eq:plasmacurrent_curent} \end{eqnarray}

    where \(\sum^\prime\) includes only the \(m_i=0\) harmonics.
  • Using \(g \equiv - \partial_s A_\zeta \; \bar g_{\theta\zeta} + \partial_s A_\theta \; \bar g_{\zeta\zeta}\), the integral for the linking current is

    \begin{eqnarray} G = {\sum_i}^\prime g_i \cos(m_i \zeta) 2\pi, \label{eq:linkingcurrent_curent} \end{eqnarray}

    where \(\sum^\prime\) includes only the \(n_i=0\) harmonics.
  • The plasma current, Eqn. \((\ref{eq:plasmacurrent_curent})\), should be independent of \(\zeta\), and the linking current, Eqn. \((\ref{eq:linkingcurrent_curent})\), should be independent of \(\theta\).

    Todo:
    Perhaps this can be proved analytically; in any case it should be confirmed numerically.

Parameters
[in]lvolindex of volume
[in]mnnumber of Fourier harmonics
[in]Ntnumber of grid points along \(\theta\)
[in]Nznumber of grid points along \(\zeta\)
[in]iflagsome integer flag
[out]ldItGpplasma and linking current

References allglobal::ate, allglobal::ato, allglobal::aze, allglobal::azo, allglobal::cfmn, allglobal::comn, coords(), allglobal::cpus, curent(), allglobal::efmn, allglobal::evmn, allglobal::guvij, allglobal::ijimag, allglobal::ijreal, allglobal::im, allglobal::ime, allglobal::in, allglobal::ine, allglobal::jiimag, allglobal::jireal, inputlist::lrad, allglobal::mne, allglobal::mpi_comm_spec, allglobal::myid, allglobal::ncpu, allglobal::notstellsym, allglobal::ntz, allglobal::odmn, allglobal::ofmn, constants::one, fileunits::ounit, constants::pi2, allglobal::sfmn, allglobal::sg, allglobal::simn, allglobal::tt, constants::two, inputlist::wmacros, allglobal::yesstellsym, and constants::zero.

Referenced by curent(), dfp100(), evaluate_dmupfdx(), and mp00ac().

Here is the call graph for this function:
Here is the caller graph for this function: