Anisotropy and shaping effects on the stability boundaries of infernal ideal MHD modes in tokamak hybrid plasmas

Anisotropy and some limiting toroidal flow effects on the stability of nearly resonant ideal magnetohydrodynamic modes in hybrid shaped tokamak plasmas are investigated within the ideal MHD infernal mode framework. Such effects are found to alter the plasma magnetic well/hill, which can be interpreted as imparing the average curvature, and the strength of mode coupling. In line with previous results, it is found that better stability properties are achieved through deepening the magnetic well by special cases of uniform toroidal flow and parallel plasma anisotropy. Plasma shaping provides additional modifications to the magnetic well depth, whose global stabilising or destabilising effect depends on the mutual interplay of elongation, triangularity and toroidicity. Further stabilisation is achieved by weakening the mode drive in vertically elongated plasmas.


Introduction
The toroidally symmetric tokamak configuration is one of the most promising reactor types for achieving controlled thermonuclear fusion. An important figure of merit in fusion research is β, the ratio of kinetic over magnetic pressure, which is a measure of the plasma performance. Much effort has been aimed indeed at maximising this quantity. High plasma pressures are achieved by several heating schemes such as radio frequency heating or neutral beam injection (NBI). While both may produce parallel and perpendicular pressure anisotropy Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. [1,2], NBI induces strong toroidal flows [3]. Large β values are typical of spherical tokamaks (STs) (devices with an aspect ratio, i.e. the ratio of major over minor radii of the toroidal chamber, close to unity) which also exhibit strong natural shaping [4]. It has also been found that centrifugal effects have a significant impact on equilibrium and stability in STs [5]. In such devices, scenarios at high β feature optimised current profiles in which the core magnetic shear, a measure of the inclination of the magnetic field lines with respect to one another, is either reversed (advanced scenario), or small over a wide region (hybrid scenario) with the safety factor (the pitch of the magnetic field lines denoted by q) always above unity [6].
Under these circumstances, long-lived saturated magnetohydrodynamic (MHD) activity, usually with low n numbers, often occur [6,7]. Indeed, scenarios with broad current and peaked pressure profiles are prone to develop infernal type instabilities [8][9][10], driven when the safety factor is close to a rational over a wide region. These instabilities exhibit a dominant mode of helicity m/n which is nearly resonating with a low q rational over a broad region. We refer to such modes as nearly-resonant, since the exact resonance of the mode with q in this broad region is not a necessary requirement for the instability to develop. We point out that spherical tokamaks are more susceptible to these ideal internal modes [6] because of the tighter aspect ratio and higher β which yield stronger toroidicity induced couplings that enhances the infernal driving mechanism. Nevertheless, such kinds of instabilities have been numerically and experimentally reported in standard tokamaks such as TFTR and DIII-D [7,[11][12][13][14]. We additionally note that reversed shear configurations with internal transport barriers (ITBs) can be unstable against pressure driven modes with infernal-like features [15].
As discussed in references [7,[11][12][13][14]16], such instabilities are usually associated with β limits (both soft or hard). Moreover, as these modes tend to saturate in amplitude (often preserving the linear mode structure [6,17]), fast ion losses can be enhanced [6]. Since preventing the access to the linear phase avoids the development of a saturated non-linear state [17][18][19], understanding the linear stability properties of such perturbations is of crucial interest.
The impact of plasma shaping in isotropic static plasmas has been extensively analysed [20][21][22][23][24][25][26][27][28]. A vast literature also exists on the modifications to equilibrium and stability due to toroidal flows [29][30][31][32] and pressure anisotropy (see e.g. references [33][34][35][36][37][38][39][40][41]). Although these two effects were generally treated separately, more recent analytical and numerical investigations provided a unified framework [2,[42][43][44][45][46][47][48][49]. The reader interested in the experimental impact of plasma anisotropy on equilibrium and stability is referred to references [41,45,48] and references therein. The current paper concentrates specifically on the stability analysis of ideal infernal modes in shaped tokamaks characterised by strong degrees of pressure anisotropy and toroidal flows. The problem of plasma anisotropy is tackled within the guiding centre plasma model [43,50], in which the macroscopic plasma motion across the magnetic field is fluid-like (i.e. identical to MHD), while the dynamics parallel to the magnetic field is described by a collisionless kinetic equation. Although the main aim is to describe the dynamics of compact configurations, a large aspect ratio expansion may still be employed as long as both the equilibrium and stability analysis is carried out sufficiently near to the magnetic axis [51]. Hence, the relevance of the analysis presented in this work can be naturally extended to standard tokamaks as well.
In analogy with previous results reported in the literature [26,31,39], it is found that plasma shaping (elongation and triangularity), anisotropy and equilibrium flows modify the magnetic well (or hill). Contributions due to a flat toroidal rotation with a monotonically decreasing pressure profile tend to increase the magnetic well implying stabilisation. It is noted that combined guiding centre-MHD model employed here is essentially isothermal, and as such differs from the way in which flows are known to modify MHD instabilities (see e.g. [52]). Pressure anisotropy, beyond trivially affecting the averaged total pressure, has a (de)stabilising effect when [37,39,40,45]. Vertical elongation decreases the magnetic well, whose depth can be restored by allowing for corrections due to positive triangularity. The same effect is achieved in negative triangularity plasmas with an oblate cross section. Finally, elongation is found to alter the strength of the coupling between neighbouring modes, improving the global stability in vertically elongated plasmas.
The paper is organised as follows. In section 2, the anisotropic single fluid MHD model is summarised and subsequently employed for the derivation of the equilibrium equations for non-circular axisymmetric toroidal equilibria, which is outlined in section 3. Section 4 is devoted to the description of the perturbed dynamics within the infernal framework. The governing equations for the mutually coupled harmonics are derived, distinguishing between regions of high and low magnetic shear. In sections 5 and 6, by solving for the perturbed system previously derived, stability boundaries are identified and analysed by exploring several plasma parameters (e.g. degree of anisotropy, shaping) for monotonic and reversed q configurations. A discussion on the features of the physical model and the results with their implications on present and future experiments is given in sections 7 and 8 respectively. Finally, appendix A presents a brief analysis for the allowance for resistive effects on the satellite harmonics.

The anisotropic MHD model
Under the assumption of strong heating, we regard the plasma as ideally conducting with vanishing resistivity. Thus, the plasma dynamics are described by the single fluid anisotropic ideal MHD equations [43]: where ρ is the mass density, u the plasma fluid velocity, B the magnetic field with |B| = B, J = ∇ × B and P = p ⊥ I + (p || − p ⊥ )bb with I the diagonal unit tensor and b = B/B. The parallel and perpendicular pressure are defined as moment averages in guiding centre coordinates as [43,44,53] where f s is the particle distribution function of the species s of mass m s (s = i, e for ions and electrons respectively), v is the microscopic particle velocity (with parallel and perpendicular projections wrt the magnetic field indicated by v || and v ⊥ respectively), and the sum is extended over all species. Hereafter for a generic vector quantity A we indicate A = |A|.
For the computation of p ⊥,|| knowledge of the distribution function for each plasma species is required. In guiding centre theory, this satisfies the drift-kinetic equation [43,44] with is the particle magnetic moment, e s being the particle charge and the parallel electric field given by E || = −b · ∇Φ. Note that corrections due to collisions have been dropped. We point out that these results are unaffected by gauge transformations of the form Φ→Φ+h(r). Although such a function, namely h, does not play a role in the equilibrium calculations, it might have an effect on perturbed quantities. Its form will then be determined in section 4. For a plasma with an equilibrium flow U = u 0 (the subscript 0 indicates the corresponding equilibrium quantity), we introduce the variable ϵ s = 1 [44] with U || = b 0 · U, so that the parallel and perpendicular pressure are given by Finally, the density of each species is and ρ = ∑ s m s n s ≈ m i n i with n i = Z i n e (quasineutrality for single ion species). Hereafter we take Z i = 1. The framework in which the following analysis is performed, is completely determined by equations (1)-(6).

Equilibrium
We analyse a tokamak configuration of major and minor radii R 0 and a respectively, with non-circular shifted toroidal surfaces. The plasma is assumed surrounded by a perfectly conducting metallic wall. Let us introduce the coordinate system (r, θ, ϕ) where r is a flux labelling variable with the dimensions of a length, while θ and ϕ are the poloidal and toroidal angles. The covariant and contravariant components of the vector A are indicated by A i and A i respectively. For sake of clarity, hereafter perturbed quantities will be denoted by a tilde and we will drop the subscript 0 for the equilibrium ones. We use the notation (·) (0) for the leading order of´2 π 0 (·)dθ/2π ≡ ⟨·⟩. The equilibrium magnetic field is written as B = B ϕ ∇ϕ − ∇ψ × ∇ϕ (the magnetic field strength at the magnetic axis is denoted by B 0 ) with the safety factor function and magnetic shear defined by q = ⟨B ϕ /B θ ⟩ andŝ = rd ln q/dr.
where √ g is the Jacobian associated with the coordinate system (r, θ, ϕ). We assume thatŝ ≈ 0 for r 1 < r < r 2 , whileŝ > 0 for 0 < r < r 1 and r 2 < r < a. From (4), at equilibrium f s = f s (r, µ, ϵ s ) [35,43,44]. Noting the necessary independence of f s on θ, we choose a 'modified' bi-Maxwellian equilibrium distribution function with equal temperatures for both particle species (i.e. ions and electrons) [37,43] Note that n s is allowed to depend upon θ also. We shall point out that, depending on the physics that is analysed, other choices for the equilibrium distribution function are possible [1,45]. The distribution function above allows for analytically tractable solutions to the equilibrium and stability problem while also accounting for the features of anisotropy (modification of the magnetic well, average curvature, etc). It is noted that the distribution is a limiting form of a model widely used for the anisotropic features of ICRH (in references [54,55] with B c chosen specifically as B max ≡ B 0 (1 + r/R 0 )). By taking the parallel gradient of equations (5) and (6) and imposing quasineutrality ∑ s e s n s = 0, we have [39,43,44] For an equilibrium velocity of the form U = R 2 Ω(r)∇ϕ, the system above is solved by [43] ρ =ρ(r) where T || = T || (r) with p ⊥,|| = 2T ⊥,|| ρ/m i and M 2 = ρR 2 0 Ω 2 /(2p || ). Here the function Θ(r) measures the degree of anisotropy, i.e. Θ(r) = B(T ⊥ − T || )/T ⊥ . For sake of simplicity we takeρ, Ω and Θ constant [31,43] and normalise B 0 = 1.
. We employ the large aspect ratio approximation (ε = a/R 0 ≪ 1) which has been proven, via comparison with codes, to give reliable, at least qualitatively, results also for compact configurations [17,51] providing that the analysis is performed sufficiently close to the magnetic axis. Because the analysis will then focus on radially extended perturbations, we extend the local equilibrium model presented in reference [56] by allowing elongation and triangularity corrections to be dependent upon the radial variable. By taking the covariant radial projection of (3) with ∂ t → 0 and assuming p ⊥,|| ∼ ε 2 with a sufficiently small magnetic shear [20], a tokamak shaped equilibrium is solved to leading order by Here κ~1 and δ~ε are real numbers describing plasma elongation and triangularity respectively, with the Shafranov shift ∆~εa fulfilling ( ′ ≡ d/dr) However for T ⊥ /T || ∼ ε −1 additional harmonics in p ||,⊥ with respect to θ are generated [41,57]. In regions withŝ ∼ 1, where it is not necessary to resolve the equilibrium to such an order, we take R = R 0 +rcosθ and Z = κrsinθ. We point out that for describing equilibria which have higher β values and extremely pronounced shaping, different techniques must be employed. Nevertheless, the analysis presented above proves to be adequate in dealing with most of the experimentally relevant configurations. We transform θ → ϑ, where ϑ is the rectified angle for which the field lines are straight [58] and the ratio B ϕ /B ϑ is a function of r only. It is easily verified Hence, by means of (7), the metric tensor elements g ij = ∂ i R∂ j R + ∂ i Z∂ j Z in the coordinate system (r, ϑ, ϕ) can be straightforwardly derived to order ε. This is the required accuracy needed for the stability calculations outlined in the next section.

Perturbed dynamics
In order to investigate the stability of the system, we employ the energy method [44,59]. Introducing the Lagrangian displacement η [60], according to reference [44] the momentum equation (3) is written as [50,61] and references therein). The equation above can be cast in the form [60] ρ( (9) where it can be easily shown that the last term on the rhs is self-adjoint. It follows that a necessary and sufficient criterion for stability can be derived [60,62].
where γ r and ω are real and c.c. stands for complex conjugate. Thus, we dot (9) with η and divide it by e 2γrt , with ω = nΩ where Ω is constant. Integrating the resulting equation over the plasma volume and averaging over an oscillation period 2π/ω, yields an equation for γ 2 r showing that this quantity is real, which therefore indicates that unstable modes rotate with frequency nΩ [31]. It follows that the stability boundaries are identified by γ r = 0.
Having established the mode frequency characteristics, we shall now proceed with the derivation of the stability equations. Assuming that perturbed quantities have a time dependence of the form exp(γt) and vary along the poloidal and toroidal angles proportionally to exp(iℓϑ − inϕ), we introduce the perturbed fluid displacement ξ =ũ/(γ − inΩ). Since we assume Ω constant, it follows that γ − iΩ is constant as well, and hence is not affected by the differential operators. Let us denote (·) ℓ =´2 π 0 (·)e −iℓϑ+inϕ dϑdϕ/4π 2 . Within the infernal framework, we impose a wide region of flat q for r 1 < r < r 2 (we shall specify r 1 later) which nearly resonates with a dominant mode of helicity m/n accompanied by its neighbouring sidebands with poloidal mode numbers m ± 1. Hereafter, m will always denote the poloidal mode number of the dominant harmonic. Because of the coupling induced by elongation, a larger number of harmonics, namely m ± 2, m ± 3, … all of order ε, should be in principle taken into account [24,27]. However, it will be shown later that under appropriate conditions, retaining all these harmonics is not necessary and the system can be described by linear coupling of three modes. Nevertheless, for illustrative purposes, we formally allow for higher order harmonics. We write q = m/n + δq and we adopt the ordering m~n~q~1 with δq~ε, ξ m±ℓ ∼ εξ m ℓ = 1, 2, . . ., and γ~Ω~εω A with ω A = 1/ √ R 0 ρ| r=0 . Therefore, the contravariant radial and poloidal projections of the perturbed (2) yield respectively at leading order ( Hereafter we indicate with √ g the Jacobian associated with the coordinate system (r, ϑ, ϕ).
Since Ω is constant and considering √ gB ϕ small enough, which is verified a posteriori, from the contravariant ϕ projection of (2) it follows that ξ ϕ m ≈ 0. Note that although sideband harmonics have ε times smaller fluid displacements compared to the dominant mode, their associated magnetic perturbations are of the same order.
In the covariant basis identified by vectors e r,ϑ,ϕ , we shall note that . By taking the covariant ϕ projection of the linearised equation (3), it can be shown that at leading order An expression for the perturbed distribution function is required in order to obtain the fluctuation of the mass density and the parallel/perpendicular pressure. We turn to (4) and we change variables, replacing the variablev || with ε s (this turns out to be more convenient when working in toroidal geometry [44,53]). By employing the expression for the perturbed velocity given above, after some algebra it can be shown that For the calculation of the stability boundaries, we letγ → 0 so that terms involving u ⋆ ∝γξ vanish. Let us first note that in choosing the gauge function h defined in section 2 to be vanishing, we ensure that ⟨Φ⟩ = 0. The term proportional toẼ s in equation (11) produces small corrections top ||,⊥ and n s , hence it can be safely neglected. Thus, the perturbed distribution function can be written as [39,40,53] where we dropped trapped particles contributions [53]. Note that neglecting compressibility effects is allowed only at marginal stability. By using the equation above for the evaluation ofp ||,⊥ andρ (obtained at leading order from (5)-(6) with the substitution f s →f s ) we get [53] where small corrections due toB have been dropped by virtue of (10). We recall thatρ and Θ are constant and so is ρ (0) . Note thatp ||,⊥ satisfies to leading order the parallel projection of (3), i.e.
All the expressions for the perturbed quantities entering the linearised equations (1)-(3) have been obtained. We now apply the operator [53,63]. By taking the m and m ± 1 moments of the resulting expression, three equations for the corresponding Fourier modes are obtained. Employing the usual techniques for infernal modes [10], we distinguish between low and high shear regions.

Low shear region
Let us first introduce the elongation factor, or ellipticity, e = (κ 2 − 1)/(κ 2 + 1). It is worth noting that with an elongation of order unity, a modem couples to all harmonicsm ± 2ℓ (ℓ = 1, 2, . . .) due to elongation induced metric oscillations. An analytic treatment which retains the whole spectrum is clearly hopeless. In order to make the algebra analytically tractable, we follow reference [26] in which a double expansion, first in ε and then independently to first order in e, is performed (such an approximation proves to hold for e ≲ 1 2 [26] or κ ≲ 2). It can be shown that harmonics with ℓ ≥ (≤)m + (−)2 can be neglected, as they enter the analysis to second order in e.
Focussing the analysis in the low shear region, we note that within the above mentioned approximations, shaping and flow effects are contained in the field line bending and perturbed toroidal field contributions. The latter, along with the perturbed pressure tensor, generates additional anisotropy corrections. After some algebraic manipulations, it is possible to show that The field line bending term contains coupling with the ℓ ± 2 sidebands due to the elongation induced metric tensor oscillations. It can be shown that at leading order the equations for the sideband harmonics are [24] (for sake of clarity we drop the superscript r in denoting the radial fluid displacement, viz.
These two equations can be integrated yielding to leading order in e where L ± are constants, which in general depend on e, to be determined later through matching with the sheared region solutions [10]. If the pressure profile has a step atr so that α ∝ δ(r −r), expanding ξ m±1 and L ± in e and integrating acrossr shows that the constants L ± are the same on either side ofr [64] (this will turn to be useful in the next sections). Let us introduce the Newcomb's operator [65] Elongation driven coupling can be neglected in the analysis of the mode m as it enters the equations proportionally to e 2 . Hence, the mth component of the perturbed field line bending term can be written as i( . Thus, employing standard techniques and taking the limitγ → 0, by means of (10), (12), (13) and (14) after rather lengthy algebra we obtain where k || = 1 − n m q and the function w ′ associated with the plasma magnetic well is given by [39] where it is understood that T ||,⊥ is taken on the magnetic axis. Note that, regardless of either plasma shaping or pressure anisotropy, the term associated with plasma rotation is positive for monotonically decreasing pressure profiles. This indicates a deepening of the magnetic well, and therefore a stabilising effect [31]. The dynamics in the low shear region is completely determined by equations (15) and (16). The derivation of the harmonics governing equations in the high shear region is the aim of the next subsection.

Sheared region
In the regions of large magnetic shear, i.e. for 0 < r < r 1 and r 2 < r < a, the parallel wave vector associated with the dominant mth mode is large enough so that inertial (viz. the lhs of (3)) and coupling terms can be neglected. We recall that m denotes always the mode number of the main harmonic. Thus, to leading order (i.e. to e 2 ) the fluid disturbance of helicity m/n obeys the Newcomb's equation [10] L m (ξ m ) = 0.
Multiplying the equation above by ξ m and integrating from r 2 to a, yields ξ m = 0. In the region 0 < r < r 1 , the same procedure gives ξ m = 0 for m > 1 and ξ m = const for m = 1. Thus, since the main harmonic vanishes for r 2 < r < a it follows that in this region the sidebands behave according to Note that elongation driven coupling between satellite harmonics of the type m ± 1 → m ∓ 1, which are of the same order, are allowed regardless of the weakness (or strength) of the magnetic shear. For monotonic q profiles, it is sufficient for to require ξ m (r 2 ) = 0 and smooth matching of the sidebands across r 2 for any m ≥ 1. Let us consider inverted safety factor profiles with r 1 ̸ = 0. Focussing on the internal high shear region 0 < r < r 1 we distinguish between m > 1 and m = 1 dominant modes. For m > 1, the same logic adopted above implies that the satellite harmonics fulfil (19) in this region also. Thus, the boundary conditions at r 1 are ξ m (r 1 ) = 0 and smooth sidebands at this point. The analysis of the m = 1 mode is more complicated. Since ξ m does not vanish for 0 < r < r 1 , additional terms must be retained in the sideband equations. Moreover, a more careful computation of (18) (up to order ε 2 even in low shear circular plasmas [44,53,66,67]) is required to obtain the correct boundary condition (viz. ξ ′ m (r 1 )) at r 1 [67]. We point out that infernal modes with m = 1 occur when q is very close to unity over a broad region. Usually, in inverted q configurations such a region is not particularly wide. This induces us to conjecture that the dynamics of the m = 1 mode with an inverted q profile are more kink-like than infernal-like, and, as such, are better described by computing δW in the region 0 < r < r 1 [68] and matching the solution across r 1 and r 2 allowing for second variations in q, i.e. q ′′ [10]. Nonetheless, we may argue that the m = 1 mode is not strictly relevant for sufficiently inverted q scenarios with the minimum of the safety factor well above unity [7,11,[69][70][71][72][73][74]. Hence, with a reversed magnetic shear we consider m > 1 dominant modes only, i.e. infernal modes with q min > 1.
The mode stability is determined by equations (16) and (19) with the boundary conditions given above. This will be analysed in the next section.

Monotonic q
Let us consider a broad region of weak magnetic shear extending from the magnetic axis to r 2 (i.e. we let r 1 → 0). We denote the value of q in this region with q m . For r 2 < r < a we take q = q m (r/r 2 ) 2 so that at leading order the flux surface averaged toroidal current density is vanishing. By imposing the mode m + 1 having a resonance within the plasma, the maximum allowed extension of the current channel is r 2 /a < √ m/(1 + m) with q m ≈m/n. Because of the presence of a perfectly conducting metallic wall at the plasma edge, we have ξ m,m±1 (a) = 0. As discussed in section 4.2, the appropriate boundary condition for ξ m at r 2 is ξ m (r 2 ) = 0 (we recall that this expression is exact to order e 2 ). We cast (19) in the form where N m±1 ∼ e is a linear functional. After setting L − = 0 for regularity of the lower sideband on the magnetic axis [75,76] (this will be proven also in the next section where a more general case is addressed), matching ξ m − 1 smoothly (to leading order in e) at r 2 yields ξ m − 1 ≈ 0. Hence, by joining ξ m + 1 across r 2 we have [10,75] where B + = r 2 ξ ′ m+1 (r 2 )/ξ m+1 (r 2 ) is obtained through solving L m±1 (ξ m±1 ) ≈ 0. It easily follows that where r 2 /r s = √ nq m /(1 + m) and d determines the behaviour of ξ m + 1 at r s . For an ideal mode, we choose d =−1 so that ξ m + 1 is finite at r s .
With a parabolic p (0) || andp, by taking (M 2 ) ′ ∝ r it is possible to find an exact solution of (16) [28,67,76]. The result, however, is rather convoluted. A great deal of simplification is achieved by approximating the plasma pressure within the shear-free region with a Heaviside step function [64,77], namely p (0) || ∝ H(r p − r) with 0 < r p < r 2 (this is shown in figure 1). Despite the crudeness of this approximation, all the important physical ingredients are retained. Due to the rotation being constant in r, it then follows that the Mach number M(r) is also distributed with a Heaviside step, so figure 1). The amplitude of the Heaviside step is determined by arguing that the volume averaged β = 2µ0   (15) and (16)) of section 5 with r 1 → 0. The smooth pressure profile has a parabolic dependence upon r.
(see figure 1). Thus r p = r 2 / √ 2 andᾱ = 2β(r 2 /a) 2 q 2 m /ε with ε = r p /R 0 . Finally, it is worth pointing out that within our model equations the ratio T ⊥ /T || can be varied independently of β, which is kept constant throughout the following analysis as well as the current channel width r 2 , by allowing variations in T || . We nevertheless point out that other constraints, e.g. on the cyclotron frequencies Ω s of the species s (related to the magnetic field strength) which have to fulfil γ/Ω s ≪ 1, may impose further limitations on how specific equilibrium quantities can be varied independently of each other. However, we argue that the amount of the independent variation of the physical parameters associated with the equilibrium configurations of interest is consistent with the model assumptions Note that, alternatively, we could have had chosen to work with a constant plasma current I p , or equivalently q(a), which corresponds to having β N ∝ βaB/I p constant (this may be more suitable for current tailoring studies). Thus, exploiting the δ-function behaviour of α and (M 2 ) ′ and assuming q m ≈m/n, integration of equation (16) across r p [64,77] yields (note that integrating from 0 to r 2 gives the same result) where A r = A(r + ) − A(r − ) having normalised ξ m (r p ) = 1.
Note that in references [27,28] where the m = 1 mode is studied and the quantity 1 − 1/q 2 vanishes, the Mercier term refers to the second term on the lhs in the equation above, i.e. the geometrical shaping contribution to the magnetic well. Nevertheless, as a matter of terminology, hereafter we call the Mercier contribution the term 1 − n 2 /m 2 . The constant Λ accounts for the sideband coupling, i.e. L + , so that employing (21) gives Finally, the solution of (16) that is continuous at r p and fulfilling the boundary conditions at r 2 is from which rξ ′ m rp = −2 m/[1 − (r p /r 2 ) 2 m ]. Hence, collating these results, equation (22) can be solved for the degree of anisotropy that yields marginal stability, i.e. we solve for marginal τ and hence marginal T || /T ⊥ for e.g. a given q m (a simplified expression for T || /T ⊥ in a weak anisotropic case can be obtained by taking τ ≈ 3 4 ( ). An example of the stability regions in the (q m , T || /T ⊥ ) plane is shown in figure 2.
Let us first note that, as pointed out in section 4.1, the last term in the lhs of (22) is always negative for monotonically decreasing pressure profiles, so that its effect is stabilising [31]. It is worth noting that modes with a sufficiently large m are stable since the field line bending contribution eventually dominates over the destabilising contribution due to the pressure driving terms. We shall also note that large m, i.e. short wavelength, perturbations of infernal type might be suppressed by higher order effects, such as e.g. diamagnetic corrections [78], which have not been included in our analysis. Finally, for given q m , the most unstable mode is expected to be the one with m and n coprime with q m ≈m/n (i.e. the lowest m resonating mode).
It is immediate to verify that, for a fixedᾱ and m > 1, smaller aspect ratio configurations are prone to exhibit enhanced stability by having a stronger stabilising contribution from the Mercier term (always having q m > 1). This, however, does not hold for modes with m/n = 1, for which such term vanishes. In agreement with previous studies, we find that with anisotropic temperatures, longitudinal injection (T || > T ⊥ ) improves stability, while transverse injection (T ⊥ > T || ) degrades it [36][37][38][39][40]45]. Assuming e > 0, we recover the elongation stabilising effect at high plasma pressure, with the stabilising influence of a positive plasma triangularity (this was previously noted in reference [28] for the standard MHD isotropic case T ⊥ = T || ). Pressure destabilisation at low β and sufficiently large vertical elongation is more easily achieved by the m = 1 mode because of the vanishing Mercier contribution (which is eventually dominant for high m modes). An example of the effect of plasma triangularity on the stability boundaries of a MASTlike configuration is shown in figure 3.
Note that for negative triangularity plasmas, oblate cross sections might be beneficial in keeping the product eδ positive, and therefore deepening the magnetic well [79]. However, one might have the side effect of enhancing the coupling with the sidebands, and therefore worsening the stability. Thus, a careful optimisation of this effect by considering the global stability against a broader spectrum of perturbations may be required. The case of inverted q profiles with a core localised high shear region is the aim of the analysis in the next section.

Inverted q
Let us allow a magnetic shear reversal in the region 0 < r < r 1 with r 1 < r 2 . We recall that in the following analysis dominant harmonics with m > 1 only are considered. This is indeed appropriate for describing experimental configurations with negative central shear which have the minimum of the safety factor well above unity [11,74]. Since plasma anisotropy and toroidal flow, and also triangularity, enter through a modification of the magnetic well, the conclusions drawn in the previous section on their effect on the stability boundaries hold in inverted q configurations as well. Elongation, on the other hand, affects the dynamics in a more subtle manner.
Following the same analysis presented in the previous section, in approximating the pressure within r 1 < r < r 2 with a step function (cf figure 1) and retaining the same β of the parabolic profile, we choose r p = √ (r 2 1 + r 2 2 )/2 andp(r − p ) =p (r 1 ). Therefore, we haveᾱ = 2β[(r 2 /a) 2 − (r 1 /a) 2 ]q 2 m /ε. As shown in section 4.2, the main harmonic is vanishing in the high shear regions. Therefore, maintaining the normalisation ξ m (r p ) = 1, the solution of (16) for r > r p is identical to (24), while for r < r p reads By repeating the logical steps employed in the previous section, we arrive at (22) where the constant Λ is now defined 1±m . In an inverted shear configuration the computation of the constants L ± requires a more careful treatment compared to the monotonic q case. The difficulty arises because of the coupling due to elongation which yields non-trivial expressions for the satellite harmonics. Let us start by expanding the sideband perturbations according to (20)). It is helpful to introduce the constant Writing L ± =L ± + eL ± , and following the standard procedure outlined in references [10,64], equation yields r ±m pL± 1±m = H ± (C ± ,B ± , 2 m) and H±(Ĉ±,B±,0) ] wherē C ± = rd ln X m±1 /dr| r1 ,B ± = rd ln X m±1 /dr| r2 ,Ĉ ± = rd ln Y m±1 /dr| r1 andB ± = rd ln Y m±1 /dr| r2 . It is worth stressing that, since the dependence in e of ξ m is missing, there is no need to expand this quantity in the elongation parameter. In order to compute X m±1 and Y m±1 , we turn to equation (19) which is more easily manipulated when it is expressed in terms of the perturbed poloidal fluxψ ℓ = −κr(1/q − n/ℓ)ξ ℓ . This also is expanded in e yieldingψ ℓ = Ψ ℓ + eχ ℓ with χ ℓ /Ψ ℓ ∼ 1. By linking X ℓ and Y ℓ toψ ℓ , it follows that Hence, to leading order equation (19) gives (ℓ = m ± 1) which is equivalent to L ℓ (X ℓ ) = 0. To the next order in e, we obtain an equation for χ m±1 Focussing on the region r 2 < r < a first, we employ the safety factor profile used in the previous section which is chosen such that the mode m + 1 is resonant at r s < a. By requiring the upper satellite harmonic to be finite at r s with an ideal metallic wall at the boundary, we have Ψ m−1 = a − [(r/a) m−1 − (r/a) −m+1 ] whereas Ψ m + 1 = 0 for r s < r < a and Ψ m+1 = a + [(r/r s ) m+1 − (r/r s ) −m−1 ] for r 2 < r < r s (the computation ofB ± is straightforward). Proceeding further, let us denote the particular solution of (26) associated with the m + 1 mode with g (which is proportional to a − ). By imposing χ m+1 (r s ) = 0, we eventually have In the region 0 < r < r 1 we use a safety factor of the form [53] With such a profile, the sideband equations can be expressed exactly in terms of hypergeometric functions [53,80]. Retaining the full solutions might be helpful when strongly reversed safety factor profiles with q 0 ≫ 1, i.e. advanced scenarios, are considered which, however, are beyond the scope of this work. The analysis of the problem tackled here, can be significantly simplified by assuming q 0 /q m not too large. Hence, within this approximation, we have Ψ m−1 ≈ A − (r/r 1 ) m−1 and X m−1 ∝ r m−2 . This yieldsC − = m − 2, and thereforeL − /(1 − m) = 0. By using (15), it follows that from which a − = 0 giving g = 0 andB + =B + . Plugging the function Ψ m − 1 determined above into (26) and neglecting the terms proportional to the magnetic shear, it is promptly verified that ∇ 2 ⋆ χ m+1 = 0 which yieldsĈ + =C + and, as an immediate consequence,L + = −3/2L + . It is worth pointing out that in the limit r 1 → 0 the expressions derived in the previous section are recovered, also for the m = 1 case. In order to have the driving term Λ fully determined, it only remains to compute the constantL − . Noticing that, depending on the value of q 0 the mode m + 1 might have a resonance atr s < r 1 , two cases are then examined in the next subsections.

Weak reversal (nq 0 < m + 1)
Here we employ the weakly reversed q approximation, viz. with y = z/(z − 1) and A = (m + 1 −m)/2. Since y < 1, this expression yields approximately Ψ m+1 ≈ A + (r/r 1 ) m+1 and X m+1 ∝ r m so thatC + = m. By employing equation (27) with the replacements r 2 → r 1 andB ± →C ± , it readily follows that Because of the absence of internal resonances, in (26) we drop effects linear with respect to the magnetic shear. Hence it is straightforward to show that where C is a constant. We point out that a similar expression could have been derived by using (15) with α → 0 and the obvious replacement L ± → A ± . Similarly to the derivation of (27), expanding equation (15) further in e yields By plugging the expression for χ m − 1 into the equation above and taking q 0 ≈n/m, we obtain It can be shown thatL − = 0 so that the constant Λ is given by (23). Therefore, the stability boundaries are determined by the set of equations (22), (23) and (25). It is immediate to note that, with r 1 > 0, the stability is improved by having a stronger field line bending stabilising contribution. As previously noted, the expressions for the monotonic q case are recovered by letting r 1 → 0. In the next subsection we allow for a stronger shear reversal which produces an internal resonance of the m + 1 mode.

Moderate reversal (nq 0 > m + 1)
The analysis of the moderately reversed q configuration essentially repeats the steps outlined in the paragraph above. The only difference is a more complicated dependence upon the radial variable of the upper sideband. For nq 0 > m + 1 the harmonic X m + 1 has a resonance atr s = r 1 √ 1/q0−n/(1+m) 1/q0−n/m < r 1 , hence for 0 < r <r s we have X m + 1 = 0, whereas forr s < r < r 1 the eigenfunction is (F is the hypergeometric function) [53] where B = (m + 1 +m)/2, C = 2 + m and D is such that X m + 1 is finite atr s . We find that, far fromr s , the leading order of the upper sideband displacement is well approximated by X m+1 ∝ rm −1 /[1/q − n/(m + 1)]. Since |D| > 1, we may take Ψ m+1 = A + (r/r 1 )m forr s < r < r 1 and Ψ m + 1 = 0 for 0 < r <r s . In analogy with the case of weak reversal, we obtain A + = −r 1 with Z = (r s /r 2 ) 2+2 m − 2. It can be shown that the particular solution of the m − 1 mode is not significantly affected by dropping the last term in square brackets in (26). Hence, for the sake of simplicity in the resulting expressions, this term will be neglected. It follows that in the regionr s < r < r 1 the solution of (26) for the m − 1 harmonic reads Under the assumption q 0 /q m is not too large (see section 6) we take (m − 1)/q − n ≈ (m − 1)/q − n withq = 2/(1/q 0 + n/m). In order to findL − it is sufficient to specify the constant C 1 . Some simple integrations of (26) acrossr s show that χ ′ m−1 has a jump atr s , whereas χ m − 1 remains continuous. These conditions read χ m−1 r s = 0 and rχ ′ m−1 r s = −1/2m(r s /r 1 )mA + . By applying such constraints we obtain Ifr s /r 1 is sufficiently small, we let C 1 → 0. Hence, by means of (28), after some straightforward manipulations we finally Therefore, the parameter Λ expanded to leading order in e reads which is computed by means of (29) and (30). It is found that the quantity K is rather small, and in the range of experimental relevant parameters we may approximate Λ with (23). Thus, in analogy with the weakly reversed q case, the stability boundaries are identified by the set of equations (22), (23) and (25). Thus, the same conclusions drawn in section 5 hold also for weakly and moderately reversed q configuration. We note in particular that the marginal β has a very weak dependence upon q 0 and for sufficiently small r 1 /r p the stability boundaries of monotonic and weakly reversed configurations coincide [7]. This might be somehow expected, since according to references [7,11,12] the eigenfunctions are relatively small in the region of the shear reversal indicating weak contributions associated with this region. Indeed, the fluid displacements, viz. the eigenfunctions, tend to be more localised where either the shear is small or in the external sheared region.

Discussion
The aim of this section is to point out the robustness of the anisotropic model and to discuss to what extent our results, in particular flow modifications, differ from previous findings found in the literature (see e.g. [52]). Such differences can be attributed essentially to (i) the absence of rotation and averaged density gradients (this has been chosen for mathematical ease) and (ii) the closure model. Focussing on the first effect, it is well known that the allowance of rotation and density gradients might have a profound impact on the stability properties. Indeed, in reference [52] it was found that the additional contributions to the magnetic well (the dA 2 /dr term given by equation (30) in the reference above) due to realistic radial variation of Ω andρ can be considerably larger than the last term in (17). Radial variations of the equilibrium averaged density can be included (e.g. in the model of the current paper) rather simply, yielding where ω A (r) = R 2 0ρ (r) andα = −2R 0 [p(1 + M 2 )] ′ q 2 ( (we also must replace α withα in equations (16) and (19)). On the contrary, dealing with rotation gradients is much more difficult. This is because, if rotation is radially dependent, we cannot set to zero the Doppler shifted eigenvalue across the whole low-shear region. This, therefore, requires a more elaborate calculation of the perturbed distribution function (cf equation (11)), which yields a complicated expression of the plasma response written in terms of the plasma dispersion function [44]. We nevertheless stress that within the infernal framework and under appropriate approximations, effects of sheared flows of the order aΩ ′ /Ω ∼ 1 can be included in the analysis, thus showing off the power of the approach. The inclusion of these particular flows demonstrates that a generalisation beyond simple anisotropy is possible, and that future work will attempt to take into account flows that resemble more realistic experimental situations. We finally point out that a large flow shear may break the assumptions employed in our model, in particular the gyrotropic assumption [81,82]. However, as long as we do not deal with instabilities localised in extremely pronounced ITBs or at the pedestal where the flow shear can be very large, the assumptions within our framework is developed should be reasonably fulfilled.
The other differences arise from the closure model. As is well know, in standard MHD we employ the adiabatic closure for which d(pρ −Γ )/dt = 0 where Γ = 5/3. In the guiding centre plasma (GCP) approximation, the closure is provided by solving the one dimensional collisionless kinetic equation, i.e. (4), which describes the particle motion parallel to the magnetic field [42,43]. It was pointed out in reference [42] that MHD marginal stability boundaries are recovered by the isotropic GCP model (in the case of shearless toroidal flows in cylindrical geometry) if Γ = 1, i.e with the plasma being isothermal. This is indeed apparent by inspecting equations (12) and (13). In standard MHD in toroidal geometry, the adiabatic index enters inertia and magnetic well terms [77]. In toroidal geometry, these contributions reduce to the ones obtained in the isotropic GCP limit for Γ = 1 at marginal stability with uniform flows. Thus, it follows that within the GCP model the Brunt-Väisälä stabilisation mechanism, coming from the centrifugal force which gives a stable density or entropy distribution within each magnetic surface, is lost (see e.g. [30,83,84] and references therein). We shall point out that other types of closure may be used [85,86], and different results might be expected depending on the closure model.
It is worth pointing out the robustness of the anisotropic fluid model used here, for cases where strong parallel anisotropy is applicable to the experimental regime of interest. It is a more complete model in the deep parallel anisotropic limit, for low or high performance plasmas, than the isotropic MHD limit for cases where isotropy applies to a fusion grade plasma. Indeed, in the limit of strong parallel anisotropy, i.e. T || /T ⊥ → ∞, the trapped particle fraction vanishes so that kinetic corrections to kinetic-MHD models are negligible [45]. Although kinetic models are dependent upon several parameters (collisional regime, temperature, bounce frequency resonance effects, etc), in the parallel anisotropic limit kinetic models yield weak corrections to a fluid model. What is left are anisotropic fluid effects which are robustly stabilising since pressure perturbation associated with passing particles are larger on the high field side of the flux surface (contrarily to an isotropic plasma in which passing particles compensate for trapped particles, where the latter tend to spend more time in the low field side).
It is also possible to see that combined elongation and anisotropy effects are recovered by inspecting equation (3) in reference [45], noting that p ⊥ , p || and the factor C = ∑ s m s´d µdϵ B v || (µB) 2 ∂fs ∂ϵ [34] can be written easily in terms of cosθ, T || and T ⊥ for the model used. This equation indicates also that the effect of elongation would yield exactly the elongation correction seen in the Mercier index (−eτ ) in equation (17). Note that for parallel anisotropy, changes to the metric are weak, allowing the toroidal and shaping expansions presented in section 3. Toroidicity and elongation effects combine with anisotropy in such a simple way because anisotropy introduces a low order poloidal dependence, which combines with the poloidal dependence of 1/R. The other shaping effects are additive, giving the well known shaping effects on interchange modes [26]. Thus, as the physical effects are additive in nature, and fairly intuitive, more realistic, though perhaps adhoc, approaches to including combined fluid anisotropy and flows can be sought.
Finally, it is worth pointing out that parallel anisotropy provides stabilisation also in stellarators, whose fields decay proportionally to 1/R [87].

Conclusions
The problem of plasma anisotropy and certain limited equilibrium flow effects in shaped hybrid plasmas has been addressed.
As discussed in the introduction, the relevance of the results presented in this work can be extended both to spherical and standard tokamaks. Using simplified class of profiles allows to have a manageable analytical treatment, nevertheless retaining relevant physical effects. The main result of this work is equation (22) which describes the stability boundaries for ideal infernal modes. Such an equation holds both for flat and q profile reversed configurations, whose specific case is identified by selecting appropriately the field line bending contribution. In line with previous results, beyond a trivial redefinition of the ballooning parameter α due to a modified averaged total pressure, it is found that plasma anisotropy effects enter through a modification of the magnetic well, yielding better stability properties with tangential injection. It is found that a uniform toroidal flow improves stability as well. Positive triangularity effects in vertically elongated plasmas are stabilising, whereas negative triangularity tends to be destabilising. We notice from figure 3 that even with a relative modest parallel pressure anisotropy (T || > T ⊥ ), that should be easily realisable with the MAST neutral beam system, the infernal mode can be completely stabilised even when the minimum of q approaches unity. Oblate cross sections might be beneficial for restoring the stabilising contribution to the magnetic well in negative triangularity plasmas.
Depending on β, elongation might be either stabilising or destabilising. A positive elongation parameter e at low pressure and negligible triangularity tends to be destabilising with a sufficiently small filed line bending contribution, while its effect turns out to be stabilising at sufficiently high β in accordance with [28]. Note that equation (22) seems to suggest that mode stabilisation could be achieved not only with current profile optimisation, i.e. modifying the safety factor, but also with a careful tailoring of the plasma shaping. We point out that the stability eigen-equations for the Fourier harmonics derived in this work, and in particular the equation for the dominant mode (16) with the allowance for residual magnetic shear effects in the field line bending contribution, might be helpful for analysing a broader class of instabilities, e.g. ballooning modes.
Further work is nevertheless needed to assess more rigorously finite aspect ratio effects, highly relevant for compact machines when ε~1, and the coupling effects resulting from the inclusion of a larger number of satellite Fourier harmonics, viz. allowing the perturbation to be more ballooned. Moreover, additional analysis is required for the description of cases in which the safety factor is strongly reversed, such as either advanced scenarios or current hole configurations. Finally, we point out that the penetration of beams in a ST reactor might not be sufficient to provide the required levels of anisotropy envisaged to stabilise the MHD activity analysed in this work. Further work is therefore needed to assess the overall effect of NBI heating in future experiments, and particularly the role of shaping as a primary player in mode stabilisation. It is envisaged that such challenging analysis, might be more suitably addressed numerically.