 Research
 Open access
 Published:
On torque computation in electric machine simulation by harmonic mortar methods
Journal of Mathematics in Industry volume 12, Article number: 6 (2022)
Abstract
The use of trigonometric polynomials as Lagrange multipliers in the harmonic mortar method enables an efficient and elegant treatment of relative motion in the statorrotor coupling of electric machine simulation. Explicit formulas for the torque computation are derived by energetic considerations, and their realization by harmonic mortar finite element and isogeometric analysis discretizations is discussed. Numerical tests are presented to illustrate the theoretical results and demonstrate the potential of harmonic mortar methods for the evaluation of torque ripples.
1 Introduction
A particular challenge for electric machine simulation is the relative motion of stator and rotor and the computation of quantities of interest depending on the rotation angle, e.g., the torque as a measure for the magnetomechanic energy conversion. Various approaches have been proposed to tackle the coupling of subdomain problems on moving geometries, e.g., moving band, mortar and Lagrange multiplier or discontinuous Galerkin methods [1, 7, 13, 16], all with their specific advantages and shortcomings. In addition, different strategies have been discussed for the numerical computation of the torque, e.g., via virtual displacements or the Maxwell stress tensor; see [12] for an overview.
In this paper, we consider harmonic mortar finite element and isogeometric analysis methods proposed in [3, 10], which are based on finite element or isogeometric analysis approximations of the magnetic problems in the stator and rotor subdomains, coupled by a Lagrange multiplier technique using trigonometric functions. These methods have several interesting properties:

(a)
They are based on the Galerkin approximation of a certain weak formulation of the problem using Lagrange multipliers. This will allow us to give an unambiguous definition of the torque resulting in an exact energy conservation principle also on the discrete level.

(b)
The computed torque, as a function of the rotation angle, can be shown to be smooth, i.e., infinitely differentiable, and therefore no spurious torque ripples are introduced by nonsmoothness of the numerical approximation.

(c)
The use of trigonometric functions for the Lagrange multipliers additionally allows for an efficient assembling of the coupling matrices for multiple rotation angles, avoiding the repeated integration of interface terms.
The resulting methods therefore are particularly wellsuited for multiquery applications, e.g., the construction of performance maps, the setup of reduced order models, coupled frequency or time domain simulations. This will be illustrated by computation of cogging torque in the numerical tests.
The remainder of the manuscript is organized as follows: Sect. 2 introduces the magnetostatic setting for electric machines in two dimensions. The strong and weak formulations of the problem are presented and the energy balance is used to derive the torque. The discretization of the problem is given in Sect. 3 using the Galerkin approach. Section 4 discusses the harmonic mortar method and its implementation. Numerical results for the torque computation using the harmonic mortar method are demonstrated in Sect. 5. Finally the paper is concluded with a discussion in Sect. 6.
2 Problem statement
For ease of presentation, we consider a linear magnetostatic setting in two space dimensions. The geometric setup represents the cross section of a cylindrical device and consists of a stator domain \(\Omega _{S}\) completely enclosing the rotor domain \(\Omega _{R}\) with common interface \(\Gamma = \partial \Omega _{S} \cap \partial \Omega _{R} = \partial \Omega _{R}\); see Fig. 1. Motivated by the application context, we assume that Γ is a circle placed within the air gap and centered around the origin. Using a standard vector potential formulation [1, 10], the magnetic fields in the two subdomains are described by
where \(a_{S}\), \(a_{R}\) are the zcomponent of the magnetic vector potential, \(j_{e}\) is the impressed electric source density, and \(M^{\perp } = (m_{y},m_{x})\) the rotated magnetization vector. The equations are formulated in two different coordinate systems attached to the respective subdomains, such that the position of material continuities stays fixed under relative motion. We further assume that
on the outer boundary \(\Sigma = \partial \Omega _{S} \setminus \Gamma \). The continuity of the magnetic field and the magnetic vector potential across the interface are encoded in
where \(\rho _{\alpha }\) describes the rotation of a point by angle α around the origin and \((f\circ g)(x)=f(g(x))\) is the concatenation of functions. Furthermore, \(n_{\Gamma }\) denotes the unit normal vector on Γ pointing from \(\Omega _{R}\) to \(\Omega _{S}\). The second coupling condition allows us to introduce
which amounts to the tangential trace of the magnetic field at the interface.
Dependence on α
By (4)–(5) the solutions \((a_{S},a_{R},\lambda )\) of (1)–(6) implicitly depend on the rotation angle α, even if the sources \(j_{e}\) and M are independent of α, which we assume in the sequel. We write \(u(\cdot \vert \alpha )\) to highlight the dependence of a function u on the angle α and denote by
the derivative of such a parameterdependent function u with respect to the parameter α. By differentiation of (4) with respect to α, we can see that
where \(x_{\theta \alpha } = \rho _{\alpha }(x_{\theta })\) is the point in the rotated coordinate system of \(\partial \Omega _{R}\) corresponding to a point \(x_{\theta }=(r_{\Gamma }\cos \theta ,r_{\Gamma }\sin \theta )\) on the fixed interface Γ; see Fig. 1. Furthermore, \(\frac{d}{d\theta } u(x_{\theta }) = r_{\Gamma }n_{\Gamma }^{\perp }\cdot \nabla u(x_{\theta })\) amounts to the tangential derivative of u along Γ and \(r_{\Gamma }\) is the radius of Γ.
Weak formulation
Using standard arguments, sufficiently regular solutions of (1)–(5) can be seen to satisfy the variational identities
for all smooth test functions \(v_{S}\), \(v_{R}\), and μ defined on \(\Omega _{S}\), \(\Omega _{R}\), and Γ, respectively, with \(v_{S}=0\) on Σ. Using the considerations outlined above, the coupling condition (11) can also be rephrased as
which will be used in the following considerations.
Energy balance and torque computation
As a next step, we introduce the magnetic energy of the system. For ease of notation, we assume a unit length L of the device in axial direction. Then
Let us note that, via the fields \(a_{S}\), \(a_{R}\), the energy also implicitly depends on the rotation angle α. By elementary calculations, we may then compute
where we used the variational identities (9)–(10) with \(v_{S}=a'_{S}\) and \(v_{R} = a'_{R}\) in the second step. Using the differential form (12) of the coupling condition, we arrive at the energy balance
where the first term denotes the electric work required to maintain the electric current \(j_{e}\) in the stator coils (neglecting Ohmic losses), and the second term is the mechanic work required for an infinitesimal rotation of the system. These energybased considerations immediately give rise to the following definition of the torque
Note that \(a_{R}\) and λ and hence T are functions of the rotation angle α. In general, the energy and torque have to be scaled by the axial length L.
Remark 1
The above formula can be derived in various ways, see [4, 9, 12]. Since the stator and rotor were both assumed to be rigid bodies, the torque can be computed here directly without resorting to the Maxwell stress tensor. Using rotational symmetry as well as integration by parts along the interface Γ, we can express the torque alternatively as
which may be more convenient depending on the particular setting.
3 Galerkin approximation
For discretization of the problem (1)–(5), we consider Galerkin approximations of the variational equations (9)–(11) using appropriate finitedimensional subspaces \(V_{h,S} \subset H^{1}_{\Sigma }(\Omega _{S})\), \(V_{h,R} \subset H^{1}(\Omega _{R})\), and \(M_{N} \subset H^{1/2}(\Gamma )\). Let us note that the boundary conditions (3) are incorporated explicitly in the definition of \(H^{1}_{\Sigma }(\Omega _{S})=\{v \in H^{1}(\Omega _{S}) : v=0 \text{ on } \Sigma \}\) here. The discrete problem for a fixed angle α then reads as follows.
Problem 1
Find \(a_{h,S} \in V_{h,S}\), \(a_{h,R} \in V_{h,R}\) and \(\lambda _{N} \in M_{N}\) such that
for all discrete test functions \(v_{h,S} \in V_{h,S}\), \(v_{h,R} \in V_{h,R}\), and \(\mu _{N} \in M_{N}\).
By choosing bases for the approximation spaces \(V_{h,S}\), \(V_{h,R}\) and \(M_{N}\), the discrete variational problem can be turned into a linear system of equations for the corresponding coordinate vectors; see Sect. 4 for details. The above variational form is however more convenient for the analysis of the discretization.
Wellposedness
For the following considerations, we assume that \(V_{h,S}\), \(V_{h,R}\), and \(M_{N}\) are finitedimensional and that \(\nu _{S}\), \(\nu _{R}\) are uniformly positive and bounded from above. The source currents \(j_{e}\) and magnetization vector M, as well as the domains \(\Omega _{S}\), \(\Omega _{R}\) are assumed to be sufficiently regular. We can then establish the wellposedness of the discretization scheme as follows.
Lemma 1
Assume that
Then the discrete variational problem (16)–(18) is uniquely solvable and
for all \(v_{h,S} \in V_{h,S}\), \(v_{h,R} \in V_{h,R}\) and \(\mu _{N} \in M_{N}\).
The assertion is a direct consequence of Brezzi’s saddlepoint theory [6]; also see [7, 11] for application in the current context. Under the stability condition (19), the Galerkin approximations obtained by Problem 1 thus always lead to quasioptimal error estimates with respect to the chosen approximation spaces. Two particular examples of Galerkin approximations will be discussed below.
Discrete torque computation and energy balance
Mimicking the formula (14) for the torque obtained on the continuous level, it seems natural to define the discretized approximation of the torque as
The torque computation for a given angle α thus only requires the solution of one magnetostatic interface problem (16)–(18) for this specific angle. With the same reasoning as on the continuous level, we obtain the following result.
Lemma 2
Let \((a_{h,S},a_{h,R},\lambda _{N})\) denote a solution of (16)–(18). Then
with discrete torque \(T_{h,N}\) defined by the formula (20).
This assertion illustrates that the electromagnetomechanic energy balance holds exactly also on the discrete level.
Alternative representation and smooth dependence on α
If the space \(M_{N}\) of discrete Lagrange multipliers consists of sufficiently smooth functions, we may express the discrete torque equivalently as
By a recursive argument, one can then show the following result.
Lemma 3
Let \(M_{N}\) consist of \(k1\) times continuously differentiable functions. Then the solution \((a_{S},a_{R},\lambda _{N})\) is k times differentiable with respect to α.
A proof of this assertion follows from the algebraic structure of the discretized problem; see the end of the next section.
4 Harmonic mortar discretizations
As a particular choice of a Galerkin approximation, we now consider the following choice of spaces: \(V_{h,S}\) and \(V_{h,R}\) are standard \(H^{1}\)conforming finite element spaces [5] over appropriate triangulations of the stator and rotor domain \(\Omega _{S}\) and \(\Omega _{R}\). Note that no conformity of the mesh across the interface is required. For approximation of the Lagrange multipliers, we consider the space
of trigonometric polynomials of degree ≤N.
Remark 2
As shown in [11], the infsup condition (19) holds true, if N is chosen not too large. As a rule of thumb, N must not exceed the number of degrees of freedom in \(V_{h,S}\) and \(V_{h,R}\) associated to the interface Γ. For a finite element approximation on a quasiuniform mesh and with fixed polynomial degree p, stability can thus be guaranteed for \(N \lesssim h^{1} p\); see [11, Theorem 1]. Similar results hold for isogeometric methods for the stator and rotor domains [3, 8]. Following the considerations of the previous section, both methods allow for a torque computation consistent with a discrete energy conservation principle.
Implementation of the harmonic mortar finite element method
In the following, we discuss some details concerning the implementation of the harmonic mortar finite element method outlined above. As we will see, the use of trigonometric polynomials for the discrete Lagrange multipliers brings advantages also for the numerical realization.
After choosing appropriate basis functions for the finite element subspaces \(V_{h,S}\), \(V_{h,N}\) and the trigonometric polynomials in \(M_{N}\), the discrete variational problem (16)–(18) can be turned into a linear system
The source vectors \(J_{e}\) and \(J_{M}\) and the matrices \(K_{S}\), \(K_{R}\) and \(B_{S}\) are independent of the angle α, whereas \(B_{R}\) and hence also the solution vectors \(a_{S}\), \(a_{R}\) and λ depend on the rotation angle. For the harmonic mortar, the entries of the coupling matrix \(B_{R}(\alpha )\) can be computed by the following expressions
where \(\phi _{j}\) are the basis functions for the Galerkin approximation on \(\Omega _{R}\).
Remark 3
By trigonometric summation formulas, we get
with smooth coefficients depending on α, hence the integrals in the coupling matrix \(B_{R}(\alpha )\) in fact only have to be evaluated for a single angle \(\alpha =0\). In matrix notation, we may then write
where \(R(\alpha )\) is a block diagonal matrix with \(2\times 2\) blocks. Further, note that the integrals in the definition of \(B_{R}(0)\) consist of products of trigonometric functions with polynomials, which can be computed analytically [15].
Algebraic energy balance and torque computation
On the algebraic level, the energy is given by \(E=\frac{1}{2} \Vert a_{S} \Vert ^{2}_{K_{S}} + \frac{1}{2} \Vert a_{R} \Vert _{K_{R}}^{2}  j_{M}^{\top }a_{R}\) where \(\Vert x \Vert _{M}^{2} = x^{\top }M x\) is the square of the norm associated with a symmetric positive semidefinite matrix M. Then
Hence the discrete torque can be simply computed by the algebraic formula
Note that \(B_{R}'(\alpha )\) can be expressed as \(B_{R}'(\alpha )=R'(\alpha )B_{R}(0)\) by using (27). Moreover, the matrix \(R'(\alpha )\) is block diagonal with \(2 \times 2\) blocks whose entries can be computed analytically; see above.
Derivatives with respect to α and proof of Lemma 3
By formal differentiation of the above equations, we can see that
Together with (28)–(30), one can see that the solution of (24)–(26) is differentiable with respect to the angle α. By recursion, we may further conclude that the torque \(T_{h,N}\) of the harmonic mortar method is a smooth function of the angle α. The same argument provides a proof of Lemma 3.
5 Numerical results
In the following, we demonstrate the application of the harmonic mortar finite element and isogeometric analysis method for computing the torque in a sixpole permanent magnet synchronous machine shown in Fig. 2. The geometry consists of a rotor with three pole pairs with embedded permanent magnets and a stator with 36 slots filled with copper windings. The length of the actual machine is \(L=0.1\text{ m}\), so the energy and torque have to be scaled by L as outlined above. Some information about the geometry and material parameters is summarized in Table 1; for details see [2, Chapter V.A].
Simulation setup
In our numerical tests, we compute the cogging torque via formula (22) in the absence of excitation currents \(j_{e}=0\). For the discretization of the magnetostatic problems in the stator and rotor domains, we used open source package GeoPDEs [17]. The computations are carried out with Bsplines of degree \(p=1\) and \(p=2\) with maximal continuity as basis functions for the solution; this corresponds to a standard finite element method (FEM) and a multipatch spline discretization with patchwise \(C^{1}\)continuous splines of second order (IGA). To accommodate for material discontinuities, only \(C^{0}\)continuity is enforced across patch borders; see [3] for details. At the external boundaries of the stator and rotor, the magnetic vector potential a is set to zero. For the computations of different degree p the mesh refinement has been adapted such that the number of degrees of freedom is comparable for \(p=1\) and \(p=2\). The number of degrees of freedom for \(p=1\) is \(N_{\mathrm{dof},R}=26{,}532\) in the rotor domain and \(N_{\mathrm{dof},S}=39{,}528\) in the stator domain. For \(p=2\) the number of degrees of freedom is \(N_{\mathrm{dof},R}=25{,}140\) in the rotor domain and \(N_{\mathrm{dof},S}=37{,}764\) in the stator domain. The reference solution is computed on a refined mesh with \(p=2\) leading to \(N_{\mathrm{dof},R}=93{,}360\) and \(N_{\mathrm{dof},S}=128{,}664\) degrees of freedom in the rotor and stator domain, and with trigonometric degree \(N=200\). The saddlepoint problems (24)–(26) are solved efficiently by a Schur complement method; details are given in the Appendix. An independent reference torque was computed with JMAG^{®} using a finite element discretization of order \(p=1\) with 1,084,517 elements.
Symmetry of the solution
A snapshot of the magnetic vector potential and its isolines, which correspond to the magnetic flux lines, is depicted in Fig. 2. Note that by symmetry of the rotor and stator geometry, the solution components \((a_{S},a_{R},\lambda )\) have a 60^{∘} antisymmetry. In particular, for the Fourier expansion of the computed Lagrange multiplier
only the coefficients \(c_{n}\), \(d_{n}\) with index \(n\in \mathcal{N}=\{3,9,15,\ldots\}\) are nonzero. By careful construction of the meshes, the geometric symmetries are preserved on the discrete level and the same behavior is observed for the numerical solution, as can be seen from Table 2. In practice, the computational cost can be reduced substantially by solving the problem only for one pole of the machine and using antiperiodic boundary conditions; see [3] for details. In the present case the number of degrees of freedom can be reduced by a factor of six. Using this prior knowledge, most of the Lagrange multipliers can be eliminated already during assembling leading to more efficient computations, in particular in connection with the Schur complement technique outlined in the Appendix.
Torque computation
In Fig. 3, we display the torque computed via formula (14) with FEM (\(p=1\)) and IGA (\(p=2\)) for different orders N of harmonic basis functions. By the 10^{∘} symmetry of the stator slots and the corresponding symmetry of the mesh, the computed torque can be shown to exhibit a periodic behavior with a period length of 10^{∘}. Moreover, the torque can be seen to be antisymmetric with respect to half of the period. We further observe that the torque converges towards that of the reference solution when increasing the number N of harmonic basis functions. As indicated in Remark 2, the computation becomes unstable when the dimension of the Lagrange multiplier space \(M_{N}\) exceeds the number of degrees of freedom of \(V_{h,S}\) and \(V_{h,R}\) associated to the interface Γ.
Due to periodicity, the torque \(T_{h,N}\) can be approximated by a Fourier series
with coefficients \(\hat{c}_{m}, \hat{d}_{m} \in \mathbb {R}\). By the symmetry properties discussed above, one can see that only \(\hat{d}_{m}\) for \(m\in \mathcal{M}=\{36,72,108,\ldots\}\) is nonzero, while \(\hat{d}_{m}=0\) of all \(m \notin \mathcal{M}\) and \(\hat{c}_{m}=0\) for all m. The corresponding results of our computations are shown in Table 3.
6 Discussion
We have discussed the harmonic mortar method using trigonometric polynomials as Lagrange multipliers for the efficient treatment of rotation in electric machine computation. The energy balance has been used to derive an explicit formulation for the computation of the torque in the continuous and discretized settings. It has been shown that the electromagnetomechanic energy balance holds exactly also on the discrete level. Furthermore, if the functions in the Lagrange multiplier space are smooth then this is inherited by the torque. The derived formulation has been applied to a typical permanent magnet synchronous machine model using isogeometric analysis and a lowest order finite element method with an exact geometry mapping. The cogging torque has been computed with the proposed method and the influence of the number of Lagrange multiplier basis functions on the solution has been investigated.
Availability of data and materials
The software framework used for the numerical test is available at http://rafavzqz.github.io/geopdes/ [17]. The CAD description of the permanent magnet synchronous machine geometry is available as an IGES file [14].
Abbreviations
 CAD:

Computer Aided Design
 FEM:

Finite Element Method
 IGA:

Isogeometric Analysis
References
Alotto P, Bertoni A, Perugia I, Schözau D. Discontinuous finite element methods for the simulation of rotating electrical machines. Compel. 2001;20:448–62.
Bontinck Z. Simulation and robust optimization for electric devices with uncertainties. Dissertation, Technische Universität Darmstadt, 2018. https://tuprints.ulb.tudarmstadt.de/id/eprint/8330.
Bontinck Z, Corno J, Schöps S, De Gersem H. Isogeometric analysis and harmonic statorrotor coupling for simulating electric machines. Comput Methods Appl Mech Eng. 2018;334:40–55.
Bossavit A. Forces in magnetostatics and their computation. J Appl Phys. 1990;67:5812–4.
Braess D. Finite elements. 3rd ed. New York: Cambridge University Press; 2007.
Brezzi F. On the existence, uniqueness and approximation of saddlepoint problems arising from Lagrangian multipliers. RAIRO Anal Numér. 1974;8:129–51.
Buffa A, Maday Y, Rapetti F. A sliding meshmortar method for a two dimensional currents model of electric engines. ESAIM: Math Model Numer Anal. 2001;35:191–228.
Cottrell JA, Hughes TJR, Bazilevs Y. Isogeometric analysis: toward integration of CAD and FEA. New York: Wiley; 2009.
Coulomb JL. A methodology for the determination of global electromechanical quantities from a finite element analysis and its application to the evaluation of magnetic forces, torques and stiffness. IEEE Trans Magn. 1983;16:2514–9.
De Gersem H, Weiland T. Harmonic weighting functions at the sliding interface of a finiteelement machine model incorporating angular displacement. IEEE Trans Magn. 2004;40:545–8.
Egger H, Harutyunyan M, Merkel M, Schöps S. On the stability of harmonic mortar methods with application to electric machines. In: Schilders W, van Beurden M, Budko N, editors. Scientific computing in electrical engineering SCEE 2020. Mathematics in industry. Berlin: Springer; 2021.
Henrotte F, Hameyer K. Computation of electromagnetic force densities: Maxwell stress tensor vs. virtual work principle. J Comput Appl Math. 2004;168:235–43.
Lange E, Henrotte F, Hameyer K. A variational formulation for nonconforming sliding interfaces in finite element analysis of electric machines. IEEE Trans Magn. 2010;46:2755–8.
Merkel M, Gangl P, Schöps S. Results of the shape optimization of rotating electric machines using isogeometric analysis. 2020. https://doi.org/10.5281/zenodo.3688478.
Neuman E. Moments and Fourier transforms of bsplines. J Comput Appl Math. 1981;7(1):51–62.
Tsukerman I. Accurate computation of ‘ripple solutions’ on moving finite element meshes. IEEE Trans Magn. 1995;31:1472–5.
Vázquez R. A new design for the implementation of isogeometric analysis in Octave and Matlab: GeoPDEs 3.0. Comput Math Appl. 2016;72:523–54.
Acknowledgements
We thank the JSOL Corporation for the fruitful discussions, partnership and JMAG license.
Funding
This work is supported by the Graduate School CE within the Centre for Computational Engineering at Technische Universität Darmstadt, by the German Research Foundation via the project SCHO 1562/61, and by the Defense Advanced Research Projects Agency (DARPA), under contract HR00111720028. The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
The initial manuscript was drafted by HE and RL and extended and edited by MH, MM and SSc. The simulations were conducted by MM. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Appendix
Appendix
If the machine model uses only a small number of interface modes N then local condensing is very effective. Let as assume that the matrices \(K_{S}\) and \(K_{R}\) are nonsingular, e.g. due to Dirichlet boundaries of the stator and rotor domains, then the system (24)–(26) can be rewritten as
The internal degrees of freedom are straightforwardly eliminated using the Schurcomplement. This gives rise to the lowdimensional interface problem
with
The inverses in (37) and (38) are not needed explicitly. Instead, one factorization and a few forward/backward substitutions (for each spectral basis at the interface) can be used to precompute the necessary expressions. Thus, only the small system (36) has to be solved in the online phase for different rotation angles.
The internal degrees of freedom can be cheaply reconstructed, i.e.,
This is computationally convenient when dealing with rotation since only the lowdimensional matrix \({R}(\alpha )\) depends on α. This leads to a significant reduction in, e.g., when considering the computation of a rotating electric machine.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Egger, H., Harutyunyan, M., Löscher, R. et al. On torque computation in electric machine simulation by harmonic mortar methods. J.Math.Industry 12, 6 (2022). https://doi.org/10.1186/s13362022001212
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s13362022001212