• No results found

Benchmarking Code Changes

Chapter 4 Development of Model

4.4 Linking LOCUST-GPU to HAGIS

4.4.6 Benchmarking Code Changes

In order to verify the code implemented to enable the use of a fast ion distribution function from LOCUST-GPU, HAGIS must be benchmarked against previous runs as well as against other comparable plasma physics codes. A very unstable high-nTAE mode is considered, which provides sufficient drive for the growth rate to be determined within a few wave periods of the simulation. It is performed in an

ITER-like plasma containing an isotropic distribution of α-particles equivalent to that expected in an ignited plasma. This EP population is in the form of a slowing- down distribution function. It is prescribed as a product of two functions, one of radiusf1(ψp) and one of energy f2(E) and is given in Equation 4.31.

f0(ψp,E) =C 1 exp[(ψp/ψ0)/∆ψ] + 1 | {z } f1(ψp) 1 E3/2+Ec3/2Erfc E − E0 ∆E | {z } f2(E) (4.31)

where ψ0 is the deposition radius (chosen to be near the q = 1 surface), E0 is the initial energy of the fast ions (forα-particle this is the energy they are born at) and ∆ψ and ∆E are parameters given below. Ec is the critical energy above which the

fast particle power goes primarily to the electrons. Up until this energy, the bulk ion friction balances the electron friction and the power transfer to both is equal. The critical energy is given by [142]

Ec = 14.8AfTe P ini Zi2/Ailn Λi neln Λe !2/3 (4.32) where Af and Ai are the atomic masses of the fast and thermal ions, Te is the

the electron temperatureni andne are the ion and electron densities and Zi is the

thermal ion atomic number. The ratio between the Debye length and the distance of closest approach (from Coulomb scattering theory) is given by Λi and Λe. For

a D−T plasma where the reactants have a common temperature, this gives an energy distribution that is roughly Gaussian in shape, and a Fermi-shaped radial distribution. The ITER-like parameters chosen for this simulation areψ0= 0.2, ∆ψ = 1/14,E0 = 3.52 MeV,Ec = 329.6 keV and δE = 335.2 keV.

This distribution function has been represented both analytically using Equa- tion 4.31 (the conventional way) and also numerically, in a format that is equivalent to the LOCUST-GPU fast ion distribution function. The numerical distribution function was found by sampling Equation 4.31 on a regular (E,Pζ,µ/E) grid. The

two sets of runs retained all other simulation parameters equal to those used in previ- ous runs of this benchmark, done in [65] and [74] to benchmarkHAGISagainst the

CASTOR-K code [143], which is a hybrid MHD-gyrokinetic model developed for

the stability analysis of global Alfv´en waves in the presence of energetic ions. This has been repeated to ensure that the code is still reporting the same results, and to ensure that the new numerical distribution function is equivalent. In this compari- son, the phase of the mode was held fixed and a scan was performed through mode frequency. The original results found in [65, 74, 143] are recovered. The HAGIS

growth rates, performed using the analytical fast ion distribution function are shown by the black dots in 4.6. The agreement remains good with theCASTOR-Kcode [143] at two different orbit sizes (the squares and the line in Figure 4.6). The results found using the new numerical fast ion distribution function are also plotted, and shown to coincide well with the equivalent analyticalHAGISdistribution function. Slight discrepancies exist between the runs done using the analytical and numeri- cal distribution functions, these are due to the limited grid resolution used. The analytical method can determine the precise values of f0, whereas the numerical one relies on cubic spline interpolation to do so. TheLOCUST-GPU distribution functions are performed at much higher resolution so this effect will be reduced; the grid resolution used in this case was sufficient to confirm the accuracy of the benchmark. As the mode frequency changes, different classes of particles become resonant. This accounts for the lines not being smooth; it is particularly significant as these classes of orbits are very clearly defined in aLOCUST-GPU distribution function, more so than in a distribution function that is a product only of radial and energy functions (although in this benchmark that is not necessarily the case as the distribution function was not created inLOCUST-GPU).

200 300 400 500 600 700 800 0 2 4 6 8 10 12 14 16 18 20 ω [ kH z ] γ / ( ω h βp i )

HAGIS code (Analytical f0)

HAGIS code (Numerical f0)

CASTOR−K code (large orbits) CASTOR−K code (small orbits)

Figure 4.6: Comparison of growth rate at different mode frequencies for a (n= 10,

m = 8,9) TAE mode. The numerical LOCUST-GPU-like fast ion distribution function gives the same results as the analytically prescribed distribution function.

4.5

Summary

The HAGIS code has been outlined, and the requirement for a high-resolution,

multi-dimensional fast ion distribution function in this code to replace the current analytical product of two one dimensional functions has been explained. This leads on to the LOCUST-GPU code, capable of creating such distribution functions. These can be accurately represented in terms of the particle’s CoM, which are best pictured in a CoM phase space that is easily separated into different orbit classifications.

The method used to link the two codes together has been described, providing a new framework in which more quantitative results can be found using theHAGIS

code. The newly implemented capability in HAGIS to use distribution functions

from LOCUST-GPU has been benchmarked against previous results, and also

compared for an example in which the same distribution function has been used in two ways to find the same level of radial redistribution. We are now in a position to

useHAGISto investigate a real MAST phenomenon using a LOCUST-GPU fast

Related documents