Advances in the flux-coordinate independent approach

https://doi.org/10.1016/j.cpc.2016.12.014Get rights and content

Abstract

The flux-coordinate independent approach (FCI) offers a promising solution to deal with a separatrix and X-point(s) in diverted tokamaks. Whereas the discretisation of perpendicular operators (with respect to magnetic field) is straight forward, the major complexity lies in the discretisation of parallel operators, for which field line tracing and interpolation is employed. A discrete version for the parallel diffusion operator was proposed in Stegmeir et al. (2016), which maintains the self-adjointness property on the discrete level and exhibits only very low numerical perpendicular diffusion/pollution. However, in situations where the field line map is strongly distorted this scheme revealed its limits. Moreover, the appearance of small scale corrugations deteriorated the convergence order with respect to spatial resolution (Held et al., 2016). In this paper we present an extension to the scheme where the parallel gradient is reformulated via a combination of integration and interpolation. It is shown that the resultant scheme finally combines many good numerical properties, i.e. it is self-adjoint on the discrete level, it has very low numerical perpendicular diffusion, it can cope with strongly distorted maps and exhibits optimal convergence. Another subtle issue in the FCI approach is the treatment of boundary conditions, especially where magnetic field lines intersect with material plates. We present a solution based on ghost points, whose value can be set in a flexible way according to Taylor expansion around the boundary.

Introduction

The geometry of diverted magnetic fusion devices poses a challenge to the numerical treatment of the plasma edge and scrape-off layer (SOL). Dynamics in tokamaks is usually strongly anisotropic leading to structures which are strongly elongated along magnetic field lines (kk). This flute mode character is usually exploited computationally in numerical codes via employing field-aligned coordinate systems  [1] and sparsifying the computational grid along the resulting parallel coordinate. However, field/flux-aligned coordinates become singular on the separatrix/X-point(s) and codes based on these coordinates have to provide some workaround or special treatment for the separatrix/X-point(s). Investigation of phenomena, where the X-point plays a crucial role, might therefore become questionable, and in the worst case even numerical artefacts might arise. The flux-coordinate independent approach (FCI) [2], [3], [4], [5] offers a solution to this dilemma: The simulation domain is spanned with a cylindrical grid, which is well defined everywhere in the region of interest, and the discretisation of perpendicular operators turns out to be straight forward. For the discretisation of parallel operators a field line map is used: Parallel operators are discretised via a finite difference along magnetic field lines, for which field line tracing towards neighbouring poloidal planes is performed and required values on the field line are obtained by interpolation. Finally, the flute mode character can be exploited computationally by sparsifying the grid along the toroidal direction. The FCI approach allows a high flexibility in geometry and is used in few codes, like FENICIA  [3], GRILLIX [5], FELTOR  [6], BOUT++ [7]. It has been successfully applied to hyperbolic and parabolic problems.

The main complexity of the approach lies in the discretisation of parallel operators, and a major critical issue is numerical perpendicular diffusion/pollution caused by the interpolation which couples distinct magnetic field lines. The highly anisotropic dynamics, e.g. the ratio of parallel to perpendicular heat conductivity may reach levels of χ/χ1010, implies that even a small directional error of discrete parallel operators may overwhelm the real slow perpendicular dynamics. Following the method of support operators [8], [9] numerical schemes for the parallel diffusion operator were derived in [5], [10], which conserve the self-adjointness property on the discrete level and exhibit a highly reduced level of numerical diffusion as compared to a naive discretisation. Two types of schemes, one based on interpolation and another one based on integration were derived. However, it turned out that the schemes which are based on interpolation exhibit erroneous corrugations, especially in situations where the field line map is strongly distorted, i.e. at low toroidal resolutions and in presence of strong magnetic shear. Moreover, a deteriorated convergence behaviour was recently found from numerical tests in complicated geometries with b0   [6], with b the magnetic field unit vector. In this paper we present an extension to these schemes, where the underlying parallel gradient is reformulated via a combination of interpolation and integration. We show that the resultant scheme combines many good numerical properties: It is self adjoint on the discrete level, it has very low numerical perpendicular diffusion/pollution, it can cope even with strongly distorted field line maps and it exhibits the expected second order convergence with respect to toroidal resolution. Moreover, it is also very practical as it does not require substantial additional effort in implementation and it does not increase the computational cost. This new numerical scheme constitutes a generalisation of and significant improvement to [5], [10], since many crucial problems are resolved without any drawback in its practical application.

Furthermore, we discuss the treatment of boundaries within the FCI approach. Especially at the intersection of magnetic field lines with material surfaces (limiter, divertor) subtle numerical problems may arise, as e.g. also information from outside the boundary is required for interpolation and the distances from grid points to the boundary may vary strongly. We present in this paper a solution which is based on ghost points, whose values are set according to a Taylor expansion along magnetic field lines around the boundary. This offers a simple and flexible way to deal with different kinds of boundary conditions.

All developed methods were implemented in the code GRILLIX, with which the presented numerical tests were carried out.

Section snippets

Parallel operators within FCI approach

A general introduction into the FCI approach, which is reviewed here only shortly, can be found e.g. in [2], [3], [4], [5] and we focus on the discretisation of parallel operators. We consider in the following an axisymmetric tokamak configuration which is spanned by a cylindrical grid (Ri,Zj,φk), which is Cartesian with grid spacing h within poloidal planes k. Based on the assumption of a strong toroidal field (BtorBpol) perpendicular operators can be approximated with a stencil which remains

Numerical tests

For the following tests and examples a 3rd order bipolynomial interpolation was used to obtain values at points which do not coincide with grid points (e.g. map points). Therefore, 4×4 grid points centred around the considered point are used to obtain the interpolating polynomial. The following numerical schemes were investigated:

  • D-3: Naive scheme for the parallel diffusion operator according to Eq.  (12). The discrete parallel gradient is thereby computed by pure interpolation (X=0 or Eq.  (1)

Boundaries within FCI

A subtle issue within the FCI approach is the treatment of boundaries, especially where magnetic field lines intersect with material plates, since these may have an immediate effect on the whole simulation domain. In general the intersection of field lines with boundaries can be identified during the field line tracing procedure.

An obvious problem arises if a map point is close to the boundary such that the standard interpolation stamp, (e.g. 4×4centred around the map point for third order

Conclusions

The flux-coordinate independent approach offers a viable solution to deal with complex geometries of magnetic fusion devices, especially a separatrix and X-point(s). The main challenge thereby is the discretisation of parallel operators as the numerical grid is not aligned with magnetic field lines.

We presented a new scheme for the parallel gradient which is based on a combination of interpolation and integration, where the degree of integration is controlled by a single parameter X. With

Acknowledgements

The authors would like to thank L. Krönert for contributing to this work with useful discussions and fruitful comments. A part of this work was carried out using the HELIOS supercomputer system at Computational Simulation Centre of International Fusion Energy Research Centre (IFERC-CSC), Aomori, Japan, under the Broader Approach collaboration between Euratom and Japan, implemented by Fusion for Energy and JAEA. This work has been carried out within the framework of the EUROfusion Consortium and

References (14)

  • M. Ottaviani

    Phys. Lett. A

    (2011)
  • F. Hariri et al.

    Comput. Phys. Comm.

    (2013)
  • A. Stegmeir et al.

    Comput. Phys. Commun.

    (2016)
  • M. Held et al.

    Comput. Phys. Commun.

    (2016)
  • M. Shashkov et al.

    J. Comput. Phys.

    (1995)
  • W.D. D’haeseleer et al.
  • F. Hariri et al.

    Phys. Plasmas

    (2014)
There are more references available in the full text version of this article.

Cited by (14)

  • A finite volume flux coordinate independent approach

    2023, Computer Physics Communications
  • A partially mesh-free scheme for representing anisotropic spatial variations along field lines: Conservation, quadrature, and the delta property

    2023, Computer Physics Communications
    Citation Excerpt :

    Since there is no defined connection between nodes in separate meshes, a mapping and interpolation procedure is performed in order to compute derivatives in the direction parallel to the magnetic field by mapping nodal points to their associated parallel ‘neighbour’ points on the adjacent meshes. Refinements to the original FCI method have been made both by Hariri and Ottaviani et al. [3,4] and Stegmeir et al. [5,6], and implementations of the method have been realized in several codes, including BOUT++, a plasma fluid simulation code [7,8]. This BOUT++ implementation is a finite difference scheme, and while it has shown some success at modelling plasma filaments [9] and arbitrary wall geometry [10], an even more general framework is desirable.

View all citing articles on Scopus
View full text