SPEC 3.20
Stepped Pressure Equilibrium Code
|
Functions/Subroutines | |
subroutine | tr00ab (lvol, mn, NN, Nt, Nz, iflag, ldiota) |
Calculates rotational transform given an arbitrary tangential field. More... | |
subroutine tr00ab | ( | integer, intent(in) | lvol, |
integer, intent(in) | mn, | ||
integer, intent(in) | NN, | ||
integer, intent(in) | Nt, | ||
integer, intent(in) | Nz, | ||
integer, intent(in) | iflag, | ||
real, dimension(0:1,-1:2), intent(inout) | ldiota | ||
) |
Calculates rotational transform given an arbitrary tangential field.
Calculates transform, \( \iota \hspace{-0.35em}\)-\( = \dot \theta ( 1 + \lambda_\theta) + \lambda_\zeta \), given \({\bf B}|_{\cal I}\).
constructing straight field line angle on interfaces
\begin{eqnarray} \lambda=\sum_j \lambda_{o,j}\sin(m_j\theta-n_j\zeta) + \sum_j \lambda_{e,j}\cos(m_j\theta-n_j\zeta) \end{eqnarray}
and insisting that\begin{eqnarray} \frac{{\bf B}\cdot \nabla \theta_s}{{\bf B}\cdot \nabla \zeta} = \dot \theta ( 1 + \lambda_\theta) + \lambda_\zeta = {{\,\iota\!\!\!}-}, \end{eqnarray}
where \({{\,\iota\!\!\!}-}\) is a constant that is to be determined.\begin{eqnarray} \label{eq:sfla_tr00ab} \partial_s A_\theta \, {{\,\iota\!\!\!}-} + \partial_s A_\zeta \, \lambda_\theta - \partial_s A_\theta \, \lambda_\zeta = - \partial_s A_\zeta \end{eqnarray}
\begin{eqnarray} & & \left( A_{\theta,e,k}^\prime \cos\alpha_k + A_{\theta,o,k}^\prime \sin\alpha_k\right) \, {{\,\iota\!\!\!}-} \nonumber \\ & + & \left( A_{\zeta ,e,k}^\prime \cos\alpha_k + A_{\zeta ,o,k}^\prime \sin\alpha_k\right) \, \left( +m_j \lambda_{o,j} \cos\alpha_j - m_j \lambda_{e,j} \sin\alpha_j \right) \nonumber \\ & - & \left( A_{\theta,e,k}^\prime \cos\alpha_k + A_{\theta,o,k}^\prime \sin\alpha_k\right) \, \left( -n_j \lambda_{o,j} \cos\alpha_j + n_j \lambda_{e,j} \sin\alpha_j \right) \nonumber \\ = & - & \left( A_{\zeta ,e,k}^\prime \cos\alpha_k + A_{\zeta ,o,k}^\prime \sin\alpha_k\right), \end{eqnarray}
where summation over \(k=1,\,\)mn
and \(j=2,\,\)mns
is implied \begin{eqnarray} & & \left( A_{\theta,e,k}^\prime \cos\alpha_k + A_{\theta,o,k}^\prime \sin\alpha_k\right) \, {{\,\iota\!\!\!}-} \nonumber \\ & + & \lambda_{o,j} \left( + m_j A_{\zeta,e,k}^\prime + n_j A_{\theta,e,k}^\prime \right) \left[ +\cos(\alpha_k+\alpha_j)+\cos(\alpha_k-\alpha_j)\right]/2 \nonumber \\ & + & \lambda_{e,j} \left( - m_j A_{\zeta,e,k}^\prime - n_j A_{\theta,e,k}^\prime \right) \left[ +\sin(\alpha_k+\alpha_j)-\sin(\alpha_k-\alpha_j)\right]/2 \nonumber \\ & + & \lambda_{o,j} \left( + m_j A_{\zeta,o,k}^\prime + n_j A_{\theta,o,k}^\prime \right) \left[ +\sin(\alpha_k+\alpha_j)+\sin(\alpha_k-\alpha_j)\right]/2 \nonumber \\ & + & \lambda_{e,j} \left( - m_j A_{\zeta,o,k}^\prime - n_j A_{\theta,o,k}^\prime \right) \left[ -\cos(\alpha_k+\alpha_j)+\cos(\alpha_k-\alpha_j)\right]/2 \nonumber \\ = & - & \left( A_{\zeta,e,k}^\prime \cos\alpha_k + A_{\zeta,o,k}^\prime \sin\alpha_k\right), \end{eqnarray}
and equating coefficients, an equation of the form \({\bf A} \cdot {\bf x} = {\bf b}\) is obtained, where\begin{eqnarray} {\bf x} = ( \underbrace{{{\,\iota\!\!\!}-}}_{\verb!x[1]!} \; , \; \underbrace{\lambda_{o,2}, \lambda_{o,3},\dots}_{\verb!x[ 2: N ]!} \; , \; \underbrace{\lambda_{e,2}, \lambda_{e,3},\dots}_{\verb!x[N+1:2N-1]!} \; )^T. \end{eqnarray}
alternative iterative method
\begin{eqnarray} \dot \theta_i + \dot \theta_i \sum_j m_j \cos \alpha_{i,j} \lambda_j - \sum_j n_j \cos \alpha_{i,j} \lambda_j = {{\,\iota\!\!\!}-}, \end{eqnarray}
where \(i\) labels the grid point.lvol | |
mn | |
NN | |
Nt | |
Nz | |
iflag | |
ldiota |
References allglobal::ate, allglobal::ato, allglobal::aze, allglobal::azo, allglobal::cpus, allglobal::glambda, constants::goldenmean, constants::half, allglobal::hnt, allglobal::hnz, allglobal::im, inputlist::imethod, allglobal::ims, allglobal::in, allglobal::ins, inputlist::iorder, allglobal::iotakadd, allglobal::iotakkii, allglobal::iotaksgn, allglobal::iotaksub, inputlist::iotatol, inputlist::iprecon, allglobal::lcoordinatesingularity, inputlist::lrad, inputlist::lsparse, inputlist::lsvdiota, allglobal::lvacuumregion, numerical::machprec, allglobal::mns, allglobal::mpi_comm_spec, inputlist::mpol, allglobal::myid, allglobal::ncpu, allglobal::notstellsym, inputlist::ntor, allglobal::ntz, inputlist::nvol, constants::one, fileunits::ounit, constants::pi2, allglobal::regumm, allglobal::rtt, numerical::small, numerical::sqrtmachprec, constants::third, tr00ab(), allglobal::tt, constants::two, numerical::vsmall, inputlist::wmacros, allglobal::yesstellsym, and constants::zero.
Referenced by evaluate_dmupfdx(), final_diagnostics(), mp00ac(), and tr00ab().