Simulation of pulse height analysis soft X-ray spectra expected from W7-X

A computer code named RayX has been developed for checking the performance of a spectroscopy system and optimizing individual parts, like detectors and filters for the pulse height analysis (PHA) diagnostic system designed for the stellarator W7-X. Using the code, the intensity and shape of the X-ray spectra are simulated for different plasma scenarios characterized by varying the temperature and density profiles as well as the electron cyclotron resonance heating (ECRH) power over a wide range. In the simulations of the recorded spectra, the influence of geometrical configuration changes of the diagnostic system (pinhole size, detector size, location of each diagnostic component), of the timing of data collection, as well as of the type and thickness of filters are being investigated. The atomic processes of free-free (bremsstrahlung), free-bound (recombination radiation), and bound-bound emission (line radiation) are considered. For the impurities fractional abundancies of 3% carbon (C), 0.5% oxygen (O) and 0.002% iron (Fe) are taken into account. Information about the number of photons which reach the detector and the current generated inside the detector is given. It is shown that the distance between pinhole and detector has a larger impact on the registered spectra (intensity and total number of photons) than the distance between plasma and pinhole. Based on the results of the simulations, the expected optimal positions of the individual components (pinholes, detectors) were defined for the PHA W7-X diagnostic system. A shorter version of this contribution is due to be published in PoS at: 1st EPS conference on Plasma Diagnostics


Introduction
High temperature plasmas, apart from electrons and hydrogen isotopes, contains impurity ions which have significant influence on fusion plasma properties. This makes monitoring of the impurity density very important and special diagnostic tools for such measurements must be present in existing and future fusion devices.
Identification of the line radiation from impurities present in a plasma and determination of their concentration is one of the key issues in the way to a commercial thermonuclear reactor. One of the diagnostics which delivers such an information is a Pulse Height Analysis (PHA) system, currently constructed for the stellarator W7-X. It is one of the commonly used system for measurements of soft X-ray spectra [1][2][3]. Analysis of the slope of the hydrogen and low-Z continuum radiation is used to determine the central electron temperature of the plasma while the intensity of the continuum radiation along with additional spectroscopic data are used to assess Z eff values in the plasma center.
To design the PHA diagnostic system, a special numerical code, named RayX has been developed in Delphi [4]. It is equipped with modules that are responsible for simulation of soft X-ray emission in both, tokamaks or stellarators. It takes into account the geometry of diagnostic port and the type of applied detectors.

Description of the RayX code
The RayX code makes it possible to analyse the soft X-ray emission, taking the plasma scenarios (distribution of n e and T e ), the port geometry and the position of the individual elements of the diagnostic system into account. In the code it is possible to consider the real cone of the plasma view for each detector and compute the number of quanta reaching the sensor. It is possible to establish the correct pinhole-detector distance, pinhole size, plasma-pinhole distance for developing the optimum diagnostic configuration which ensure the required energy resolution. The computation idea is demonstrated in figure 1. Each cone of view is divided into small sub-regions (dV = 1 mm 3 ), where constant values of the electron temperature as well as electron and ions density is assumed. Next, the contribution of each sub-area into the total value of X-rays reaching the detector is calculated. X-ray emission from each sub-region is dependent on a local electron temperature (T e ) and, local electron and ions densities (n e , n i ).
It is planned that the super conducting stellarator W7-X will run pulses of up to 30 min duration. The main heating method for steady-state operation is Electron Cyclotron Resonance Heating (ECRH). In the operation phase a heating power of 8-10 MW is planned to be used. In the chosen simulations plasma scenarios for 8 MW of ECRH, presented in figure 2, have been taken into account [5,6]. The user interfaces of RayX are presented in figure 3. They are foreseen to set system parameters, like geometry of the diagnostic port, plasma scenarios as well as type of detectors and content of plasma including impurities.  In order to simulate a full range of mechanisms of soft X-ray emission it is necessary to take into account several components like: • free-free emission (bremsstrahlung); • free-bound emission (recombination radiation); • bound-bound emission (line radiation); • de-excitation after radiative recombination (additional mechanism for free-bound emission); -3 -
The RayX code includes only first three of these components because they have the largest influence on the registered spectra. Moreover, for detector test purpose they are the most important. A more elaborate description of the X-rays emission from plasma was made in the code IONEQ by A. Weller [7].
In the case of free-free emission, radiation is emitted by free electrons, which are accelerated in the electric field of charged particles. Both, the initial and final states of the electron are free. This explains its continuous spectrum. If the free electrons are scattered by the plasma ions, the bremsstrahlung emission energy E ff per unit frequency ω, temporal interval dt and unit volume V , averaged over the Maxwell velocity distribution is: where it is summed over all species of ions; m e , v, T e are the electron mass, velocity and temperature,hω is the emitted photon energy, n j is the ion density with the charge Z j , and G ff is the Maxwell-averaged Gaunt factor.
Recombination radiation differs from bremsstrahlung in the final state of the electron, which is bound. Radiative recombination emission term is represented by the equation similar to that for bremsstrahlung: χ j−1 is the ionization potential of the final ion with charge j − 1, n is the main quantum number of this state, ξ = 2n 2 is the total number of places in the shell with the main quantum number n, and G fb (µ) is the Gaunt factor for the recombination to the nth shell. The spectrum of radiative recombination has a continuous character with discrete edges.
Line radiation originates from the transitions of electrons between the bound states of atoms or ions.
where: f j is an oscillator strength, G ex is an averaged Gaunt factor for emission bound-bound, n e , n Z are electron and ion densities,T e is an electron temperature and E ph, j is the energy of the X-ray photon. Physics used for description of the X-ray radiation and used by authors is still valid and can be useful for estimation of X-ray emission for diagnostic. Information about gaunt factors for emission -4 -

JINST 10 P10021
free-free G ff (E ph , Z, T e ) , free-bound G fb (E ph , Z, T e , n) and bound-bound G ex (E ph,i /kT e ) (note: in equation (2.3) free-bound Gaunt factor was not in use) as well as about oscillators strengths can be find in [12] and in many other papers. It should be emphasized that for precise analysis of the data measured by the PHA diagnostic, should be considered more complex model of X-ray emission and such a code is under construction.
As it is seen, all equations are dependent on temperature as well as on the concentrations of electrons n e and ions n Z . These parameters are connected with the geometry of the devices taken into account during simulations. RayX is able to use realistic T e , n e and n Z profiles from a tokamak or a stellarator. The ionic compositions for all kinds of impurities are calculated by solving a set of kinetic-equations with assumption of the coronal plasma model [13] (Elvert thermodynamic equilibrium model). In this model different ways for ionization and recombination are assumed. The process of ionization by radiation as well as the process of recombination on the way of collisions between two electrons and one ion, is not allowed here.
An example for the Li ions is presented below.
Finally, the equations for n 1 , n 2 , n 3 can be rewritten in the form of: An example of equilibrium ionization balance presented in the paper, should be understand as a brief description of the algorithm used inside the code only. In [14] can be find huge number of recommendations pointed more recent evaluations of equilibrium ionization balance than in reference [11], but differences between old models and new models for considered iron seems to be huge mainly for temperatures where ionic fractions are quite low (e.g. for Fe 16+ for T = 4·10 6 K, -5 -where ionic fraction is equal about 0.7, error is close to 0%, for T = 9 · 10 6 K, where ionic fraction is equal about 0.08, error is of order of 40%). Such error level can be conditionally accepted for iron but for some other ions not taken into account in paper (e.g. nickel) revision of the equilibrium model should be done. In general, authors claim that presented in [14] recommendations are worth to consider in the case of codes for analyzing and interpretation of the data from X-ray diagnostics (such new code is under construction) but for codes used for the overall estimation of the work environment for diagnostic, older models can be used as well.
For modeling of the X-ray emission from a stellarator plasma, impurity transport effects are not such important as in the case of tokamak but still important. However for general modeling of the X-ray emission, devoted for diagnostic designing, coronal model can be used. Impurity transport should be considered in complex codes designed to be an analysis tool for the plasma physics, where the X-ray spectrum is the source of information. In order to test of this assumption, a special comparison between RayX code and popular IONEQ code was made. In the case when the impurity transport effects was neglected, results obtained from both codes were very similar. The same analyse made with the use of IONEQ code, working in the impurity transport regime, has given a little bit different results for the spectrum but still sufficiently close to the results received from the previous tests. It allowed to prove our assumption. It also means that full near-LTE Elvert model used for plasma balance description can be replaced by simply coronal balance model.
An integral part of the RayX code consists of modules responsible for calculation of the influence of the applied filters for X-rays quanta reaching the detector as well as for simulation of the detector sensitivity. In the case of using filters, the code is able to compute the attenuation of the X-rays based on data read from a file. In such files, values of the quanta transmission as a function of the quanta energy are collected. For detectors, there are four predefined choices of absorption of quanta by a detector. These are: the ideal CCD (all photons are detected), back illuminated CCD, front illuminated CCD and front illuminated deep depletion CCD. In the case of PHA will be used silicon diode type detectors instead of CCD detectors. Diode detectors can be compute by loading the data from the file, when is chosen option "Definition of CCD or scintillator from file". The relevant interface is presented in figure 4.
Data absorption coefficients in function of quanta energy for "(BN) CCD", "(FI) CCD", and "(FI DD) CCD" were entered to code as a constant values. CCD data sheet for these CCD's was provided by manufacturer. An example characteristic for (BN) CCD is presented in figure 4.
In this papers absorption data for detectors was implemented by use of the last option "Definition of CCD or scintillator". Absorption characteristic for Si detectors and transmission characteristics for filters were taken from [15], and saved in a file, where absorption coefficients in function of quanta energy was stored D(E ph ). In the case of filters, procedure was similar but in the file, transmission coefficients in function of quanta energy was placed F(E ph ).
The main cycle of simulation is described below: 1. setting of the parameters (among others geometry of the device, kind of filter and detector, reading of the elektron temperature and concentration profiles, and so on) 2. calculation of the radiation from all plasma subregions inside detector cone of view (equations (2.1,2.2,2.3)). Collecting data about number of quanta as a function of the quanta energy N(E ph ). This is spectrum from plasma before filter.
-6 - 3. multiplication: N(E ph ) · F(E ph ) in order to obtain spectrum profile after filter N f (E ph ) 4. additionaly it is possible to guess spectrum after detection by multiplication: An example of the transmission characteristic for Be 8 µm filter as well as absorption characteristic for 450 µm SDD (Silicon Drift Detector) are presented in figure 6.

Exemplary results
A number of simulations have been done and the results allowed to determine the position of the particular diagnostic components [17]. The code assumed hydrogen plasma with given concentrations of impurities like Carbon, Oxygen and Iron. There is no clear prediction of impurity concentrations in W7-X plasma, and to make reasonable assumptions together with previous experiences on W7-AS stellarator, it was estimated that extreme cases are: C 1%, O 0.2%, Fe 0.001% and C 3%, O 1%, Fe 0.001% [16]. Since almost the complete wall and the divertor plates in W7-X will be covered by graphite tiles, carbon will be the dominating impurity species, and a concentration up to 3% may be expected. This number could be reduced by reducing oxygen contaminations by boronisation (reducing carbon sputtering by oxygen wall fluxes). In a boronised wall scenario, the oxygen concentrations are usually well below a maximum of about 0.5%. As far as iron (or metals) are concerned the massive graphite armour in W7-X should help to keep the metal concentrations on a low level. In very good situations (control of low-Z impurities, sufficient low CX-fluxes and -7 -  fast ion losses) concentrations of 1e-5 seem feasible, but in particular cases, by a factor of 10 higher metal concentrations could occur.
Example of spectra were received for the following input parameters: plasma scenario-profile 1 for 8MW ECRH (presented in figure 2), hydrogen plasma with impurities: carbon 3%, oxygen 0.5%, iron 0.02%, 8 µm Be filter, distance between pinhole-plasma equal to 6.5 m, distance pinhole-detector equal to 1 m, detector size of 2.7 mm 2 , pinhole size 200 µm, presented in figure 5. Calculations were perform assuming an ideal CCD, and the total number of quanta per second -8 - which reach the detector in described case was 146915. This value is very important to obtain a good energy and time resolution. Usually, the producer of detectors provides the dependence of the energy resolution (FWHM full width at half maximum) on the input count rate. This indicates the limit of the number of photons for the requested energy resolution. In case of the PHA system for W7-X it is planned to used SDD (Silicon Drift Detectors) from PNDetectors where the energy resolution is almost constant up to 2 × 10 6 input counts per second, and this is equivalent to 132 eV@5.9 keV.
Other computation results are presented in figure 7 which shows the number of photons which reach the detector dependent on the pinhole size. It is clearly seen that for the applied input parameters, distance plasma and pinhole equal to 5 m and distance between pinhole and detector equal to 1 m, the pinhole size should be not larger than 200 µm to ensure the best energy resolution.
Finally, taking into account also the influence of the magnetic field on the turbo-molecular pump, in the PHA system for W7-X, the pinhole has been located at 6.5 m from the plasma centre, and the distance between pinhole and detector has been set to 1 m. Moreover, simulations show that the distance between detector and pinhole has higher impact on spectra (number of photon which reach the detector) than the distance between pinhole and plasma centre. To ensure a good energy resolution of registered spectra, changeably pinholes with piezo drives have been installed to allow handling of the expected high dynamic range of the X-ray flux.