Continuum theory

The continuum is a local spectral problem on a flux surface. Radial position sets the equilibrium coefficients; the solver then follows the poloidal angle over one period. FACS implements the fluid Alfvénic and ion-acoustic equations in Boozer coordinates. Falessi et al. describe this framework and the relation between Floquet phases and mode numbers in Eqs. (5), (7), and (16).

Coordinates and units

Let \(\psi\) denote poloidal flux measured from the magnetic axis, \(\theta\) the Boozer poloidal angle, and \(q(\psi)\) the safety factor. A prime below means \(\partial/\partial\theta\) at fixed flux. Equilibrium coefficients have period \(L=2\pi\). Boozer coordinates make \(JB^2\) a flux function, where \(J\) is the coordinate Jacobian.

Use three distinct frequency symbols:

Symbol Meaning
\(\omega\) Physical angular frequency.
\(\Omega=\omega R_0/v_{A,0}\) Dimensionless frequency in CLI options and continuum output.
\(w=\lvert q\rvert\Omega\) Local frequency used by the coupled integrator and root finder.

Here \(R_0\) is the magnetic-axis major radius and \(v_{A,0}=\lvert B_0\rvert/\sqrt{\mu_0\rho_0}\). Density is uniform; the solver exports \(\Omega\), without requiring a value for \(\rho_0\). Lengths use \(R_0\), field magnitudes use \(\lvert B_0\rvert\), pressure uses \(B_0^2/\mu_0\), and the outward flux coordinate uses \(R_0^2\lvert B_0\rvert\). FACS corrects the sign of libmeq's normalized flux; other fields follow libmeq's signed field convention.

The scalar CLI currently converts with signed \(q\), rather than \(\lvert q\rvert\). Its frequency scan assumes the usual positive-\(q\) case. The coupled path uses \(\lvert q\rvert\) in both conversions.

The displayed radius is

\[ \rho_t=\sqrt{\frac{\psi_t(\psi)}{\psi_t(\psi_{\rm wall})}}, \qquad \psi_t(\psi)=\int_0^\psi q(u)\,du. \]

Set this radius cutoff with --rho-max. The alternative --psi-max sets \(\psi/\psi_{\rm wall}\) and defaults to 0.8; supply only one of these options. Neither coordinate is a geometric minor radius. The wall here is the outer flux retained by the equilibrium contour construction.

Scalar Alfvénic equation

Define \(g=\lvert\nabla\psi\rvert\). The scalar equation is

\[ f_A''+\left(a_0+w^2a_A\right)f_A=0, \qquad a_0=-\frac{g''}{g}, \qquad a_A=\left(\frac{J}{q}\right)^2. \]

Changing the radial flux label multiplies \(g\) by a factor constant on a surface, so it does not change \(g''/g\). The radial term accounts for angular variation of the flux-surface geometry. The inertia term sets the local Alfvénic propagation scale.

Coupled Alfvénic and acoustic equations

The acoustic variable is scaled so that the coupling matrix is symmetric. The implemented system is

\[ \mathbf f''=-K(\theta,w)\mathbf f, \qquad \mathbf f=\begin{pmatrix}f_A\\f_S\end{pmatrix}, \qquad K=\begin{pmatrix} a_0+w^2a_A & wc\\ wc & w^2a_S \end{pmatrix}, \]

with

\[ a_S=\frac{(JB/q)^2}{\Gamma p}, \qquad c=\frac{2JFB'}{\lvert q\rvert B g}. \]

\(F\) is the stored toroidal-field flux function and \(\Gamma\) is the ratio of specific heats. The pressure \(p\) comes from the g-file. The geodesic curvature relation

\[ \kappa_g=-\frac{FB'}{JB^2g} \]

gives \(c=-2J^2B\kappa_g/\lvert q\rvert\). The sign of the scaled acoustic field fixes the off-diagonal sign convention. A constant reversal of that field changes the coupling sign without changing the spectrum.

These coefficients require nonzero \(q\), positive pressure, and positive \(\Gamma\) on every sampled surface. Removing the coupling yields two independent wave equations. FACS integrates in Boozer \(\theta\); it does not change to the continuum flux coordinate \(\eta\) used in Eqs. (8)–(13) of Falessi et al..

Fundamental matrix and Floquet condition

Introduce momenta \(\mathbf p=\mathbf f'\) and the state

\[ \mathbf x=(f_A,f_S,p_A,p_S)^T, \qquad \mathbf x'=\mathcal A\mathbf x, \qquad \mathcal A=\begin{pmatrix}0&I\\-K&0\end{pmatrix}. \]

For the scalar problem the state is \((f_A,p_A)^T\). The fundamental matrix \(X\) starts at the identity, with each column a separate solution. Its value after one period,

\[ M(w)=X(2\pi,w), \]

is the monodromy matrix. If \(M\mathbf v=\lambda\mathbf v\), the associated Floquet solution has multiplier \(\lambda=e^{2\pi i\nu}\). The field-line condition at toroidal mode number \(n\) is

\[ \nu=\pm(nq-m),\qquad m\in\mathbb Z. \]

Thus a continuum root satisfies

\[ \det\left(M-e^{2\pi i nq}I\right)=0. \]

Reciprocal and conjugate partners supply the opposite phase. Changing \(n\) changes the boundary target, while the coefficient table and scanned matrices on a surface remain reusable.

Unit-modulus multipliers describe propagation along the angular coordinate. Multipliers off the unit circle describe angular growth or decay in a gap. This use of Floquet stability does not diagnose temporal plasma stability.

Symplectic structure and reciprocal spectra

Use a separate symbol for the canonical symplectic matrix:

\[ \mathcal J=\begin{pmatrix}0&I\\-I&0\end{pmatrix}. \]

Symmetric \(K\) implies \(\mathcal A^T\mathcal J+\mathcal J\mathcal A=0\), and the exact flow satisfies \(M^T\mathcal J M=\mathcal J\). Its multipliers occur in reciprocal pairs. Real matrices also supply complex conjugate partners.

For a 4×4 symplectic matrix, write

\[ \det(\lambda I-M)=\lambda^4-a\lambda^3+b\lambda^2-a\lambda+1, \qquad a=\operatorname{tr}M, \quad b=\frac{a^2-\operatorname{tr}(M^2)}{2}. \]

Dividing by \(\lambda^2\) and setting \(\mu=\lambda+\lambda^{-1}\) reduces the quartic to

\[ \mu^2-a\mu+b-2=0. \]

The two roots describe the two reciprocal pairs. The continuum condition is \(\mu_j=2\cos(2\pi nq)\). A real \(\mu_j\in[-2,2]\) gives a unit-circle pair. A real value outside this interval gives a real reciprocal pair; complex \(\mu_j\) gives a complex quartet.

The coupled analysis export gives two folded exponents with \(0\leq\Re\nu_j\leq1/2\). Folding removes integer band indices. Continuum curves use separate IDs for contiguous frequency-rank segments. Equal ranks connect on consecutive surfaces, and the lines can exchange polarization at crossings. These IDs are not physical poloidal mode numbers or lifted Floquet band indices. See rank grouping for the connection rule and treatment of missing points.

Stability diagram

The browser and analysis export use \((A,B)=(a,b)\), with \(A=\operatorname{tr}M\). The characteristic equation is

\[ \lambda^4-A\lambda^3+B\lambda^2-A\lambda+1=0. \]

The boundaries are \(B=\pm2A-2\) for unit multipliers and \(B=A^2/4+2\) for coincident reciprocal traces. The open elliptic region is

\[ |A|<4,\qquad 2|A|-2<B<A^2/4+2. \]

There, two distinct multiplier pairs lie on the unit circle. Boundaries can contain defective matrices, so the shading does not certify bounded solutions at a degeneracy. For more on the seven regions, see Appendix B.2 of this UPC thesis. The scalar matrix has one reciprocal pair. The browser plots its trace against frequency alongside the exponents. Its characteristic equation is \(\lambda^2-(\operatorname{tr}M)\lambda+1=0\). The open interval \(|\operatorname{tr}M|<2\) has unit-circle multipliers; \(\operatorname{tr}M=\pm2\) marks a band edge.

The browser uses seven colors for the open coupled regions: cream for two elliptic pairs; green for one elliptic pair and one positive real pair; red for one elliptic pair and one negative real pair; pink or cyan for two positive or two negative real pairs; yellow for real pairs of opposite sign; and blue for a complex quartet. Grey marks unit edges and repeated reciprocal traces. The classifier treats values within \(128\epsilon\max(1,|\mu|)\) of a unit edge as boundary values, where \(\epsilon\) is double precision machine epsilon. It also tests the separation of the two traces; the Broucke background applies a corresponding scaled discriminant test. These are Floquet multiplier classes for evolution in the poloidal angle, not a test for temporal plasma stability.

Full scalar exponent

The reciprocal multiplier pair determines \(\nu\) only up to an integer and a sign. FACS chooses the branch whose real part starts at zero at the lowest band edge and rises by \(1/2\) across each stable band. It recovers this band index independently at each trial frequency, using Sturm oscillation and the interlacing of Dirichlet and periodic spectra.

Write the scalar equation as

\[ -s''+V(\theta)s=E r(\theta)s, \qquad V=-a_0,\quad r=a_A,\quad E=w^2,\quad L=2\pi. \]

The argument assumes real, continuous, \(L\)-periodic coefficients and \(r>0\). Let \(s(0;E)=0\), \(s'(0;E)=1\), and let \(z(E)\) count its zeros in \((0,L)\). \(s\) is the second column's position component in the scalar fundamental matrix. Its zeros are simple: \(s=s'=0\) would force the whole solution to vanish. Each zero therefore changes sign. The solution need not be an odd function unless the coefficients have the required reflection symmetry.

Why the zero count fixes the band

Let \(D_1<D_2<\cdots\) be the eigenvalues with Dirichlet conditions at both ends, so \(s(L;D_j)=0\). The Sturm oscillation theorem gives

\[ z(E)=\#\{j\geq1:D_j<E\}. \]

The strict inequality follows from excluding the endpoint \(L\) from the zero count. The theorem applies at every trial \(E\), including values that are not eigenvalues. See Simon, Sturm Oscillation and Comparison Theorems, Theorem 3.4 for unit weight and Teschl, Ordinary Differential Equations and Dynamical Systems, Theorem 5.18, pp. 169–170 for the weighted Sturm–Liouville form used here.

Order the periodic and antiperiodic band edges as

\[ E_0<E_1\leq E_2<E_3\leq E_4<\cdots. \]

The bands are \([E_{2j},E_{2j+1}]\) for \(j\geq0\); the finite gap closures are \([E_{2j-1},E_{2j}]\) for \(j\geq1\). Periodic spectral theory gives

\[ E_{2j-1}\leq D_j\leq E_{2j}. \]

Thus, inside the open band \((E_{2j},E_{2j+1})\), exactly \(j\) Dirichlet eigenvalues lie below \(E\): \(z=j\). In FACS's branch convention, this band has \(j/2<\nu<(j+1)/2\). The zero count therefore selects the half-integer interval needed to recover the full exponent. The ordering and interlacing follow from Teschl, Theorems 5.33 and 5.36, pp. 179–182.

Reconstruction in a stable band

Set \(t=\operatorname{tr}M/2\). Since \(\det M=1\), its characteristic equation gives \(\cos(2\pi\nu)=t\). For \(|t|\leq1\), define the folded phase \(\alpha=\arccos(t)/(2\pi)\in[0,1/2]\). Selecting the interval fixed by \(z\) gives the implemented expression

\[ \nu=\frac z2+ \begin{cases} \alpha,&z\text{ even},\\ 1/2-\alpha,&z\text{ odd}. \end{cases} \]

For example, the same folded phase \(\alpha=0.2\) gives \(\nu=3.2\) when \(z=6\) and \(\nu=3.8\) when \(z=7\). The trace supplies the phase within a band; the zero count supplies its index and the direction of unfolding.

Reconstruction in a gap and at its edges

Inside the \(j\)-th open gap, \(t\) has sign \((-1)^j\). The zero count is \(j-1\) when \(E\leq D_j\) and \(j\) when \(E>D_j\), so it can change inside one gap. Both parts must retain \(\Re\nu=j/2\). FACS selects

\[ g=\begin{cases} z,&(-1)^z=\operatorname{sgn}(t),\\ z+1,&(-1)^z\ne\operatorname{sgn}(t), \end{cases} \qquad \nu=\frac g2-i\operatorname{sgn}(t) \frac{\operatorname{acosh}(|t|)}{2\pi}. \]

This rule gives \(g=j\) on either side of \(D_j\), including at \(D_j\) with the endpoint excluded. Below the lowest band, \(z=g=0\) and \(t>1\). The signed imaginary part follows the representative chosen by FloquetMatrix::exponent; the reciprocal partner has exponent \(-\nu\).

At \(t=\pm1\), FACS uses the stable expression. Either adjacent zero count gives the same edge phase \(j/2\), so an endpoint zero does not change that phase. If a gap closes, \(E_{2j-1}=D_j=E_{2j}\), and the same expression continues through the common edge.

Band edges and Dirichlet eigenvalues

These boundary conditions select different spectra:

Condition Boundary values over \(L=2\pi\) Matrix test
Real \(\nu=k\), \(k\in\mathbb Z\) \(f(L)=f(0)\), \(f'(L)=f'(0)\) \(t=1\)
Real \(\nu=k+1/2\) \(f(L)=-f(0)\), \(f'(L)=-f'(0)\) \(t=-1\)
Dirichlet eigenvalue \(f(0)=f(L)=0\) \(M_{12}=s(L;E)=0\)

The first two are the periodic and antiperiodic band edges. They follow from \(\lambda=e^{2\pi i\nu}=\pm1\); see the Hill characteristic equation, DLMF §28.29(ii), whose period is \(\pi\) rather than \(2\pi\).

A trace value \(t=\pm1\) does not require \(M_{12}=0\). Conversely, at a Dirichlet eigenvalue, \(M\) is triangular and \(\det M=1\) gives real reciprocal multipliers. Hence \(|t|\geq1\): a Dirichlet eigenvalue lies in a gap closure. It can coincide with a band edge, but need not. Inside an open gap, \(\Re\nu=j/2\) throughout while \(\Im\nu\ne0\); the real part alone cannot locate \(D_j\).

Numerical zero count

FloquetMatrix approximates \(z\) by counting sign changes after each angular drift. It skips exact-zero samples, counting an interior crossing once and excluding an exact final zero. Roundoff can shift an endpoint crossing, and a coarse angular grid can miss crossings. The continuous theorem does not certify this sampled count; check the index and frequency as the angular grid is refined. Changing the frequency scan alone does not refine the angular zero count.

test_floquet_index and test_gap_index check analytic discrete oscillator phases at frequencies evaluated out of order, exact grid-aligned zeros, closed gaps, and gap indices under shifts of the angular origin. These checks exercise the per-frequency reconstruction without relying on a previous frequency's index.

The browser folds the scalar plot into \(-1/2\leq\Re\nu\leq1/2\); the analysis download keeps the full exponent above. Both retain signed imaginary parts. The coupled export keeps folded exponents and does not use this scalar zero-count construction.

Small phases and the Cayley transform

Subtracting \(2\) from a reciprocal trace near a periodic edge can lose a small phase. The spectral calculation first forms shifted invariants. If both pairs lie near the same edge \(s=\pm1\), it can use the Hamiltonian Cayley transform

\[ C=(M-sI)(M+sI)^{-1}. \]

Its eigenvalues occur as \(\pm\zeta_1,\pm\zeta_2\). Their squares satisfy

\[ t^2-\alpha t+\beta=0, \qquad \alpha=\tfrac12\operatorname{tr}(C^2), \quad \beta=\det C, \qquad \mu-2s=\frac{4st}{1-t}. \]

These expressions preserve small quantities before adding the edge shift. Near a pole of \((M+sI)^{-1}\), FACS falls back to the shifted reciprocal polynomial. This transform computes spectral invariants; the root finder below uses a different symmetric matrix.

Exact periodic and antiperiodic roots

If \(nq\) is an integer, the boundary multiplier is \(s=1\). If it is a half-integer, it is \(s=-1\). Near these targets a reciprocal trace often touches \(2s\) quadratically. Two close roots can therefore have traces that round to the same value.

Define

\[ A=M-sI,\qquad B=\mathcal J(M+sI),\qquad D_t=B+tA,\qquad H_t=AD_t^{-1}. \]

For symplectic \(M\), \(A^TB=B^TA\), hence \(H_t\) is real symmetric whenever \(D_t\) is invertible. Its signed eigenvalues expose crossings that the reciprocal traces can hide. The parameter \(t\) selects a chart; changing it avoids singular denominators, including an opposite unit multiplier elsewhere in the spectrum. Chart changes are a numerical device, not a change to the physical boundary condition. The use of symmetric coordinate charts for symplectic spectral problems is also discussed by Beck and Malham.

If \(H_t\mathbf u=0\), recover

\[ \mathbf v=D_t^{-1}\mathbf u,\qquad A\mathbf v=0. \]

The number of independent kernel vectors is the geometric multiplicity. A defective unit multiplier can supply one vector; a closed wave gap can supply two; coincident closed gaps can supply four. Algebraic multiplicity alone does not determine the number of independent modes.

The code checks the recovered vectors against the original \(M-sI\). It takes this path only at exact edge phases. Nearby nonzero phases keep their own complex boundary multiplier.

Alfvénicity

FACS offers three definitions using the same Floquet eigenvector and the existing Boozer θ coordinate.

Local effective energy

The default measure uses CSSC's equally split channel energies at the starting angle. For \(\nu=\arg\lambda/(2\pi)\), define

\[ E_i(0)=\nu\Im\bigl(f_i(0)^*p_i(0)\bigr),\qquad \alpha_{\rm local}=\frac{|E_A(0)|}{|E_A(0)|+|E_S(0)|}. \]

This needs only the recovered eigenvector. Divide the absolute energy sum by its squared state norm at θ=0 for the zero-energy check. A value at most \(10^{-14}\) uses \(\alpha=0.5\); valid unstable modes use the same convention.

Period-averaged effective energy

Enable the third definition with --period-averaged-alfvenicity. For the propagated state \(\mathbf v(\theta)=(f_A,f_S,p_A,p_S)^T\), define

\[ \nu=\frac{\arg\lambda}{2\pi},\qquad E_i(\theta)=\nu\Im\bigl(f_i(\theta)^*p_i(\theta)\bigr),\qquad \langle E_i\rangle=\frac{1}{2\pi}\int_0^{2\pi}E_i(\theta)\,d\theta, \qquad \alpha=\frac{|\langle E_A\rangle|} {|\langle E_A\rangle|+|\langle E_S\rangle|}. \]

The signed energy is averaged before taking its absolute value. Both channels use uniform Boozer θ measure. This gives \(\alpha=1\) for a pure Alfvénic wave and \(\alpha=0\) for a pure acoustic wave with nonzero energy. The result does not depend on the starting angle for the same stable mode.

FACS normalizes the zero-energy check by \(N=\langle|f_A|^2+|f_S|^2+|p_A|^2+|p_S|^2\rangle\). When \((|\langle E_A\rangle|+|\langle E_S\rangle|)/N\leq10^{-14}\), it returns \(\alpha=0.5\). A zero state uses the same convention. Real periodic and antiperiodic vectors have zero effective energy. For a nonunit multiplier, conservation of total symplectic flux implies \(\Im(f_A^*p_A+f_S^*p_S)=0\), so the two absolute channel energies agree; these unstable modes also use \(0.5\). That value does not establish equal physical mixing.

Failed vector recovery or unresolved propagation gives nan. At a repeated eigenvalue, individual colors can depend on the chosen basis within its eigenspace. Binary files store the local and averaged formulas separately in /run/cssc_definition and /run/average_definition.

Period-integrated amplitude

This measure follows Falessi's amplitude fraction over a full poloidal period on one flux surface. All three definitions refer to the same radial position; the period integral does not extend across flux surfaces. Enable it with --period-integrated-alfvenicity. Its quadrature shares propagation with averaged energy when both are enabled. Both period measures are disabled by default. Let \(s=d\eta/d\theta=J_\theta/J_\eta\). Falessi's transformations give \(s\propto g^{-2}\) and \(g_i\propto\sqrt{s}f_i\), where \(g=|\nabla\psi|\) and the omitted factors are constant on each surface. The η-space amplitude norm therefore becomes a weighted θ-space norm:

\[ \alpha_{\mathrm{Falessi}}= \frac{\displaystyle\int_0^{2\pi}W(\theta)|f_A(\theta)|^2\,d\theta} {\displaystyle\int_0^{2\pi}W(\theta)\left(|f_A(\theta)|^2+ |f_S(\theta)|^2\right)\,d\theta}, \qquad W=s^2\propto g^{-4}. \]

One Jacobian factor comes from the integration measure, the other from the field normalization. See Falessi 2019, Eqs. (8)–(12) and Falessi 2020, Eq. (2.9). FACS keeps the solver and equilibrium coefficients in θ, samples the geometry kernel once per surface, and weights the saved-grid quadrature.

At the axis it uses the finite shape \(G=g/\sqrt{2\psi}\). The common flux factor cancels. Interpolation of \(\log G\), with the Miller-axis limit and matching value/slope at the first resolved surface, keeps \(G\) positive. Weights \((G_{\min}/G)^4\) avoid reciprocal overflow without changing the ratio.

For a unit-circle multiplier, the squared field amplitudes are periodic. The fraction is unchanged by the eigenvector's scale or complex phase and by the choice of angular origin. It is 1 for a pure Alfvénic field and 0 for a pure acoustic field, including real periodic and antiperiodic modes. FACS propagates the selected complex vectors directly on the cached coefficient grid. It reports nan for unstable multipliers, zero or nonfinite norms, or unresolved propagation. Repeated eigenspaces have the same basis dependence as the CSSC measure.