SPEC 3.20
Stepped Pressure Equilibrium Code
|
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... | |
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
\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.\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\).\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
\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.\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\).
[in] | lvol | index of volume |
[in] | mn | number of Fourier harmonics |
[in] | Nt | number of grid points along \(\theta\) |
[in] | Nz | number of grid points along \(\zeta\) |
[in] | iflag | some integer flag |
[out] | ldItGp | plasma 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().