Hostname: page-component-6898cfcb55-w5hgh Total loading time: 0 Render date: 2026-11-11T04:38:32.504Z Has data issue: false hasContentIssue false

Implementation of higher-order velocity mapping between marker particles and grid in the particle-in-cell code XGC

Published online by Cambridge University Press:  04 May 2021

Albert Mollén*
Affiliation:
Theory Department, Princeton Plasma Physics Laboratory, Princeton, NJ 08543-0451, USA
M. F. Adams
Affiliation:
Scalable Solvers Group, Computational Research Division, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA
M. G. Knepley
Affiliation:
Computer Science and Engineering, State University of New York at Buffalo, Buffalo, NY 14260-2500, USA
R. Hager
Affiliation:
Theory Department, Princeton Plasma Physics Laboratory, Princeton, NJ 08543-0451, USA
C. S. Chang
Affiliation:
Theory Department, Princeton Plasma Physics Laboratory, Princeton, NJ 08543-0451, USA
*
†Email address for correspondence: amollen@pppl.gov
Rights & Permissions [Opens in a new window]

Abstract

The global total-$f$ gyrokinetic particle-in-cell code XGC, used to study transport in magnetic fusion plasmas or to couple with a core gyrokinetic code while functioning as an edge gyrokinetic code, implements a five-dimensional continuum grid to perform the dissipative operations, such as plasma collisions, or to exchange the particle distribution function information with a core code. To transfer the distribution function between marker particles and a rectangular two-dimensional velocity-space grid, XGC employs a bilinear mapping. The conservation of particle density and momentum is accurate enough in this bilinear operation, but the error in the particle energy conservation can become undesirably large and cause non-negligible numerical heating in a steep edge pedestal. In the present work we update XGC to use a novel mapping technique, based on the calculation of a pseudo-inverse, to exactly preserve moments up to the order of the discretization space. We describe the details of the implementation and we demonstrate the reduced interpolation error for a tokamak test plasma using first- and second-order elements with the pseudo-inverse method and comparing with the bilinear mapping.

Information

Type
Research Article
Copyright
Copyright © The Author(s), 2021. Published by Cambridge University Press
Figure 0

Figure 1.Illustration of the shape functions $S_1 (\xi (v))$, $S_2 (\xi (v))$ and $S_3 (\xi (v))$ in one-dimensional v-space representing $\mathbb {P}_2$ Lagrange elements.

Figure 1

Figure 2.Illustration of a finite element when using a quadratic basis in v-space for a uniform rectangular grid in $v_{\|}$, $v_{\perp }$, where we have labelled the nine vertices A, B,…, I.

Figure 2

Figure 3.Input plasma profiles of (a) ion density and temperature and (b) collisionality.

Figure 3

Figure 4.Colour maps of the change in relative ion density ${\rm \Delta} n / n$ (relative density error) in all configuration space vertices of the poloidal cross-section in time step 200 of the simulation. The colour maps show the change due to the collisions (a,c,e) and the change due to the interpolation (b,d,f), comparing the three different velocity mapping methods: first-order ‘pseudo-inverse’ (a,b), second-order ‘pseudo-inverse’ (c,d) and ‘bilinear’ (e,f).

Figure 4

Figure 5.Colour maps of the change in linear parallel momentum normalized to momentum at thermal speed ${{\rm \Delta} P_{\|}}/({n \sqrt {2 m T}})$ (relative parallel momentum error) for the ions in all configuration space vertices of the poloidal cross-section in time step 200 of the simulation. The colour maps show the change due to the collisions (a,c,e) and the change due to the interpolation (b,d,f), comparing the three different velocity mapping methods: first-order ‘pseudo-inverse’ (a,b), second-order ‘pseudo-inverse’ (c,d) and ‘bilinear’ (e,f).

Figure 5

Figure 6.Colour maps of the change in kinetic energy normalized to pressure ${{\rm \Delta} E}/{(3 n T / 2)}$ (relative energy error) for the ions in all configuration space vertices of the poloidal cross-section in time step 200 of the simulation. The colour maps show the change due to the collisions (a,c,e) and the change due to the interpolation (b,d,f), comparing the three different velocity mapping methods: first-order ‘pseudo-inverse’ (a,b), second-order ‘pseudo-inverse’ (c,d) and ‘bilinear’ (e,f).

Figure 6

Figure 7.Time evolution of the maximum relative density error (a,b), maximum relative parallel momentum error (c,d) and maximum relative kinetic energy error (e,f) in any configuration space vertex (node) for the Coulomb collision operation (a,c,e) and the velocity interpolation (b,d,f), comparing the three different velocity mapping methods: first-order ‘pseudo-inverse’ (solid, blue), second-order ‘pseudo-inverse’ (dashed, orange) and ‘bilinear’ (dot-dashed, green).

Figure 7

Figure 8.Time behaviour of the particle noise, represented by the flux-surface averaged variance of the particle weights $\langle \sigma ^2 \rangle = ({1}/{N_p}) \sum _{k = 1}^{N_p} \langle (w_{1,k} w_{0,k} - \bar {w} )^2 \rangle$, with the mean $\bar {w} = ({1}/{N_p}) \sum _{k = 1}^{N_p} w_{1,k} w_{0,k}$, at half minor radius in the normalized radial coordinate system, comparing the three different velocity mapping methods: first-order ‘pseudo-inverse’ (solid, blue), second-order ‘pseudo-inverse’ (dashed, orange) and ‘bilinear’ (dot-dashed, green). It can be observed that the particle resampling method controls well the particle noise.