$T$-$\Omega$ formulation with higher order hierarchical basis functions for non simply connected conductors

This paper extends the $T$-$\Omega$ formulation for eddy currents based on higher order hierarchical basis functions so that it can deal with conductors of arbitrary topology. To this aim we supplement the classical hierarchical basis functions with non-local basis functions spanning the first de Rham cohomology group of the insulating region. Such non-local basis functions may be efficiently found in negligible time with the recently introduced D{\l}otko--Specogna (DS) algorithm.

T -Ω Finite Element formulation for solving eddy currents problems is computationally very attractive given that it reduces the number of unknowns by exploiting the fact that the magnetic field is irrotational in the insulating region. Yet, the standard Finite Element formulation based on Whitney edge elements [1] and the Discrete Geometric Approach (DGA) counterpart described in [2] provide a current density which is only uniform inside each mesh element. Higher order basis functions are therefore very attractive since they yield greater accuracy for a given computational cost and smoother current density vector field.
Among the various possibilities to obtain a high order of convergence, the hierarchical basis functions introduced in [3] and [4] are particularly appealing. They allow to have a good control over the distribution of degrees of freedom (dofs) given that different orders can coexist on the same mesh. Moreover, these different orders may be set by hand or, as in p-adaptivity, automatically by a mesh refinement scheme.
The T -Ω Finite Element formulation for solving eddy currents problems using hierarchical high order basis functions has been introduced in [5]. Yet, the authors of [5] assume that the conducting region is simply connected. Since in the engineering practice in most cases this assumption is overly restrictive, the aim of this paper is to fill this gap by proposing a formulation valid for manifold conductors of arbitrary topology. A previous attempt to solve this issue is reported in [6], even though necessary details for such a solution are missing, see Sec. 1.3. Let us assume that the conductors form a combinatorial three-manifold K c and that K = K c ∪K a , where K a represents the insulating region and K the whole computational domain. We assume that K is simply connected since this is the case in the great majority of problems while also making the presentation easier. However, this assumption does not affect the generality of the results of this paper, given that it may be removed as described in [9].
If one wants to solve the eddy current problem with the magnetic scalar potential in configurations containing topologically nontrivial conductors (for example, conductors with "handles" like a torus), representatives of first cohomology group generators of insulator are the only objects that make the problem well defined. Thus, the idea proposed in this contribution is to supplement the basis functions introduced in [5] with non-local basis functions spanning the first de Rham cohomology group H 1 dR (K a ) [7] of the insulating region. To achieve good overall performances, it is mandatory to address this topological pre-processing efficiently. With classical algebraic methods like [8] based on reduction of the complex K a followed by a Smith Normal Form (SNF) computation on the reduced complex, finding such non-local basis functions easily becomes the bottleneck of the whole simulation, see [11]. This is the main reason why such rigorous methods to solve this issue did not take off in electromagnetic solvers.
In this paper we propose to perform the topological pre-processing with the DS algorithm [9], whose typical computational complexity is linear. Yet, the set of representatives provided by the DS algorithm is a lazy cohomology basis [9], [10]: the provided set of representatives span the needed cohomology group, but contains additional, dependent elements. The size of the lazy basis is no more than twice the size of a standard cohomology basis and with moderate effort one may produce a standard cohomology basis (see [9]) given a lazy one. However, it has been verified that this technique does not provide any speedup in the solution of the electromagnetic problem while giving exactly the same solution in terms of induced currents up to linear solver tolerance.
The paper is organized as follows. In Section II we introduce the novel T -Ω formulation to solve eddy current problems with high order hierarchical basis functions which works also when conductors have arbitrary topology. Moreover, we survey the algorithm used to extract the lazy cohomology basis. Section III presents the results obtained when solving two TEAM problem benchmarks. Finally, in Section IV, the conclusions are drawn.

.1 de Rham cohomology
If K a is simply-connected (or topologically trivial), as in Fig. 1a, a curl-free vector field, like the magnetic field h, can be expressed as the gradient of the magnetic scalar potential Ω.
Topology starts playing a role in the T -Ω formulation when K a is not simply-connected. Let us consider an example where K a is the complement of a conductive torus K c with respect to a Figure 1: The insulating region K a is obtained as the complement of a with respect to a box (not represented in the picture for clarity) of (a) a trivial conductor, (b) a solid torus, (c) a two-fold solid torus, i.e. a conductor with two handles.
box as in Fig. 1b. The magnetic field h is curl-free in K a but its circulation on the loop c of Fig. 1b, because of Ampère's law, has to match the electric current i c that flows around K c . The consequence is that the gradient of the magnetic scalar potential is not enough to span the space where the magnetic field h lives.
In the following we use concepts of algebraic topology that due to the limited space cannot be reproduced here. Please consult [13] for a formal introduction or [12], [2], [9] for an informal one.
In algebraic topology, the first de Rham cohomology group H 1 dR (K a ) of K a , is exactly the space of curl-free vector fields in K a that are not gradients [7]. Therefore, by its very definition, H 1 dR (K a ) is the space we have to add to the space generated by the well known hierarchical basis functions described in [17]. It is known that the dimension of this space is equal to the first Betti number β 1 (K a ) of K a [7].
Focusing again on the example in Fig. 1b, β 1 (K a ) = 1, thus the basis for the H 1 dR (K a ) space is composed by just one element called generator. Let us construct the generator g ∈ H 1 dR (K a ) as a curl-free field that has a circulation 1 on a loop linking the conductor as c in Fig. 1b. If one now considers the product i c g ∈ H 1 dR (K a ), by varying the independent current i c one is able to span the whole H 1 dR (K a ) space. Therefore, i c is a new degree of freedom that has to be added as an additional unknown of the eddy current problem.
This property is generalizable to more complicated topologies, see [14], [9] for a more formal explanation. Here we informally show what happens in a more complicated example, i.e. let us consider a two-fold solid torus as K c , see Fig. 1c. Here, β 1 (K a ) = 2 (the conductor has two handles), thus there are two independent currents i c 1 and i c 2 . The H 1 dR (K a ) space is generated by  Fig. 1b. (b) The thick black edges belong to the thick cut g (i.e. to the support of the representative of the cohomology generator H 1 (K a , Z)). The coefficients assigned to thick edges are such that C a g = 0, where C a is the restriction of C to K a , and that the circulation on all discrete cycles linking the conductive torus like c is 1.
i c 1 g 1 + i c 2 g 2 , where the two generators g 1 , g 2 are such that t is the tangent vector of the loop c i and δ ij is the Kronecker delta. In general, the magnetic field h is represented as where the space of gradients of the magnetic scalar potential Ω has been already defined in [17] and each independent current has to be included as an additional degree of freedom to span the whole space of the eddy current problem solution.

Construction of H 1 dR (K a ) generators
Let us try to replicate the properties of g in the example of Fig. 1b at the discrete level. Let us call g the discrete counterpart of g. First, the circulation of g on a loop c made of edges that links the conductor like c has to be 1 as for g. Therefore, it is natural to define g as a discrete field having integer coefficients assigned to mesh edges. Second, we want g to be curl-free as its continuous equivalent. This translates in the discrete case to the condition C a g = 0, where C a is the face-edge incidence matrix of the mesh restricted to K a . That is, the discrete circulation of g over the edges in the boundary of each face of the mesh must be zero. It is possible to prove that such edge discrete fields may be interpreted as the representatives of the generators of the first cohomology group over integers H 1 (K a , Z) [14], [9]. Then, to retrieve g, we just need to interpolate g with the standard Whitney edge elements basis functions [15]. Thus, it is evident that there is no need to use higher order basis functions to span the de Rham space. The H 1 (K a , Z) are realized using the thick cut technique [16], see Fig. 2. The advantage in switching to cohomology over the integers is that the generators of H 1 (K a , Z) can be rigorously and efficiently computed. In this respect, it is important to note that the property of the basis functions of being hierarchical is of fundamental importance: thus, the term of h related to H 1 (K a , Z), can be accounted for when using higher order by adding it to the scalar first order dofs on the edges of K a . In what follows we give a detailed description of an algorithm that performs this task.

Efficient computation of H 1 (K a , Z) generators
We find the required non-local basis functions spanning the first de Rham cohomology group space by exploiting the recently introduced idea of lazy cohomology generators [9]. In what follows we recall the DS algorithm that finds the lazy generators of the first cohomology group H 1 (K a , Z): 1. First the discrete surface S = K c ∩ K a (see Fig. 3a) is extracted and its first cohomology group generators H 1 (S, Z) are computed with a combinatorial algorithm with linear worstcase complexity [9]. In Fig. 3a the supports of the dual in S of two possible representatives c 1 and c 2 of the cohomology generators are shown.
2. Thinned currents are found by pre-multiplying the generators of S by the incidence matrix C c between face and edge pairs [9] restricted to K c .
3. Finally, a vectorialized version of the ESTT algorithm [9] is run on the whole complex K for all thinned currents at once. The ESTT algorithm is a general version of the Webb-Forghani iterative algorithm [17] to obtain a discrete field whose discrete curl has to match the thinned current vectors obtained at the previous step. Its typical complexity is linear, even though the worst-case complexity is cubical. The output of the ESTT restricted to K a form the required lazy cohomology generators.
The output lazy generators span the H 1 (K a , Z) cohomology group, but they do not form a base given that they are dependent. In the example, the generator obtained by processing c 1 span H 1 (K a , Z), whereas the generator obtained with c 2 is not useful given that the dual of c 2 bounds a discrete surface inside K c (therefore it is not topologically interesting but it is used anyway in the final system of equations).
Disentangling boundary generators is far from being trivial especially because it is in general not enough to pick half of the generators to produce the suitable basis. This is because the generators of the basis may be "mixed", meaning that one of them is a linear combination of the two as c 3 in Fig. 3c. Thus, in general there are no easier ways to do it than the change of basis described in the appendix of [9].
The novel idea of lazy cohomology generators [9] is exactly that all boundary generators produce a cut, even if half of them may be eliminated. This approach does not provide a sensible slowdown in the system solver time, whereas greatly speedup the topological pre-processing part. Concerning the quality of the solution, the results with a standard vs lazy basis in terms of eddy currents are the same up to solver tolerance.
This technique is appealing first of all because the topological pre-processing requires mere seconds even on very complicated problems. Moreover, the DS algorithm is proved to be general, therefore it works for every possible input, no matter how complicated the geometry or the topology of the insulating region is.
Finally, we note that the technique proposed by Ren [1] and used later by He et al [6] lack a number of decisive details. The description of the algorithm does not specify if surface cuts (i.e. boundary generators) are disentangled or not (and, if they are then how). It is also not clear whether the surface cuts (i.e. cohomology generators) are extended in K a or in the whole K. The idea of extending topologically trivial sets that seems to be at the root of the algorithm in [1] suffers from very serious drawbacks that may prevent successful termination of the algorithm. However, given the level of generality of the presentation in [1], it is not possible to assess its correctness nor to implement and use it.

Numerical results
The DS algorithm together with the T -Ω formulation with hierarchical basis functions have been implemented inside the EMS solver (www.emworks.com). We validated the software and assessed the performances of first and second order approximation in solving various eddy current problems.
As a first benchmark, we use the TEAM Workshop problem 7, see [18]. It consists of a racetrack shaped coil driven by a time harmonic current (amplitude 2742AT, frequency f =200Hz) over a square aluminum plate. Fig. 4 represents the eddy currents resulting from the solution with first and second order. Table 1 contains the comparison of the computed heat losses P = K ρj 2 , where j is the current density vector field and ρ is the resistivity. As a second benchmark, we consider the TEAM Workshop problem 21, see [19]. Fig 5 contains the eddy currents resulting from the solution with first and second order in case of benchmark 21a-3. Table 2 contains the comparison of the computed heat losses for the cases 21a-1, 21a-2 and 21a-3.

Conclusions
Lazy cohomology generators technology has been integrated inside an eddy current solver employing second order hierarchical basis functions. As expected, the second order formulation indeed provides more accurate results than its first order counterpart. The inclusion of automatic mesh adaptivity to render the second order more efficient is left for further studies.