XGC is a gyrokinetic particle-in-cell code, which specializes in the simulation of the edge region of magnetically confined thermonuclear fusion plasma. The simulation domain can include the magnetic separatrix, magnetic axis and the biased material wall. XGC can run in total-delta-f, and conventional delta-f mode. The ion species are always gyrokinetic except for ETG simulation. Electrons can be adiabatic, massless fluid, driftkinetic, or gyrokinetic (for ETG only).
XGC is written in Fortran 90 and is designed for HPC systems utilizing MPI, OpenMP, CUDA (GPU), OpenACC (GPU), and AVX512 vectorization (e.g. for Intel MIC-KNL). Weak scaling is roughly linear to the maximal number of compute nodes of leading HPC systems in the US.
There are several versions of XGC for different purposes:
XGC1 is for turbulence simulation with low parallel wavenumber. Piecewise field-following coordinates are used to handle low k-parallel perturbation with low toroidal resolution (Ntor~64). When run in total-delta-f mode, it utilizes a phase space grid in addition to particles to handle non-Maxwellian particle distribution function in the tokamak edge.
XGCa is an axisymmetric version of XGC1 for simulation of neoclassical transport.
The following pages describe the XGC repository structure and workflow, coding policies, and how to compile and run XGC.
 S. Ku et al., Nuclear Fusion 49, 115021 (2009), https://doi.org/10.1088/0029-5515/49/11/115021
 S. Ku, R. Hager, C.S. Chang et al., J. Comp. Physics, 315, 467 (2016), https://doi.org/10.1016/j.jcp.2016.03.062
 R. Hager, E.S. Yoon, S. Ku et al., J. Comp. Physics, 315, 644 (2016), https://doi.org/10.1016/j.jcp.2016.03.064
 R. Hager, J. Lang et al., Phys. Plasmas 24, 054508 (2017), http://dx.doi.org/10.1063/1.4983320