{'fraction_non_alphanumeric': 0.029817627071631648, 'fraction_numerical': 0.00977740794674433, 'mean_word_length': 4.669025157232705, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Radial penetration of flux surface shaping in tokamaks

Using analytic calculations, the effects of the edge flux surface shape and the toroidal current profile on the penetration of flux surface shaping are investigated in a tokamak. It is shown that the penetration of shaping is determined by the poloidal variation of the poloidal magnetic field on the surface. This fact is used to investigate how different flux surface shapes penetrate from the edge. Then, a technique to separate the effects of magnetic pressure and tension in the Grad-Shafranov equation is presented and used to calculate radial profiles of strong elongation for nearly constant current profiles. Lastly, it is shown that more hollow toroidal current profiles are significantly better at conveying shaping from the edge to the core.


Introduction
Recently, it has been shown theoretically [1,2,3], experimentally [4], and numerically [5] that breaking the up-down symmetry of tokamak flux surfaces can significantly increase the intrinsic toroidal rotation without the need for an external momentum source. Toroidal rotation has been experimentally proven to increase MHD stability [6,7,8,9,10] and can suppress turbulent energy transport [11,12,13,14,15]. This has motivated substantial interest in creating strong up-down asymmetry that penetrates radially into the plasma [5,16,17]. Additionally, strong shaping increases the stability of the plasma to kink modes by increasing the safety factor at constant plasma current [18]. Also, shaping has been observed to have a stabilizing effect on ELMs [19] and to improve turbulent energy transport [20,21].
This work uses a series of independent arguments to develop intuition for how shaping penetrates in the ideal MHD model [22]. We investigate the effects of both free parameters in the large aspect ratio Grad-Shafranov equation [23]: the boundary condition and the toroidal current profile. Although this work was motivated by updown asymmetry, the main results of this paper apply to the penetration of traditional up-down symmetric plasma shaping as well.
The traditional argument concerning shaping penetration [16,17,24] uses a Taylor expansion of the poloidal flux function about the magnetic axis to find where R is the major radial coordinate, R 0 is the major radial location of the magnetic axis, Z is the vertical coordinate, and we assume that the magnetic axis is located at Z = 0. We have imposed that the flux vanishes on the magnetic axis and since the flux is at a minimum at the magnetic axis, the linear term is zero. This means that, no matter what external fields shape the plasma, close enough to the magnetic axis, the flux surface ellipticity will dominate over higher order shaping effects. Note that if all the second order Taylor coefficients are zero, then this argument fails. However, this requires a vanishing toroidal current density on-axis, which prevents closed, nested flux surfaces [25]. While this argument is compelling, it says nothing about how shaping behaves away from the magnetic axis or how triangularity penetrates in the absence of elongation. A more sophisticated version of this argument is presented in references [5,16], which includes effects from having a linear toroidal current profile about the magnetic axis.
In section 2, we show that the shaping of a given flux surface depends on the strength of the poloidal variation of the poloidal magnetic field on the flux surface. Then, in section 3, we use this dependence to study why different flux surface shapes penetrate better than others. In section 4, we explore a limit of the Grad-Shafranov equation to separate the effects of magnetic pressure and tension. In this limit we clearly see how the current profile affects shaping penetration.

Quantifying shaping penetration
The amount of flux surface shaping can be quantified by the parameter where the flux surface label a is the minor radius (i.e. the minimum distance of the flux surface from the magnetic axis) and b is the maximum distance of the flux surface from the magnetic axis. For circular flux surfaces ∆ = 1 and, for purely elliptical flux surfaces, this definition reduces to the typical definition of the elongation, usually denoted by κ.
Taking a derivative we find the change in elongation across a flux surface is given by The derivative can be calculated from the definition of the poloidal magnetic flux, where ζ is the toroidal angle, r is the distance from the magnetic axis, and B p is the poloidal magnetic field. Using implicit differentiation, this gives Here | a and | b indicate the quantity should be evaluated at the poloidal locations of the minimum and maximum radial positions on a given flux surface. Therefore, we find that equation (3) becomes We will use this equation to understand why different flux surface shapes (elongated, triangular, etc.) penetrate better from the edge to the core and how the toroidal current profile affects this penetration.

Effect of flux surface shape
In this section we will compare different flux surface shapes and show that lower order shaping effects penetrate from the plasma boundary to the magnetic axis more effectively. First, we must determine which shapes to consider and argue that comparisons between them are fair. We will use large aspect ratio equilibria produced with a constant toroidal current profile because it is both simple and a reasonable approximation of experimental profiles. From these equilibria we will select strongly shaped flux surfaces, specifically those that approach having magnetic field nulls. Hence, their flux surfaces approach regular polygons (see figure 1). These configurations will be analytically tractable and exaggerate the effects we mean to investigate. It should be noted that we expect flux surfaces with higher order shaping to be more difficult to create experimentally. This is because they have more magnetic field nulls, so they require more magnets and more total external current to create. From Ampere's law we find that RB p | a ≈ (S p /l p ) µ 0 j ζ R, where S p is the poloidal area enclosed by the flux surface, l p is the poloidal perimeter, µ 0 is the vacuum permeability, and j ζ is the toroidal current. Crucially, we note that RB p | b is small because we have chosen configurations that nearly have magnetic nulls. Near magnetic nulls, the strong poloidal curvature leads to large poloidal tension, making B p small by force balance (see equation (11)). What this reveals is, as the flux surface shaping is increased, the ratio of poloidal fields in equation (7) diverges to positive infinity. This implies that d∆/da is positive and large, that is, regardless of the current profile, it will be impossible to maintain strong shaping from the boundary to the magnetic axis. While this is true for nearly all configurations, there is one caveat: when the shaping parameter ∆ also diverges to infinity. Then, d∆/da can be finite and negative. This makes the m = 2 cylindrical harmonic shaping effect special because flux surfaces with arbitrarily large elongation are possible. All pure higher order shaping effects cannot make flux surfaces that are both closed and have arbitrarily large shaping. For a given poloidal mode number m ≥ 2, we can use the geometry of regular polygons to find the highest obtainable shaping to be ∆ max = csc ((π/2) (m − 2) /m). When the mathematics are worked out rigorously [5,16] we find that a constant current profile has no effect on the externally applied elongation, meaning that d∆/da = 0. This section has shown that elongation is optimal for radial penetration. In the next section we will investigate the effect of the toroidal current profile on flux surface elongation.

Effect of toroidal current profile
As we compare configurations with different toroidal current profiles, we will choose to keep the external flux surface shape fixed. Therefore, from equation (7) we conclude that changing the current profile, while maintaining a constant boundary flux surface shape, only affects the shaping penetration by altering RB p | a / RB p | b .
In order to calculate the ratio of the poloidal fields we will appeal to the Grad-Shafranov equation [23] where p is the plasma pressure and I ≡ RB ζ is the toroidal magnetic field flux function. Using B p = ∇ζ × ∇ψ and noting that the toroidal current density j ζ is given by µ 0 j ζ R = −µ 0 R 2 (dp/dψ) − I (dI/dψ), we can rewrite equation (8) as to lowest order in ≡ a/R 0 , the inverse aspect ratio. Here κ p ≡ b p · ∇b p is the magnitude of the poloidal magnetic field curvature vector andb p ≡ B p /B p is the poloidal field unit vector. We choose this form because it clearly separates the effects of poloidal magnetic pressure in the first term and field line tension in the second, while the right hand side is constant on a flux surface. We apply equation (9) to the strongly shaped m = 2 flux surface (see figure 1(a)), which causes the first and second terms to vary dramatically with the poloidal location. At the poloidal location of the minimum radial position, the field lines become straight and the curvature term vanishes giving At the poloidal location of the maximum radial position, the magnetic pressure term is small, giving The integral in equation (10) assumes that the separation between magnetic pressure and tension must be valid over the entire radial profile, not just on the flux surface of interest. If the flux surfaces are circular over a substantial region near the axis, equation (10) is no longer accurate. For the m = 2 mode with a constant current profile, equations (10) and (11) are exact in the limit of ∆ → ∞ (see figure 2). With a linear peaked current profile that changes by 20% over the radial region and an elongation of ∆ = 2, equations (10) and (11) are only accurate to about 20%. Substituting equations (10) and (11) into equation (7) we find that Since we know that elongation penetrates unaffected with a constant current profile, we can solve for where j ζcc and ψ cc are the current density and poloidal flux in the constant current case respectively. This is useful because we are comparing configurations with different current profiles, holding the flux surface shape constant, so both κ p | b and ∆ will stay fixed. Substituting equation (13) into equation (12), we find that By normalizing this equation or equation (8), we see that the total plasma current can be scaled without changing the flux surface shapes (by scaling the external currents accordingly). In other words, we can choose j ζcc (as long as ψ cc is calculated consistently) and we can multiply j ζ by any numerical factor without changing any flux surface shapes. We see that equation (14) is a differential equation for ∆ (a), which can be solved giving where ∆ edge is the shaping parameter of the outermost flux surface and a edge is the minor radius of the outermost flux surface. This equation should give the exact elongation profile in the limit that the elongation profile becomes constant and ∆ edge → ∞. In figure 3, we present results for a linear current profile, j ζ = j ζ0 + j ζ ψ, as j ζ → 0 to verify equation (15). For a linear current profile with small j ζ , we can simplify equation (15) to a simple quadratic profile that matches the exact profile well. Equation (14) can be further simplified by choosing j ζcc to be j ζ (ψ), the toroidal current on the flux surface of interest, giving This shows that the elongation penetration only depends on the amount of toroidal current within the flux surface compared with the constant current case. Profiles that are more hollow will help shaping penetrate into the plasma. This is because, by definition of a hollow profile, j ζ is less than j ζcc . Also, ψ will decrease relative to ψ cc because of the relationship B p ∝ j ζ (from Ampere's law) and ψ ∝ B p (from equation (4)). What happens is, as the on-axis current is lowered, the shaping and R 0 B p | b stay constant, maintained by the external magnets, while R 0 B p | a decreases because of the drop in the total plasma current. From equation (7) we see that a change in the ratio of these magnetic fields allows the shaping to penetrate radially. Analogously, peaked current profiles will tend to limit the shaping to the edge. From figure 4(a,b,c), we see that achieving an on-axis elongation of 2 with a peaked current profile requires a 25% greater edge elongation than it would with a hollow profile. Figure 4(d,e,f) shows that triangular flux surface shaping is only large near the boundary, as we would be expected from the arguments in sections 1 and 3. However, we still observe that the shaping penetrates more effectively with a hollow current profile, relative to a peaked profile. This suggests that the beneficial effect of hollow current profiles for shaping penetration is general to all flux surface shapes (see reference [5,16] for a different approach to the same problem).

Conclusions
There are several broad points illuminated by this work. First, in section 1, we reviewed the implications of Taylor expanding the poloidal flux about the magnetic axis. It was found that this argument demonstrates that elongation will always dominate higher order shaping near the magnetic axis, but does not forbid higher order shaping from effectively penetrating in the absence of elongation. Next, in section 2, we showed that the change in shaping from flux surface to flux surface depends on the ratio of poloidal magnetic fields at different poloidal locations on the flux surface. Then, in section 3, we proved that elongation is the only cylindrical harmonic that can penetrate unaffected from the boundary in the limit of a strongly shaped boundary condition. This suggests that lower order shaping effects always penetrate throughout the plasma most effectively. Lastly, in section 4, we presented a method to separate the effects of magnetic pressure and tension in the Grad-Shafranov equation to get an analytic solution for  the shaping penetration of strongly elongated flux surfaces with near constant current profiles. This argument demonstrated hollow current profiles enhance the shaping of strongly elongated elliptical flux surfaces, while peaked current profiles tend to limit elongation to the edge. This effect was found to alter the elongation by over 25% and appears to be generic to all flux surface shapes.