Contacts: Milo Dorr

Short Description

Generation of flux-surface-aligned mapping and flux DCT coefficient used by COGENT


gyrokinetic models, edge plasma geometry, mapped coordinates, flux-aligned grids

Long Description

This module facilitates the generation of a COGENT “mapping file” and a particular discrete magnetic equilibrium flux representation from data contained in a g-EQDSK file. Currently, the sole objective of the module is to produce two files, the path to which can then be (manually) specified in a COGENT input file. When COGENT reads the input file, it uses the data contained in the two specified files to generate a continuous magnetic flux representation and to generate a flux-surface aligned computational grid, with dealignment modifications at the X point to support COGENT’s high-order, finite-volume discretation of the gyrokinetic system.

Full details of the algorithm used to generate the discrete mapping are contained in Section 4 of “High-order Discretization of a Gyrokinetic Vlasov Model in Edge Plasma Geometry,” M. R. Dorr, P. Colella, M. A. Dorf, D. Ghosh, J. A. F. Hittinger, and P. O. Schwartz, J. Comput. Phys. 373, 15 (2018), pp. 605-630,

Typical workflows

  • Specify the location of the COGENT root directory.

  • Specify the location of the Hypnotoad root directory (optional).

  • Select a g-EQDSK file.

  • Extract magnetic flux data in a special form that COGENT requires, which are the coefficients of a discrete cosine transform (DCT) expansion of the flux as well as some other metadata describing the equilibrium (e.g., location of the magnetic axis). Currently, a post-processor developed for the BOUT++ Hypnotoad grid generator is used to generate the DCT flux data (another more direct tool for obtaining the DCT representation directly from g-EQDSK files will be added in the next module revision).

  • Specify a collection of grid generation parameters, either individually or by reading them from an ASCII text file.

  • Generate the mapping grid from the DCT flux data.

  • Generate smooth extensions of the individual grid blocks.

  • Plot the generated grid and/or individual blocks, with or without ghost cells.

  • Modify the grid by adjusting the appropriate parameters and re-generating the grid.

  • Deploy (write out) the DCT flux representation and the mapping file.

  • Set the paths to the DCT flux and mapping files in a COGENT input file.

Supported devices

  • DIII-D, and possibly others for which g-EQDSK magnetic flux data is available


After importing the COGENT module, a step-by-step workflow description can be found at the COGENT['FILES']['documentation'].


List of contributors sorted by number of lines authored:

638 Milo Dorr
165 Fusion Bot
 12 Orso Meneghini


List of usernames sorted by number of module imports: dorr, meneghini, wangy, zhangp