Implementation of a 3D halo neutral model in the TRANSP code and application to projected NSTX-U plasmas

A 3D halo neutral code developed at the Princeton Plasma Physics Laboratory and implemented for analysis using the TRANSP code is applied to projected National Spherical Torus eXperiment-Upgrade (NSTX-U plasmas). The legacy TRANSP code did not handle halo neutrals properly since they were distributed over the plasma volume rather than remaining in the vicinity of the neutral beam footprint as is actually the case. The 3D halo neutral code uses a ‘beam-in-a-box’ model that encompasses both injected beam neutrals and resulting halo neutrals. Upon deposition by charge exchange, a subset of the full, one-half and one-third beam energy components produce first generation halo neutrals that are tracked through successive generations until an ionization event occurs or the descendant halos exit the box. The 3D halo neutral model and neutral particle analyzer (NPA) simulator in the TRANSP code have been benchmarked with the Fast-Ion D-Alpha simulation (FIDAsim) code, which provides Monte Carlo simulations of beam neutral injection, attenuation, halo generation, halo spatial diffusion, and photoemission processes. When using the same atomic physics database, TRANSP and FIDAsim simulations achieve excellent agreement on the spatial profile and magnitude of beam and halo neutral densities and the NPA energy spectrum. The simulations show that the halo neutral density can be comparable to the beam neutral density. These halo neutrals can double the NPA flux, but they have minor effects on the NPA energy spectrum shape. The TRANSP and FIDAsim simulations also suggest that the magnitudes of beam and halo neutral densities are relatively sensitive to the choice of the atomic physics databases.


Introduction
The National Spherical Torus eXperiment (NSTX) [1] operated as a midsize low aspect ratio fusion research facility with typical discharge parameters being major radius = R 0.85-0.9 m, minor radius a = 0.67 m resulting in an aspect ratio of A = R/a ~ 1.3, plasma current I p = 0.3-1.5 MA and toroidal field B T = 0.35-0.55 T. One co-directed deuterium neutral beam line with three sources injected up to P b = 7 MW at full neutral energies up to E b = 100 keV. The performance milestones that were achieved in NSTX have been reported elsewhere [2].
For the National Spherical Torus eXperiment-Upgrade (NSTX-U), the heating power will be doubled with a second neutral beam injection (NBI) system that is projected to increase the beam current drive by up to a factor of two and support 100% non-inductive operation [3]. The toroidal field and plasma current will also be doubled and the pulse length increased from 1-1.5 s typical of NSTX to 5-8 s for NSTX-U along with other performance upgrades.

Implementation of a 3D halo neutral model in the TRANSP code and application to projected NSTX-U plasmas
Energetic ion energy distributions are commonly measured using charge exchange neutral particle diagnostics [4] and two types of analyzers have been used on NSTX. One system is the E B ∥ NPA diagnostic [5] utilizing a superimposed parallel electric and magnetic field spectrometer originally developed at the Princeton Plasma Physics Laboratory for the Tokamak Fusion Test Reactor [6] that simultaneously measures the mass-resolved energy spectra of both H and D neutrals with a time resolution of ~1 ms set by signal-to-noise levels. A multianode micro-channel plate detector provides up to 39 energy measurements for each of the H and D species. The calibrated energy range is from E = 0.5-150 keV and the energy resolution varies over a range of ΔE/E = 3%-7% from high to low energy. Extensive measurements of energetic ion loss and/or redistribution including active and passive charge exchange contributions have been reported for NSTX [7,8]. Another system is a multi-sightline solid state neutral particle analyzer (ssNPA) [9,10] utilizing silicon photodiode detectors that can be configured for pulse height analysis to measure energy resolved spectra or current analog output for energyintegrated measurements with fast time resolution [11].
The TRANSP [12,13] code is capable of simulating plasma physics processes that are influenced by charge exchange reactions and includes five types of neutrals: beam neutrals (from injected beams), halo neutrals (from charge exchange reactions between thermal ions and beam neutrals), fast neutrals (from charge exchanged fast ions), warm neutrals (from wall recycling), and cold neutrals (from gas puffing). Each type of neutral can be set on or off in the TRANSP namelist. Attenuation of these neutrals during progression through the plasma is computed using look-up tables for charge exchange and particle impact ionization cross sections.
However, the legacy (prior to 2014) TRANSP-based NPA simulation is not accurate since it did not handle halo neutrals properly: i.e. the halo neutrals were volume averaged over both poloidal and toroidal coordinates. But the fact is halo neutrals remain in the vicinity of the neutral beam footprint and because of multi-generations they have a comparable density to the primary beam neutrals. Since plasma diagnostics that use neutral beams to provide active signals strongly depend on local neutral density, it is conceivable that the signal magnitude and temporal evolution produced by charge exchange on the primary and halo neutrals could be significantly different. Prior to the present work, the effects of 3D halo neutrals on the NPA flux and shape of NPA energy spectra have been explored in in a code called FIDAsim that is discussed further in section 4. To increase the speed of halo neutral calculation and include fast halo neutrals, a new 3D halo model other than FIDAsim is implemented in the TRANSP code.
This article is organized as follows. Section 2 describes the 'beam-in-a-box' 3D halo neutral simulation that has been incorporated into the TRANSP code. Section 3 presents information on the charge exchange neutral particle diagnostics used to measure plasma energetic ion distributions and documents the 3D halo simulation for NSTX-U discharge projections obtained using the TRANSP analysis code. Section 4 discusses benchmarking of the TRANSP 3D halo model using the FIDAsim code. Section 5 discusses the effects of different cross section databases and the paper concludes in section 6 with a summary.

The 3D halo neutral model in NUBEAM
In the NUBEAM [14] module prior to this work, the first generation (or birth halo neutrals) were uniformly distributed over the plasma volume contrary to the physical reality of being spatially localized around the NBI footprint. Such volume distributed birth neutrals could undergo further charge exchange collisions producing nth generation halos until an ionization collision occurs. In the 3D halo model of this work, the birth neutral is localized to a birth cell and is subsequently tracked through multiple generations that can traverse multiple cells until the particle ionizes or exits the 3D simulation domain that is set for each neutral beam. This process creates the 3D halo neutral cloud that physically surrounds each injected beam.
The 3D halo neutral model employs a 'beam-in-a-box' concept hereinafter called the box. This choice is driven by the structural nature of the NUBEAM module that computes injected neutral beam deposition for use in the TRANSP code.
The following text will first address the box model, followed by primary beam neutral deposition and first generation halo creation and finally tracking of the halos through multiple generations.
For the legacy E B NPA diagnostic simulations in the TRANSP code, the PREACT [15] atomic physics database that has no excited state model has been used in the NUBEAM module. Recently, NUBEAM was extended with full implementation of ADAS [16,17] atomic physics ground state data. The excited state model uses the ADAS 310 program [18] that calculates the excited population structure, effective ionization and recombination coefficients (including radiative recombination) for hydrogen atoms or hydrogenic ions in mixed species plasma targets. A very many n-shell bundle-n approximation is used; more details are in www.adas.ac.uk/ man/chap3-10.pdf.
The main physics issue for pushing beyond the legacy PREACT atomic physics database in TRANSP is the density and temperature dependence of the ADAS database for beam stopping when effects of collisional excitation of beam neutral atoms is taken into account and the collective nature of the state excitation process. In ADAS/PREACT, atomic physics data such as rate coefficients for a thermal species are averaged over a Maxwellian distribution function. In this document, the ADAS ground state cross sections are used in both the TRANSP and the FIDAsim codes to facilitate the comparisons.
The box is a bounded 3D Cartesian domain that is aligned with and symmetrical about a neutral beam footprint as illustrated in figure 1. For clarity, only beam primary neutral tracks are shown because including multi-generation halo neutral paths results in an obscure image. The box encompasses both injected beam neutrals and multi-generation halo neutrals. Separate boxes are prescribed for each of the six neutral beam injectors on NSTX-U. Each box is subdivided into a multitude of cells. The dimensions of the cells are code input parameters that are chosen as a compromise between available computational resources and the desired resolution of the beam deposition and subsequent halo evolution. Typical parameters employed for the box structure are width X = ± 35 cm, height Y = ±35 cm and length L = 210 cm. The box is subdivided into 140 cells in width, 140 cells in height, 420 cells in length. The cells are cubical with edge dimensions of 0.5 cm that is a small fraction of the neutral collisional mean-free-path characteristic of the plasma under investigation.
A schematic of the 3D halo neutral generation process is shown in figure 2(a) while a typical example of the evolution of the halo neutral population as a function of halo generation as calculated using NUBEAM is shown in figure 2(b). The total beam neutral current I 0 (atoms s −1 ) is divided into N launch markers of weight w j = I 0 /N launch . In a representative NUBEAM run, we set N launch = 64 000 and define N split = 50 giving a limit on the possible number of markers that can be generated by the parent neutral beam and the subsequent multi-generation halo neutrals. The parameters N split-geo = 5 (spatial splitting) and N split-kin = 1 (velocity splitting) are used to impose a numerical limit N markers = N launch × N split-geo × N split-kin = 9.6 × 10 5 on the number of markers along a track, either during beam deposition or halo evolution. A halo track is terminated by an ionization event, by reaching a minimum weight w min or by exiting the overall simulation box. At the end of the 3D halo modeling process, halo neutrals exist as a cloud of neutral atoms that envelopes each neutral beam footprint. In NUBEAM, both the primary beam deposition and the 'mature' halo evolution processes are completed prior to each TRANSP time step. No memory of NUBEAM results from the previous time step is retained in the code.  Before the 3D halo model can be initiated, it is necessary to deposit the injected beam primary neutrals into the prescribed cells within a given 'beam-in-a-box' using the NUBEAM module. The process can be envisioned as follows with the aid of the schematic in figure 2(a). Using the known beam source geometry and injection path, a procedure launches full, half and third energy neutral beam primary Monte Carlo particles. All beam primary neutrals are in the ground or excited states depending on the atomic physics used for modeling. Each energy component of each species is treated separately during progression into the plasma. While some beam neutrals undergo deposition by ionization collisions, a subset of the beam primary neutrals produce thermal halo neutrals upon deposition by charge exchange collisions with background plasma ions as well as fast halo neutrals due to charge exchange on partially slowed down fast ions traversing the beam footprint. Deposition of beam neutrals along with the subsequent halo neutral tracking is an involved numerical process that is described in detail the TRANSP User Manual [19] but will be briefly described below.
For computational efficiency in the deposition process, individual injected beam neutral atoms are not utilized. Rather, the beam is treated as composed of Monte Carlo particles or 'markers'. The process begins with deposition of weighted beam primary neutral markers. Each marker has a start location at x j,0 and a velocity v j . (x j,0 can be either a box entrance point for a beam neutral or a birth location for a halo neutral.) For each beam energy component and species, an initial number N launch of beam primary markers are launched by dividing the associated total beam neutral current I 0 (atoms s −1 ) into N launch markers each of weight w j = I 0 /N launch representing some fraction of the total neutral current in atoms per second along with indication of the neutral species (H, D, T…).
During beam deposition, sub-markers are spawned from the beam primary markers either by ionization events or by charge exchange collisions with the background plasma ions that produce the 1st generation of halo neutrals. To generate a sub-marker, the so-called N split-geo and N split-kin model controls are used. Geometrical splitting N split-geo is a number of random, probability weighted, charge-exchange splits during either the primary beam deposition process or the evolution of a halo neutral track. N split-kin is a number of splits in velocity space that are sampled from the eligible ion population (Maxwellian or not) at each charge-exchange event. The exact ratio of N split-geo to N split-kin is checked and maintained to be a constant. The weight of a halo marker is required to be more than w min and depends on weight of its 'parent' neutral deposition marker and on plasma parameters as well as on chosen statistics N split , N split-geo , N split-kin as a fraction of mean free flight-time due to neutralizing charge-exchange reactions to a total one, which includes electron ionization, impact ionization and charge-exchange reactions. Monte Carlo halo markers with weight at or below w min = w j /N split are not allowed. The control number N split shows how many halo neutral markers may be generated from one beam primary neutral marker, and together with N split-geo and N split-kin facilitates placing a limit the number of halo generations as well as controlling the number of generations in a halo track.
If a marker of halo neutrals reaches weight w min then a random number generator is applied to produce either ionization or charge-exchange.
As a jth neutral marker (beam primary and halo neutral markers are treated similarly) goes through the plasma region encompassed by a 3D box, its path intercepts a k number of a box cells with { } dl j k , intersection length and produces a track with a total N j intersections. For each jth track, the intersec- gives the exit point from kth cell (dl j,k = | x j,k − x j,k-1 |) and after encompassing N k intersection cells gives the exit point from the box, x j Nk , . Stopping rate coefficients are used to compute survival probability P j k , for the jth marker. Here, P j k , is a probability of the jth marker to exit the kth intersection cell, where P j,0 = 1, and P j,Nj is a probability of jth marker to escape from the box region. Thus, in each 3D box one can accumulate beam injec- , and any other desired moments of the actual distribution. Here, V k is the volume of the kth intersection cell and dt j,k = dl j,k /|v j |. In a similar fashion, charge-exchange of the birth halo neutrals results in creation of descendent halo neutral generations or tracks localized with probabilities based on ( ) − − P P j k j k , , 1 and with splitting to capture energy dependent effects.
The halo neutrals have a spatially broad density profile and generally increase the peak neutral density by the order of 20%-50% relative to the beam neutral density in plasmas with temperature of ~1-4 keV and density of a few 10 13 cm −3 . The ratio of halo neutral density to beam neutral density depends on plasma profiles especially plasma temperature and density. Beyond density considerations, the halos increase the NPA flux even further because the cross sections for charge exchange on thermal halo neutrals are larger than that for beam primary neutrals due to the energy dependence of the reaction rates. The increase in the NUBEAM CPU time when the 3D halo model is deployed can be ~2x depending on the choice of 3D halo model parameters noted above. Due to this increased run time, the 3D halo model should primarily be utilized for the NPA efflux simulation. Halo neutrals cause fast ion charge exchange loss, thus impacting basic TRANSPcalculated quantities such as beam driven current, transport and confinement. However, note that the choice of volumeaveraged halo model or the 3D halo model has virtually no effect on neutral beam driven current or neutron yield. This is simply because the TRANSP code assumes the plasma is toroidally symmetric and that the calculation of global quantities does not depend on whether halo neutrals are localized in a specific toroidal region or uniformly distributed around the torus.
At the Culham Centre for Fusion Energy UK, a similar 3D neutral code was developed known as LOCUST [20,21].

Application of the 3D halo neutral model to NSTX-U
The most effective NPA diagnostics employ sightlines that intersect the footprint of neutral beam injectors inside the plasma to measure fast ion distributions ranging from thermal to supra-thermal via the charge exchange process that generates escaping neutrals. For application of the 3D halo neutral simulation to NSTX-U, two representative NPA sightlines are examined as shown in figure 3. One sightline (solid magenta line) corresponding to a candidate E B NPA diagnostic views across the co-injection paths of NBI #1 that injects at major tangency radii R nb = 50, 60 and 70 cm. The other sightline (dashed blue line) corresponds to the location of one of the planned ssNPA arrays (blue fan-like footprints) viewing across the co-injection paths of NBI #2 having major tangency radii R nb = 110, 120 and 130 cm. Note that the type of NPA diagnostic has no effect on the 3D halo simulations presented herein. Both elected diagnostic sightlines have a tangency radius of R tan = 100 cm that was chosen because the charge exchange flux corresponds primarily to co-passing energetic ions that dominate the co-injected fast ion distribution. For convenience, the above will be referred to as the 'E B NPA' and 'ssNPA' sightlines in this paper. Figure 4 illustrates the localization of the charge exchange flux in space that arises from the intersection of the E B NPA diagnostic sightline with the NBI #1 primary neutral footprint (inner triad) and likewise the ssNPA sightline with that of NBI #2 (outer triad). Localization is strongest near the NBI full energy, but remains substantial over the entire slowing down distribution. The spatial localization weakens at smaller NPA tangency radii, R tan , due to attenuation of the beam neutral density with increasing penetration distance. Throughout this paper, contributions to the NPA flux arising from edge neutral densities are turned off in the TRANSP simulation code; i.e. the simulated NPA flux is produced by charge exchange on beam and 3D halo neutrals only.
In the TRANSP analysis code, the NUBEAM module uses measured temperature and density (including impurity) profiles and rotation velocity to compute the beam ion deposition and density using a Monte Carlo method for computing the injected neutral density, attenuation, beam-ion birth profiles, buildup of beam ion density and pitch-energy resolved distribution functions. Note that NUBEAM does not evolve plasma parameters and profiles itself: this is the function of the coupling with the TRANSP code. In cases where finite Larmor radius (FLR) effects need to be considered, the fast ion distribution can be converted to particle position with an FLR model. In the calculation of NPA flux, the fast ion distribution at the particle location is used because the charge exchange reactions take place at particle position. The gryo-radius can be as large as ~1/3 of minor radius on NSTX but about 1/6 of minor radius on NSTX-U since the magnetic field will be doubled (B T = 1.0 T).

TRANSP simulations documenting 3D halo neutral effects for the E B NPA sightline
Physics parameters derived from TRANSP analyses for the E B NPA sightline having a tangency radius of R tan = 100 cm The injected primary beam neutral density (a) and the total 3D halo neutral density (b) as a function of distance along the E B NPA sightline and time with a programmed notch in NBI that occurs at t = 3 s is shown in figure 5. The plots are very similar with the halo neutral density being ~25% greater than that for the beam primary neutrals. In the figures to follow, the data are captured at t = 2.5 s prior to the beam notch. Figure 6(a) compares the beam primary and total halo neutral densities, the peak halo density being ~25% greater than the primary as noted above. The composition of the halo neutral density over multiple generations as viewed along the E B NPA sightline is illustrated in figure 6(b). The total halo neutral density is comprised of multiple generations of halos with the first three generations being dominant. Figure 7 exhibits the halo neutral density over multiple generations on a semi-logarithmic scale that provides additional detail on the halo profiles. Having examined the role of halos regarding neutral density effects, attention now turns to effects on charge exchange neutral flux. The evolution of the E B NPA deuterium flux at E = 85 keV as a function of time is shown in figure 8. At this energy, it can be seen that the peak flux with 3D halos is ~2.3× that without halos.
The E B NPA deuterium emissivity as a function of distance along the NPA sightline at E = 85 keV with and without 3D halo neutrals is shown in figure 9. The ratio of emissivity with and without 3D halo neutrals at the peak location is 1.8. The increase and broadening of NPA emissivity is simply because halo neutrals are spatially more extended than beam neutrals and the peak halo neutral density is modestly  larger than the beam neutral density, as shown in figure 6(a). Figure 10 compares the E B charge exchange energy spectra (integrated along the sightline) with and without 3D halo neutrals. Due to the increase of NPA emissivity, the NPA energy spectrum with 3D halos neutrals is almost ~2× that with that without 3D halo neutrals, as expected. The flux increase at E ~ 85 keV is consistent with the emissivity increase in figure 9.

TRANSP simulations documenting 3D halo neutral effects for the ssNPA sightline
Physics parameters derived from TRANSP analyses for the ssNPA sightline having a tangency radius of R tan = 100 cm as depicted by the dashed blue line in figure 3 are presented in figures 11-16. The ssNPA case is also used to compare the 3D halo model with the legacy TRANSP volume averaged halos.
The data correspond to a simulated NSTX-U deuterium discharge [22] over an interval of 0-4 s with NBI deuterium injection energy of E b = 90 keV from all six sources. In a subset of these figures, solid lines correspond to simulations with 3D halo neutrals, dashed lines are without 3D halo neutrals while the remaining lines are with the 3D halo neutral volume averaged.
The beam primary and total halo neutral densities are shown in figure 12(a) while the composition of the halo neutral density over multiple generations is illustrated in figure 12(b), both as viewed along the NPA sightline. The peak halo neutral density is ~50% greater than that of the beam primary neutrals. The total halo neutral density is comprised of five generations of halos with the first three generations being dominant. Figure 13 exhibits the halo neutral density over   multiple generations on a semi-logarithmic scale that provides additional detail on the halo profiles.
The evolution of the ssNPA deuterium flux at E = 85 keV as a function of time is shown in figure 14. At this energy, it can be seen that the flux with 3D halo density is ~2.8× greater than that without halos. Also shown is the flux resulting from volume averaging of the 3D halos. The dominant message is that localization of the halo neutrals to the NBI footprint significantly enhances the NPA flux. The details of this difference will vary with the choice of sightline and plasma parameters. Figure 15 contrasts the ssNPA deuterium emissivity as a function of distance along the sightline at E = 85 keV with and without 3D halo neutrals. In this and the following figure, the data are captured at t = 2.5 s The emissivity peak with 3D halo neutrals is ~1.8× that without halos, consistent with the E B case.
The ssNPA charge exchange energy spectra (integrated along the sightline) with and without 3D halo neutrals are compared in figure 16. The flux increase at E ~ 85 keV is ~2.1×. The NPA spectra in figures 10 and 16 differ due to variation of the radii for beam injection and NPA sightline intersection as well as differences in the pitch angle viewed. Another factor is that the average fast ion slowing down time for the E B NPA spectrum is t ~ 15 ms while for the ssNPA spectrum it is t ~ 10 ms due to local temperature and density differences. Thus the ssNPA spectrum 'fills-in' faster because of the shorter slowing down time. Figure 17 compares the particle pitch for the ssNPA and E B NPA emissivity distributions evaluated along the sightlines depicted in figure 4. The pitch, v v / , is sampled from the fast ion distribution function along a selected NPA efflux cord. Both the E B NPA and ssNPA sightlines have a charge exchange pivot of R maj = 190 cm and a sightline tangency radius of R tan = 100 cm which means that the pitch variation   with distance along the NPA sightline is identical for the two cases. However, intersection with the NB footprints localizes the pitch range for the two NPA measurements differently. Using FWHM values for the E B NPA v v / = 0.91-0.99 (demarked by dashed lines), the pitch at the NPA peak emissivity is v v / = 0.95. For the ssNPA, v v / = 0.70-0.82 with the pitch at the ssNPA peak emissivity being v v / = 0.75. To summarize, the data in subsections 3.1 and 3.2 indicate that the 3D halo neutrals increase the NPA flux at E = 85 keV above charge exchange on the beam primary neutrals alone by factors of ~2.3-2.8× depending on the NPA sightline and implicit integrations involved over space or energy. The overall conclusion from the data presented above is that the 3D halo neutral model developed for TRANSP is consistent not only within itself but also with the FIDAsim code benchmark analysis discussed in the next section.

FIDAsim benchmark of the 3D halo neutral simulation in TRANSP
The Fast-ion D-alpha simulation (FIDAsim) code [23][24][25] provides 3D Monte Carlo simulations of beam neutral injection, attenuation, halo spatial diffusion, and the resulting photoemission from beam excited states, direct charge-exchange, halo emission and fast ion charge exchange. The FIDAsim   code also calculates NPA neutral efflux from charge exchange reactions. There are many possible principal quantum numbers, n, and angular momentum states, l, available to the neutrals. The strong fine structure mixing allows the assumption that the population of each quantum state may be grouped as a single population based on the principal quantum number. In the FIDAsim code, states with n > 6 are neglected since these energy levels are sparsely populated and the cross sections seem uncertain. The required cross sections and reactivities for neutrals in states n = 1-6 are available in Janev's 2004 report [17] and in the Atomic Data and Analysis (ADAS) compilation [18].
The FIDAsim 3D halo neutral model differs from that of the TRANSP code in several aspects as depicted in table 1. In addition, differences between the TRANSP and FIDAsim NPA simulations can be expected because the codes employ different sightline geometry models: i.e. the geometry for TRANSP is a tube while FIDAsim uses a cone. This effect is minimized by using the NPA sightline that more closely satisfies the 'far-field' simplification in analytic modeling [24].
The FIDAsim code has been successfully applied to benchmark the 3D halo neutral model in TRANSP for the E B NPA case in the following manner using all six neutral beam sources with an injection energy of E inj = 90 keV, total power of 12 MW and a programmed notch at t = 3 s. The 'beamin-a-box' model is applied to the three sources of NBI #1 in figure 3 because the E B NPA sightlines intersect those beams only. For benchmarking purpose, ADAS ground state cross sections are used in TRANSP and FIDAsim. In addition, FIDAsim temporally ignores all excited state quantum energy levels and the fast halo neutrals are turned off in TRANSP simulations. The main input plasma density and temperature profiles are shown in figure 18. This is a relatively high density case with peak electron density around 1.2 × 10 14 cm −3 and peak electron temperature around 1.4 keV.
A comparison of NPA energy spectra at t = 2.5 s with and without halos is shown in figure 19. For all three sightlines in this figure, the NPA flux increase is more than a factor of two when halo neutrals are included. In addition, TRANSP and FIDAsim modeling of the NPA energy spectrum achieve excellent agreement in both the shape and magnitude in all cases including with and without halo neutrals.    quantitatively compare beam and halo neutral densities along the white horizontal solid lines (i.e. the neutral beam centerline) and the white vertical solid lines (L = 78 cm, Y = 0) in panels (a)-(d). Even the beam neutral density is strongly attenuated at L = 78 cm with peak density less than 10% of that at the plasma boundary. TRANSP and FIDAsim predictions of beam and halo neutral densities agree well with each other. In this benchmark case, the halo neutral density is ~40% larger than the beam neutral density and spreads much wider than the beam neutral density because of halo diffusion. It is interesting to note that figure 20(f) clearly shows the effect of toroidal rotation on the halo neutral density profile. The peak of the halo neutral density profile slightly shifts to the '−X' direction, the same direction as toroidal rotation, while beam neutral density remains symmetric about the NB centerline. This is simply because when a first generation halo neutral is born, it inherits a toroidal rotation from its parent thermal ion, which has a component pointing to the '−X' direction. For beam neutrals, their velocity is at least one order of magnitude larger than the rotation velocity, so their spatial profile is less affected.
The charge exchange NPA simulators in TRANSP and FIDAsim are also verified and a summary is shown in figure 21. Figures 21(a) and (b) show the pitch angle (at which fast ions can reach the NPA diagnostic) and local fast ion density at that pitch angle versus distance along the NPA sightline.    also shows that the halo neutral density is noticeably larger than the beam neutral density so that the total neutral density is more than double that of the beam neutral density. Figure 21(d) shows the attenuation factors for 60 keV neutrals along the NPA sightline from the TRANSP and FIDAsim simulations. Figure 21(e) shows the differential contribution to the 60 keV charge-exchange flux along an NPA sightline. Figures 21(c) and (e) also illustrate the core localization of the charge exchange efflux in space that arises from the intersection of NPA sightline with neutral beam footprint. Please note that the passive contribution from edge neutrals, such as wall recycling and gas puffing, is not included in these simulations. However, it could be important in experimental measurements since the edge neutral density is a few orders of magnitude larger than the core beam neutral density and could contribute as much as one-third of the total NPA signals in some cases. Figure 21(f) compares the NPA energy spectrum after integration over the sightline in both codes. All the terms in the NPA calculations show excellent agreement between the TRANSP and FIDAsim codes. This verifies the NPA simulation in both codes.  sections and artificial enhancement factors to take into account the effects of excited states, and (4) ADAS310 that self-consistently includes the effects of excited states. Figure 22 compares the neutral beam deposition through charge exchange with thermal ions when using ADAS ground, ADAS hybrid and ADAS310 models. Because of the differences in atomic cross section tables, there are significant differences in the neutral beam deposition, which result in different beam and halo neutral densities. Since ADAS310 model self-consistently includes the effects of excited states on charge exchange and ionization cross sections, this database would be the preferred candidate to be used in standard TRANSP runs. A standard FIDAsim run needs charge exchange, ionization and excitation/de-excitation cross sections for quantum energy levels n = 1-6. The cross sections come from a mixture of ADAS, Janev's 2004 report and other references. In principle, the cross section tables of FIDAsim should be equivalent to ADAS310 cross section tables used in TRANSP. Figure 23 shows TRANSP and FIDAsim calculated beam and halo neutral densities when they use their own standard atomic cross section tables. As shown in figures 23(a), (b), (e) and (f), TRANSP and FIDAsim are in good agreement on the profile and magnitude of beam neutral density. However, figures 23(c)-(f), suggest that TRANSP calculated total halo neutral density is about 15% larger than the FIDAsim predictions although the first generation halos still achieve reasonable agreement in terms of magnitude and profile shape. This difference in total halo neutral density is believed to be mainly caused by the charge-exchange cross sections or the fraction of neutralizing charge-exchange cross sections to total charge exchange and ionization cross sections at relatively low energy levels.

Summary
An upgrade to the halo neutral simulation in the TRANSP code has been completed using a 3D halo neutral 'beam-ina-box' model that encompasses both injected beam and halo neutrals. A subset of the full, half and one-third beam components produce halo neutrals upon deposition by charge exchange that are tracked through multiple generations until the halo neutrals are ionized or exit the box. The TRANSP NPA simulator was used to show that the 3D halo neutrals increase the NPA flux by factors ~2.3 -2.8 above charge exchange on the beam primary neutrals alone, depending on the elected NPA sightline. Benchmarking of the NPA simulator in the TRANSP and FIDAsim codes with a projected NSTX-U discharge. Both TRANSP and FIDAsim use the plasma profiles from TRANSP Run ID 142302R01 at t = 2.5s. (a) Pitch angle that can reach the NPA detector, (b) fast ion density at the pitch angle that can reach the NPA detector, (c) beam and halo neutral densities, (d) attenuation factor for 60 keV neutrals, (e) emissivity along the NPA sightline and (f) NPA energy spectrum for a sightline with both beam and halo neutrals. The 3D halo neutral model and NPA simulator in TRANSP have been benchmarked with FIDAsim code. When using the same ADAS ground state cross section databases, TRANSP and FIDAsim simulations are in excellent agreement on the spatial profile and magnitude of beam and halo neutral densities along the beam centerline and the NPA energy spectra. When using their own standard cross section databases, TRANSP and FIDAsim simulations predict the same beam neutral densities, but there is ~15% discrepancy in the calculated halo neutral densities. This is mainly because of the differences in two atomics physics databases, especially charge-exchange cross sections or the fraction of neutralizing charge-exchange cross sections to total charge exchange and ionization cross sections at low energy levels. It has been shown that halo neutral density is relatively sensitive to choice of the atomic physics database. In addition, the 3D halo neutral model has been applied to NSTX-U projected plasmas [25].
The simulations show that halo neutrals remain in the vicinity of the neutral beam footprint, as expected, and that halo neutral density can be comparable with primary beam neutral density. The halo neutrals can more than double the NPA flux, but they have minor effects on the shape of the NPA energy spectrum.