Three-dimensional simulations of edge impurity flow obtained by the vacuum ultraviolet emission diagnostics in the Large Helical Device with EMC3-EIRENE

Edge carbon impurity flow in the stochastic layer of the Large Helical Device (LHD) has been investigated with the three-dimensional (3D) edge transport code EMC3-EIRENE. The simulated synthetic C3+ impurity flow profile from EMC3-EIRENE shows a reasonable agreement with the vacuum ultraviolet (VUV) measurements according to the CIV (1548.20  ×  2 Å) Doppler- shift spectrum. The same horizontally outward C3+ impurity flows at the top and bottom edges of the stochastic layer are determined by the 3D magnetic field structure and the parallel C3+ impurity flow velocity. The observed up-down asymmetric structure of the C3+ impurity flow at the top and bottom edges is caused by the vertical displacement of the VUV spectrometer from the midplane. The horizontally outward shift of the magnetic axis position from 3.6 to 3.9 m leads to a change of the C3+ impurity flow direction at the top and bottom edges. For a high upstream plasma density, the transport of the C3+ impurity flow is mainly determined by the background parallel plasma flow, while a reversed C3+ impurity flow is obtained for a low upstream plasma density, due to the expansion of the thermal force dominant regions. The enhanced thermal force leads to a suppression of the impurity screening effect.


Introduction
The control of impurity transport in the edge plasma of fusion devices is critical for sustaining high-performance plasma and mitigating divertor heat flux [1,2]. In the scrape-off layer (SOL) of tokamaks, the impurity momentum transport along parallel magnetic field lines is mainly determined by the force balance acting on the impurity, which is mainly related to the background plasma condition [3]. However, for stellarators and tokamaks with resonant magnetic perturbation (RMP) applications, edge stochastization gives rise to more complicated edge impurity transport behavior [4][5][6][7][8][9][10][11][12]. Hence, studies of the impact of the edge plasma condition and the magnetic configuration are important for gaining an insight into the mechanisms of impurity transport in the edge plasma.

Three-dimensional simulations of edge impurity flow obtained by the vacuum ultraviolet emission diagnostics in the Large Helical Device with EMC3-EIRENE
The transport behavior of impurity flow in the divertor of ASDEX Upgrade [13] and DIII-D [14][15][16] has been studied by using the Doppler-shift of spectral lines emitted from impurities moving along the magnetic field lines. This is important for understanding the convective losses for energy transport [17] and for assessing the efficiency of impurity screening from the core plasma [18]. On the other hand, the transport properties of edge impurities in the stochastic layer have been investigated by using the spectroscopic measurement of impurity emissivity in the experiments of the Large Helical Device (LHD) [19][20][21][22][23][24]. The complex magnetic field structure of the LHD leads to a more stochastic transport characteristic compared to the axisymmetric magnetic geometry [25], and this provides a good platform to investigate the three-dimensional (3D) effects of a magnetic field structure on impurity transport. In order to treat the complicated magnetic field structure, the 3D edge transport code EMC3-EIRENE [26,27] has been employed to study edge impurity transport in the LHD in comparison with the impurity emission measurements [28][29][30]. Systematic parameter scans of the parallel transport coefficients, the perpendicular diffusivity and impurity source locations have been performed in comparison with extreme ultraviolet (EUV) measurements of impurity emission [30]. The impurity transport model in [3] has been developed and widely used in tokamaks with a 2D axisymmetric configuration. It is necessary to check whether the model can reproduce and interpret the experiments for complex 3D topology in a stellarator, which is characterized by the strong perpendicular coupling of different flux tubes associated with the long connection lengths. Recently, space-resolved vacuum ultraviolet (VUV) spectroscopy using a 3 m normal incidence spectrometer has been developed to measure the distribution of the impurity emission in the edge plasma of the LHD [31,32]. The flow velocity of the C 3+ impurity measured by the VUV spectrometer system provides a straightforward way of comparing the 3D simulation results of edge impurity transport with the experimental data.
The EMC3-EIRENE modeling of the chord-integrated C 3+ impurity flow velocity shows good agreement with the VUV emission measurements according to the CIV Dopplershift spectrum. The up-down asymmetry profile of the chordintegrated velocity of the impurity flow observed by VUV spectroscopic measurements is studied by EMC3-EIRENE modeling, which can be well interpreted by artificially changing the vertical position of the VUV spectrometer. The 3D invest igations of the magnetic field structure and the parallel impurity velocity have been performed to expound the measured impurity flow directions by the VUV spectrometer system. Studies on the operation regimes with different 3D magnetic field structures and edge plasma conditions have been conducted to examine the change of the transport behavior of the edge impurity flow.
In section 2, the LHD and the VUV spectrometer system are briefly described. Section 3 gives a short introduction to the plasma and impurity transport models in EMC3-EIRENE code, and a method for obtaining the chord-integrated velocity of the impurity flow according to the simulation results of the EMC3-EIRENE is also presented. The simulated velocity of the impurity flow is compared with the experimental data from the VUV measurements in section 4, which also addresses a detailed analysis of the up-down asymmetry structure of the C 3+ impurity flow velocity, as well as the relationship between the C 3+ impurity flow direction and the 3D magnetic configuration of the stochastic layer. In section 5, the impacts of the magnetic field structure and the edge plasma condition are studied. Finally, the results are summarized in section 6.

LHD and VUV spectrometer system
The LHD is the largest superconducting heliotron-type fusion device, and has a major radius of 3.9 m and a minor radius of 0.6 m. A maximum plasma volume of 30 m 3 is obtained in the standard configuration with a magnetic axis position of R ax = 3.6 m. The magnetic field geometry of the LHD is created by a pair of helical coils twisted with poloidal and toroidal pitch numbers of l = 2 and n = 10, respectively [25]. Thus, the magnetic field structure has 10 field periods in the toroidal direction. The plasma distributions at toroidal angles of ϕ = 0 • , 18 • and 36 • in the LHD have up-down symmetry structures. The unique edge magnetic field topology of the LHD, i.e. the existence of an intrinsic stochastic layer just outside of the last closed flux surface (LCFS), is generated by the helical coil system due to the overlapping of magnetic island chains. The entire edge region outside the LCFS is termed the stochastic layer in this study, which is composed of stochastic fields, remnant magnetic islands and edge surface layers. The magnetic field lines in the stochastic layer have connection lengths (L c ) in the range from several meters to 2000 m. Four divertor legs, induced by the stretching of the flux tubes, are connected to the divertor target plates, forming a divertor configuration similar to the double-null tokamak configuration [28,33,34]. The vacuum vessel wall and divertor target plates in the LHD are made of stainless steel and graphite, respectively. The VUV spectrometer system in the LHD is commonly used in the diagnostics of edge impurity behavior by observing the distribution of spectral intensity and the shape of the impurity lines [31,32]. Figure 1 shows a schematic of the VUV spectrometer system in the LHD, which is installed at the outboard midplane port at a toroidal angle of ϕ = 18 • . The vertical profile of the VUV emissions as a wavelength-dispersed image is projected on the CCD detector by a space-resolved slit mounted between the entrance slit and the grating in the spectrometer. The horizontal position of the space-resolved slit is about 10.1 m away from the plasma center at R ax = 3.6 m. In the vertical direction, the VUV spectrometer is located at a distance of Z vuv = −0.43 m away from the midplane, as shown in figure 1. A mirror unit consisting of a cylindrical mirror and a flat mirror has been installed between the spectrometer and the torus to switch the view angle. The sightline is basically adjusted to measure the edge plasma profile with a high spatial resolution, while it can be expanded to measure the full plasma profile with a wider viewing angle if the mirror unit is used. The vertical size of the elliptical plasma profile is about 100.0 cm when a stochastic layer is considered, which can be fully observed by the present VUV spectrometer. The observed range of the VUV spectrometer is around 10.0 cm in the toroidal direction. The working wavelength range of the VUV spectrometer is from 300 to 3200 Å. Detailed information about the VUV spectrometer used in the LHD is introduced in [31]. Figure 2 presents the second order spectra of CIV (1548.20 × 2 Å) obtained along the sightline located at a vertical position of about Z = −48.2 cm during the discharge (shot #126987). Two spectra at different times of t = 3.25 s (open circles) and 4.25 s (closed circles) are measured in figure 2. It can clearly be seen that there is a Doppler-shift between the two CIV spectral profiles (emitted by C 3+ ), which is analyzed with a Gaussian profile fitting [31]. Hence, a relative impurity flow velocity along the sightline can be obtained by the formula ∆v = c(∆λ/λ), where c is light speed, ∆λ is the Doppler-shift, and λ is the wavelength of the line emission. The same procedure can be carried out along other sightlines to obtain the vertical distribution of the chord-integrated velocity of the C 3+ impurity flow. The measured chordintegrated velocity of the C 3+ impurity flow according to the CIV Doppler-shift spectrum will be shown later in figure 4(a). In addition, it can be seen that the peak value position of the CIV spectrum shifts to a lower wavelength from t = 3.25 to 4.25 s in figure 2, i.e. the so-called blueshift according to the Doppler effect, which indicates that the C 3+ impurity flow moves towards the outboard side of the torus. A detailed analysis of the C 3+ impurity flow direction will be presented in the following sections.

The EMC3-EIRENE code
The EMC3-EIRENE code can well treat the plasma and impurity transport in an arbitrary 3D magnetic configuration, such as helical devices and non-axisymmetric tokamaks with RMP fields, and it has been widely used for 3D edge plasma modeling [35][36][37][38][39][40][41][42][43][44][45][46]. The EMC3 code [26] solves the Braginskii fluid equations for the particle, momentum and energy transport of ions and electrons, and is self-consistently coupled with the EIRENE code [27,47,48] to treat the transport of neutral atoms and molecules. The parallel transport along the magnetic field is assumed to be classical, while for cross-field transport, anomalous diffusion is assumed. The Monte Carlo (MC) method is employed to solve the fluid equations for the steady-state plasma temperature, density and parallel flow distributions. The magnetic-field-aligned grid is used by EMC3-EIRENE to provide computationally effective access to fast magnetic field reconstruction during MC particle tracing based on the reversible field line mapping (RFLM) technique [49,50]. This magnetic geometry can well treat both open field lines that terminate on the target plates and closed field lines that exist inside the plasma core. Detailed information of the edge magnetic configuration for the LHD and the computational grid constructed by using the vacuum fields is introduced in [25,33,51].
The EMC3 code also includes a self-consistent treatment of impurity transport for studies of the relevant impurities [52]. The following continuity and momentum equations for impurity transport are solved by EMC3 to obtain detailed information, such as impurity density and velocity, for each charge state: where the subscripts i and z mean the background ion and impurity species, respectively. D imp is the impurity perpendicular transport coefficient and S z is the impurity source of  the ionization state z determined by the ionization and recombination of impurities. s and τ s are the coordinates along the magnetic field and the collision time between the impurity and background plasma, respectively. The terms on the right-hand side of equation (2) are the impurity pressure gradient force, the electrostatic force, the friction force, the electron thermal force and the ion thermal force in sequence.
For the impurity momentum transport model, the friction force and the ion thermal force are the dominant forces acting on the impurity according to [3]. The friction force drives the impurity towards the target plates, while the ion thermal force induced by the temperature gradient pushes the impurity in an upstream direction. Therefore, the balance between the friction force and the ion thermal force determines the transport of the impurity and thereby the impurity distribution in the edge plasma. Both the friction force and the ion thermal force are associated with the background plasma parameters, implying that the force balance can be affected by the background plasma conditions. The feedback of impurities in the background plasma is given by energy sinks, due to the excitation and ionization of impurities. For the present version of the EMC3-EIRENE code, a minor change of the impurity transport module has been achieved to extract the impurity flow velocities for different charge states. The self-consistent treatment of drift and volume recombination effects is beyond the capability of the present code. The relevant work is ongoing to implement drift and volume recombination effects in EMC3-EIRENE [40].

Calculation of the chord-integrated velocity of impurity flow
Since the measured impurity flow velocity by the VUV spectrometer is obtained according to a Doppler-shift spectrum, the impurity flow velocity simulated by EMC3-EIRENE is weighted by the line-integrated emission intensity along each observation chord. A sophisticated post-processing program for calculating the volumetric emissivity has been developed, which can trace the lines of sight for each observation chord of the VUV spectrometer through the 3D emission distribution obtained from the EMC3-EIRENE code. This post-processing program has been validated against the EUV measurements of impurity emission in previous EMC3-EIRENE simulations [29,30]. In addition, the 3D reconstruction of the spectroscopic measurements of the H α and CIII emission on Wendelstein 7-X has been performed as well by EMC3-EIRENE modeling [53]. In this study, the chord-integrated velocity of impurity flow can be expressed by equation (3): where V z chord(loc) is the projection of the simulated local velocity of the impurity flow along the observation chord, z is the charge state of the carbon impurity and l is the length along the observation chord. The local impurity emission intensity I z (loc) inside each volume cell is calculated according to the relation I z (T e , n e ) = n e · n z imp · L z (T e ), where n z imp is the carbon impurity density of the charge state z and L z (T e ) is the emission coefficient taken from the ADAS database [54]. This emission intensity weighted method can effectively suppress the numerical noise for the post-processing data according to the test simulations. The experimental measurements of the impurity flow velocity are achieved at t = 3.25 and 4.25 s according to the Doppler-shift effect, which measures the relative impurity flow velocity between two timings. In the modeling, two scenarios for different timings (t = 3.25 and 4.25 s) during the discharge are simulated separately since the timeindependent fluid equations are solved by EMC3 code [26]. The respective absolute chord-integrated velocities of the C 3+ impurity flow for different timings (t = 3.25 and 4.25 s) are calculated by the above method, and then the chord-integrated velocity of the C 3+ impurity flow at t = 4.25 s is subtracted by that at t = 3.25 s to calculate the resultant relative horizontal velocity of the C 3+ impurity flow, ∆V C 3+ chord , as shown later in figure 4(a). As a consequence, a quantitative comparison between the EMC3-EIRENE simulations and the VUV measurements can be carried out, which is presented in the following section.

Setup of EMC3-EIRENE simulations
The input parameters for EMC3-EIRENE modeling are specified according to the experimental measurements during LHD exposure. The experiment is attempted for hydrogen discharges with a magnetic axis position of R ax = 3.6 m and a toroidal magnetic field of B t = 2.75 T. Two scenarios for different timings (t = 3.25 and 4.25 s) during the discharge (shot #126987) are simulated in this work. They are used to calculate the relative impurity flow velocity and compared with the experimental data. The respective boundary conditions for particle and energy transport at the LCFS are the upstream density (n LCFS ) and input power (P SOL ), which are obtained experimentally. For the time t = 3.25 s, an electron cyclotron heating (ECH) power of 2 MW is used and the upstream density is 2.2 × 10 19 m −3 . For t = 4.25 s, the neutral beam injection (NBI) power is 10 MW and the upstream density is 6.5 × 10 19 m −3 . The Bohm sheath boundary condition is used at the divertor target plates. The ion and electron sheath heat transmission coefficients are assumed to be 2.5 and 4.5, respectively. The generation of a carbon impurity is induced by erosion of the divertor target plates, and the sputtering coefficient is assumed to be 0.005 in the modeling. The input power and upstream density for this study are similar to the previous work for the EUV measurements of impurity emission [30]. High upstream density leads to a low plasma temperature at the divertor region and a large particle flux deposition on the divertor targets, which results in a very low sputtering yield according to the previous analysis [30]. Hence, a sputtering coefficient of 0.005 is used here as well as in the previous work.
In addition, test simulations have been performed to check the influence of impurity source location by distributing the same amount of carbon impurity source on the first wall as that on the divertor source. Although the impurity source distribution can affect the local impurity emission, the line-integration effect along the observation chord leads to a suppression of the impact of the impurity source distribution on the C 3+ impurity flow. Hence, impurity source distribution is not crucial for the studies of C 3+ impurity flow. The neutral carbon is released from the divertor target plates according to the plasma flux deposition distribution. The cross-field particle and energy transport coefficients of the background plasma, D ⊥ and χ ⊥ , are determined by fitting the electron density and temperature profiles measured by the Thomson scattering system in the LHD. Figure 3 shows the electron density and temperature distributions measured at the outboard midplane of the LHD and modeled by the EMC3-EIRENE code. A good match between the experiment and modeling is obtained by using   velocity is projected along the observation chord of the VUV spectrometer, which is approximately in the horizontal direction, as shown in figure 1. A test simulation of the horizontal component of the parallel C 3+ impurity flow velocity along the major radius has been performed, which indicates a negligible difference compared to the chord-integrated velocity of the C 3+ impurity flow. Hence, the chord-integrated velocity of the C 3+ impurity flow is also referred to as the horizontal velocity of the C 3+ impurity flow to facilitate the discussion in this work. The positive C 3+ impurity flow velocity is towards the outboard side along the major radius direction, while the negative C 3+ impurity flow velocity is along the inboard direction, as shown in figure 4(a).

Comparison between the simulation and the experiment
The relative chord-integrated C 3+ impurity flow velocity simulated by EMC3-EIRENE shows good agreement with the experimental data, as shown in figure 4(a). It can be seen that there are two peak values of C 3+ impurity flow velocity at the top (Z = 48.0 cm) and bottom (Z = −46.6 cm) edges of the stochastic layer (marked in figure 4(a)). Further, it is found that the C 3+ impurity flows at the peak locations of the top and bottom edges in the stochastic layer move in the same direction towards the outboard side of the torus, which can be understood by the following analysis of the relation between the 3D magnetic configuration and the parallel impurity flow. Both the simulation and experimental results show that the peak value of the horizontal C 3+ impurity flow velocity at the bottom edge is larger than that at the top edge.
The cause of the asymmetric profiles of the horizontal C 3+ impurity flow velocity at the top and bottom edges of the stochastic layer is studied in figures 4(b)-(d), which shows the zoom-in vertical distributions of the absolute and relative horizontal velocities of the C 3+ impurity flow obtained by EMC3-EIRENE for different vertical positions of the VUV spectrometer system. The VUV spectrometer is located vertically lower than the midplane of the LHD by −43 cm, as shown in figure 1, which is fixed in the LHD experiments. However, the post-processing program for calculating the horizontal velocity of the C 3+ impurity flow is flexible when changing the position of the VUV spectrometer. The vertical position of the VUV spectrometer has been moved from Z vuv = −43 cm to the midplane (Z vuv = 0 cm) artificially to study its impact on the vertical distribution of the horizontal velocity of C 3+ impurity flow in the simulation. It can be seen that the relative horizontal C 3+ impurity flow velocities show almost the same value of 4.0 km s −1 at the top and bottom edges (Z = ±46.6 cm) of the stochastic layer for the VUV spectrometer at Z vuv = 0 cm in figure 4(c). Furthermore, to confirm this result, the vertical position of the VUV spectrometer has been changed to Z vuv = 43 cm, which leads to a higher relative horizontal velocity of C 3+ impurity flow at    a small ΔV compared to the peak value of ΔV at Z = ±48.0 and ±46.6 cm. Moreover, the C 3+ impurity flow directions around the peak value regions for V 1 , V 2 and ΔV are along the outboard direction at the top and bottom edges for all three cases.

Impurity flow direction related to the 3D magnetic configuration of the stochastic layer
According to the above experiments and simulations, it is found that the horizontal C 3+ impurity flows at the peak locations of the top and bottom edges in the stochastic layer move in the same direction towards the outboard side of the torus. The reason for this phenomenon is ascertained by an analysis of the relationship between the 3D magnetic configuration and the parallel impurity flow direction along the magnetic field line. Figure 5 displays the 2D distributions of the normalized magnetic field components B R and B z at the poloidal cross section of ϕ = 18 • . The positive direction of the toroidal components of the magnetic field is in a counter-clockwise direction along the torus from the top view; the positive directions of the B R and B z components are also shown with the black arrows in figure 5(a). It can be seen that the direction of the B R component above the midplane is towards the inboard side of the torus, as indicated by the blue arrow, except for the divertor leg regions. However, the direction of the B R component below the midplane is mainly towards the outboard side of the torus, as indicated by the yellow arrow. For the B z comp onent there is a clear boundary around R = 380 cm, as shown in figure 5(b). The upward movement of the B z components is indicated by the yellow arrows on the left-hand side of this boundary, while the downward movement is indicated by the blue arrows on the right-hand side due to the poloidal component of the magnetic field. Figure 6 shows the 2D distribution of the parallel velocity of the C 3+ impurity flow for t = 4.25 s (V 1 ) and 3.25 s (V 2 ) at the poloidal cross section of ϕ = 18 • . The positive and negative signs indicate the directions of the positive and negative toroidal directions. It can clearly be seen that the parallel velocity of the C 3+ impurity flow is in a reversed toroidal  figure 6. The individual directions of the parallel velocity of the C 3+ impurity flow for the P1-P2 are negative in the toroidal direction, as indicated in cyan, while the P3-P4 points are in a positive toroidal direction, as indicated in yellow, respectively. The C 3+ impurity flow moves downwards for P1 and P3 and upwards for P2 and P4 in the vertical direction, respectively. However, all the horizontal components of the C 3+ impurity flow are in the same direction towards the outboard side of the torus. Therefore, a blueshift of the CIV spectrum is observed by the VUV spectrometer, as mentioned in section 2. In the following section, detailed studies using EMC3-EIRENE modeling are performed to investigate the transport characteristics of the C 3+ impurity flow with different magnetic configurations and edge plasma conditions. The C 3+ impurity flow velocity simulated below is the absolute velocity (i.e. EMC3-EIRENE results for one moment) in order to make a direct comparison between different scenarios and also to save computational resources.

Influence of the magnetic field structure on C 3+ impurity flow velocity
In the LHD experiments, the position of the magnetic axis (R ax ) can be changed horizontally to obtain different magnetic field structures. A new computational grid development for R ax = 3.60, 3.75 and 3.90 m has been achieved, which enables us to investigate the impact of the magnetic field structure on the edge impurity transport. The magnetic configurations for R ax = 3.60, 3.75 and 3.90 m are the typical magnetic geometries usually used in the LHD experiments. The scenario simulated in section 4 (shot #126987) is employed as the reference case in the simulations. The other scenarios, which do not represent specific experiments, are employed to make a comparative study to check the influence of the magnetic configuration and edge plasma condition on the C 3+ impurity flow in this work. In addition, the studies of different scenarios can play a predictive role in the projections of future experiments. Figure 7 shows the 2D distributions of the L c for the R ax = 3.60, 3.75 and 3.90 m at the poloidal cross section of ϕ = 18 • . In the outermost region of the stochastic layer, the L c of the open field lines is very short (L c < 10 m) for all three magnetic configurations. The stochastic magnetic field lines surrounded by the short field lines (L c < 10 m) have a variety of L c (10 < L c < 2000 m), which corresponds to 0.5-100 toroidal turns of the LHD torus. The horizontally outward shift of the R ax from 3.6 to 3.9 m leads to a corresponding outward shift of the confined plasma region, as shown in figure 7. The thickness of the stochastic layer is the largest for the case of R ax = 3.90 m among the three magnetic configurations. For R ax = 3.60 m, there are thicker flux tube bundles with a long L c distributed at the inboard divertor leg regions compared to the outboard divertor leg regions, as shown in figure 7(a). When the R ax shifts outwards horizontally from 3.60 to 3.90 m, it is clearly seen that thick flux tube bundles with a long L c appear at the outboard divertor leg regions for R ax = 3.75 and 3.90 m in figures 7(b) and (c). The in-out asymmetric divertor leg structure can lead to in-out asymmetric distributions of the background plasma along the divertor legs. Figure 8 shows the 2D distributions of the plasma temperature and density for R ax = 3.60, 3.75 and 3.90 m at the poloidal cross section of ϕ = 18 • . Input parameters that are the same as the above simulations of t = 4.25 s are used here for the three magnetic field structures, i.e. P SOL = 10 MW, n LCFS = 6.5 × 10 19 m −3 , D ⊥ = 0.4 m 2 s −1 and χ ⊥ = 0.4 m 2 s −1 . It can be seen that the distributions of the plasma temper ature and density are strongly associated with the magnetic field structures as shown in figure 7. The plasma temper ature and density at the inboard X-point region reduce gradually when R ax moves from 3.60 to 3.90 m. Accordingly, an increase of the plasma temperature and density is obtained at the outboard X-point region. The thicker flux tube bundles with a long L c distributed at the inboard (R ax = 3.60 m) and outboard (R ax = 3.75 and 3.90 m) divertor leg regions result in a wider plasma distribution, respectively. The plasma temper ature and density are very low at the outermost regions of the stochastic layer due to the short L c (L c < 10 m) for all three magnetic field structures. The plasma temperatures in the divertor leg regions are less than 30 eV for the three magnetic configurations. Near the divertor target plates, the plasma temperature is even lower than 10 eV at both the in-and outboard sides. The in-out asymmetric distributions of the background plasma along the divertor legs in figure 8 can cause the asymmetric erosion of the divertor target at the in-and outboard sides. An outward shift of R ax from 3.60 to 3.90 m can lead to the reduced erosion (~40%) of inboard divertor targets and increased erosion (by a factor of ~3.7) of the outboard divertor targets. The impurity source distribution can affect the local   impurity emission, but the chord-integrated effect can suppress the impact of the impurity source distribution, as mentioned above.  figure 7(a). The distances to the targets for the flux tubes at the top and bottom edges are closer to the inboard lower and upper divertor targets, respectively. This has been confirmed by the field line tracing code Kmag [55]. Hence, the plasma pressure tends to drive the plasma at the top and bottom edges to the inboard lower and upper divertor leg regions, respectively. This can be proved by the results in figure 9(a), which shows that the plasma flows at the top and bottom edges move in the same directions as those for the inboard lower and upper divertor leg regions, respectively. However, for R ax = 3.75 and 3.9 m, the horizontally outward shift of R ax leads to the flux tubes mainly connecting to the outboard divertor targets, as shown in figures 7(b) and (c). The distances to the targets for the flux tubes at the top and bottom edges are closer to the outboard lower and upper divertor targets, respectively. In the same way, the plasma flows at the top and bottom edges move in the same direction as those for the outboard lower and upper divertor leg regions in figures 9(b) and (c), respectively. As a result, the horizontally outward shift of R ax leads to a reversal of the plasma flow. It can also be seen that the values of V || at the top and bottom edges of the stochastic layer are very high for three magnetic configurations in figure 9. The plasma flow velocity has an impact on the friction force according to equation (2), and further on the force balance acting on the impurity. Hence, the resultant parallel velocity of the C 3+ impurity flow is associated with the distribution of V || , which will be analyzed below.
The effects of the friction force and the thermal force are investigated in figure 10, which presents the 2D distributions of the force balance of V fric || − V ther || between the friction and thermal forces for R ax = 3.60, 3.75 and 3.90 m at the poloidal cross section of ϕ = 18 • . It is clearly shown that the plasma edge regions are in the friction force dominant regime, and the regions near the LCFS are in the thermal force dominant regime for all three magnetic configurations with the present set of plasma parameters. The friction force is dominant in the high density/low temperature region, while the thermal force is reversed according to [28]. The individual plasma densities at the outermost edge regions for R ax = 3.60 and 3.75 m are very low in figures 8(d) and (e). Hence, thermal force dominant regimes are obtained at the very edge regions for R ax = 3.60 and 3.75 m in figures 10(a) and (b), respectively. In addition, the divertor leg regions, which have a very low plasma density, are also in the thermal force dominant regime in figure 10. The transport of the parallel impurity flow is mainly determined by the momentum balance along the magnetic field line. The background plasma flow is usually directed towards the divertor target plate, which will lead to the suppression of the divertor leakage of impurities by friction force. Hence, the plasma edge regions of the LHD exhibit a good impurity screening effect for all three magnetic configurations, with the present set of plasma parameters. Figure 11 shows the 2D distributions of the parallel velocity of the C 3+ impurity flow for R ax = 3.60, 3.75 and 3.90 m at the poloidal cross section of ϕ = 18 • . The plasma edge regions are mainly dominated by the friction force for all three magnetic configurations according to the results in figure 10. The dominant friction force can drive the C 3+ impurity flow along the same direction as the plasma flow. Hence, it can be seen that the distributions of the parallel C 3+ impurity flow in figure 11 show the same phase as the plasma flow profiles in figure 9. As a consequence, the directions of the parallel velocity of the C 3+ impurity flow at the top and bottom edges are reversed for R ax = 3.75 and 3.90 m compared to that for R ax = 3.60 m.   Figure 12 shows the vertical distributions of the horizontal velocity of the C 3+ impurity flow for R ax = 3.60, 3.75 and 3.90 m. The distributions of the magnetic field components B R and B z for R ax = 3.75 and 3.90 m are similar to that for R ax = 3.60 m in figure 5. Hence, the directions of the horizontal C 3+ impurity flow are determined by the parallel C 3+ impurity flow directions. This leads to a reversed direction of the horizontal impurity flow for R ax = 3.75 and 3.90 m compared to that for R ax = 3.60 m at the top and bottom edges of the stochastic layer, as shown in figure 12. It is noted that this variation of C 3+ impurity flow directions between different magnetic configurations does not mean that the impurity transport regime changes. In all cases, the impurity transport is in the friction force dominant regime in the present set of plasma parameters. The positions of the green dashed lines in figure 12

Influence of the edge plasma condition on C 3+ impurity flow velocity
The above analyses show that the 3D magnetic field structure and the force balance acting on impurities play important roles in determining the impurity transport properties in the stochastic layer. Since the force balance is strongly associated with the edge plasma condition, a detailed analysis has been performed to evaluate the influence of the edge plasma condition on the distribution of the horizontal velocity of the C 3+ impurity flow. The position of the magnetic axis is located at R ax = 3.6 m for the following analysis. Figure 13 shows the 2D distributions of the plasma temperature and density for n LCFS = 6.5 × 10 19 , 4.5 × 10 19 and 2.5 × 10 19 m −3 at the poloidal cross section of ϕ = 18 • . Here, the input power is fixed to 10 MW, and both the cross-field particle and energy transport coefficients of the background plasma are 0.4 m 2 s −1 for the three cases. The reduced upstream plasma density (n LCFS ) leads to a higher edge plasma temperature and a lower edge plasma density, as shown in figure 13. This results in an increase of the thermal force and a reduction of the friction force in the stochastic layer, which will have an impact on the parallel transport behavior of the C 3+ impurity flow. Figure 14 shows the 2D distributions of the force balance   between the friction and thermal forces is more remarkable. The variation of the force balance can lead to a corresponding modulation of the parallel C 3+ impurity transport. In addition, a comparative study of the effect of the magnetic configuration on the impurity transport regime in the LHD and HL-2A was conducted in [28], where the importance of enhanced perpend icular transport in the stochastic layer compared to the tokamak SOL is pointed out. Figure 15 displays the 2D distributions of the C 3+ density for n LCFS = 6.5 × 10 19 , 4.5 × 10 19 and 2.5 × 10 19 m −3 at the poloidal cross section of ϕ = 18 • . The enhanced thermal force at the inboard divertor legs in figure 14 can push the carbon impurity to the upstream regions and hence increase the divertor leakage of impurities. For a low upstream density of 2.5 × 10 19 m −3 , it is clearly shown that the C 3+ density is higher at the upstream and near the inboard X-point regions compared to the cases of 6.5 × 10 19 and 4.5 × 10 19 m −3 . In particular, the dominant thermal force at the inboard divertor leg regions in figure 14(c) results in a substantial accumulation of C 3+ ions, as shown in figure 15(c). Hence, the enhancement of thermal force for the case of n LCFS = 2.5 × 10 19 m −3 leads to a suppression of the impurity screening effect, which results in upstream impurity accumulation. Figure 16 displays the 2D distributions of the parallel velocity of the C 3+ impurity flow for n LCFS = 6.5 × 10 19 , 4.5 × 10 19 and 2.5 × 10 19 m −3 at the poloidal cross section of ϕ = 18 • . The directions of the parallel velocity of the C 3+ impurity flow at the top and bottom edges are the same for three cases. For n LCFS = 2.5 × 10 19 m −3 , the distribution of the parallel velocity of the C 3+ impurity flow becomes noisy in the stochastic layer, which is induced by the change of the force balance, as shown in figure 14. In particular, the changes of the parallel C 3+ impurity flow direction at the inboard divertor leg and outboard X-point regions are remarkable. Figure 17 shows the vertical distributions of the horizontal velocity of the C 3+ impurity flow for n LCFS = 6.5 × 10 19 , 4.5 × 10 19 and 2.5 × 10 19 m −3 . The green dashed lines indicate the peak value locations of the relative C 3+ impurity flow velocity at Z = 48.0 and −46.6 cm in figure 4(a). For n LCFS = 6.5 × 10 19 and 4.5 × 10 19 m −3 , the positive horizontal C 3+ impurity velocities at Z = 48.0 and −46.6 cm indicate the outward impurity flows along the major radius direction, while a reversed impurity flow direction is obtained for n LCFS = 2.5 × 10 19 m −3 . This reversal of impurity flow is due to the enhanced thermal force at the inner radii, as shown in figure 14. The C 3+ impurity flow velocity at Z = 48.0 cm for n LCFS = 6.5 × 10 19 m −3 is around 6.5 km s −1 , which is higher than that for n LCFS = 4.5 × 10 19 and 2.5 × 10 19 m −3 . At Z = −46.6 cm, the largest C 3+ impurity flow velocity of 6.0 km s −1 is obtained for n LCFS = 2.5 × 10 19 m −3 for the three cases.

Summary
The transport characteristics of the edge impurity flow in the stochastic layer of the LHD have been investigated with the EMC3-EIRENE code. The impurity transport model in EMC3-EIRENE has been widely used in tokamaks with a 2D axisymmetric structure. It was necessary to study whether it was able to reproduce and interpret the experiments for complex 3D topology in a stellarator, where different flux tubes strongly interact with each other via perpendicular transport. The modeled synthetic C 3+ impurity flow profile in the stochastic layer using EMC3-EIRENE is in good agreement with the VUV spectrometer measurements.
The asymmetric structure of the chord-integrated velocity of the C 3+ impurity flow at the top and bottom edges was investigated by artificially changing the vertical position of the VUV spectrometer. The vertical adjustment of the VUV spectrometer position has an impact on the line-integrated emission of the CIV along the observation chords, and hence on the resultant vertical profile of the C 3+ impurity flow. The measured C 3+ impurity flows at both the top and bottom edges are found to move outward along the major radius, that is, the impurity flows towards the outboard side of the torus. This can be well interpreted by detailed analysis of the 3D magnetic field structure and the parallel impurity flow direction.
Variation of the magnetic field configuration leads to a change of the 2D flow pattern of impurities at the edges of the stochastic layer. This is attributed to the change of the background parallel plasma flow depending on the magnetic field configurations. For a high upstream plasma density, the parallel transport of the C 3+ impurity flow is predominantly determined by the background parallel plasma flow in the edge regions. A low upstream plasma density leads to an expansion of the thermal force dominant regions, which results in a reversal of the C 3+ impurity flow compared to the high upstream plasma density. In addition, the increased thermal force for the low upstream plasma density leads to a suppression of the impurity screening effect, which can cause upstream impurity accumulation.