**Abstract**

Modelling of realistic electromagnetic problems is presented by partial differential equations (FDEs) that link the magnetic and electric fields and their sources. Thus, the direct application of the analytic method to realistic electromagnetic problems is challenging, especially when modeling structures with complex geometry and/or magnetic parts. In order to overcome this drawback, there are a lot of numerical techniques available (e.g. the finite element method or the finite difference method) for the resolution of these PDEs. Amongst these methods, the finite element method has become the most common technique for magnetostatic and magnetodynamic problems.

**Keywords:** finite element method, magnetostastics, magnetodynamics, Maxwell's equations, weak formulations

## **1. Introduction**

Mathematical modeling of realistic problems in the framework of electromagnetics leads to a set of partial derivates equations that have to be solved on a domain with complex geometry associated with boundary conditions and initial conditions. This complexity makes any analytical approach unpracticable. In the past (until 1960), people used experimentation (very expensive, sometimes destructive) or analogic simulation (lack of generality) to solve these problems. Since 1970, the growth of computer capabilities makes the numerical simulation a tool that is more and more used by the people interested in solving these complex problems. When using the computer, the continuous problem is represented with a finite number of degrees of freedom (d.o.f.). The continuous problem is then replaced by a discrete problem. There are a lot of numerical techniques available. We will see that the most common ones can be derived from the same general principle of weighted residuals.

A continuous formulation of a problem cannot generally be solved analytically and some numerical methods have to be used in order to obtain quantitative information about the solution. The unknown functions of a continuous problem belong to continuous function spaces which are usually of infinite dimensions, that is, those functions are usually described by an infinite number of parameters. The basis of any numerical method is to discretize such a problem in order to obtain a similar discrete problem, characterized by a finite number of unknowns which are called

degrees of freedom. This discretization process consists of replacing the considered continuous function spaces by some discrete function spaces, whose dimensions are finite, and which are usually subspaces of them. Those spaces are also called approximation spaces and their elements are called approximation functions.

The function spaces are defined in a particular studied domain. If this one is discretized, that is, if it is defined as the union of geometric elements of simple shapes, and if the discrete function spaces are built in such a way that their functions are piecewise defined, then the approximation numerical method is called the finite element method (FEM). It is this kind of method we are interested in. We can thus see that the finite element method necessitates a double discretization: a discretization of some function spaces and a discretization of the studied geometric domain, which leads to a mesh.

Weak formulations are well adapted to the finite element method, which will appear in the following. Such formulations make use of several kinds of Green formulas.

### **2. Numerical technique**

#### **2.1 The Laplacian problem**

The formalism used in the case of a Laplacian problem is sufficiently simple to be very understandable without lack of generality. The description of a Laplacian problem is presented now. Let us consider a bounded domain Ω and its boundary Γ ¼ Γ<sup>h</sup> ∪ Γ<sup>e</sup> (**Figure 1**).

The Laplace equation has to be solved in Ω [1–3]:

$$
\Delta u(\mathbf{x}) = \frac{\partial^2 u}{\partial \mathbf{x}^2} + \frac{\partial^2 u}{\partial \mathbf{y}^2} + \frac{\partial^2 u}{\partial \mathbf{z}^2} = \mathbf{0},
\tag{1}
$$

where u is the unknown field defined at each point x (x, y, z) of the studied domain. The associated boundary conditions are respectively Dirichlet and Neumann conditions, that is

$$
\mu(\mathbf{x}) = \overline{u}(\mathbf{x}), \quad \mathbf{x} \in \Gamma\_h,\tag{2}
$$

$$\nu(\mathbf{x}) = \frac{\partial u(\mathbf{x})}{\partial n} = \overline{v}(\mathbf{x}), \quad \mathbf{x} \in \Gamma\_{\varepsilon}. \tag{3}$$

**Figure 1.** *Studied domain* Ω *and its boundary* Γ *=* Γ*<sup>h</sup>* ∪ Γ*e:*

This diffusion equation describes a wide range of physical phenomena. The next table shows some of these phenomena.


A natural way to discretize the problem is to impose the error on the equation and on the boundary conditions weighted by a trial function w to be equal to zero, that is

$$\int\_{\Omega} \Delta u \, w \, d\Omega + \int\_{\Gamma\_h} (\overline{u} - u) w \, d\Gamma\_e + \int\_{\Gamma\_e} (\overline{v} - v) w \, d\Gamma\_h = 0. \tag{4}$$

Equations (1–3) are then meanly solved, the sense of the mean being the principle of the numerical method. In fact, the numerical method used (F.D.M, F.E.M or B.E.M) are directly related to the chosen trial functions.
