Adaptive Hybridizable Discontinuous Galerkin discretization of the Grad-Shafranov equation by extension from polygonal subdomains
Tonatiuh S\'anchez-Vizuet, Manuel E. Solano, Antoine J. Cerfon

TL;DR
This paper introduces an adaptive hybridizable discontinuous Galerkin method for solving the Grad-Shafranov equation on curved domains, using polygonal subdomains and automatic mesh refinement to accurately model plasma equilibria.
Contribution
It presents a novel high-order solver that avoids complex geometry-conforming meshes by employing a transfer technique on polygonal subdomains with adaptive mesh refinement.
Findings
Effective error estimator for plasma equilibria
Automatic boundary updating maintains geometric accuracy
Suitable for realistic plasma confinement geometries
Abstract
We propose a high-order adaptive numerical solver for the semilinear elliptic boundary value problem modelling magnetic plasma equilibrium in axisymmetric confinement devices. In the fixed boundary case, the equation is posed on curved domains with piecewise smooth curved boundaries that may present corners. The solution method we present is based on the hybridizable discontinuous Galerkin method and sidesteps the need for geometry-conforming triangulations thanks to a transfer technique that allows to approximate the solution using only a polygonal subset as computational domain. Moreover, the solver features automatic mesh refinement driven by a residual-based a posteriori error estimator. As the mesh is locally refined, the computational domain is automatically updated in order to always maintain the distance between the actual boundary and the computational boundary of the order of…
| Polynomial degree | Polynomial degree | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.32 | 0.79 | 1.66 | 1.68 | 1.64 | 1.49 | 2.1 | 1.81 | 2.57 | 1.66 | 2.01 | 2.04 | 2.02 | 1.63 | 1.52 | 2.78 | |
| 1.95 | 2.34 | 1.8 | 1.84 | 1.62 | 1.59 | 2.05 | 1.5 | 2.7 | 2.89 | 2.63 | 2.64 | 2.81 | 2.55 | 2.93 | 3.06 | |
| 1.97 | 2.11 | 1.87 | 1.89 | 1.82 | 1.78 | 2.28 | 1.81 | 2.8 | 2.26 | 2.66 | 2.66 | 2.75 | 2.62 | 2.56 | 2.81 | |
| 1.99 | 2.13 | 1.93 | 1.95 | 1.93 | 1.86 | 2.33 | 1.94 | 2.97 | 3.02 | 2.88 | 2.88 | 2.91 | 2.83 | 2.74 | 2.85 | |
| Polynomial degree | Polynomial degree | |||||||||||||||
| 3.46 | 1.66 | 1.64 | 1.61 | 1.82 | 1.99 | 1.96 | 2.82 | 3.94 | 2.14 | 1.39 | 1.4 | 1.65 | 1.28 | 1.64 | 2.47 | |
| 3.52 | 3.62 | 3.53 | 3.53 | 3.58 | 3.53 | 3.91 | 3.93 | 4.37 | 4.02 | 4.34 | 4.34 | 4.29 | 4.21 | 4.53 | 4.56 | |
| 3.13 | 2.3 | 3.26 | 3.26 | 3.2 | 3.34 | 3.44 | 3.48 | 3.64 | 2.7 | 3.88 | 3.89 | 3.63 | 3.81 | 3.92 | 3.96 | |
| 4.26 | 3.78 | 3.83 | 3.83 | 3.81 | 3.85 | 3.99 | 3.71 | 5.21 | 4.56 | 4.78 | 4.79 | 4.68 | 4.67 | 4.79 | 4.79 | |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Adaptive Hybridizable Discontinuous Galerkin discretization of the Grad-Shafranov equation by extension from polygonal subdomains
Tonatiuh Sánchez–Vizuet
New York University, Courant Institute of Mathematical Sciences
Manuel E. Solano
Universidad de Concepción, Department of Mathematical Engineering
Universidad de Concepción, Center for Research in Mathematical Engineering CI2MA
Antoine J. Cerfon
Abstract
We propose a high-order adaptive numerical solver for the semilinear elliptic boundary value problem modelling magnetic plasma equilibrium in axisymmetric confinement devices. In the fixed boundary case, the equation is posed on curved domains with piecewise smooth curved boundaries that may present corners. The solution method we present is based on the hybridizable discontinuous Galerkin method and sidesteps the need for geometry-conforming triangulations thanks to a transfer technique that allows to approximate the solution using only a polygonal subset as computational domain. Moreover, the solver features automatic mesh refinement driven by a residual-based a posteriori error estimator. As the mesh is locally refined, the computational domain is automatically updated in order to always maintain the distance between the actual boundary and the computational boundary of the order of the local mesh diameter. Numerical evidence is presented of the suitability of the estimator as an approximate error measure for physically relevant equilibria with pressure pedestals, internal transport barriers, and current holes on realistic geometries.
keywords:
Adaptive Hybridizable Discontinuous Galerkin (HDG) , Residual error estimator , Curved boundaries , Local mesh refinement , Un-fitted mesh , Plasma Equilibrium
MSC:
[2010] 65N30 , 65Z05 , 65N50
fn1fn1footnotetext: A.J.C. and T. S-V have been partially funded by the US Department of Energy. Grant No. DE-FG02-86ER53233.fn2fn2footnotetext: M. S. has been partially funded by CONICYT–Chile through FONDECYT project No. 1160320 and by Project AFB170001 of the PIA Program: Concurso Apoyo a Centros Cientificos y Tecnologicos de Excelencia con Financiamiento Basal.
1 Introduction
In toroidally axisymmetric configurations and in the absence of flows, the steady-state equations of magnetohydrodynamics (MHD) yield the following partial differential equation for the poloidal flux function , known as the Grad-Shafranov equation [1, 2, 3]
[TABLE]
In Equation (1), is the radial coordinate in the coordinate system naturally associated with the toroidal geometry, being the ignorable coordinate for the axisymmetric configurations we consider here, where is the poloidal magnetic flux, is the plasma pressure, is the net poloidal current flowing in the plasma and the toroidal field coils, and the elliptic toroidal operator is defined by
[TABLE]
Above, for simplicity in the manipulations we have defined the operator that acts formally like a vector of partial derivatives independent of the coordinate system.
Both and are free functions of , which are determined from other physical processes or experimental data, and taken as input to the partial differential equation. In general, and are such that is a nonlinear function of , so that the Grad-Shafranov equation is a semi-linear partial differential equation. Together with the boundary conditions, and determine the nature of the MHD equilibrium. Once is computed, the equilibrium magnetic configuration is fully determined, through the relations
[TABLE]
where is the magnetic field and is the current density, and is the unit vector in the toroidal direction.
In this article, we will focus on fixed boundary equilibria, for which the boundary of the computational domain is known, and corresponds to the boundary of the confinement region of the plasma. Physically, it must be a level set of , and without loss of generality, we can let be the level set . We are therefore interested in the following Dirichlet boundary value problem
[TABLE]
For plasma physics applications, the solution to (4), the corresponding magnetic field and the current density given by Equations (2) and (3), are used as input for stability, transport, and radio-frequency (RF) wave propagation and heating solvers [4, 5, 6, 7, 8, 9, 10]. This gives stringent performance requirements on numerical solvers for the Grad-Shafranov equation. The solver should be fast, so that the time to compute the equilibrium configuration is negligible compared to the run time of the stability, transport, or RF wave solvers. The solver should also be accurate, because some of the physical quantities of interest depend not only on , but also on the first derivatives of , as is obvious for and , and on the second derivatives of , as is the case for the magnetic curvature for example. Because of the central role of the Grad-Shafranov equation in magnetic confinement fusion, many numerical solvers for Eq.(4) have been developed in the last decades, relying on a vast range of formulations and numerical schemes. A good summary of early efforts can be found in [11]. More recently, approaches based on bi-cubic finite elements [7, 12, 13], on spectral elements [6, 14], on the hybridizable discontinuous Galerkin method[15], and on integral equation methods [16, 17] have led to fast, high order accurate, and flexible solvers. Even so, none of these solvers simultaneously satisfy the four criteria required for optimal performance in magnetic confinement fusion applications, which can be listed as follows: 1) the solver must be fast; 2) it must be able to handle arbitrary boundaries , which may or may not have corners (corresponding to magnetic X-points); 3) it must compute derivatives with high accuracy; and 4) it must have automatic adaptive refinement capabilities, in order to resolve the strong gradients in internal transport barriers and in edge pedestals without having a fine grid throughout the computational domain, where the solution is typically very smooth and requires few grid points for good accuracy. In this article, we present the first numerical Grad-Shafranov solver which satisfies these four performance requirements.
To achieve this goal, we added adaptive refinement capabilities to the Hybridizable Discontinuous Galerkin (HDG) Grad-Shafranov solver we originally presented in [15]. The solver relies on reformulating the problem as a first order system [18], which takes the form
[TABLE]
The auxiliary variable will be referred to as the flux. This mixed formulation has the practical advantage of discretizing directly, thus providing additional accuracy for the the physically meaningful quantity. Our enhanced solver exploits the natural suitability of discontinuous Galerkin methods for parallel computation, sidesteps the geometrical complexities by carrying on the computations on a polygonal subdomain of discretized by a simple non-fitting and shape regular triangulation, handling the curved boundaries with a high order transferring technique, approximates the partial derivatives of directly, and features automatic mesh refinement driven by a local error estimator.
The structure of the paper is as follows. Starting with geometric considerations, Section 2 describes the discretization of the mixed form (5), introducing the basic concepts of the hybridizable discontinuous Galerkin method and the components of the solution process including the treatment of curved boundaries, the accelerated iteration process to handle the non-linearity of the Grad-Shafranov equation, and a post-processing step yielding an approximation to that converges with an additional order of accuracy. Throughout Section 2 the problem is posed on a fixed computational domain with a given mesh. Adaptivity is then addressed in Section 3, which starts by introducing a residual-based local error estimator and by briefly discussing choices for the element marking strategy. The remaining part of the section discusses the issue of refining the embedded triangulation while maintaining the distance between the computational domain and the boundary always on the order of the local mesh parameter. The resulting strategy generates a sequence of updates of the computational domain that approximate the physical domain by exhaustion as the refinement progresses. In Section 4 we present numerical experiments to demonstrate the efficiency and reliability of the error estimator, as well as the convergence properties of the numerical solution. The experiments are carried out in realistic geometries first for a Solov’ev equilibrium for which an exact solution is available, and then for physically relevant benchmark problems with sharp and localized features, specifically an equilibrium with a pressure pedestal, and equilibrium with an internal transport barrier, and an equilibrium with a deep current hole. Concluding remarks are given in the final Section 5.
2 The discrete problem
Before describing the adaptive algorithm, we will discuss the problem on a fixed, uniform and embedded polygonal mesh. Most of the details have been described in [15]. However, starting with this standard case will allow us to introduce the notation and the fundamental ideas underpinning our HDG approach, as well as our treatment of curved boundaries and the iterative method to treat the non-linearity of the equation. Moreover, the solution of the problem in this setting will constitute the starting point for the adaptive algorithm. It is therefore worth repeating the key elements of the numerical scheme for the standard situation here.
The HDG formulation of the problem depends on the specific spatial discretization of the domain where the equation is posed. Therefore, we will first describe the choice of polygonal subdomain where the problem will be discretized. The use of a polygonal subset of as the computational domain creates the need to communicate the Dirichlet boundary conditions from the “true” boundary to that of the polygonal subdomain where the computations are carried out. Hence, we will then describe the high order transfer scheme that will be used to impose the boundary conditions on the computational domain. With all these ingredients in place, it will be then possible to pose the discrete problem and describe the numerical method in detail. A rigorous analysis of the method for general semilinear elliptic equations is the subject of ongoing work [19].
2.1 The computational domain
We will start by defining the polygonal subdomain where the discrete system will be posed, henceforward the computational domain, and the grids that will be used for approximation. Following [20], the computational domain will be chosen to be a polygonal subdomain of obtained from a regular background triangulation as follows.
Consider to be a triangulation of a polygonal domain containing and consisting of uniformly shape-regular triangles as in Figure 1 (left). The computational mesh and the computational domain (Figure 1 center) are, respectively, the set of triangles completely contained in and its interior. More precisely, we define
[TABLE]
The boundary of the computational domain will be denoted by and set of all edges commonly referred to as the skeleton of the triangulation will be denoted by . We note that the skeleton can be decomposed as where
[TABLE]
are the set of boundary edges and interior edges respectively. In addition, a companion grid consisting of those elements in that constitute a minimal cover of will be defined
[TABLE]
the companion mesh consists of all the elements in together with those background elements that intersect with the boundary of , as depicted on the right end of Figure 1. The need for this additional companion mesh will become apparent in Section 3.3, where the mesh refinement strategy will be discussed.
2.2 Extension from subdomains
The definition of the computational domain as an unfitted and embedded subdomain seems to leave open the problem of defining the approximate solutions in the intermediate region corresponding to the area between the “true” boundary and the computational boundary. In particular, one must deal with the problem of defining the boundary conditions on . This in fact can be dealt with in a natural way through the following transfer procedure.
Consider a point on the true boundary and a point on the computational boundary . We will denote by the normalized vector anchored at pointing towards and by the line segment connecting them, henceforward the transfer path – as in Figure 2 (right). Then, integrating equation (5a) along a transfer path with direction vector given by it follows that
[TABLE]
where is the Euclidean distance between and . Therefore, as long as is known along the transfer path, it is possible to represent exactly the value of at any point of the computational boundary in terms of its value at one point of the physical boundary and the values of the flux. However, the value of will be determined only within the computational domain and thus we will resort to an approximation of by extrapolation. In order to detail the extrapolation procedure we must first introduce the following extension of the computational domain.
Consider the set consisting of all endpoints of the edges and denote by the minimum diameter over all triangles containing . To every we will assign a unique point and will denote by the straight line segment connecting them. The assignment must be done such that the Euclidean distance between them , and that no two pair of such paths intersects. This can be done in different ways, for instance, following the procedure described in [20].
For a boundary edge we will denote by the region enclosed by , the paths corresponding to each endpoint of , and the edge itself—as depicted on the right end of Figure 2. The union of all these patches covers the “un-meshed” gap , as can be seen in the center of Figure 2. Each of the patches can be unambiguously identified with the unique element with which they share the edge . This allows us to define the extension of a polynomial function as
[TABLE]
In other words, the extension is a polynomial function with the same coefficients as , but defined on the larger domain . We can finally address the issue of transferring the boundary conditions to the computational boundary. Let be a polynomial approximation to . Then, for and , the quantity
[TABLE]
will be used as an approximation to the boundary value . Note that the same formula can be used to define the approximation of the pointwise value of for any point .
2.3 The discrete system
We can now present the form of (5) that will be discretized. Given a computational domain with boundary and a regular embedded triangulation as defined in Section 2.1, we look for functions and defined on and defined on satisfying the system
[TABLE]
where is given by (7) and the jump of the flux across two elements with exterior normal vectors along a shared edge is defined in standard fashion as
[TABLE]
. Note that for the remainder of this article, we will also use this notation for the jump of any scalar quantity across two elements, namely . In (8c) and in what follows, quantities with the superscript must be understood as defined only on the skeleton of the mesh. The system (8) is the restatement of (5) as a collection of the local problems (8a) and (8b) satisfying the boundary conditions (8c) or (8e) on each element and “glued” together by the continuity condition on the flux (8d).
The introduction of the hybrid unknown as a global quantity encoding the boundary conditions allows to fully decouple the local problems if an appropriate numerical flux is chosen (more on this below). Once the hybrid variable has been determined, the local problems for and can be solved independently. This process is akin to the well known static condensation technique used to decouple degrees of freedom on the edges/faces of an element from those on the interior which was first devised for Finite Elements [21] and mixed formulations through hybridization [22]. The connections between HDG and static condensation have been thoroughly discussed in [23].
When equation (8b) is posed weakly and discretized, one is faced with the choice of a numerical approximation for the normal flux across the element edges. Due to the fact that it allows to express the weak forms of (8a) and (8b) entirely in terms of local quantities and also that it allows great freedom of choice for the approximation spaces, the choice
[TABLE]
has become standard [23] and we will follow it in our discretization. Moreover, it is known that if the stabilization parameter remains of order , the method achieves optimal convergence order. Therefore, for all the computations we will set it to be .
2.4 The HDG discretization
The HDG method [24] yields piecewise polynomial approximations to the solutions of the weak formulation obtained by testing (8) with functions in the finite dimensional spaces
[TABLE]
where the space of polynomials of degree defined on the triangle is denoted by , the product space of two copies of itself is given by and is the space of polynomials of degree defined on a given edge . The inner products in these spaces are given by
[TABLE]
where, as is customary, and are the inner products on a single element and on its boundary respectively.
Once the choice of trace of the numerical flux given by (9) has been introduced and the system has been tested with functions , the weak form of the first order system (8) can be understood as consisting of two parts. The local equations
[TABLE]
that are satisfied by the hybrid unknown at the interior edges of the triangulation (13c) and at the set of edges belonging to the boundary of the computational domain, (13d). For each extended element we can let be the starting point of a transfer path and use the equation (7) together with the fact that satisfies homogeneous Dirichlet boundary conditions to express the transferred boundary value appearing on (13d) as
[TABLE]
In the previous expression, is the extrapolation of the polynomial defined on to the neighboring exterior element obtained by extending the domain of definition of from to while keeping the same polynomial form.
2.5 The solution method
In this section we will first consider the source term to be independent of ; once the solution method has been described for this simple, linear case, we will come back to address the nonlinear case, in which . We will denote the basis functions of the approximation spaces , , and respectively by , and , and define the Finite Element-style mass and convection matrices
[TABLE]
Moreover, if , and denote respectively the coefficient vectors of the system unknowns, the transferred boundary conditions, and the source term, we can write the two parts of the HDG system succinctly in matrix form as
[TABLE]
where the operators and above are the discrete counterparts of the restriction to the interior edges and boundary edges , respectively. Now, following equation (14) the first term on the left hand side of (15t) comes from integrating the extrapolation along the transfer paths; it can therefore be expressed in the form
[TABLE]
where is the composition of two discrete operators: 1) a restriction to the elements with at least one edge on the computational boundary, denoted as , and 2) the combination of a line integral along the transfer paths and the inner product with the basis of defined on the skeleton of the mesh, which can be represented as
[TABLE]
At the implementation level, both integrals (the line integral and the inner product) involved in are approximated by quadrature rules with matching orders of accuracy. Therefore the global system can be written in matrix form as
[TABLE]
where the top row is satisfied by the degrees of freedom of lying on the internal edges of the skeleton and the bottom row is satisfied by those on the edges corresponding to the boundary of the computational domain. Solving formally the linear system (15j) for we obtain
[TABLE]
This expression for can then be substituted into (16) and, from the resulting system, it follows that
[TABLE]
From this equation one can obtain and back-substitute in (17) to obtain . The relevance of the last two equations stems from the following observations. First, the matrices and the corresponding linear solves appearing on the right hand side of equation (17) are entirely in terms of local quantities, and can therefore be processed fully in parallel. Second, despite the fact that it involves a global unknown, the system (18) is sparse, for it includes only degrees of freedom associated to either the skeleton of the mesh or elements with at least one edge on the computational boundary. Moreover, the linear solves appearing on each side of equation (18) are the same as those in (17) and therefore have to be computed only once. The solution process can then be split into three steps:
Locally (i.e. in parallel) solve the systems
[TABLE]
appearing in equation (17) and store them. 2. 2.
Using the local vectors obtained in the first step, assemble the matrices on both sides of equation (18) and solve the resulting global system, thus recovering the hybrid unknown . 3. 3.
Distribute the relevant parts of over local elements and use the local solvers obtained on the first step to recover fully in parallel.
Accelerated Picard iterations
In order to deal with the non-linear nature of the Grad-Shafranov equation, we will resort to a simple, yet effective, iterative strategy consisting of accelerated Picard iterations. The standard Picard or fixed point iteration goes as follows. Given a guess for the solution , the source term can be evaluated yielding a source that is independent of the solution. The resulting system (15) is a linear problem that can be solved as described above yielding an update . The source term is then updated by evaluation at the newly computed solution and the process is repeated iteratively until the relative difference between successive updates falls below a certain predetermined tolerance.
This strategy is simple to implement but may require a large number of iterations to converge for small values of the tolerance. However, the convergence rate for Picard iterations can be improved by means of a device known as Anderson acceleration [25]. Anderson’s idea is to improve convergence through the use of information from more than one previous iterate. This is achieved by defining the update to be an optimized convex linear combination of the solutions to (15) obtained on a predetermined number of previous iterations. The coefficients of the convex linear combination are chosen so that the difference between the solutions and the updates is minimized. This requires the storage of previous updates and previous solutions and the solution of a small system at every iteration in order to determine the optimal coefficients.
Below we describe algorithmically the simplest form of the acceleration—which is the version implemented in our solver—but we refer the reader to the works by Kelly and Toth [26], and Walker and Ni [27], where the method is studied in detail. If we denote by a prescribed tolerance, by the initial input, by the solution operator to (15) described above, and by the final, approximate solution to the non-linear problem then, in its simplest form, the acceleration algorithm that uses previous iterates can be described as follows:
2.6 Non-linear local post-processing
Following the idea introduced by Stenberg [28], once the approximations and have been determined from the solution of (15), it is possible to define a locally post-processed function with enhanced convergence properties. There a several different ways of defining the post-processing, but in order to take advantage of the increased accuracy of the post processing as part of a residual estimator we will define to be the piecewise polynomial function satisfying
[TABLE]
Note that when is independent of , this reduces to the case analyzed in [29], where it was shown that the solution to this auxiliary problem converges towards with order when . Numerical evidence suggests that the simpler post processing that arises if the terms involving in equation (19a) are dropped is also effective; even in the semi-linear case. However for our convergence analysis in [19] the effect of the non-linear source term needs to be considered and this leads to the non linear post processing above. The solution to this auxiliary problem will be used in the error estimator described in the next section.
3 The adaptive algorithm
In many situations of physical interest, the solution and its derivatives may vary rapidly in localized regions in [16]. In such cases, adaptive mesh refinement is an effective way to minimize the number of degrees of freedom for a given target accuracy. Our adaptive strategy follows the standard “solve estimate mark refine” iterative paradigm. Specifically, starting from an initial triangulation , the problem is solved and a suitable error estimator is computed using the obtained approximate solution. Based on the error estimator, a subset of the triangulation is marked for refinement. This generates a new triangulation where the process can be started over until a predetermined number of cycles is reached or the estimator falls below a given threshold.
Our algorithm is based on theoretical work done by Cockburn and Zhang [30, 31], and Cockburn, Nochetto and Zhang [32]. In the first references, the authors proposed and studied the performance of a residual-based error estimator, and in the third one they were able to prove the convergence of the adaptive HDG method assuming that Dörfler’s marking criterion is used (we will return to this later). The problems studied in those cases were linear and the equations were posed in polygonal domains discretized with fitted triangulations. Our focus on the Grad-Shafranov equation poses additional challenges, namely the semi-linearity of the problem and the non-fitting nature of the computational domain—which in turn imposes the requirement that the distance between the boundaries and remains locally . The non-linearity is dealt with through the accelerated iterative process described above. The refinement of the unfitted grid will require some additional care, as we discuss below.
3.1 A residual-type estimator
For an edge with length and a function defined on (or on a superset containing ) we will denote by its norm on (or the norm of its restriction to ). Considering to be a generic element of the triangulation , we will adopt the following local error estimator
[TABLE]
where is the post-processed numerical solution obtained by solving the local auxiliary problem (19). This estimator is based on the one proposed and analyzed by Cockburn and Zhang [30, 31] for linear elliptic equations posed in polygonal domains. The global error estimate is obtained by adding all the local contributions over the computational domain and is therefore defined as
[TABLE]
A detailed analysis of the estimator and its properties for semilinear problems like ours as well as possible improvements for it are the subject of a separate communication [19], but some intuitive understanding can be gained by expressing the estimator in the form , where
[TABLE]
and studying each term separately. The term corresponds to the local residual of the strong equation for the flux (8b). Similarly, it would be desirable to consider the residual of the strong equation (8a) as part of the estimator. However, it would converge with reduced order due to the differentiation of the approximate solution . To overcome this and achieve the desired order of convergence, the term makes use of the post processed solution instead, thus preserving the desired convergence order . In this sense, the second term of the estimator is reminiscent of indicators based on gradient recovery, where an improved approximation of the gradient is obtained through post processing and is then used to estimate the error.
Finally, the edge terms and provide, respectively, a measure of the local loss of conformity of the solution and of its flux, by considering their jumps across element edges in the normal direction. estimates the rate of convergence of the hybrid variable and post-processed solution—restricted to the element boundaries—as approximations to the local trace.
3.2 Marking strategies
Given an initial triangulation , the discrete problem is solved and post-processed yielding the approximations which are then used to compute the local error estimator (20). One now must choose the elements that will be marked for refinement based on the local values of . Different marking strategies have been tried in the literature. Here we consider Dörfler’s criterion [33, 34] and the so-called maximum criterion [35]. In both cases, one must first choose a value of the marking parameter and then the elements
Either belonging to a minimal set such that
[TABLE] 2. 2.
or for which the local estimate is such that
[TABLE]
are marked and subsequently refined. The choice of the value of the marking parameter depends on the needs and constraints of the user. It is usually picked based on considerations such as memory availability, desired speed of the computation, etc. In the case of Dörfler’s marking, values of closer to zero result in fewer elements being marked on each cycle, and very localized refinement; larger values of tend to produce refinements that are more uniform. This qualitative behavior is reversed when maximum marking is used: refinement is localized for large values of and becomes uniform as the parameter approaches zero.
The convergence of the adaptive refinement loop on fixed polygonal domains was established by Cockburn, Nochetto and Zhang within the context of hybridizable discontinuous Galerkin methods for linear problems [32]; and assuming Dörfler’s method for marking. Regarding the maximum marking criterion, Morín, Siebert and Veeser [36] proved the convergence of the method for a wide class of linear problems discretized with Finite Elements. The analysis of this strategy applied to HDG is still an ongoing task, even for the linear case, but the strategy seems to be robust, as suggested by our numerical experiments.
3.3 Local mesh refinement
Once some elements of the triangulation have been marked by one of the criteria presented above, triangle refinement can be carried out through standard methods such as newest vertex bisection (NVB) [37, 38] or a red-green procedure [39]. In the standard setting where the computational domain coincides with the domain of definition of the PDE, each of the refined meshes produced in such fashion will remain a triangulation of the original domain .
In the present situation however, the computational domain is in fact a strict subdomain of . Thus, if is a triangulation of a fixed computational domain built as described in Section 2.1, with every subsequent refinement step the mesh will drift farther away from satisfying the condition that the distance between the computational boundary and the actual boundary remains locally of the order of the triangle diameter , as depicted in Figure 3. As a result, the transfer procedure would not yield satisfactory results.
In order to avoid such situations, we propose a strategy to update the computational domain consistent with the mesh refinement in such a way that the local distance condition is always satisfied. The method, showed schematically in Figure 4, can be described as follows:
-
Starting from the computational domain , a pair of computational and companion meshes and are built following the process detailed in Section 2.1.
-
The problem is solved and the error is estimated on the mesh , which results in a list of elements marked for refinement (green triangles in the second column of Figure 4).
-
The elements in the companion mesh which correspond to those marked on the computational mesh in the previous step are marked for refinement. In addition, all the elements in the companion mesh which intersect the true boundary and share an edge with any triangle in are marked for refinement as well (yellow triangles in the second column of Figure 4). This results in an augmented list of elements in the companion mesh.
-
The companion mesh is updated by performing triangle refinement on all elements in , yielding a temporary background mesh that completely contains , as depicted in the central column of Figure 4. Note that since the new elements may have smaller diameter, some of them may now in fact be completely contained in even if the parent triangle was not. In a similar fashion, some of them may neither be contained in nor intersect .
-
A new computational domain and its corresponding triangulation are defined by selecting the triangles in that are completely contained in . Analogously, a new companion mesh is defined by selecting all the elements of that are either completely contained in or intersect the boundary . The remaining triangles are discarded. The resulting level of refinement will then use the new computational and companion meshes and the process will continue until the predetermined stopping criterion is met.
Note that no computations are ever carried out using the companion grid, which is needed only to update the background triangulation in a way that gives rise to a refined computational domain satisfying the separation condition for every . Moreover, since at every level the computational domain is defined as a subdomain of an increasingly finer background triangulation, the algorithm yields a sequence of computational domains that effectively “exhaust” as so long as the local estimator remains nonzero on the elements having an edge on . This is illustrated in Figure 5.
4 Numerical Experiments
We present five examples to showcase the performance of the adaptive algorithm. To establish the correct behavior of the error estimator and the refinement strategy we begin with a linear test case where the analytic solution is known. The chosen analytic equilibrium has the advantage of providing the desired geometric and parametric flexibility, but corresponds to solutions that vary smoothly across the confinement region and thus tend to favour a uniform refinement strategy. Nevertheless, the availability of an exact solution allows us to verify the overall behavior of the estimator.
More challenging and physically relevant situations arise when the source term of the equation is non-linear and has large gradients. The solutions for these cases develop features that would be hard to resolve accurately while simultaneously keeping a small number of elements and using the boundary transfer technique. It was precisely to address cases like these that we included adaptive refinement capabilities in our solver, and the last four examples in this section belong to this category. In all the experiments, the maximum criterion was used for marking.
4.1 A Solov’ev equilibrium
In order to test the performance of the error estimator and the adaptive algorithm, we start with a simple linear setting for which an exact solution is available. The example corresponds to a so-called Solov’ev profile [40] where the source term of the equation is taken to be of the form [41]
[TABLE]
The free parameter determines the ratio of plasma pressure to magnetic pressure in the equilibrium of interest. With such a source term, the Grad-Shafranov equation is linear and exact solutions can be constructed by imposing physical or geometrical constraints. The case that we will consider here corresponds to a geometry similar to that of the National Spherical Toroidal Experiment (NSTX) in the high beta regime.
The exact solution is of the form
[TABLE]
Graphs of the solution and its partial derivatives with these parameter values on the target geometry can be seen in Figure 6.
To test the behavior of the error estimator with respect to the true error, the equation was solved with polynomial basis with degrees and uniform mesh refinement (i.e. for any subsequent levels ). The initial mesh diameter was . The convergence plots for this experiment are shown in the top row of Figure 7, where it can be seen that the estimator accurately captures the qualitative behavior of the error. Moreover, as can be seen in Table 1, the rates of convergence of the numerical solutions and , as well as those of the error estimator and all its component terms are nearly optimal.
For comparison, five levels of the adaptive algorithm were ran on the same problem for polynomial degrees from 1 to 4 on the same initial grid. Marking was done using the maximum criterion with parameter : elements whose estimator is at least 30% of the maximum local estimate are marked. The convergence history can be seen in the bottom row of Figure 7. As can be seen in the same figure, for the number of degrees of freedom after four levels of uniform refinement is about the same order of magnitude as that of five levels of adaptive refinement, but the adaptive algorithm places most of the computational effort on the left side of the domain. Comparing with the plot of in Figure 6 it is clear that the refinement is focusing on the region where the magnitude of the second derivative in the horizontal direction peaks.
4.2 A pressure pedestal
The following example features a pressure profile that remains almost flat throughout the confinement region and drops abruptly in the vicinity of the boundary:
[TABLE]
with , , and . This kind of profile is quite frequent in magnetic confinement fusion experiments, where the narrow region of fast decrease of the pressure is known as a pressure pedestal. If the equilibrium is assumed to be neither paramagnetic nor diamagnetic, , and the source term of the Grad-Shafranov equation is
[TABLE]
which has very strong gradients close to the edge of the confinement region since is small. Figure 8 shows both the pressure and the source profiles in an ITER-like geometry with an magnetic X-point (as described in [41]). As can be seen from the cross sections at constant values of in the same figure, the source has large gradients close to the boundaries, especially in the “outer” region.
The equation was solved using (24) as the source term and the latter parameter values. Figure 9 shows the post-processed numerical solution obtained when the polynomial basis was chosen to have degree four, and six levels of refinement were used with marking parameter . The computational mesh had initial mesh parameter , whereas the final mesh, displayed in the first block of the figure, consists of 636 elements with maximum diameter and minimum diameter . Our adaptive refinement scheme clearly focuses degrees of freedom in the region corresponding to the pressure pedestal, where and its derivatives vary strongly.
4.3 A transport barrier
In magnetic confinement fusion experiments, large pressure gradients may also be observed closer to the core of the discharge, and correspond to internal transport barriers [42]. To model such situations, we consider a pressure profile of the form
[TABLE]
where erf is the error function, and are natural numbers, and the parameters and control the height and the steepness of the barrier respectively. The parameter gives the location of the transport barrier with respect to a common normalization where [43, 17]. In Figure 10 we present the behavior of the pressure as a function of for different parameter values, and thus verify that we are able to model experimentally relevant situations [42, Figure 3].
Figure 11 shows the numerical solution for a transport barrier with parameter values , , , , and , corresponding to the steepest barrier depicted in Figure 10. Plots of the pressure distribution and the source term in the confinement geometry are shown side by side. The geometry for this experiment corresponds to an up-down symmetric ITER-like configuration with two magnetic X-points [41]. The solution displayed in the figure was computed adaptively using piecewise cubic polynomials. The initial mesh consisted of 129 elements, and the final grid consisted of 514 elements with a ratio and . Both meshes can be seen in Figure 12.
Figure 12 shows the convergence of the global error estimator for basis functions of degrees varying from 1 to 4. All the experiments started on the initial mesh shown in Figure 12, which subsequently underwent six levels of refinement with maximum marking using (i.e. only those elements whose local contribution is at least 50% of the maximum value of are refined at every level). Note that at the finest level of refinement all the examples in the figure have roughly the same number of degrees of freedom; however, as is expected, higher order discretizations result in coarser grids (i.e. consisting of fewer elements) and considerably smaller error.
4.4 A current hole
Another challenging configuration of physical relevance is the family of equilibria with a so-called “current hole”. This name refers to equilibria for which there is an extended region in the plasma core where the toroidal current is nearly zero [44, 45, 46, 47, 48]. The “near absence” of the current (thus the name “hole”) corresponds to a core region with almost constant pressure. Such equilibria have been observed experimentally in several tokamaks, and are found to be remarkably robust [48]. They are likely to naturally occur in future large scale tokamaks in fully non-inductive current drive operation. They have therefore gathered significant interest in recent years [48] (and references therein).
The following source term, adapted from that of the pressure pedestal, can give rise to such an equilibrium
[TABLE]
Choosing the values as well as and , the spatial distribution of the source term will be as shown in Figure 13 for an up-down symmetric D-shaped geometry with ITER-like parameters (as described in [16]). Recalling the relationship , we see that the current drops to close to zero in the core of the confinement region and has sharp peaks near the boundary. As can be seen in the figure, there is a sharp contrast between the almost constant behavior of both the source and the solution in the central region and the large gradients at the edge. Consistently, the estimator focuses the computational effort on the edges and keeps a relatively coarse mesh in the core. The computation was ran over six levels of refinement with marking parameter ; for a polynomial basis of degree four the resulting final mesh shown in the figure consisted of 3310 elements where and .
Figure 14 shows the partial derivatives of obtained directly from the components of the flux and their cross sections for different values of . The second derivatives were computed by differentiating the local polynomial approximants of and , which introduces additional error. However, the high polynomial order in combination with the focused mesh refinement imply that, even with the expected deterioration, the approximation remains within an acceptable range.
4.5 An internal layer
Perhaps one of the most desirable features in an adaptive scheme is the ability to automatically detect localized features in the solution and to refine the computation locally in order to resolve them accurately. The pressure pedestal can be turned into a more challenging benchmark along these lines if the source term is modified to
[TABLE]
This source term is not physically relevant for magnetic confinement fusion applications, because it cannot be cast in the canonical form of the source in (1) due to the explicit appearance of the coordinate in the argument of the last exponential. Nevertheless, it represents a good benchmarking problem to test for the detection of internal layers. As can be seen in Figure 15 (left and center left) the source presents an internal layer that changes abruptly in addition to the large gradients at both edges of the confinement region. In the figure and the numerical experiment the constants were taken to be and .
The simulation parameters were as in the example with the pressure pedestal: the same ITER-like geometry with an x-point, the same starting grid, polynomial basis of degrees one to four and six levels of refinement with . As can be seen in the central panel of Figure 15, the estimator successfully detects the development of internal features in the solution, and concentrates the refinement in that region. The final grid consists of only 601 elements with maximum mesh diameter and minimum mesh diameter .
The post-processed numerical solution and cross sections at different heights are depicted on the right end of Figure 15. The sharp change in the slope of the solution drives the interior refinement thus enabling the accurate approximation of the step-like behavior of the derivative in the horizontal direction (Figure 16). The approximate first derivatives are shown in Figure 16 along with a plot of the convergence history of the global error estimator.
5 Conclusion
The solver for fixed-boundary Grad-Shafranov equilibria based on the hybridizable discontinuous Galerkin method we presented has several attractive features beyond the high order approximation properties for and its partial derivatives. The use of an HDG framework provides the code with a robust and reliable method that is naturally suited for parallelization and addresses the issue of unnecessarily large numbers of degrees of freedom—usually associated with discontinuous Galerkin discretizations—through hybridization.
The use of a polygonal subdomain to carry out the computations combined with the transfer algorithm to impose boundary conditions “at a distance” allows for a simple, yet highly accurate, treatment of curved boundaries without having to resort to more complicated techniques like isoparametric mappings. It also enables a unified treatment of both smooth geometries and those with corners, corresponding to magnetic X-points. Moreover, in applications where the geometry of the confinement region needs to be updated, this technique provides the additional benefit of avoiding the need for constant updating of a fitted mesh.
The addition of a local error estimator and adaptive mesh refinement allows for focused computational efforts. As the numerical experiments show, this feature combined with the updating of the computational domain and the improved geometric approximation of the physical domain as the refinement progresses allows for efficient detection of relevant physical effects near the edge (as is the case for equilibria with a pressure pedestal) or the resolution of highly localized internal structures (as is the case for equilibia with an internal transport barrier).
6 Acknowledgements
The computational implementation of the algorithm described in this paper benefited greatly from the detailed explanations and code templates for HDG and adaptive refinement provided respectively by Fu, Gatica and Sayas [49], and Funken, Praetorius and Wissgott [50]. Finally, sampling of the confinement regions from the analytic expressions given in [41] was done using chebfun [51].
The authors are deeply grateful to Wrick Sengupta (NYU) and Georg Stadler (NYU) for their valuable insights on the physical and mathematical aspects of the problem. They also thank François Waelbroeck (UT-Austin) for suggesting the current hole problem as a benchmarking test. Antoine J. Cerfon. and Tonatiuh Sánchez-Vizuet were partially funded by the US Department of Energy. Grant No. DE-FG02-86ER53233. Manuel E. Solano was partially funded by CONICYT–Chile through FONDECYT project No. 1160320 and by Project AFB170001 of the PIA Program: Concurso Apoyo a Centros Cientificos y Tecnologicos de Excelencia con Financiamiento Basal.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] H. Grad, H. Rubin, Hydromagnetic equilibria and force-free fields, in: Proc. Second international conference on the peaceful uses of atomic energy, Geneva, Vol. 31,190, United Nations, New York, 1958.
- 2[2] V. D. Shafranov, On magnetohydrodynamical equilibrium configurations, Soviet Physics JETP 6 (1958) 545–554.
- 3[3] R. Lüst, A. Schlüter, Axialsymmetrische magnetohydrodynamische Gleichgewichtskonfigurationen, Z. Naturf 12a (1957) 850–854.
- 4[4] M. Brambilla, Numerical simulation of ion cyclotron waves in tokamak plasmas , Plasma Physics and Controlled Fusion 41 (1) (1999) 1–34. doi:10.1088/0741-3335/41/1/002 . URL https://doi.org/10.1088%2F 0741-3335%2F 41%2F 1%2F 002 · doi ↗
- 5[5] E. Fable, C. Angioni, A. Ivanov, K. Lackner, O. Maj, S. Yu, Medvedev, G. Pautasso, G. Pereverzev, A stable scheme for computation of coupled transport and equilibrium equations in tokamaks , Nuclear Fusion 53 (3) (2013) 033002. doi:10.1088/0029-5515/53/3/033002 . URL https://doi.org/10.1088%2F 0029-5515%2F 53%2F 3%2F 033002 · doi ↗
- 6[6] E. Howell, C. Sovinec, Solving the Grad-Shafranov equation with spectral elements , Computer Physics Communications 185 (5) (2014) 1415 – 1421. doi:https://doi.org/10.1016/j.cpc.2014.02.008 . URL http://www.sciencedirect.com/science/article/pii/S 001046551400040 X · doi ↗
- 7[7] W. Kerner, J. Goedbloed, G. Huysmans, S. Poedts, E. Schwarz, Castor: Normal-mode analysis of resistive mhd plasmas , Journal of Computational Physics 142 (2) (1998) 271 – 303. doi:https://doi.org/10.1006/jcph.1998.5910 . URL http://www.sciencedirect.com/science/article/pii/S 0021999198959101 · doi ↗
- 8[8] X. Lapillonne, S. Brunner, T. Dannert, S. Jolliet, A. Marinoni, L. Villard, T. Görler, F. Jenko, F. Merz, Clarifications to the limitations of the s- α 𝛼 \alpha equilibrium model for gyrokinetic computations of turbulence , Physics of Plasmas 16 (3) (2009) 032308. ar Xiv:https://doi.org/10.1063/1.3096710 , doi:10.1063/1.3096710 . URL https://doi.org/10.1063/1.3096710 · doi ↗
