# Electric circuit element boundary conditions in the finite element method for full-wave passive electromagnetic devices

## Abstract

A natural coupling of a circuit with an electromagnetic device is possible if special boundary conditions, called Electric Circuit Element (ECE), are used for the electromagnetic field formulation. This contribution shows how these ECE boundary conditions can be implemented into the 3D-finite element method for solving coupled full-wave electromagnetic (EM) field-circuit problems in the frequency domain. The frequency response allows the extraction of a reduced order model of the analyzed device, accounting for all the EM field effects. The implementation is based on a weak formulation that uses the electric field strength E strictly inside the domain and a scalar potential V defined solely at the boundary. Edge elements for E are used inside the three-dimensional domain and nodal elements for V are used on its two-dimensional boundary. The weak formulation is described and implemented in the free environment Open Numerical Engineering LABoratory (onelab). The validation is carried out on 3D examples.

## Motivation

Many electromagnetic (EM) devices with distributed parameters and field effects specific to full-wave (FW) or Magneto-Quasi-Static (MQS) EM field regime are connected to circuits with lumped parameters (e.g. in measuring and control applications). For this, the models of EM devices need boundary conditions compatible with external circuits (Fig. 1, left).

By definition, an isolated electric circuit (i.e. with no connections to other circuits) has a finite number of components connected to common nodes. Each node is characterized by its voltage with respect to the ground. A non-isolated circuit, i.e. a sub-circuit with m terminal nodes has each of these terminals characterized by a pair of scalar quantities, a current $$i_{k}$$ entering into the sub-circuit and a “node voltage” (potential) $$v_{k}$$ (Fig. 1-right). The power transferred to it is

$$P = \sum_{k=1}^{m} {i_{k} v_{k}} = \sum_{k=1}^{m-1} i_{k} (v_{k}-v_{m}) = \sum _{k=1}^{m-1} i_{k} v_{k},$$
(1)

if $$i_{m}$$ is expressed according to Kirchhoff current law for a cutset and the terminal m is connected to ground. This power expression shows that the state of a m-terminal circuit is characterized by $$2(m-1)$$ independent quantities: $$m-1$$ currents and $$m-1$$ voltages. The assumption $$v_{m}=0$$ is not a restriction for the purpose of this paper, which is stated at the end of Sect. 2. A natural coupling of this sub-circuit with an EM device is possible if some connecting surfaces are defined on the device boundary, for which currents and potentials are defined, in order to satisfy Kirchhoff relationships and provide the same transmitted power formula (1) as subcircuits do. The conditions that satisfy these requirements are the ones proposed in , used in [12, 17] and referred to Electric Circuit Element (ECE) boundary conditions.

The ECE boundary conditions, combined with current excited terminals, are the “realistic boundary conditions” used in  to solve eddy current problems with the finite element method (FEM) using a formulation in H and an ungauged $$\mathbf{T}-\varphi$$, φ one in . Similar conditions, although with a different definition for the terminal voltages are proposed in  and used for A, V eddy current formulations . In  the coupling of MQS (formulation in H and formulation in A, V) FEM models with circuits is done by using electric global quantities that are naturally coupled with local quantities. The use of ECE in MQS problems for inductance extraction with an A, V formulation is discussed in .

Our aim is to use ECE boundary conditions to solve full-wave (FW) problems with FEM. We have successfully used ECE to model passive on-chip components such as resistors, inductors, capacitors, interconnects or RF-MEMS switches in FW , with the Finite Integration Technique as numerical method. To the best of our knowledge, the ECE conditions are not available in FEM codes which implement the formulation of microwave ports for FW. Setting such ports in FW requires complicate modeling e.g. as explained in . Theoretical studies exists, e.g. in , based on an E, V formulation for the whole domain. In  we used E strictly inside the domain and V solely on the boundary. During the reviewing process of , Hiptmair and Ostrowski released a relevant report published in  proving the interest for this subject. In  the same authors propose a FW FEM formulation coupled with circuits, with a strong emphasis on the stability of the field solution inside the domain at low frequencies. An EQS formulation is herein used to gauge the proposed FW formulation in terms of potentials A and φ. Our approach in  states the problem in terms of the fields and does not need gauging. We focused only on coupling field devices with circuits at high frequencies.

This paper is an extended version of , where the validation was carried out on 2D examples. The proposed formulation is implemented in the Open Numerical Engineering LABoratory (onelab) environment, consisting of the free mesh generator Gmsh [9, 10] and the finite element solver GetDP . Here the validation is carried out on 3D examples. The implementation and the described test problems will be added to the collection available at https://gitlab.onelab.info/doc/models.

## ECE boundary conditions

Assume a simply connected domain Ω, with a Lipschitz boundary Ω (Fig. 2) that includes m disjoint parts $$S_{k}$$, $$k=1,2,\ldots ,m$$ (device terminals), so that conditions (ECE1), (ECE2) and (ECE3) are satisfied:

• (ECE1) there is no magnetic coupling with the exterior:

$$\mathbf{n} \cdot \frac{\partial \mathbf{B}(\mathbf{r},t)}{\partial t} = 0, \quad \forall \mathbf{r} \in \partial \Omega ;$$
• (ECE2) the electric coupling is carried out only through the terminals:

$$\mathbf{n} \cdot \bigl(\nabla \times \mathbf{H}(\mathbf{r},t)\bigr) = 0, \quad \forall \mathbf{r} \in \partial \Omega - \bigcup_{k=1}^{m} S_{k};$$
• (ECE3) the terminals are equipotential:

$$\mathbf{n} \times \mathbf{E}(\mathbf{r},t) = \mathbf{0}, \quad \forall \mathbf{r} \in S_{k}, k = 1,\ldots ,m.$$

According to Faraday’s law, (ECE3) implies (ECE1) for the terminals, the inclusion of the terminals in (ECE1) is only kept to emphasize the physical meaning.

By definition, the currents and potentials of any terminal are:

$$i_{k}(t) = \oint _{\partial S_{k}} \mathbf{H} \cdot \mathbf{dl} = - \int _{S_{k}} \biggl( \mathbf{J} + \frac{\partial \mathbf{D}}{\partial t} \biggr) \cdot \mathbf{n} \,\mathrm{d}s,\qquad v_{k}(t) = \int _{C_{k} \tiny {\subset \partial \Omega }} \mathbf{E} \cdot \mathbf{dl},$$
(2)

where, in order to ensure conservation, each terminal current is the total current (conductive and displacement) and the potential is properly defined as the voltage between this terminal and the reference one, along a path $$C_{k}$$ included in the domain boundary. Due to (ECE1) the voltage between two points placed on the boundary surface is independent of the path of the integration line connecting these points, provided that this path is included in the surface. Thus, the potential on the surface is well defined, although this is not the case for a general time-varying EM field. Under these conditions, (currents and voltages satisfy Kirchhoff equations and (1) holds for the EM device, where $$i_{k}$$ and $$v_{k}$$ are given by (2), and thus the ECE boundary conditions are compatible with the power transferred through its terminals by a multipolar circuit [17, 20].

If we assume that the potentials at the terminals are known, then it can be proved that the problem of EM field analysis described by the Maxwell equations in a passive linear domain with ECE boundary conditions has a unique solution in the frequency domain. Consequently, the terminal currents are output signals and are obtained by solving the field problem . As the domain is linear, so are the equations, hence the device with ECE conditions is a linear system, defining a multiple input multiple output (MIMO) type dynamic system with $$m-1$$ inputs and $$m-1$$ outputs (Fig. 3). In the frequency domain, the input-output relationship is:

(3)

The problem to be solved is: “Find $$\underline{\mathbf{H}}(f)$$, where f is the working frequency in a given frequency range of interest, defined by its minimum and maximum values $$f_{\min}$$ and $$f_{\max}$$ $$f \in [f_{\min},f_{\max}]$$, from the EM field solution.”

If this hybrid matrix $$\underline{\mathbf{H}}(f)$$ is known, then the “field” element can be realized with common circuit elements and included in any circuit simulator. This final step can be carried out with vector fitting (VF), a very efficient model order reduction procedure which computes a rational approximation of a given order for the frequency response . Moreover, VF can be included in a loop that increases the order of the reduced model while choosing new appropriate frequency points for evaluation in an adaptive frequency sampling strategy (AFS). Thus, for an imposed accuracy, the minimal reduced order model which describes high frequency field effects is obtained .

## ECE in FEM

1. (a)

Strong formulation for E with classical boundary conditions

It is useful to recall the formulation in E with classical boundary conditions, since the newly proposed formulation inherits part of it. We will assume a frequency domain formulation, and therefore complex representation of the vector field quantities will be used and denoted byFootnote 1$$\underline{\mathbf{E}}(\mathbf{r}) = \mathcal{C}(\mathbf{E}(\mathbf{r},t))$$.

The well-known FW Maxwell equations in the frequency domain, for passive linear media and no internal field sources are: $$\nabla \times \underline{\mathbf{E}} = - \mathrm{j} \omega \mu \underline{\mathbf{H}}$$, $$\nabla \times \underline{\mathbf{H}} = \sigma \mathbf{E} + \mathrm{j} \omega \varepsilon \underline{\mathbf{E}}$$, $$\nabla \cdot (\mu \underline{\mathbf{H}}) = 0$$, $$\nabla \cdot (\varepsilon \underline{\mathbf{E}}) = \rho$$, where permittivity ε, permeability μ and conductivity σ are positive, space dependent material parameters. The reluctivity $$\nu =1/\mu$$ might be used instead of μ. The solution of these equations is unique if in any point of Ω, either exclusively $$\underline{\mathbf{E}}_{t}$$ or $$\underline{\mathbf{H}}_{t}$$ are known (given). The subscript t indicates the tangential component of the vector on the surface. It is useful to denote a disjoint partition of the boundary: $$\partial \Omega = S_{E} \cup S_{H}$$, $$S_{E} \cap S_{H} = \emptyset$$, and thus $$\underline{\mathbf{E}}_{t} : S_{E} \rightarrow \mathbb{C}^{2}$$, $$\underline{\mathbf{H}}_{t} : S_{H} \rightarrow \mathbb{C}^{2}$$. The imposed boundary conditions are: $$\mathbf{n} \times (\mathbf{E}(\mathbf{r}) \times \mathbf{n}) = \underline{\mathbf{E}}_{t}(\mathbf{r})$$, for $$\mathbf{r} \in S_{E}$$ and $$\mathbf{n} \times (\mathbf{H}(\mathbf{r}) \times \mathbf{n}) = \underline{\mathbf{H}}_{t}(\mathbf{r})$$, for $$\mathbf{r} \in S_{H}$$. In what follows we will name them classical boundary conditions. The uniqueness of the field solution can be proven on the basis of the complex form of the Poynting theorem that gives the expression of the transmitted power (assuming a linear field domain, with no moving parts):

$$- \oint _{\partial \Omega } \bigl(\underline{\mathbf{E}}_{t} \times \underline{\mathbf{H}}_{t}^{*} \bigr) \cdot \mathbf{n} \, \mathrm{d}s = \int _{\Omega } \underline{\mathbf{E}} \cdot \underline{ \mathbf{J}}^{*} + 2 \mathrm{j} \omega \int _{\Omega } \biggl( \frac{\underline{\mathbf{B}} \cdot \underline{\mathbf{H}}^{*}}{2} - \frac{\underline{\mathbf{E}} \cdot \underline{\mathbf{D}}^{*}}{2} \biggr).$$
(4)

The proof assumes that there exist two such fields that satisfy the same boundary conditions. This means that the Poynting theorem in complex form is valid for the difference field, which satisfies the Maxwell equations (due to linearity) and zero boundary conditions. This implies that the real part is zero which results in zero difference electric field (conductivity of the domain is assumed non-zero everywhere) and the imaginary part is zero which amounts to zero difference magnetic field.

The second order equation satisfied by $$\underline{\mathbf{E}}$$, obtained from Maxwell equations by elimination of $$\underline{\mathbf{H}}$$ is a curl-curl type PDE:

$$\nabla \times (\nu \nabla \times \underline{\mathbf{E}}) + \mathrm{j} \omega (\sigma + \mathrm{j} \omega \varepsilon ) \underline{\mathbf{E}} = \mathbf{0}.$$
(5)

This equation has an unique solution when the following boundary conditions are given: $$\mathbf{n} \times (\mathbf{E}(\mathbf{r}) \times \mathbf{n}) = \underline{\mathbf{E}_{t}}$$ on $$S_{E}$$ and $$(\nabla \times \underline{\mathbf{E}})_{t} = j \mu \underline{\mathbf{H}_{t}}/\omega$$ on $$S_{H}$$.

1. (b)

Weak formulation for E with classical boundary conditions

In general, solving (5) implies a numerical approach, e.g. FEM, which is based on weak formulations. The needed functionals are obtained by projecting (5) onto a set of appropriate test functions $$\underline{\mathbf{E}}^{\prime }$$, then integrating by parts and applying Gauss-Ostrogradski formula:

$$\int _{\Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl( \nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega ( \sigma + \mathrm{j} \omega \varepsilon ) \underline{ \mathbf{E}} \cdot \underline{ \mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x = - \oint _{ \partial \Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \times \underline{\mathbf{E}}^{\prime } \bigr] \cdot \mathbf{n} \,\mathrm{d}s$$

Replacing the expression of the magnetic field strength in the right hand side we get

$$\int _{\Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl( \nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega ( \sigma + \mathrm{j} \omega \varepsilon ) \underline{ \mathbf{E}} \cdot \underline{ \mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x = \mathrm{j} \omega \oint _{\partial \Omega } \bigl( \underline{\mathbf{H}} \times \underline{ \mathbf{E}}^{\prime } \bigr) \cdot \mathbf{n} \,\mathrm{d}s.$$
(6)

With classical boundary conditions, the integral in the right hand side is

$$\oint _{\partial \Omega } \bigl( \underline{\mathbf{H}} \times \underline{ \mathbf{E}}^{\prime } \bigr) \cdot \mathbf{n} \,\mathrm{d}s = \int _{S_{E}} \bigl( \underline{\mathbf{E}}^{\prime }_{t} \times \mathbf{n} \bigr) \cdot \underline{\mathbf{H}} \,\mathrm{d}s + \int _{S_{H}} ( \mathbf{n} \times \underline{\mathbf{H}}_{t} ) \cdot \underline{\mathbf{E}}^{\prime } \,\mathrm{d}s.$$
(7)

$$\underline{\mathbf{E}}_{t}$$ are essential boundary conditions that is why the test functions are chosen so that $$\underline{\mathbf{E}}^{\prime }_{t}$$ is zero on $$S_{E}$$. Thus, the weak equation for the trial functions $$\underline{\mathbf{E}}$$ is:

$$\int _{\Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl( \nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega ( \sigma + \mathrm{j} \omega \varepsilon ) \underline{ \mathbf{E}} \cdot \underline{ \mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x = \mathrm{j} \omega \int _{S_{H}} ( \mathbf{n} \times \underline{\mathbf{H}}_{t} ) \cdot \underline{\mathbf{E}}^{\prime } \,\mathrm{d}s.$$
(8)

The boundary conditions $$\underline{\mathbf{H}}_{t} = \mathbf{n} \times (\underline{\mathbf{H}} \times \mathbf{n})= - \mathbf{n} \times (\nabla \times \underline{\mathbf{E}} \times \mathbf{n})/(j \omega \mu )$$ are natural, they appear in the functional equation.

Finally, the weak formulation in $$\underline{\mathbf{E}}$$ with classical boundary conditions is:

Find $$\underline{\mathbf{E}}$$ in $$\mathcal{H}$$, such that

$$a \bigl(\underline{\mathbf{E}},\underline{\mathbf{E}}^{\prime } \bigr) = f \bigl( \underline{\mathbf{E}}^{\prime } \bigr),\quad \forall \underline{ \mathbf{E}}^{\prime }\in \mathcal{H}_{0},$$
(9)

where

\begin{aligned}& a \bigl(\underline{\mathbf{E}},\underline{\mathbf{E}}^{\prime } \bigr) = \int _{\Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl(\nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega ( \sigma + \mathrm{j} \omega \varepsilon ) \underline{\mathbf{E}} \cdot \underline{ \mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x, \end{aligned}
(10)
\begin{aligned}& f \bigl(\underline{\mathbf{E}}^{\prime } \bigr) = \mathrm{j} \omega \int _{S_{H}} ( \mathbf{n} \times \underline{\mathbf{H}}_{t} ) \cdot \underline{\mathbf{E}}^{\prime } \,\mathrm{d}s, \end{aligned}
(11)
\begin{aligned}& \mathcal{H} = \bigl\{ \mathbf{u} \in \mathcal{H}(\mathrm{curl}, \Omega )| \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = \mathbf{E}_{t} \text{ on } S_{E} \bigr\} , \end{aligned}
(12)
\begin{aligned}& \mathcal{H}_{0} = \bigl\{ \mathbf{u} \in \mathcal{H}(\mathrm{curl}, \Omega )| \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = \mathbf{0} \text{ on } S_{E} \bigr\} \end{aligned}
(13)

are the curl-conform Sobolev spaces.

1. (c)

Weak formulation for E with ECE boundary conditions

If we use ECE boundary conditions, the unknowns are the electric field inside the domain and an electric scalar potential solely defined on Ω. That is why the formulation is still named E, V, but is different from other formulations, such as the E, V in  where V is defined also inside the domain. An E, V interpretation of the ECE boundary conditions (ECE 1, 2, 3) is:

• (ECE1b) $$\oint _{\Gamma }\underline{\mathbf{E}} \cdot \mathbf{dl} = 0$$, $$\forall \Gamma \in \partial \Omega$$, is a closed curve;

• (ECE2b) $$\mathbf{n} \cdot \underline{\mathbf{E}}(\mathbf{r}) = 0$$, $$\forall \mathbf{r}\in \partial \Omega - \bigcup_{k=1}^{m} S_{k}$$;

• (ECE3b) $$\underline{\mathbf{E}}_{t}(\mathbf{r}) = \mathbf{0} \forall \mathbf{r} \in S_{k}$$, $$k = 1,\ldots ,m$$.

From (ECE1b) an electric scalar potential $$\underline{V}$$ can be defined on the boundary Ω, such that $$\underline{\mathbf{E}}_{t} = -\nabla _{2} \underline{V}$$. Condition (ECE3b) requires that the electric terminals are equipotential. For uniqueness reasons, at least one terminal has to be fixed to a value. Without lack of generality we can assume it is grounded in what follows. For the other terminals the uniqueness implies that, exclusively, either their voltages or currents are known.

Using (5) we get the weak equation for $$\underline{\mathbf{E}}$$:

$${ \int _{\Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl(\nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega (\sigma + \mathrm{j} \omega \varepsilon ) \underline{\mathbf{E}} \cdot \underline{\mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x = \mathrm{j} \omega \sum _{k \in \mathcal{I}_{c}} \underline{V}_{k}^{\prime } \underline{I}_{k}, }$$
(14)

where $$\mathcal{I}_{c}$$ is the set of indices of current excited terminals. Similarly, we will denote by $$\mathcal{I}_{v}$$ is the set of indices of voltage excited terminals.

In  a separate equation for the electric potential on the boundary was proposed. However, the coupling between the unknowns strictly inside the domain and those on the boundary can be done at the level of the basis functions, as follows.

Find $$\underline{\mathbf{E}} \in \mathcal{H}_{E}$$ and $$\underline{V} \in \mathcal{H}_{V}$$, so that

\begin{aligned} & a \bigl(\underline{\mathbf{E}},\underline{\mathbf{E}}^{\prime } \bigr) = f \bigl( \underline{\mathbf{E}}^{\prime } \bigr), \quad \forall \underline{ \mathbf{E}}^{\prime }\in \mathcal{H}_{E,0}; \\ & \oint _{\partial S_{k}} \mathbf{H} \cdot \mathbf{{dl}} = \underline{I}_{k}, \quad k \in \mathcal{I}_{c}; \qquad \underline{ \mathbf{E}}_{t} = - \nabla _{2} V,\quad \text{on } \partial \Omega , \end{aligned}
(15)

where

\begin{aligned}& a \bigl(\underline{\mathbf{E}},\underline{\mathbf{E}}^{\prime } \bigr) = \int _{ \Omega } \bigl[ (\nu \nabla \times \underline{\mathbf{E}}) \cdot \bigl( \nabla \times \underline{\mathbf{E}}^{\prime } \bigr) + \mathrm{j} \omega ( \sigma + \mathrm{j} \omega \varepsilon ) \underline{ \mathbf{E}} \cdot \underline{\mathbf{E}}^{\prime } \bigr] \,\mathrm{d}x, \end{aligned}
(16)
\begin{aligned}& f \bigl(\underline{\mathbf{E}}^{\prime } \bigr) = \mathrm{j} \omega \sum _{k \in \mathcal{I}_{c}} \underline{V}^{\prime }_{k} \underline{I}_{k}; \end{aligned}
(17)

and $$\underline{\mathbf{E}}_{t}^{\prime }= -\nabla _{2} V^{\prime }$$, where $$\underline{V}^{\prime }\in \mathcal{H}_{V,0}$$,

\begin{aligned}& \mathcal{H}_{E} = \Biggl\{ \mathbf{u} \in \mathcal{H}(\mathrm{curl}, \Omega )| \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = -\nabla _{2} \underline{V}^{\prime } \text{ on } \partial \Omega , \underline{V}^{\prime }\in \mathcal{H}_{V} \\& \hphantom{\mathcal{H}_{E} =}{} \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = \mathbf{0} \text{ on } \bigcup_{k=1}^{m} S_{k} \Biggr\} \\& \mathcal{H}_{E,0} = \Biggl\{ \mathbf{u} \in \mathcal{H}(\mathrm{curl}, \Omega )| \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = -\nabla _{2} \underline{V}^{\prime } \text{ on } \partial \Omega , \underline{V}^{\prime }\in \mathcal{H}_{V,0} \\& \hphantom{\mathcal{H}_{E,0} =}{} \mathbf{n} \times (\mathbf{u} \times \mathbf{n}) = \mathbf{0} \text{ on } \bigcup_{k=1}^{m} S_{k} \Biggr\} \\& \mathcal{H}_{V} = \bigl\{ {u} \in \mathcal{H}(\mathrm{grad},{ \partial \Omega })| u = \underline{V}_{k} \text{ on } S_{k}, k \in \mathcal{I}_{v}, \\& \hphantom{\mathcal{H}_{V} =}{} u = \mathrm{constant (unknown, floating potentials)} \text{ on } S_{k}, k \in \mathcal{I}_{c} \bigr\} \\& \mathcal{H}_{V,0} = \bigl\{ {u} \in \mathcal{H}(\mathrm{grad},{ \partial \Omega })| u = 0 \text{ on } S_{k}, k \in \mathcal{I}_{v} \\& \hphantom{\mathcal{H}_{V,0} =}{} u = \mathrm{constant (unknown, floating potentials)} \text{ on } S_{k}, k \in \mathcal{I}_{c} \bigr\} . \end{aligned}
1. (d)

Discrete formulation in E

In  we used a simplicial mesh (tetrahedrons in 3D, triangles in 2D), numerical test functions $$\mathbf{N}_{k}$$ that correspond to edge elements of order (0,1), and degrees of freedom that represent the complex representations of voltages $$\underline{U}_{k}$$ along the edges. In the case of using classical boundary conditions, the numerical trial function is approximated as

$$\underline{\mathbf{E}} = \sum_{j=1}^{\mathrm{Ne}} \underline{U}_{j} \mathbf{N}_{j},$$
(18)

where Ne is the total number of edges in the domain, including its boundary.

In the case of using ECE boundary conditions, the function space where the trial function is searched for is curl free on the domain boundary, where nodal unknowns $$V_{k}$$ and test functions $$\varphi _{k}$$ are needed. The connection between the approximations inside and on the boundary can be done at the level at test functions. For instance, since for one element

$$\mathbf{N}_{k}^{(e)} = \varphi _{i}^{(e)} \nabla \varphi _{j}^{(e)} - \varphi _{j}^{(e)} \nabla \varphi _{i}^{(e)},$$
(19)

it follows that the numerical trial function when using ECE boundary conditions is approximated as

$$\underline{\mathbf{E}} = \sum_{j=1}^{\mathrm{NeInt}} \underline{U}_{j} \mathbf{N}_{j} - \sum _{j=1}^{\mathrm{NnBnd}} \underline{V}_{j} \nabla { \varphi }_{j}$$
(20)

where NeInt is the total number of edges that are strictly inside the domain and NnBnd is the total number of nodes on the boundary. Some of the nodes that are on the boundary belong to the same terminal, which must be equipotential. The corresponding terms in (20) have to be grouped together, and the final expression of numerical solution with respect to the trial functions is:

$$\underline{\mathbf{E}} = \sum_{j=1}^{\mathrm{Neint}} \underline{U}_{j} \mathbf{N}_{j} - \sum _{j=1}^{\mathrm{NnBndNotTerm}} \underline{V}_{j} \nabla { \varphi }_{j} - \sum_{k=1}^{m} \Biggl( \underline{V}_{k} \sum_{j=1}^{\mathrm{NnTermK}} \nabla {\varphi }_{j} \Biggr),$$
(21)

where m is the total number of terminals, and NnTermK are the number of nodes that are covered by terminal k.

The discrete formulation (15)-(17) was implemented in getdp . The most relevant one for the formulations above are: the discrete function spaces (18) for classical boundary conditions and (21) for ECE; the weak equation (9) or (15), with the same bilinear functional (10) or (16), but with the linear functional (11) for classical boundary conditions (the tangential component of the magnetic field strength is a natural boundary condition) and (17) for ECE (currents of current excited terminals are natural boundary conditions); constraints – essential boundary conditions – tangential component of the electric field in the case of classical boundary conditions, from which appropriate voltages along edges on the boundary are computed, and potentials of voltage excited terminals in the case of ECE boundary conditions.

## Numerical results

The results in  were obtained with an in-house code for two simple though relevant academic 2D test problems: a homogeneous rectangular domain corresponding to a single input single output system ($$m=2$$) and a non-homogeneous rectangular domain corresponding to a multiple input multiple output system ($$m=3$$). Two 3D test cases are considered herein. The new implementation has been done in onelab, using first order tetrahedral elements.

The first test is a cylindrical domain with radius a and length l, having linear and homogeneous material propertiesFootnote 2 (ε, μ, σ). Its ends are two terminals, one grounded and the other excited either in current or voltage. This configuration has the advantage that a formulation with classical boundary conditionsFootnote 3 is equivalent to a formulation with ECE boundary conditions.Footnote 4 The classical boundary conditions formulation admits an analytic solution in terms of Bessel functions for the current excitation case. This is used to validate the numerical solution of FEM, in 3D-FW regime with ECE boundary conditions.

Figure 4 shows a quantitative validation in terms of the associated frequency-dependent resistance (R) and inductance (L), the relative errors (vs. the analytic exact solution) are less than 2% for the whole frequency range when using a mesh with 2 elements per skin depth. The figure includes also the results obtained with the formulation proposed in  that uses V defined in the whole domain. The two numerical solutions overlap (up to machine precision), but the computational effort for a formulation with V inside is greater, since the number of DoFs increases with the number of inner nodes. For instance at 60 GHz, if 2 elements per skin depth are imposed, then a mesh with 128,219 elements is generated, leading to 12,659 and 23,441 unknowns for V when it is defined only on the boundary, or in the whole domain, respectively.

The second benchmark is the LC 3D field device proposed in . Not only this test was solved with FEM,Footnote 5 in FW regime with ECE boundary conditions, but the solving was embedded into a model order reduction procedure based on Vector Fitting (VF)  and Adaptive Frequency Sampling (AFS) .

Figure 5 shows a part of the surface mesh and the color map of the real part of the potential on the boundary, as well as a color map on a cut of the rms value of the electric field strength for $$f = 1$$ kHz. The mesh used has 161,485 first order tetrahedral elements leading to 187,560 DoFs. Note that in  a mesh with 1.12 million elements was used to solve this problem.

Figure 6 shows the results of the model extraction using FEM for field evaluation combined with model reduction with Vector Fitting (VF) and Adaptive Frequency Sampling (AFS). The reference result corresponds to a series connection of three lumped elements: $$R_{\mathrm{ref,\mathrm{DC}}} = 7.2$$ mΩ, $$L_{\mathrm{ref}} = 10.1$$ mH and $$C_{\mathrm{ref}} = 33.4$$ mF, which fits very well to the field solution , especially if instead or the DC value of resistance $$R_{\mathrm{ref}}= 24$$ mΩ is used, which considers the eddy-current effects effect at the resonance frequency.Footnote 6 We have set the AFS local relative error to 0.01. A reduced model of order 4 was obtained, needing only 7 frequencies evaluations in FEM to achieve this error. The evaluation of the transfer function (TF) in the frequency range shows that the resonance frequency is at 8889 kHz, which is 2.5% different from the reference resonance frequency. Moreover, a new strictly proper rational approximation of order 2 was obtained, starting from a set of 100 points evaluated for the reduced model of order 4. From the two poles and residuals, the values of a RLC series circuit were extracted: $$R_{\mathrm{extr}} = 26.6$$ mΩ; $$L_{\mathrm{extr}} = 9.18$$ mH; $$C_{\mathrm{extr}} = 33.8$$ mF, which correspond to relative errors versus the reference circuit of 10.8 %, 9.1% and 1.1%, respectively. As in the previous cylinder benchmark, better numerical results are expected for a refined mesh. The circuit simulation is also shown in Fig. 6.

Figure 7 shows the results obtained when connecting the extracted reduced models to the outside circuit consisting of a resistance $$R_{\mathrm{ext}} = 450$$ mΩ from  and an ideal voltage source having an imposed voltage of 1 V (rms value). The results are extremely good, especially considering that the mesh we used is about seven times coarser than the mesh in the reference paper. No instabilities were noticed at terminal values for frequencies lower than 1 kHz, down to 50 Hz, even if the conductivity in the dielectric domain is zero. The external resistance which is relatively high makes that the accuracy of the extracted resistance of the LC device have no relevance.

## Conclusions

The main advantage of ECE BC for the Maxwell equations is that the ports are well defined, without ambiguity, and compatible with the circuit terminals, even for RF devices. There is no restriction on the field regime (DC to full wave, even including nonlinear media). For MIMO systems, the hybrid excitation is obtained in a natural way. It is important to be aware that ECE BC for parameter extraction can be applied only to a simply connected subdomain, obtained after partitioning the domain corresponding to a whole system in parts that do not overlap or do not have holes.

This paper proposed a FEM formulation for ECE, which E strictly inside the domain and V on the boundary. The degrees of freedom are the electric voltages on the inner edges and the potentials of the floating nodes on the boundary (nodes outside terminals and current excited terminals). The paper presents its theoretical background (weak formulation) and its implementation details in the onelab environment. This new approach provides the same results but is more data-efficient than using internal node-potentials as described in . The simulated frequency response allows extracting of a reduced order model of the analyzed device, accounting for all the EM field effects .

The formulation was validated for two 3D test problems, the frequency responses being saved in Touchstone file format. The numerical experiments showed that besides fundamental physical and mathematical aspects related to the weak formulation and functional framework, the choice of the mesh and its adaptation to the solution are key to ensure a highly accurate of the numerical model. Besides the appropriate choice of the field regime and boundary conditions which are apriori model order reduction (MOR) techniques, and compact “equivalent” circuit extraction which is an aposteriori MOR technique, the choice of an optimal mesh is an “on the fly” MOR technique. Effective methodologies for solving real-life field problems should use MOR at every modeling step .

## Availability of data and materials

The implementation and the described test problems will be added to the collection available at https://gitlab.onelab.info/doc/models.

1. Notation: An underlined symbol represents a complex quantity in order to avoid confusions with the root mean square (rms) value of the quantity it represents. For instance, the time representation of the potential is $$V : \Omega \times (0,T) \rightarrow \mathbb{R}$$ and its complex representation is $$\underline{V} : \Omega \rightarrow \mathbb{C}$$, where the instantaneous value is $$V (\mathbf{r}, t) = \sqrt{2} V (r) \sin (\omega t + \theta )$$, and its complex representation is $$\underline{V}(\mathbf{r})= V(\mathbf{r}) \exp (j\theta )$$, with $$V(\mathbf{r})$$ the rms value, j the imaginary unit and $$\omega = 2 \pi f$$.

2. There is no airbox in this test, consequently the computed inductance is the interior one.

3. $$\mathbf{E}_{t}=\mathbf{0}$$ on the ends, $$\mathbf{H}_{t} = I/(2\pi a) \mathbf{u}_{\theta }$$ on the lateral surface, $$\mathbf{u}_{\theta }$$ azimuth direction, $$I = 1$$.

4. Current excitation with $$I=1$$ A, the lateral surface of the cylinder being a non-terminal ECE surface

5. The benchmark files are provided at https://gitlab.onelab.info/doc/models. Note that the LC geometry is given in a STEP file format as well as in a native Gmsh language that allows straightforward parametric studies, essential for parametric model order reduction methodologies.

6. From the inductance extraction point of view, this RLC test problem is not proper, as the extracted inductance depends on the size of the airbox and tends to infinity if the airbox goes to infinity. Indeed, the airbox boundary is the support of the current return path. This issue is inherent to the model and independent of the boundary conditions. However, we have adopted the same airbox (size and shape) as in the reference paper , we can thus extract and compare the values to those in the reference paper.

## Abbreviations

2D/3D:

two/three dimensional

AFS:

DoFs:

degrees of freedom

ECE:

electric circuit element

EM:

electromagnetic

EQS:

electroquasistatic

FEM:

finite element method

FW:

full wave

MEMS:

micro electro mechanical systems

MIMO:

multiple input multiple output

MOR:

model order reduction

MQS:

magneto-quasi-static

RF:

RLC:

resistor inductor capacitor

TF:

transfer function

VF:

vector fitting

## References

1. Bermúdez A, Piñeiro M, Rodriguez R, Salgado P. Analysis of an ungauged T, φ-φ formulation of the Eddy current problem with currents and voltage excitations. Math Model Numer Anal. 2017;51(6):2487–509.

2. Bermúdez A, Rodríguez R, Salgado P. Numerical solution of Eddy current problems in bounded domains using realistic boundary conditions. Comput Methods Appl Mech Eng. 2005;194(2):411–26.

3. Ciuprina G, Ioan D, Lazar IA, Dita CB. Vector fitting based adaptive frequency sampling for compact model extraction on HPC systems. IEEE Trans Magn. 2012;48(2):431–4.

4. Ciuprina G, Ioan D, Popescu M, Lup S. Electric circuit element boundary conditions in the finite element method for full-wave frequency domain passive devices. In: van Beurden M, Budko N, Schilders W, editors. Scientific computing in electrical engineering. vol. 36. Berlin: Springer; 2021. p. 1–13.

5. Ciuprina G, Lup AS, Dita CB, Ioan D, Stefanescu A. Extraction of TL-lumped RF macromodels MEMS switches. Nr Elmag Multiphy Mod Opt, NEMO. 2015.

6. COMSOL Walter Frei. Blog modeling of coplanar waveguides. 2013. https://www.comsol.com/blogs/modeling-coplanar-waveguides/.

7. Dular P, Geuzaine C. GetDP reference manual: the documentation for GetDP, a general environment for the treatment of discrete problems. http://getdp.info.

8. Dular P, Kuo-Peng P, Geuzaine C, Sadowski N, Bastos JPA. Dual magnetodynamic formulations and their with massive and stranded inductors. IEEE Trans Magn. 2000;36(4):1293–9.

9. Geuzaine C. GetDP: a general finite-element solver for the de Rham complex. In: PAMM Volume 7 Issue 1. Special Issue: Sixth International Congress on Industrial Applied Mathematics (ICIAM07) and GAMM Annual Meeting, Zürich 2007. vol. 7. New York: Wiley; 2008. p. 1010603–4.

10. Geuzaine C, Remacle J-F. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. Int J Numer Methods Eng. 2009;79(11):1309–31.

11. Gustavsen B, Semlyen A. Rational approximation of frequency domain responses by vector fitting. IEEE Trans Power Deliv. 1999;14(3):1052–61.

12. Hantila IF, Ioan D. Voltage-current relation of circuit elements with field effects. Rev Roum Sci Tech, électrotech. énerg.. 1994;39(3):405–16.

13. Hiptmair R, Kramer F, Ostrowski J. A robust Maxwell formulation for all frequencies. IEEE Trans Magn. 2008;44(6):682–5.

14. Hiptmair R, Ostrowski J. Electromagnetic port boundary conditions: topological and variational perspective. Int J Numer Model. 2021;34(3):e2839.

15. Hiptmair R, Sterz O. Current and voltage excitations for the Eddy current model. Int J Numer Model. 2005;18(1):1–21.

16. Ioan D, Ciuprina G, Schilders WHA. 5 complexity reduction of electromagnetic systems. Berlin: de Gruyter; 2020. p. 145–200. https://doi.org/10.1515/9783110499001-005.

17. Ioan D, Munteanu I. Missing link rediscovered: the electromagnetic circuit element concept. Stud Appl Electromagn Mech. 1999;8:302–20.

19. Ostrowski J, Hiptmair R. Frequency-stable full Maxwell in electro-quasistatic gauge. SIAM J Sci Comput. 2021;43(4):B1008–B1028.

20. Radulet R et al.. Introduction des paramètres transitoires dans l’étude des circuits électriques linéaires ayant des éléments non filiformes et avec pertes suplimentaires. Rev. Roum. Sci. Tech., Sér. électrotech. énerg.. 1966;11(4):565–639.

## Acknowledgements

The authors would like to thank Jörg Ostrowski for providing the complete description of the LC benchmark in STEP format.

## Funding

This paper was not funded by any sources.

## Author information

Authors

### Contributions

GC: initiator of the preliminary SCEE 2020 paper  whose novelty was the idea of using V only on the boundary and not everywhere inside the domain as it was proposed in ; proof of concept by implementing the idea in an in-house 2D FEM code for full-wave regime of the EM field; onelab implementation; main responsible of the paper content. DI: contribution to and supervision of the paper content: correct placement in the literature as one of the authors of , concepts, results. RVS: high involvement in the supervising of the onelab implementation, considering that the other authors had no experience in onelab prior to this extended version of the SCEE paper; contribution to and supervision of the paper content. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to Gabriela Ciuprina.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Rights and permissions 