Introduction and motivation.
Numerical simulations with the EIRENE  code are indispensable for both understanding and predicting the fuel and impurity transport in the edge and divertor areas of fusion devices including ITER. The transport determines impurity penetration towards the core, plasma exhaust and plasma-surface interaction (PSI) issues. The insight into the interplay of transport and atomic-molecular (A&M) processes provided by modelling is key for understanding of the detachment phenomenon , critical for many exhaust regimes envisaged for ITER and DEMO.
EIRENE is a multi-purpose Boltzmann-equation Monte-Carlo (MC) solver typically employed in an interactive scheme with a computational fluid dynamics (CFD) code. A number of CFD-EIRENE kinetic-fluid code packages such as 2D SOLPS-ITER , EDGE2D-EIRENE, SOLEDGE2D-EIRENE  and 3D EMC3-EIRENE , TOKAM3X-EIRENE  are extensively employed and actively developd by the fusion community; 3D ones are more CPU and memory demanding. They provide self-consistently generated plasma distributions (2D or 3D), heat and particle fluxes to the wall, synthetic spectroscopy and radiative energy losses. An essential part of the neutral MC tracing procedure is the database of A&M processes for main-plasma species and intrinsic/extrinsic impurities. This includes ionization-dissociation-recombination of A&M species, molecular break-up chains in plasma and elastic processes.
In fusion-relevant plasmas, the mean free path $\lambda$ for neutrals is large compared to the gradient lengths L and the flow is in the large Knudsen $K_n=\lambda/L$ number regime, for which no accurate fluid closure is available. This is why a kinetic approach is generally used for neutrals. The MC approach allows solving the kinetic problem on a 3D grid, at the cost of introducing statistical noise. It also provides flexibility in terms of geometry and A&M processes. However, especially in large machines such as ITER, high collisionality regions (HCRs) may appear, where the coupling of the neutrals with the background plasma becomes very strong, leading to quasi-Maxwellian distributions for neutrals. This situation is computationally demanding in the frame of the MC method, because of the high number of collisions to be calculated before the particle is ionized or absorbed at the surface. HCRs could be addressed more efficiently by using a hybrid kinetic/fluid approach.
The CFD side of the packages typically provides sufficient performance allowing calculations for ITER and other large devices on a realistic time scale. It also helps to impose the respective magnetic configuration of the plasma discharge. Often, plasma ions are simulated by a fluid approach, and just the neutrals including molecular species are treated kinetically. However, in some cases, for instance when velocity distributions of plasma species are complex and dynamic (e.g. thermalisation isotropy) or, another example, if A&M processes significantly impact the particle trajectories and energy distributions on time scales shorter than the ion relaxation time, only a kinetic approach can provide sufficient detail and precision. Therefore, a kinetic approach for plasma ions is developed inside the EIRENE code together with various application schemes described below. Treating ions on the kinetic side of CFD-EIRENE packages in addition to a fluid approximation for neutrals provides more flexible and seamless coupling between the codes as well as an internal benchmarking mechanism.
The paper gives an overview over the effort on introducing the hybrid kinetic-fluid approach for EIRENE inside EUROfusion. This effort includes the optimization of the code parallelization by providing an OpenMP-MPI hybrid scheme to the already available MPI approach and some general code refactoring. The shared memory (OpenMP) parallelization is currently being implemented  and aims at alleviating memory issues for large 3D grids and improving resource usage when coupled to other OpenMP-MPI codes (e.g. TOKAM3X).
Spatial and micro-macro methods for fluid-kinetic hybridization (FKH)
Two methods for hybrid tracking of atoms (in future applicable also for ions and molecular species) in both fluid and kinetic parts of the CFD-EIRENE packages are under development.
In the spatial hybridisation (SpH) approach [7,11], the whole simulation volume is segregated into kinetic and fluid domains with an immersed boundary. Trajectory tracking of kinetic atoms are stopped when entering a fluid region and contribute to the source of fluid atoms there. The implementation of these models is straightforward and does not require modifications of the kinetic solver, however the transition between fluid and kinetic regions/boundaries is based on ad-hoc criteria, whose choice affects the accuracy of the scheme. The [7,10] approach used e.g. in Soledge2D is inspired by , where additional reaction channels are introduced to represent evaporation/condensation between the kinetic and fluid phases. In , the decision of whether to treat an atom as fluid or kinetically is based on its birth/recycling location, after which it retains its identity until the next ionization or recycling event.
In the micro-macro hybridisation (mMH) , the neutral distribution function is split into a “fluid” part and a “kinetic correction” seamlessly in the entire simulation domain. A consistent equation is derived in such a way that the sum of the fluid part and the kinetic correction gives exactly the same result as the solution of the original fully kinetic equation. The benefit of mMH is that the solution is (in principle) equivalent to the solution of the full kinetic equation and independent of the recycling regime. However, for a significant computational benefit the fluid model should already capture a large part of the full kinetic distribution (hence, the kinetic correction part should be small), which is expected only for high recycling or detached conditions. The method requires substantial development efforts for the kinetic correction term and fluid solver acting for the whole volume right down to the first wall.
In addition, fundamental physical enhancements of the kinetic ion transport part of EIRENE were performed , by adding first-order drift effects, cross-field diffusion, and magnetic mirror force. These additions, which are relevant for thoroughly investigating the full three-dimensional influence of impurities on actual fusion devices, have been cross-checked on analytical properties of passing and trapped (banana) particle orbits, as well as checking on the introduction of numerical diffusion by our integration scheme.
First applications of the hybrid FKH and kinetic ion tracing (KIT) for ITER and ITER-scale devices with advanced divertor concepts are ongoing, which allows testing the code performance, determination of the key parameters, investigating merits and synergies of the hybridization options.
Summary and conclusion
A FKH is developed (both SpH and mMH) for the CFD-EIRENE packages [6-11]. It combines acceptable computing performance with model accuracy approaching full kinetic simulations. In addition, the KIT option is improved . The advantages of hybridisation methods are compared based on experience from the first applications to ITER scale devices [5-8]. Currently, the main effort is on 1) basic development of the approaches 2) validation with full-kinetic simulations to determine the gain in computational speedup and optimal parameters 3) impact demonstration of new physics included on example of ITER-relevant applications.
In future, the advantages of various FKH approaches should be combined. The hybrid OpenMP-MPI code parallelization goes mostly in parallel, however, its optimization can depend on the final selection of the FHK scheme.
 D. Reiter, M. Baelmans, P. Börner, Fusion Sci. Technol. 2005, 47(2), 172.
 H. Frerichs et al. NME 18 (2019) 62–66
 S. Wiesen et al., JNM 463 (2015) 480–484
 H. Bufferand et al., NF 55, 053025 (2015)
 F. Schluck, CPP, https://doi.org/10.1002/ctpp.201900144
 N. Horsten et al., NME 18 (2019) 201-207.
 M. Valentinuzzi et al. NME 18 (2019) 41–45
 F. Nespoli et al., NME 18 (2019) 29–34
 Karney et al., CPP, 38, 319, 1998
 Y. Marandet et al., this conference
 M.Blommaert, et al. NME 19 (2019) 28–33
|Affiliation||Forschungszentrum Jülich GmbH|
|Country or International Organization||Germany|