Maxwell

Electromagnetic field problems can be characterized by the field intensities and the flux densities described by the partial differential equations derived from Maxwell’s equations.

Maxwell’s equations define relations for the electromagnetic field quantities and the source elements, i.e. the electric and the magnetic field intensities, the electric and the magnetic flux densities, the charge and current distribution. Constitutive relations are added to Maxwell’s equations to describe the properties of the media.

1. Maxwell modeling and theory

1.1. Differential form of Maxwell equations

The differential form of Maxwell’s equations reads:

×H(x,t)=J(x,t)+D(x,t)t×E(x,t)=B(x,t)tB(x,t)=0D(x,t)=ρ(x,t)B(x,t)=μ0[H(x,t)+M(x,t)],J(x,t)=σ[E(x,t)+Ei(x,t)]=σE(x,t)+Ji(x,t)D(x,t)=ϵ0E(x,t)+P(x,t)

1.1.1. Variables, symbols and units

The following table provides the names and units (in SI) of the symbols and variables above.

Table 1. Name and units of symbols and variables of the Maxwell’s equations
Notation Quantity Unit SI

H(x,t)

magnetic field intensity

Am1

Am1

E(x,t)

electric field intensity

Vm1

kgms3A1

B(x,t)

magnetic flux density

T

kgs2A1

D(x,t)

electric flux density

Cm2

Asm2

A(x,t)

magnetic potential vector

Vsm1

kgms2A1

J(x,t)

electric current density

Am2

Am2

ρ(x,t)

electric charge density

Cm3

Asm3

M(x,t)

magnetisation

Am1

Am1

Ei(x,t)

impressed electric field

Vm1

kgms3A1

Ji(x,t)

impressed electric current

Am2

Am2

P(x,t)

polarization

Cm2

Asm2

μ0(x,t)

permeability of vacuum

Hm1

kgms2A2

σ(x,t)

conductivity

Sm1

kg1m3s3A2

ϵ0(x,t)

permittivity of vacuum

Fm1

kg1m3s4A2

The field quantities are depending on space x and on time t, we will omit later both in the notation and use e.g. H,E,

The sources of the electromagnetic fields are the electric current density J and the electric charge density ρ.

1.1.2. Constitutive relations

The last three equations in Maxwell’s equations above collect the constitutive relations, which – depending on the properties of the examined material – describe the relationship between field quantities.

In the simplest case these relations are linear, i.e.

M=χH,Ei=0,P=ϵ0χdE

where χ and \chi_d are the magnetic and the dielectric susceptibility respectively and

B=μH,J=σE,D=ϵ0E

where

μ=μ0(1+χ)=μ0μr,ϵ=ϵ0(1+χd)=ϵ0ϵr.

Here μr=1+χ is the relative permeability, ϵr=1+χd is the relative permittivity of the material and the conductivity σ is constant. The equation J=σE is the differential form of Ohm’s law.

The constitutive relations are nonlinear in general, that is the permeability, conductivity and permittivity depend on the associated field quantities, i.e.

μ=μ(H,B),σ=σ(E,J),ϵ=ϵ(E,D)

or equivalently

B=B(H),J=J(E),D=D(E)

where \mathcal{B}(·), \mathcal{J}(·) \text{ and } \mathcal{D}(·) are operators. We would actually need also the inverse operator, e.g.

H=B1(B)

1.1.3. Classification of Maxwell’s Equations

We now turn to the classification of the Maxwell’s equations.

Steady case

The simplest case corresponds to the steady case: the time variation of the field quantities can be neglected, i.e. \partial/\partial t = 0. The corresponding fields are called static field. In this case the magnetic, the electric and the current fields can be treated independently because there are no interactions between them.

Time varying case

When /t=0, the magnetic and electric fields are coupled, we are then in the presence of eddy current fields and wave propagation of electrodynamics.

Static magnetic field

The time independent current density J=J(x) generates the time independent magnetic field intensity H=H(x) and the time independent magnetic flux density B=B(x).

the magnetostatic Maxwell’s equations read

×H(x)=J(x)B(x)=0B(x)={μ0H in airμ0μrH in magnetically linear mediaμ0[H+M] in magnetically nonlinear media

In a nonlinear medium, the magnetization vector M=M(x) is depending on the magnetic field intensity vector, i.e. M=H(H).

The operator H can be described by so-called hysteresis models denoted by B=B(H).

This constitutive relation has an inverse form which read

H={ν0B in airν0νrB in magnetically linear mediaB1(B) in magnetically nonlinear media

where ν0=1/μ0,νr=1/μr are the reluctivity of vacuum and the relative reluctivity.

In magnetically nonlinear media, it can be represented by an inverse hysteresis operator, H=B1(B).

The source current distribution is solenoidal, which reads J=0 (take the divergence of the first Maxwell’s equation). This means that all current lines either close upon themselves, or start and terminate at infinity.
This case corresponds to magnetic fields generated by (i) coils carrying currents or (ii) the static behavior of electrical machines. When J=0, then a boundary value problem to simulate e.g. the field of magnetic poles.

1.2. Magnetostatic problem formulation

Denote Ω0 the non-magnetic (e.g. air) part of Ω (hence 0) and Ωm the magnetic part.

In the case of static magnetic field, the Maxwell’s equations read

×H(x)=J(x) in Ω0ΩmB(x)=0 in Ω0ΩmB(x)={μ0H in airμ0μrH in magnetically linear mediaB(H)=μoH+R in magnetically nonlinear media

The constitutive relation has an inverse form

H(x)={ν0B in airν0νrB in magnetically linear mediaB1(B)=νoB+I in magnetically nonlinear media

where μo and νo are the optimal permeability and reluctivity respectively obtained using the polarisation method described below.

Only the tangential components of H is continuous across the interface Γ0m between Ω0 and Ωm. As to B, it is its normal component which is continuous across Γ0m.

1.3. Vector Potential formulation for magnetostatic

The magnetic vector potential A is defined by

B=×A

which satisfies B=0 exactly, because of the identity ×v=0 for any vector function v.

To ensure the uniqueness of the magnetic vector potential, its divergence can be selected according to Coulomb gauge,
A=0

This is useful, because the vector potential A=A+ϕ also satisfies the equations above, because of the identity ×ϕ=0 where ϕ is a scalar field. This is the reason why the magnetic vector potential is not unique.

Substituting the definition of A into the first Maxwell’s equation and using the linearized constitutive relation, we get

×(νo×A)=J×I in Ω

where J is the source current density.

In case where the media is linear, the term ×I disappears.

The strategy to solve this equation is discussed the following section.

1.4. Resolution strategy

Resolution strategy for Maxwell equations

1.4.1. Polarisation method

Design and simulation of electrical engineering applications containing ferromagnetic parts require the accurate modeling of hysteresis characteristics and the implementation of the models and solve the nonlinear partial differential equations derived from Maxwell’s equations.

The partial differential equations are generally nonlinear because of the nonlinear characteristics of ferromagnetic materials.

The numerical analysis of electromagnetic fields can be characterized by the electric and magnetic field intensities and flux densities formulated by Maxwell’s equations, which are the collection of partial differential equations of the electric field intensity E, the magnetic field intensity H, the electric flux density D and the magnetic flux density B.

Constitutive relations between the above quantities are defined to take into account the macroscopic properties of the medium.

We consider a constitutive relation between the magnetic field intensity and the magnetic flux density which is nonlinear , given by the operator B=B(H) or equivalently H=B1(B). These nonlinear characteristics can be reformulated by introducing the polarization method and the resulting system of nonlinear equations can be solved using fixed point iterations.

According to the polarization method, the magnetic flux density can be split in two parts as

B=μH+R

where μH is a linear term, μ is constant and the nonlinearity is in the second term R. It is a magnetic flux density like quantity.

The question is the appropriate value of the parameter μ. This representation can be reformulated as

R=BμH=BμB1(B)

Here, the inverse type hysteresis characteristics are used.

It is important to note that the nonlinear equations are solved by iterative methods, the n-th iteration is denoted by the superscript (n) in the following. By using the various formula in the constitutive relations defined in Maxwell’s equations, the solution of the nonlinear partial differential equations with appropriate boundary conditions can be formulated as

B(n)=M(R(n1))

where the operator M represents the set of Maxwell’s equations and the boundary conditions. The starting R(0) is arbitrary. The value of electromagnetic field quantities in the n-th step are depending on the value of R in the (n1)-th step and they represent source like quantities.

The source of electromagnetic fields (e.g. the electric current density J) is not changing during fixed point iteration, i.e. the fixed point iteration has no particular physical meaning.
Abstract fixed point iteration

It may be better to use the reluctivity ν when applying the inverse hysteresis model, because ν(B)=HB. Let us now multiply the relation above by νo=1/μo, we have

νoB=H+νoR,

hence

H=νoBνoR=νoB+I

where I=νoR, νo=νmin+νmax2 and νmin and νmax are the minimum and maximum slope of the inverse of the hysteresis characteristics. We have νmin=1/μmax and νmax=1/μmin.

The nonlinear fixed point iteration can be summarized as follows. The iteration can be started by an arbitrary value of I(0), then for n>0 we do,

  • the magnetic flux density B(n) can be calculated by solving the partial differential equations obtained from Maxwell’s equations and using I(n1), in other words,

B(n)=M(I(n1)),
  • the magnetic field intensity H(n) can be calculated by applying the inverse type hysteresis model, H(n)=B1(B(n)),

  • the nonlinear residual term can be updated by using the magnetic flux density and magnetic field intensity,

I(n)=H(n)νoB(n)=B1(B(n))νoB(n)
  • and the sequence defined by steps (i)–(iii) must be repeated until convergence.

Convergence criterion can be ||I(n)I(n1)||<ε, where ε is the tolerance. Convergence criterion can be also defined by using the magnetic field intensity or the magnetic flux density.

Fixed point iteration for the A formulation

Recall that we have

×(νo×A)=J×I in Ω

associated to proper boundary conditions for A. The fixed point iteration algorithm reads

We start with arbitrary I(0) and then for n>0

  • solve

×(νo×A(n))=J×I(n1) in Ω
  • compute

B(n)=×A(n)

*compute the residual

I(n)=B1(B(n))νoB(n)
  • repeat steps i-iii until convergence, e.g.

||I(n)I(n1)||<ε

1.4.2. Picard method

The main benefit for the polarization method is to keep the matrix constant. There is no need to rebuild a preconditioner and to assemble again and again the matrix. Actually, as long as the volume of the non linear concrete is small against the total volume, the gain is proportionnaly small.

Generaly, the non linear law links the magnetic field magnitude B to the magnetic field intensity H. In other word, we have an isotropic concrete. That is we have the relation B=μ(H)H instead of B=μ(H)H.

One can write:

B=μ(H)H,=μrμ0H,

where μr is the relative magnetic permeability.

We denote with μ(H) the interpolation of the data. It is defined thanks to a P1 or Akima’s interpolation of the dataset BHB.

The Picard algorithm reads:

Given an initial μ(0)r chosen arbitrarily:

  • solve

×(1μ(n)r×A(n))=μ0J in Ω
  • compute

B(n)=×A(n)
  • compute

H(n)=B(n)μ0μ(n)r
  • compute

μ(n+1)r=μ(H(n))μ0
  • repeat steps i-iii until convergence, e.g.

||B(n)B(n1)||<ε

1.4.3. Linking Picard to the Polarization

The polarization method has some evident advantages. Our benchmarks (to come) has shown that algorithm is less robust than the Picard one.

We note here an idea we do not have yet implemented that should circumvent the Polarization problem.

We want to transfer from the right hand side to the matrix the non linearity. When a criteria we need to define is reached, we construct μN

B=μ0μoptH+I=μ0μNHμN=μopt+1μ0IH

And then we start a new Polarization algorithm with an initial I set to zero.

1.4.4. Formulations

Saddle-point formulation

The first possibility is to add a constraint on the divergence using the Coulomb gauge, A=0. It is managed by a scalar Lagrange multiplier, giving the saddle-point problem:

×ν0×A+p=J×I in ΩA=0 in ΩA×n=AD on Ωp=0 on Ω
Variational formulation

The variational formulation the consists in finding (A,p)(XH(curl,Ω)×H10(Ω)) (see Notations) such that

Ων0(×A)(×v)+δΩν0(×A)(v×n)+Ωvp=ΩJvΩ(×I)v  vYΩAq=0  qH10(Ω)

The Dirichlet boundary condition on A imposed on strong form vanishes the boundary term of and the condition is directly taken into account in the definition of the function space X=HAD(curl,Ω)={vH(curl,Ω)v×n=AD on Ω}. The variational formulation then consists in finding (A,p)(HAD(curl,Ω)×H10(Ω)) such that

Ων0(×A)(×v)+Ωvp=ΩJvΩ(×I)v  vH0(curl,Ω)ΩAq=0  qH10(Ω)

We can also impose the Dirichlet boundary conditions on weak form, adding symetrization and penalisation terms and then avoiding to add condition in X function space, i.e. X=H(curl,Ω). As previously, γ is the penalisation coefficient and hs the mesh size. The variational formulation consists then in finding AH(curl,Ω) such that (v,q)H(curl,Ω)×H10(Ω)

Ων(×A)(×v)+δΩν(×A)(v×n)+δΩν(×v)(A×n)+δΩγhsν(v×n)(A×n)+Ωvp=ΩJvΩ(×I)v+δΩν(×v)AD+δΩγhsν(v×n)ADΩAq=0
Discretization

Since A must be in H(curl,Ω), we need to use Nédélec elements, see Notations. On the strong form, the discrete problem becomes:
Find (Ah,ph)(HAD,h(curl,Ω)×P1c,h(Ω)) such that

Ων0(×Ah)(×vh)+Ωvhph=ΩJvhΩ(×I)vh  vhH0,h(curl,Ω)ΩAhqh=0  qhP10,c,h(Ω)

On the weak form, the discrete problem becomes:
Find (Ah,ph)(Hh(curl,Ω)×P1c,h(Ω)) such that (vh,qh)Hh(curl,Ω)×P10,c,h(Ω)

Ων(×Ah)(×vh)+δΩν(×Ah)(vh×n)+δΩν(×vh)(Ah×n)+δΩγhsν(vh×n)(Ah×n)+Ωvhph=ΩJvhΩ(×I)vh+δΩν(×vh)AD+δΩγhsν(vh×n)ADΩAhqh=0
Regularized formulation

The second way consists of considering the ungauged problem as a special case of the time harmonic Maxwell’s equations. Then using a Fourier transform, we can write the problem as:

×ν0×A+εA=J×I in ΩA×n=AD on Ω
Variational formulation

The variational formulation obtained consists in finding AXH(curl,Ω) such that

Ων0(×A)(×v)+δΩν0(×A)(v×n)+ΩεAv=ΩJvΩ(×I)v vY

Imposing the Dirichlet boundary condition on strong form, removes the boundary term and the condition is inherent to he function space X=H(AD,curl,Ω). The variational formulation becomes : Find AHAD(curl,Ω) such that

Ων0(×A)(×v)+ΩεAv=ΩJvΩ(×I)vvH0(curl,Ω)

We can also impose the Dirichlet boundary conditions on weak form, adding symetrization and penalisation terms and then avoiding to add condition in X function space, i.e. X=H(curl,Ω). As previously, γ is the penalisation coefficient and hs the mesh size. The variational formulation consists then in finding AH(curl,Ω) such that vH(curl,Ω)

Ων(×A)(×v)+δΩν(×A)(v×n)+δΩν(×v)(A×n)+δΩγhsν(v×n)(A×n)+ΩαAv=ΩJvΩ(×I)v+δΩν(×v)AD+δΩγhsν(v×n)AD
Discretization

On strong form, the discrete problem is: find AhHAD,h(curl,Ω) such that

Ων0(×Ah)(×vh)+ΩεAhvh=ΩJvhΩ(×I)vhvhH0,h(curl,Ω)

On weak form, the discrete problem is : find AhH(curl,Ω) such that vhH(curl,Ω)

Ων(×Ah)(×vh)+δΩν(×Ah)(vh×n)+δΩν(×vh)(Ah×n)+δΩγhsν(vh×n)(Ah×n)+ΩαAhvh=ΩJvhΩ(×I)vh+δΩν(×vh)AD+δΩγhsν(vh×n)AD

1.4.5. Solver and Preconditionner

There are many methods available to solve the saddle-point formulation, using iterative solvers. Considering the number of non zero entries in the matrix to inverse due to the use of edge based finite elements, this method proves to be inefficient for this problem.

A block diagonal preconditioning approach for the time-harmonic Maxwell equations is introduced in <Greif-Schötzau>. Combined with a nodal auxiliary space preconditioning technique proposed in <Hiptmair Xu> specifically designed for H(curl)-conforming finite element, this method gives attractive performance results detailed in <Li>.

This section describes the main ingredients of preconditioning method introduced in <Li>. Based on the saddle point formulation, the magnetostatic problem reads on the form Kx=b

(ABTB0)K(Ap)x=(f0)b

The solving of this system is performed at two solver "levels". An outer solver dealing with the resolution of the previous system with the block diagonal preconditioner <Greif-Schötzau>, and an inner solver dealing with the application of auxiliary space preconditioning technique <Hiptmair-Xu> to the first block of the latter.

Outer solver

The block diagonal preconditioner proposed in <Greif-Schötzau> consists in

PM,L=(PM00L)

where

PM=A+M with Mi,j=Ωψjψi,  1i,jn

and L the scalar Laplacian on Qh defined as

L=Ωϕjϕi,  1i,jm

The outer solver for Kx=b is a preconditioned MINRES, using previously defined PM,L as preconditioner. The linear system to solve then reads PM,L Kx=PM,L b

(PM00L)PM,L(vq)xout=(cd)bout

This linear system is solved block by block, using subspace solvers. The block (1,1) consists in the linear system

PMv=c

and the block (2,2) is the linear system

Lq=d

The resolution of both systems gives the solution (v,q) from which we conclude current MINRES iteration updating x in Kx=b. The same process can then applied for each MINRES iteration, until convergence.

While the solving of the scalar elliptic problem Lq=d can be efficiently performed with standard methods, the H(curl)-conforming linear system PMv=c of the outer problem is more tricky. This bottleneck can be overcomed using a second level of preconditioning, applying the effective auxiliary space preconditioning method <Hiptmair and Xu> to the inner problem PMv=c.

Inner solver

The preconditioning method proposed in <Hiptmair and Xu> is used to solve the linear system PMv=c.

This system is solved using a preconditioned conjugate gradient (CG) and then reads PVPMv=PVc, where PV is the preconditioner to be descibed. The linear system to solve then becomes

PVw=r

The preconditioner PV is defined such that

P1V=diag(PM)1+P(ˉL+ˉQ)1PT+C(ˉL1)CT

where

ˉL=1μdiag(L,L,L)

and

ˉQ=diag(M,M,M)

The matrix C is composed by the coefficients of the gradient of Qh basis functions ϕj in the H(curl)-conforming space Vh

C={Ci,j} 1in, 1jm such that ϕj=ni=1Ci,jψi 1jm

and the matrix P is the nodal interpolation operator Πcurlh from Q3h to Vh.

From the definition of PV, the linear system PVw=r gives

w=diag(PM)1r+Py+Cz  with y=(ˉL+ˉQ)1PTr  and z=ˉL1CTr

The terms y and z are computed by solving two linear systems

(ˉL+ˉQ)y=PTrLz=CTr

Then, w can be updated by solving both systems which solves the linear system PMv=c.

References

  • [Greif07] Preconditioners for the discretized time‐harmonic Maxwell equations in mixed form C Greif, D Schötzau - Numerical Linear Algebra, 2007 - Wiley

  • [Xu07] Nodal auxiliary space preconditioning in H (curl) and H (div) spaces, R Hiptmair, J Xu, SIAM Journal on Numerical Analysis 45 (6), 2483-2509

  • [Li2010] …​

1.5. Benchmark

We benchmark here our implementation.

We set - for convenience - μo to one in that convergence test.

Given a sinusoïdal solution, we compute - with no regularization terms (we are not interested in the potential vector but its curl) - the appropriate right hand side and use the exact solution a boundary condition.

J=(3π3cos(πx)sin(πy)sin(πz)6π3sin(πx)cos(πy)sin(πz)3π3sin(πx)sin(πy)cos(πz))Aexact=(πcos(πx)sin(πy)sin(πz)2πsin(πx)cos(πy)sin(πz)πsin(πx)sin(πy)cos(πz))c=(3π2cos(πz)cos(πy)sin(πx)0(3π2)sin(πz)cos(πy)cos(πx))

1.5.1. Regularized point system

×(1μo×A)+ϵA=J in ΩA|Ω=Aexact

1.5.2. Saddle point system

×(1μo×A)+p=J in ΩA=0 in ΩA|Ω=Aexactp|Ω=0

The boundary condition can apply with penalization or elimination. We compare both results:

Saddle Point system convergence