1 Motivation and Introduction

During an optimization process of a rotating electrical machine with respect to specific requirements on the performance many different designs have to be simulated. In each simulation a complete rotation cycle of the motor has to be performed. The vast amount of simulations calls for efficient concepts to reduce the computational costs.

Our focus is on the introduction of a domain decomposition approach that allows an independent meshing of the two motor parts. This decomposition gives us the flexibility to simulate the whole rotation cycle without remeshing. Furthermore, to reduce the complexity of the simulation while attaining the same accuracy of the calculation we are interested in a mesh that is as coarse as possible and as fine as necessary. To achieve an optimal distribution of the degrees of freedom in our finite element mesh we use an adaptive mesh refinement procedure.

2 Model Problem

To model the behaviour of the electrical machine we use the magnetostatic case of Maxwell’s equations in 2D. Since we are interested in modelling a rotating electrical machine our computational domain Ωdecomposes—as already mentioned—into two different parts. One part is fixed—we will call it stator Ω S—and one part is moving—the rotor Ω R. Both parts consist of various material domains Ω i, i ∈ I. In our considerations we added to the physical stator and rotor an outer and inner air domain as well as parts of the motor-air-gap to each of them respectively. Additionally we introduce the interface

$$\displaystyle \begin{aligned} \varGamma_{} = \partial \overline{\varOmega_{S}} \cap \partial \overline{\varOmega_{R}}, \end{aligned} $$

where ∂Ω k represents the boundary of the respective domain.

Remark 1

In our application we consider only interfaces Γ that are circular (Fig. 1).

Fig. 1
figure 1

Example of the cross-section of a motor sector. Iron parts are colored in gray, magnets are depicted in yellow. Current domains and their connections are indicated in orange, green and red

The variational formulation for the continuous problem then has the following form: Find \(u \in H_{0}^{1} \left ( \varOmega _{} \right )\) such that

$$\displaystyle \begin{aligned} a \left( u, w \right) = \left\langle f, w \right\rangle &&\forall w \in H_{0}^{1}(\varOmega) {} \end{aligned} $$
(1)

with the semi-linear form

$$\displaystyle \begin{aligned} a \left( u, w \right) = \sum_{i \in I} &\left( \int_{\varOmega_{i}} \nu_{i}(\left| \nabla u_{i} \right|) \nabla u_{i} \cdot \nabla w_{i} \right) \end{aligned} $$

and the linear form

$$\displaystyle \begin{aligned} \left\langle f, w \right\rangle = \sum_{i \in I} &\left( \int_{\varOmega_{i}} J_{3,i} w_{i} + \int_{\varOmega_{i}} \nu_{M} {\mathbf{M}}_{i,\perp} \nabla w_{i} \right). \end{aligned} $$

Here u i is the restriction of the solution u to the domain Ω i. The right-hand side includes contributions from the current J 3,i in the coils of the electrical machine and from the magnetization of domains representing permanent magnets, denoted by M i = (M 1,i, M 2,i). The material properties in Ω i is described by the function ν i, which is non-linear in iron. In air we use a constant value ν 0. H s(Ω) and \(H^{s}_{0}(\varOmega )\) denote the usual Sobolev spaces.

2.1 Nitsche Coupling

The Nitsche coupling is a domain decomposition technique see, e.g., [2, 3]. The idea is to penalize the jump of the solution on the two adjacent domains Ω S and Ω R across the interface Γ. For this the trace of u on Γ is introduced as a new variable λ (Fig. 2).

Fig. 2
figure 2

Schema of the two different motor parts: the rotor and the stator with the circular interface Γ in between

2.1.1 Discrete Problem

We approximate the domains Ω S and Ω R by admissible triangular meshes \(\mathcal {T}_{S,h}\) and \(\mathcal {T}_{R,h}\). We require that all nodes of an element T lie inside one material domain Ω i. With this assumption we write ν T instead of ν i for this triangle. We assume that the meshes are shape-regular. The interface Γis subdivided by elements \(\mathcal {E}_{\varGamma _{}} = \left \{ e \right \}\) with \(\varGamma _{} = \bigcup _{e \in \mathcal {E}_{\varGamma _{}}} \overline {e}\). Note that the elements of \(\mathcal {E}_{\varGamma _{}}\) are curvilinear and represent Γaccurately. So the overall mesh is described by the triple \(\mathcal {M}_{h} = (\mathcal {T}_{S,h}\), \(\mathcal {T}_{R,h}, \mathcal {E}_{\varGamma _{}})\) (Fig. 3).

Fig. 3
figure 3

Example of a polygonal approximation \(\mathcal {T}_{h}\) for the individual parts. The meshes are separated for better presentation, in reality all interface vertices of rotor and stator lie on Γ

For the discretization we use continuous piece-wise linear elements, in details: Find \({\mathbf {u}}_{h} = (u_{S,h}, u_{R,h}, \lambda _{h}) \in X_{h}(\mathcal {M}_{h}) = V_{h}\left ( \mathcal {T}_{S,h} \right ) \times V_{h} \left ( \mathcal {T}_{R,h} \right ) \times W_{h} \left ( \mathcal {E}_{\varGamma _{}} \right ),\) such that

$$\displaystyle \begin{aligned} a_{h} \left( {\mathbf{u}}_{h}, {\mathbf{w}}_{h} \right) = \left\langle f, {\mathbf{w}}_{h} \right\rangle &&\forall {\mathbf{w}}_{h} = (w_{S,h}, w_{R,h}, \psi_{h}) \in X_{h}(\mathcal{M}_{h}) {} \end{aligned} $$
(2)

with

where \(\mathcal {P}^{1}(T)\) is the space of polynomials of degree less than 1 restricted to the element T and

where \(\widehat {e} = [0,1]\) denotes the reference element and F e maps \(\widehat {e}\) onto e. The semi-linear form and the linear form are given by

$$\displaystyle \begin{aligned} &a_{h} \left( {\mathbf{u}}_{h}, {\mathbf{w}}_{h} \right) = \sum_{k \in \{ R,S \} } \left( \sum_{T \in \mathcal{T}_{k,h}} \int_{T} \nu_{T}(\left| \nabla u_{k,h} \right|) \nabla u_{k,h} \cdot \nabla w_{k,h} \right. \\ &\quad - \sum_{e \in \mathcal{E}_{\varGamma_{}}} \int_{e} \nu_{0} \nabla \overline{u}_{k, h} \cdot n_{k} \left( \overline{w}_{k, h} - \psi_{h} \right) + \beta \sum_{e \in \mathcal{E}_{\varGamma_{}}} \int_{e} \nu_{0} \left( \overline{u}_{k, h} - \lambda_{h} \right) \nabla \overline{w}_{k, h} \cdot n_{k} {} \\ &\quad + \left. \frac{\alpha}{h} \sum_{e \in \mathcal{E}_{\varGamma_{}}} \int_{e} \nu_{0} \left( \overline{u}_{k, h} - \lambda_{h} \right) \left( \overline{w}_{k, h} - \psi_{h} \right) \right) \end{aligned} $$
(3)

and

$$\displaystyle \begin{aligned} \left\langle f_{h}, {\mathbf{w}}_{h} \right\rangle = &\sum_{k \in \{ R,S \} } \sum_{T \in \mathcal{T}_{k,h}} \left( \int_{T} J_{3} w_{k, h} + \int_{T} \nu_{M} {\mathbf{M}}_{\perp} \nabla w_{k, h} \right). \end{aligned} $$

Here n k stands for the normal vector on ∂Ω k that points in outward direction. \(\overline {u}_{k,h}\) and \(\overline {w}_{k,h}\) denotes the extension of the function u k,h and w k,h respectively as defined by

Definition 1 (Extensions of u h)

The extension of u k,h from Ω k,h to Ω k ∪ Ω k,h is given in the following way:

$$\displaystyle \begin{aligned} \overline{u}_{S,h} &= \begin{cases} u_{S,h} &\text{on } \varOmega_{S,h}\\ 0 &\text{on } \varOmega_{S} \setminus \varOmega_{S,h} \end{cases} \end{aligned} $$
$$\displaystyle \begin{aligned} \overline{u}_{R,h} &= \begin{cases} u_{R,h} &\text{on } \varOmega_{R,h}\\ u_{R,h}^{ext} &\text{on } \varOmega_{R} \setminus \varOmega_{R,h}, \end{cases} \end{aligned} $$

where u ext denotes the linear extension of the function on the triangle to the curved domain.

The second term on the right-hand side in (3) is called consistency term, the third term is the symmetry term, since in the linear case we get a symmetric bilinear form by choosing β = −1. The last term in (3) is referred to as penalization term.

We use β = −1 and we choose the parameter α = 20. This choice results in a symmetric, positive definite stiffness matrix. In the notation of discontinuous Galerkin methods this corresponds to a symmetric interior penalty Galerkin (SIPG) method.

3 A Posteriori Error Estimator

The error is estimated in the following energy norm (see [2, p.6])

$$\displaystyle \begin{aligned} \left\| (w, \psi) \right\|{}_{E(\varOmega,\varGamma)} &= \left( \sum_{k \in \{ R,S \}} \sum_{i \in I_{k}} \nu_{ref,i}^{2} \left\| \nabla w_{i} \right\|{}_{L^{2}(\varOmega_{i})}^{2} + \nu_{0}^{2} \left| w - \psi \right|{}_{\frac{1}{2},\varGamma_{}}^{2} \right)^{\frac{1}{2}}, {} \end{aligned} $$
(4)

where ν ref,i is a reference value for each material domain, and

$$\displaystyle \begin{aligned} \left| w \right|{}_{\frac{1}{2},\varGamma_{}}^{2} = \sum_{k \in \{S, R\}} \frac{1}{h} \left| w_{k} \right|{}_{L^{2}(\partial \varOmega_{k} \cap \varGamma)}^{2}. \end{aligned} $$

Additionally we introduce the jump notation for vector-valued functions q:

For the error estimator we introduce another mesh \(\widehat {\mathcal {M}}_{h}\) which is finer near the curvilinear boundaries than \(\mathcal {M}_{h}\) (see Fig. 4). In particular we start in each part Ω k from the mesh \(\mathcal {T}_{k,h}\) and refine all elements with at least two nodes on a curvilinear boundary uniformly. Additionally the neighbouring elements are refined in such a way that we end up with admissible meshes. The interface elements are refined uniformly. This refinement strategy is repeated until the boundary is approximated sufficiently well. By \(\widehat {\mathbf {u}}_{h}\) we will denote an approximate solution of the discrete problem on this finer mesh (calculated by using a few steps of a symmetric Gauss-Seidel-Iteration), extended to \(\varOmega \cup \widehat {\varOmega }_{h}\) as described in Definition 1.

Fig. 4
figure 4

\(\widehat {\mathcal {M}}_{h}\) with one boundary refinement. The two meshes that are touching the interface are depicted separately

Theorem 1 (A Posteriori Error Estimation)

Let \(u \in H_{0}^{1}(\varOmega )\)be the solution of problem (1), and let \({\mathbf {u}}_{h} \in X_{h}(\mathcal {M}_{h})\)denote the solution of (2) and \(\widehat {\mathbf {u}}_{h} \in X_{h}(\widehat {\mathcal {M}}_{h})\)denotes the solution on the finer mesh. Then there exists a constant C such that for \(\overline {\mathbf {e}}_{h} = \mathbf {u} - \overline {\mathbf {u}}_{h}\)the following a posteriori error bound holds:

$$\displaystyle \begin{aligned} \left\| \overline{\mathbf{e}}_{h} \right\|{}_{E(\varOmega, \varGamma)} \leq & \left( \eta^{2} + \sum_{k \in \{ R,S \} } \mathcal{O}_{\eta}(f_{k}, \widehat{u}_{h}) + \mathcal{O}(h^{3}) \right)^{\frac{1}{2}} {} \end{aligned} $$
(5)

with

$$\displaystyle \begin{aligned} \eta^{2} = &\sum_{k \in \{ R,S \} } \left( \sum_{T \in \mathcal{T}_{k,h}} \eta_{T}^{2} + \sum_{e \in \overline{\mathcal{E}}_{\varGamma_{}}} \eta^{2}_{e,k} \right), \end{aligned} $$

where

The set \(\mathcal {C}(T)\) consists of all child-triangles of T in \(\widehat {\mathcal {T}}_{h,k}\) . For the oscillation terms \(\mathcal {O}_{\eta }(f_{k}, \widehat {u}_{h})\) see [ 4 , p.6].

Remark 2

In [1] an adaptive strategy including a posteriori controlled boundary approximation was presented for the Poisson problem with pure Dirichlet conditions. This technique cannot be adopted to the case of mixed boundary and interface conditions.

3.1 Marking and Refinement Strategy

The constant C in Theorem 1 plays the role of a weighting factor. For the numerical experiments C was replaced by a computable heuristic approximation based on information on the coarsest mesh leading to corresponding computable approximations which—for simplicity—are denoted by the same symbols η T and η e,k. With these quantities we assign local error indicators \(\widetilde {\eta }_{T}, \widetilde {\eta }_{e}\) for each triangle T and each edge e from \(\mathcal {M}_{h}\) in the following way:

  1. 1.

    for all triangles T with at most one vertex on Γ we set \(\widetilde {\eta }_{T} = \eta _{T}\),

  2. 2.

    for every \(e \in \mathcal {E}_{\varGamma }\) we set \(\widetilde {\eta }_{e} = \eta _{e,S} + \eta _{e,R}\),

  3. 3.

    for the remaining triangles we set \(\widetilde {\eta }_{T}\) equal to η T enlarged by contributions \(\widetilde {\eta }_{e}\) from edges \(e \in \mathcal {E}_{\varGamma }\) weighted proportional to the length of the edge e between the two point of T on Γ.

As marking strategy we use Dörfler marking. For refinement we used classical red- and green-refinement.

4 Numerical Experiments

The error estimator was tested for the motor geometry shown in Fig. 1 for different rotor-to-stator positions. The initial mesh was generated with Netgen [5] and consists of 562 degrees of freedom. The mesh generator takes material interfaces into account leading to a non-uniform distribution of elements mainly concentrated around the air gap as depicted in Fig. 5.

Fig. 5
figure 5

Initial Mesh with 562 degrees of freedom

For the first rotor-to-stator position the final mesh after 7 refinement steps is depicted in Fig. 6 and the reduction of the error in the energy-norm compared to the solution on a uniform refined mesh shown in Fig. 7.

Fig. 6
figure 6

Final Mesh for φ = 0, α = 20

Fig. 7
figure 7

Convergence for φ = 0, α = 20

Starting from the same initial mesh, with the rotor part rotated by φ = 60 we arrive after 7 refinement steps at a mesh depicted in Fig. 8 with an error reduction rate given in Fig. 9.

Fig. 8
figure 8

Final mesh for φ = 60, α = 20

Fig. 9
figure 9

Convergence for φ = 60, α = 20

5 Conclusions

The adaptive refinement strategy show promising results. As expected due to the varying current in the coils for different φ as well as the natural change in the overall geometry the refined mesh looks quite different for different φ. Since it would be preferable to have one refined mesh for all rotation angles we are working on strategies to refine the mesh in an optimal way for the whole rotation cycle.