SPEC 3.20
Stepped Pressure Equilibrium Code
|
Functions/Subroutines | |
subroutine | ma02aa (lvol, NN) |
Constructs Beltrami field in given volume consistent with flux, helicity, rotational-transform and/or parallel-current constraints. More... | |
subroutine ma02aa | ( | integer, intent(in) | lvol, |
integer, intent(in) | NN | ||
) |
Constructs Beltrami field in given volume consistent with flux, helicity, rotational-transform and/or parallel-current constraints.
[in] | lvol | index of nested volume for which to run this |
[in] | NN | number of degrees of freedom in the (packed format) vector potential; |
sequential quadratic programming
LBsequad=T
. See LBeltrami
for details. E04UFF
is under construction. Newton method
LBnewton=T
. See LBeltrami
for details. linear method
LBlinear=T
. See LBeltrami
for details. The algorithm proceeds as follows:
plasma volumes
C05PCF
, can be used to (iteratively) find the appropriately-constrained Beltrami solution, i.e. \({\bf f}(\boldsymbol{\mu})=0\). The function \({\bf f}(\boldsymbol{\mu})\), which is computed by mp00ac(), is defined by the input parameter Lconstraint:
Lconstraint
= -1, 0, then \(\boldsymbol{\mu}\) is not varied and Nxdof=0
. Lconstraint
= 1, then \(\boldsymbol{\mu}\) is varied to satisfy the transform constraints; and Nxdof=1
in the simple torus and Nxdof=2
in the annular regions. (Note that in the "simple-torus" region, the enclosed poloidal flux \(\Delta\psi_p\) is not well-defined, and only \(\mu=\boldsymbol{\mu}_1\) is varied in order to satisfy the transform constraint on the "outer" interface of that volume.) Lconstraint
= 2, then \(\mu=\boldsymbol{\mu}_1\) is varied in order to satisfy the helicity constraint, and \(\Delta\psi_p=\boldsymbol{\mu}_2\) is not varied, and Nxdof=1
. (under re-construction)vacuum volume
The function \({\bf f}(\boldsymbol{\mu})\), which is computed by mp00ac(), is defined by the input parameter Lconstraint:
Lconstraint
= -1, then \(\boldsymbol{\mu}\) is not varied and Nxdof=0
. Lconstraint
= 0,2, then \(\boldsymbol{\mu}\) is varied to satisfy the enclosed current constraints, and Nxdof=2
. Lconstraint
= 1, then \(\boldsymbol{\mu}\) is varied to satisfy the constraint on the transform on the inner boundary \(\equiv\) plasma boundary and the "linking" current, and Nxdof=2
. Nxdof>1
via C05PCF
to determine the appropriately constrained Beltrami field, \({\bf B}_{\boldsymbol{\mu}}\), so that \({\bf f}(\boldsymbol{\mu})=0\). mupftol
and mupfits
control the required accuracy and maximum number of iterations. If Nxdof=1
, then mp00ac() is called only once to provide the Beltrami fields with the given value of \(\boldsymbol{\mu}\).
debugging: finite-difference confirmation of the derivatives of the rotational-transform
Lconstraint=1
, then mp00ac() will ask tr00ab() to compute the derivatives of the transform with respect to variations in the helicity-multiplier, \(\mu\), and the enclosed poloidal-flux, \(\Delta\psi_p\), so that C05PCF
may more efficiently find the solution. \begin{eqnarray} \frac{\partial {{\,\iota\!\!\!}-}}{\partial \mu}\\ \frac{\partial {{\,\iota\!\!\!}-}}{\partial \Delta \psi_p} \end{eqnarray}
to improve the efficiency of the iterative search. A finite difference estimate of these derivatives is available; needDEBUG
, Lcheck=2
and Lconstraint=1
. References allglobal::ate, allglobal::cpus, df00ab(), allglobal::dma, allglobal::dmb, allglobal::dmd, allglobal::dpflux, allglobal::dtflux, constants::half, inputlist::helicity, allglobal::im, allglobal::imagneticok, allglobal::in, allglobal::ivol, allglobal::labintegral, allglobal::lbbintegral, allglobal::lblinear, allglobal::lbnewton, allglobal::lbsequad, inputlist::lcheck, inputlist::lconstraint, allglobal::lcoordinatesingularity, allglobal::localconstraint, allglobal::lplasmaregion, inputlist::lrad, allglobal::lvacuumregion, ma02aa(), allglobal::mbpsi, allglobal::mn, mp00ac(), allglobal::mpi_comm_spec, inputlist::mu, inputlist::mupfits, inputlist::mupftol, allglobal::myid, allglobal::ncpu, allglobal::nfielddof, constants::one, fileunits::ounit, packab(), numerical::small, allglobal::solution, constants::ten, numerical::vsmall, inputlist::wmacros, allglobal::xoffset, and constants::zero.
Referenced by dfp100(), and ma02aa().