# Electromagnetic analysis¶

This section discuss the electromagnetic theories that are applied in the WELSIM application.

## Electromagnetic field fundamentals¶

The electromagnetic fields are governed by the well-known Maxwell's equations \(\eqref{eq:ch4_theory_maxwell1}\)-\(\eqref{eq:ch4_theory_maxwell4}\)^{1}^{2}.

where \(\mathbf{H}\) is the magnetic field intensity vector, \(\mathbf{J}\) is total current density vector, \(\mathbf{J}_{s}\) is the applied source current density vector, \(\mathbf{J}_{e}\) is the induced eddy current density vector, and \(\mathbf{J}_{VS}\) is the velocity current density vector, \(\mathbf{D}\) is the electric flux density vector (this term is also called electric displacement), \(\mathbf{E}\) is the electric field intensity vector, \(\mathbf{B}\) is the magnetic flux density vector, and \(\rho\) is the electric charge density.

The above field governing equations contian the constitutive relations:

and

where \(\mathbf{P}\) is the polarization density, and \(\mathbf{M}\) is t he magnetization. In many materials the polarization density can be approximated as a scalar multiple of the electric field. \(\mu\) is the magnetic permeability matrix. For example, if the magnetic permeability is a function of temperature,

For the permanent magnets, the constitutive relation of magnetic field becomes

where \(\mathbf{M}_{0}\) is the remanet intrinsic magnetization vector.

Similarly, the consitutive relations for the related electric fields are:

where \(\sigma\) is the electrical conductivity matrix, \(\epsilon\) is the permittivity matrix, and \(v\) is the velocity vector.

## Electrostatics¶

The WELSIM application introduces electric scalar potential to solve the electrostatic problems. When the time-derivetive of magnetic flux density is neglected from the full Maxwell's equations. The governing equations are reduced to

Since the electric field \(\mathbf{E}\) is irrotational and can be expressed as the function of electric scalar potential

where \(\varphi\) is the electric scalar potential and has units of Volts in the SI system. Inserting this definition into the Gauss's Law gives:

which is Poisson's equation for the electric potential , where we have assumed a linear constitutive relation between \(\mathbf{D}\) and \(\mathbf{E}\) of the form \(\mathbf{D}=\epsilon\mathbf{E}+\mathbf{P}\).

### Boundary Conditions¶

For an electric material interface, the continuious conditions for \(\mathbf{E}\), \(\mathbf{D}\), and \(\mathbf{J}\) are

where \(E_{t}\) is the tangential components of \(\mathbf{E}\), \(J_{n}\) is the normal components of \(\mathbf{J}\), \(D_{n}\) is the normal components of \(\mathbf{D}\), and \(\rho_{s}\) is the surface charge density.

Since the solutons to the governing equation are non-unique, we must impose a Dirichlet boundary condition at least at one node in the domain to get the physical solution. The Dirichlet condition could be a fixed piecewise voltage value on certain nodes. In addition, the normal derivative boundary condition \(\hat{n}\cdot\mathbf{D}\) such as surface charge density can be imposed on the boundary.

### Matrix Forms¶

The electric scalar potential algorithm is applied in the WELSIM application for solving electrostatic problems. The governing equations are reduced to the following:

The matrix equation for an electrostatic analysis is derived from Equation \(\eqref{eq:ch4_theory_govern_eqn_electrostatic}\):

where

### Vector magnetic potential¶

The WELSIM application applies the vector magnetic potential method for the magentostatic analysis. Considering the neglected electric displacement currents, the full Maxwell's equations can be reduced to

A numerical solution can be achieved by introducing potentials to the governing equations. The proposed magnetic vector potential \(\mathbf{A}\) and electric scalar potential \(V\) have the following characteristics:

In addition, the Coulomb gauge condition is introduced to ensure the uniqueness of the vector potential, as shown in the following equations.

where matrix invarient \(v_{e}\) is \(v_{e}=\frac{1}{3}\mathrm{tr}(v)=\frac{1}{3}(v_{11}+v_{22}+v_{33})\).

### Edge-element magnetic vector potential¶

Due to the limitation of node-based vector magnetic potential algorithm^{2}, WELSIM application uses the edge-based finite element for the magnetic vector potential algorithm.

The governing equation for the edge finite element method is given below.

The uniqueness of these equations is ensured by the tree gauging procedure, which sets the edge-flux degrees of freedom related to the spanning tree of the finite element mesh to zero.