[Paper Review] Gingred, a general grid generator for 2D edge plasma modeling
Gingred is a new, general-purpose grid generator for 2D edge plasma modeling in tokamaks, designed to create logically rectangular, non-orthogonal grids for arbitrary magnetic configurations—including single-null, double-null, and snowflake divertors—using a step-by-step, user-friendly IDL-based workflow. Its key contribution is enabling accurate, reproducible grid generation with bi-cubic interpolation of magnetic flux, supporting advanced divertor geometries critical for fusion reactor design.
The current work reports the development of a new general grid generator called Gingred for arbitrary (e.g., number of X-points) 2D magnetic equilibria and plate geometries. A standardization of the construction of a grid is explained, the main command lines are detailed, and examples of snowflake grids are shown. The main advantages of Gingred are the tracking of the step-by-step progresses (from "skeleton" grids) of grid generations by non-experts and new users, the ability to use an arbitrary magnetic configuration, and the more accurate numerical computation by bi-cubic interpolation of the magnetic flux rather than discrete cosine transform.
Motivation & Objective
- To develop a universal, extensible grid generator capable of handling arbitrary 2D magnetic equilibria with any number of X-points, including advanced divertor configurations like snowflake and super-X.
- To provide a transparent, step-by-step workflow for non-expert users to construct and debug grids, overcoming limitations of existing tools that lack visibility into the grid generation process.
- To improve numerical accuracy in fluid simulations by replacing discrete cosine transforms with bi-cubic interpolation of magnetic flux, especially critical for complex divertor geometries.
- To support future fluid codes, including those with non-Maxwellian kinetic effects, by providing a standardized, reusable grid framework independent of specific simulation codes.
- To enable systematic exploration of divertor geometry parameters (e.g., secondary X-point position, plate shape) to minimize particle and heat fluxes on divertor plates.
Proposed method
- The grid generation process is based on a bottom-up, sequential construction of 'skeleton' grids from minimal geometric parameters, such as X-point locations (ixpt1, ixpt2), plate boundaries (ixlb, ixrb), and grid dimensions.
- A logical mapping scheme is used to represent complex magnetic topologies (e.g., snowflake, double-null) on a logically rectangular mesh, preserving connectivity and flux surface structure.
- Bi-cubic interpolation is applied to the magnetic flux function to generate smooth, accurate flux surfaces, replacing less precise discrete cosine transforms used in prior tools.
- The code is implemented in IDL, offering a simple command-line interface with clear progress tracking, making it accessible for new users and suitable for debugging.
- The framework supports arbitrary numbers of X-points and plates, with predefined templates for common configurations like snowflake-minus and snowflake-plus, each with 13×5 cell grids including guard cells.
- The method is validated through the generation of multiple standard and advanced divertor grids (e.g., SNL, DNL, SF15, SF45, SF75, SF95), with full parameterization and logical map visualization.
Experimental results
Research questions
- RQ1How can a general-purpose grid generator be designed to support arbitrary 2D magnetic equilibria, including multiple X-points and complex divertor geometries like snowflake configurations?
- RQ2What workflow enables non-expert users to construct, debug, and understand the step-by-step development of complex plasma edge grids?
- RQ3How does bi-cubic interpolation of magnetic flux improve numerical accuracy compared to discrete cosine transforms in fluid simulation grids?
- RQ4Can a single, extensible grid generation framework be developed that is independent of specific fluid simulation codes like UEDGE or SOLPS-Iter?
- RQ5What are the minimal set of geometric parameters needed to define and reproduce standard and advanced divertor grid topologies?
Key findings
- Gingred successfully generates logically rectangular, non-orthogonal grids for 2D edge plasma simulations across a wide range of magnetic topologies, including single-null, double-null, and snowflake divertors.
- The code supports snowflake configurations with two distinct types—snowflake-minus (secondary X-point in the SOL) and snowflake-plus (secondary X-point in the private flux region)—each with two variants based on secondary X-point position relative to the plates.
- All snowflake grids are constructed with a fixed 13×5 cell structure, including guard cells, with distinct parameter sets for each configuration (e.g., SF15, SF45, SF75, SF95).
- The use of bi-cubic interpolation for magnetic flux significantly improves grid accuracy over discrete cosine transforms, especially in regions with strong flux expansion or complex X-point geometries.
- The step-by-step, transparent workflow enables users to track grid construction progress, reducing debugging complexity and improving usability for new users.
- The framework is extensible and can be readily adapted to include additional X-points or new divertor configurations using the same bottom-up approach.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.