Estimating cross-field particle transport at the outer midplane of TCV by tracking filaments with machine learning

Cross-field transport of particles in the boundary region of magnetically confined fusion plasmas is dominated by turbulence. Blobs, intermittent turbulent structures with large amplitude and a filamentary shape appearing in the scrape-off layer (SOL), are known from theoretical and experimental studies to be the main contributor to the cross-field particle transport. The dynamics of blobs differs depending on various plasma conditions, including triangularity (δ). In this work, we analyze triangularity dependence of the cross-field particle transport at the outer midplane of plasmas with δ=+0.38 , +0.15, −0.14, and −0.26 on the Tokamak à Configuration Variable, using our novel machine learning (ML) blob-tracking approach applied to gas puff imaging data. The cross-field particle flux determined in this way is of the same order as the overall transport inferred from KN1D, GBS, and SOLPS-ITER simulations, suggesting that the blobs identified by the ML blob-tracking account for most of the cross-field particle transport in the SOL. Also, the ML blob-tracking and KN1D show a decrease in the cross-field particle transport as δ becomes more negative. The blob-by-blob analysis of the result from the tracking reveals that the decrease of cross-field particle transport with decreasing δ is accompanied by a decrease in the number of blobs in a fixed time, which tend to have larger area and lower radial speed. Also, the blobs in these plasmas are in the connected sheath regime, and show a velocity scaling consistent with the two-region model.


Introduction
Particle transport in magnetically confined fusion plasmas is a critical factor constraining reactor performance, determining confinement, impurity content, wall loading, and fueling and detachment requirements. Plasma turbulence in the boundary region has been known to be the major cause of the particle transport in the edge, as demonstrated in theoretical studies [1] and experiments [2]. Specifically, intermittent turbulence with large amplitude, filamentary structures (elongated along the field) in the scrape-off layer (SOL) [3][4][5], called blobs, plays a key role in the cross-field particle transport [2,[5][6][7][8].
Filamentary turbulence differs depending on various plasma conditions, including core density [9,10], and plasma shape, e.g. the triangularity (δ) [11]. Compared to the conventional positive δ plasmas, negative δ plasmas have been shown to exhibit reduced core fluctuations [12][13][14] as well as edge/SOL fluctuations [11]. Previous work [11] has demonstrated that first-wall interaction can be completely suppressed for L-mode plasmas with δ ≲ −0.25 on the Tokamakà Configuration Variable (TCV), an effect ascribed to blobs becoming discharged by the short connection length.
Here, we extend the results of [11] to the study of cross-field particle transport at the outer midplane of negative triangularity plasmas, and explore the role of blobs in cross-field particle transport. There can be a poloidal dependence of the crossfield particle transport, but this is not addressed in this analysis. In particular, the contribution of blobs of different sizes to the cross-field particle transport is investigated, as they belong to different turbulent regimes depending on their sizes [7,15]. To obtain the distribution of blob sizes, we use gas puff imaging (GPI) data with our newly developed machine learning (ML) model for blob-tracking [16,17], which tracks the shapes and trajectories of individual blobs frame-by-frame. We used the ML blob-tracking to estimate the cross-field particle transport, assuming that the light emission in the GPI data corresponds to the radial convective motion, and that the far-SOL transport is essentially convective, not diffusive [18]. We find that cross-field particle transport through the far-SOL at the outboard midplane, in a fiducial TCV plasma, as estimated by the ML blob-tracking, is of the same order as the flux evaluated by simulations of varying fidelity, specifically KN1D [19], GBS [20], and SOLPS-ITER [21]. Also, cross-field particle transport in plasmas with δ = +0.38, +0.15, −0.14, and −0.26 are estimated using both ML blob-tracking and KN1D. Both results show a decrease in overall cross-field particle transport with decreasing δ. The analysis of the ML blob-tracking shows that plasmas with smaller δ tend to have less frequent blobs, most of which have larger area and lower radial speed, leading overall to a lower cross-field particle transport. Furthermore, as δ becomes more negative, the blob regime tends to be shifted toward the regime with a higher collisionality. This paper is structured as follows. Section 2 elaborates on how the blobinduced cross-field particle transport is estimated using the ML blob-tracking of the GPI data. Section 3 compares four different estimates of the cross-field particle transport in a fiducial TCV plasma, obtained using the ML blob-tracking of the experimental data, and modeling with KN1D, GBS, and SOLPS-ITER. It also shows the comparison of the cross-field particle transport for different δ values, as further investigated by the blob-by-blob analysis from the ML blob-tracking. The dynamic regime of the blobs are also analyzed with the individual blob information estimated by the tracking. Lastly, we present conclusions and remarks in section 4.

GPI diagnostic on TCV
GPI diagnostics measure the edge/SOL fluctuations by imaging atomic emission from the excitation of a local neutral gas puff [22]. On TCV, nozzles installed near the outboard midplane puff D 2 gas 3 and 12 × 10 optical fibers view the light emission along lines-of-sight that are aligned to the local magnetic field [23]. The signals are transmitted through the optical fibers and onto avalanche photo-diodes (APD) through D α (656 nm) filters, and recorded by digitizers with a sampling rate of 2 MHz. The location of the GPI views is displayed in figure 1(a) with the poloidal cross-section of a plasma in TCV. A snapshot of the GPI data capturing a blob on the righthand side moving radially outward is shown in figure 1(b). The empty (white) spots correspond to GPI views with broken optical fibers.

ML model for blob-tracking in GPI images
The pattern recognition and tracking from images is a wellknown task in ML, and has been implemented for blobtracking in GPI data [17]. Four benchmarked models were trained with synthetic GPI data and two of the models show excellent performance on real GPI data, both in shape prediction and blob regime identification. An example of ML blob detection is shown in figure 1(c). The raw GPI brightness in figure 1(b) is standardized (i.e. mean-subtracted and divided by the standard deviation), interpolated to a denser grid, translated to a range [0, a] where a > 0 is the same for all pixels, and scaled to the [0, 1] range for the input of the ML blobtracking. Note that this normalization scheme is used only for finding the boundary of the blob, which is identified as the blue contour in the figure.
ML blob-tracking can be used to estimate cross-field particle transport by blobs as follows. First, the local emissivity (ϵ) in the region of the neutral gas cloud is assumed to have a linear dependence on the local neutral density (n n ) and a nonlinear dependence on the local electron density (n e ) and temperature (T e ), parameterized by [22,24,25]: Also, as the lines-of-sight of GPI are approximately aligned with the local magnetic field, the brightness (i.e. the   (2) computed for the Dα brightness from the DEGAS 2 code by Cziegler [24], as a function of log ne and log Te.
line-integrated emissivity along the line-of-sight) (I) is expressed as: where A is a proportionality factor which includes the toroidal extent of the gas cloud. The variation of n e is much faster than that of n n , so that the neutral density can be assumed to be constant over the time scale of interest [25]. The exponents α n and α T for the D α brightness were computed from the DEGAS 2 code by Cziegler [24], for a range of n e and T e , as shown in figure 2. The brightness fluctuation (Ĩ) can then be approximated and linearized as follows [24]: where I 0 , n e0 , and T e0 are the time averages of I, n e , and T e , respectively. This gives the expression for normalized brightness fluctuations:Ĩ For the plasma conditions used in this work (L-mode, with δ = +0.38, +0.15, −0.14, and −0.26), the ratio α T /α n in the GPI field-of-view (FoV) is shown in figure 3, which was computed according to figure 2 with n e and T e measured from Thomson scattering and the reciprocating probe. This shows that α T < α n at the separatrix and in the near-SOL, but α T can become comparable or even larger than α n in the far-SOL. In  this work, however, we assume α nñ e ne0 ≫ α TT e Te0 and thus neglect the second term in the right-hand side of equation (6) [24,26]. This gives us an upper-bound ofñ e if we assumeñ e andT e are in phase, with the caveat thatñ e may be overestimated in the far SOL. WithĨ and I 0 obtained from GPI,ñ e in a blob can then be computed for the group of pixels inside the blob's boundary found by ML blob-tracking (G blob ). Then the number of excess electrons per unit length orthogonal to the GPI FoV carried by a blob (μ e,blob (m −1 )) can be calculated bỹ where a pixel is the area of the pixel. Figure 4 illustrates the three-dimensional structure of a filament on the GPI image to aid understanding of the introduced quantities. Here, a fraction of the filament having a unit length orthogonal to the GPI FoV is considered. In order to estimate the cross-field particle transport at the outboard midplane, at the radial location ρ ψ , we count blobs whose center crosses a 'finish line' in the GPI FoV, where the 'finish line at ρ ψ ' is defined as the poloidal contour line of the ρ ψ flux surface within the GPI FoV as shown in figure 4(b). Then the electron flux (i.e. the cross-field particle transport) due to all the blobs crossing the finish line at ρ ψ , within the time window ∆t, can be estimated by where ⟨μ e,blob,i ⟩ is the number of time-averaged excess electrons per unit length carried by blob i throughout its trajectory, B ρ ψ is the set of blobs crossing the finish line at ρ ψ within the time window ∆t, and l fl (ρ ψ ) is the length of the finish line at ρ ψ in the GPI FoV. Toward smaller ρ ψ , the profile of Γ blobs (ρ ψ ) is limited by the position of the LCFS and the average size of the blobs. There are not many blobs detected by the ML blob-tracking near the LCFS in the GPI images. If the gap between the LCFS and the finish line is small, few blobs are counted, leading to a bias in the estimate of the crossfield particle transport. Therefore, finish lines located near the LCFS (within the gap of an average blob size) are not considered. Also, at larger ρ ψ , the profile of Γ blobs (ρ ψ ) is limited by the outermost edge of the GPI FoV and the average size of the blobs. When blobs touch the edge of the GPI FoV, the blob boundary is not closed, and the number of electrons carried by these blobs is underestimated. Thus, finish lines located near the outermost edge of the GPI FoV (again, within the gap of an average blob size) are also excluded from the analysis.
With this approach we only account for transport due to sufficiently large blobs to be tracked by our fine resolution grid assuming they are the main radial transport mechanism in the far-SOL [2,[5][6][7][8]18].

KN1D
KN1D is an algorithm which computes the particle transport for atomic and molecular hydrogen or deuterium in a 1D space of an ionizing plasma with specified plasma profiles as input [19]. Originally it is written in IDL. In this work, we ran KN1D in Python using Aurora, an open-source package for particle transport, neutrals and radiation modeling in magnetically confined fusion plasmas [27][28][29]. Neutral pressure, measured by a baratron gauge, is used as an input for KN1D, and uncertainty in the pressure measurement is one (but not the only) source of uncertainty in the resulting particle flux.

Comparison of the results from simulations and tracking
The estimates of the cross-field particle transport computed from KN1D and the ML blob-tracking are compared with that found using two well-established simulation codes: GBS [20] and SOLPS-ITER [21], for an L-mode, lower-single null case (TCV-X21 reference case [30]) as shown in figure 5. All results give a similar level of cross-field particle flux, and this closeness reinforces the conclusion that the cross-field particle transport in the edge/SOL is indeed dominated by the blobs.

Cross-field particle transport in positive and negative triangularity plasmas
The plasmas presented in this section are ohmic-heated, innerwall limited L-mode plasmas with δ = +0.38, +0.15, −0.14, and −0.26 on TCV at a toroidal field B T = 1.4 T and plasma current I p = 230 kA. Plasma densities range from 3.8 × 10 19 to 4.9 × 10 19 m −3 , which correspond to Greenwald fractions of 0.27-0.37. GPI brightness from D 2 puffs was recorded and a data window of 40 ms was used for each of these plasmas, with Mask R-CNN for the blob-tracking [17]. The edge/SOL Figure 5. Cross-field particle flux as a function of ρ ψ estimated from GBS, SOLPS-ITER, KN1D, and ML blob-tracking for the TCV-X21 reference case [30]. For GBS, the data is flux-averaged. For the other methods, the data is from the outer midplane. ρ ψ at the outer-wall in the midplane is denoted as a dashed line.
densities and temperatures were obtained from Thomson scattering and the reciprocating probe. Figure 6(a) displays the comparison of cross-field particle flux, as a function of ρ ψ , between the δ = +0.38, +0.15, −0.14, and −0.26 plasmas, estimated from KN1D (solid lines) and ML blob-tracking (solid lines with dots); average blob sizes are also evaluated and illustrated at the ρ ψ = 1.05 surface. ρ ψ at the outer wall is denoted by a dashed line for each plasma. These results further reinforce the validity of the ML blob-tracking method for the estimation of cross-field particle flux, giving values reasonably close to the results from KN1D. Additionally, the particle flux estimated by the reciprocating probe in the far-SOL of previous L-mode discharges in TCV, with similar plasma current and density, is also in the same order [31]. Furthermore, both KN1D and the ML blob-tracking show an overall similar trend with triangularity: δ = +0.38 shows the highest flux, followed by δ = +0.15, −0.14, and −0.26, although δ = −0.14 and −0.26 are close in KN1D. Previously, it was observed that fluctuations were fully suppressed at the first wall, and in part of the SOL, for δ ≲ −0.25 [11]. The reduction in blob-induced transport indicated here in the δ = −0.26 case, and even the partial reduction for outer flux surfaces at δ = −0.14, is consistent with this earlier result. This phenomenon had been correlated to the drop-off in connection length occurring closer to the LCFS for more negative triangularities. However, this effect alone does not organize the observed reduction in transport from δ = +0.38 through δ = +0.15 to δ = −0.14, since the connection lengths and blob sizes in these three cases are comparable. Additional, currently unidentified, mechanisms are needed to describe the difference between the positive and negative triangularity cases.
Further analysis of the contribution of blobs to the crossfield particle transport is shown in figure 7, which is a result that takes advantage of the ML blob-tracking algorithm's particular ability to compile information on individual blobs.   , is plotted as a function of their average area, for plasmas with δ = +0.38, +0.15, −0.14, and −0.26. The Pearson correlation coefficient (ρ P ) is denoted for each case, and shows an overall strong correlation between ⟨μ e,blob ⟩ and the blob area for all δ. Therefore, blobs with larger area tend to contain more particles, which is a straightforward reflection of equation (7).
Although a single blob with small area does not contribute much to the cross-field particle transport, it is necessary to determine whether the frequency of such small blobs counterbalances this smaller individual contribution, which would manifest as a greater density of points in figures 7(a)-(d). This is seen in figures 7(e)-(h), where the blob area is separated into equally sized bins and the bar length is the summation of data points contained in each bin. The peak of the blob area distribution tends to shift to larger blob area as δ decreases from +0.38 to −0. 26. This means that, as δ becomes more negative, the proportion of contribution to the cross-field transport of blobs with a smaller area decreases, and that most of the blobs carrying particles radially have larger areas. In addition, as denoted in the titles of figure 7, the number of blobs detected (that cross the finish line) within 40 ms of GPI data is 327, 201, 122, and 81 for δ = +0.38, +0.15, −0.14, and −0.26, respectively.
Furthermore, it is worthwhile to investigate whether the radial motion of blobs changes as δ changes. Figure 8 shows histograms of the time-averaged radial speed of all the blobs tracked within a 40 ms time window, not just the blobs crossing the finish line as before. The δ = +0.38 case in figure 8(a) shows the highest mean radial blob speed (0.50 km s −1 ), whereas the δ = +0.15, −0.14, and −0.26 cases in figures 8(b)-(d) show lower mean radial blob speeds (0.38, 0.41, and 0.22 km s −1 , respectively) and their distributions are skewed to lower speeds. Thus, in addition to a lower cross-field particle transport and fewer blobs, more negative δ plasmas tends to have blobs with smaller radial speed components. Also, the skewness of ⟨v r ⟩ is the most dramatic for δ = −0.26 in figure 8(d), which is, again, the triangularity where first-wall interaction is suppressed, as found in [11].
Lastly, we compare the regime of the blob dynamics of these plasmas, as we have estimates of the blob sizes and Figure 9. Diagram of Θ-Λ parameter space, where Θ and Λ are defined in equation (9). Each blob regime is indicated with the corresponding scaling ofv as a function ofâ. ϵx is the factor for magnetic field line fanning and approximated as ∼0.5 for our limited plasmas [32,33]. The regime of plasmas with δ = +0.38, +0.15, −0.14, and −0.26 are identified based on the average collisionality and the average size of the blobs measured by the ML blob-tracking. speeds from the ML blob-tracking. We use the diagram presented in [7,15] to identify the regime as in figure 9, where the four regimes are 'resistive ballooning' (RB), 'resistive Xpoint' (RX), 'connected ideal-interchange' (C i ), and 'connected sheath' (C s ). Here, Θ is a normalized blob size and Λ is a normalized plasma collisionality: a b is the radius of blobs, L ∥ is the parallel connection length, R is the major radius, ρ s is the ion sound Larmor radius, v R is the radial speed of blobs, and c s is the sound speed. In figure 9, all four cases are identified as in the C s regime, where the filament  is electrically connected to the target sheath. In both C s and RX regime,v is inversely dependent onâ. This is further checked by looking at the relation betweenv andâ for the C s and RX regime, as shown in figure 10. Indeed, all cases are closer to the scaling line of C s in figure 10(a) than to the scaling line of RX in figure 10(b). The result in figures 9 and 10 validates the consistency of the two-region model, extending the analysis in [10] to the C s regime in TCV.
In figure 11, the shortest connection length from the GPI FoV is shown for each δ, and the blue dashed line indicates the flux surface of the outermost limit used for the blob-tracking analysis described in section 2.2. For the δ = −0.26 case, the tracking limit is located inside of where the connection length is strongly reduced which was associated with the suppression of first-wall interaction as reported in [11]. This shows that the blob radial velocity and associated transport is reduced for δ = −0.26, even in regions where connection length is not reduced. The mechanism driving this behavior is currently unknown.

Conclusions and remarks
Cross-field particle transport at the outer midplane was estimated using ML blob-tracking in GPI image sequences and an approximate model relating D α emission to electron density. The results so obtained are roughly consistent with those from simulations using KN1D, GBS, and SOLPS-ITER. Therefore, this type of workflow, using ML blob-tracking, is apparently able to capture those blobs that are primarily responsible for the cross-field particle transport in the far SOL. From the estimates of cross-field particle transport in plasmas with δ = +0.38, +0.15, −0.14, and −0.26 on TCV, ML blobtracking and KN1D give similar trends of decreasing particle flux with decreasing δ. Using the particular capability of ML blob-tracking, the contributions of blobs with different areas are explored. This analysis reveals that the reduction of crossfield particle transport in more negative δ is accompanied by a decrease in blob frequency, and that those blobs tend to have larger area and lower radial speed. Especially for δ = −0.26, the low cross-field particle transport and radial blob speeds are consistent with the suppression of first-wall interaction in sufficiently negative δ, as shown in [11]. Also, the blob regime of these plasmas is the connected sheath regime and shows a velocity scaling consistent with the two-region model. This work also demonstrates the versatility of ML methods in the exploration of tokamak physics in general, and of turbulence in particular. The ML blob-tracking allows blob-by-blob analysis, providing distributions of properties derived from individual structures. Moreover, specification of the training data provides intuitive means to control algorithm performance, and allows the algorithm to replicate the outcome of a human analyst. As a future work, the method can be improved by more accurately measuring the local blob density, for example with He I line-ratio methods [34,35] or by applying ML to GPI using He puffs [36], so that the density fluctuation in equation (7) can be directly measured without using the approximated relation with the GPI brightness in equation (6).