Skip to content

Magnetism A

Our starting points along with the material relation are

B=0×H=JB=μH.\begin{align} \nabla \cdot \boldsymbol{B} &= 0 \\[5pt] \nabla \times \boldsymbol{H} &= \boldsymbol{J} \\[5pt] \boldsymbol{B} &= \mu \boldsymbol{H}. \end{align}

Since the magnetic field is divergence-free, we can use the identity for divergence of a curl and write the magnetic field as a curl of some vector A\boldsymbol{A}

B=×A.\begin{align} \boldsymbol{B} = \nabla \times \boldsymbol{A}. \end{align}

Vector A\boldsymbol{A} is called a magnetic vector potential. By substituting (4) into (3) and rearranging, the material relation becomes

H=1μB=1μ(×A).\begin{align} \boldsymbol{H} = \frac{1}{\mu} \boldsymbol{B} = \frac{1}{\mu} \left( \nabla \times \boldsymbol{A} \right). \end{align}

Substituting (5) into (2), the strong form becomes

×H=1μ(×A)=J.\begin{align} \nabla \times \boldsymbol{H} = \frac{1}{\mu} \left( \nabla \times \boldsymbol{A} \right) = \boldsymbol{J}. \end{align}

To obtain the weak form, we multiply the strong form with the test function A\boldsymbol{A}^\prime and integrate over the entire domain Ω\Omega. It is convenient to use the strong form as in (2) to derive the weak form here as

Ω (×HJ)A dΩ=0Ω (×H)A dΩΩ JA dΩ=0.\begin{align} \int_{\Omega}\ (\nabla \times \boldsymbol{H} - \boldsymbol{J}) \cdot \boldsymbol{A^\prime}\ d \Omega = 0 \\[5pt] \int_{\Omega}\ (\nabla \times \boldsymbol{H}) \cdot \boldsymbol{A^\prime}\ d \Omega - \int_{\Omega}\ \boldsymbol{J} \cdot \boldsymbol{A^\prime}\ d \Omega = 0. \end{align}

Using the identity for divergence of a cross product on the first term we get

Ω (H×A) dΩ+Ω H(×A) dΩΩ JA dΩ=0.\begin{align} \int_{\Omega}\ \nabla \cdot (\boldsymbol{H} \times \boldsymbol{A^\prime})\ d \Omega + \int_{\Omega}\ \boldsymbol{H} \cdot (\nabla \times \boldsymbol{A^\prime})\ d \Omega - \int_{\Omega}\ \boldsymbol{J} \cdot \boldsymbol{A^\prime}\ d \Omega = 0. \end{align}

Applying the divergence theorem on the first term we obtain

Γ (H×A)n dΓ+Ω H(×A) dΩΩ JA dΩ=0.\begin{align} \int_{\Gamma}\ (\boldsymbol{H} \times \boldsymbol{A^\prime}) \cdot \boldsymbol{n}\ d \Gamma + \int_{\Omega}\ \boldsymbol{H} \cdot (\nabla \times \boldsymbol{A^\prime})\ d \Omega - \int_{\Omega}\ \boldsymbol{J} \cdot \boldsymbol{A^\prime}\ d \Omega = 0. \end{align}

Using the scalar triple product rule on the boundary term we get

Γ (n×H)A dΓ+Ω H(×A) dΩΩ JA dΩ=0.\begin{align} \int_{\Gamma}\ (\boldsymbol{n} \times \boldsymbol{H}) \cdot \boldsymbol{A^\prime}\ d \Gamma + \int_{\Omega}\ \boldsymbol{H} \cdot (\nabla \times \boldsymbol{A^\prime})\ d \Omega - \int_{\Omega}\ \boldsymbol{J} \cdot \boldsymbol{A^\prime}\ d \Omega = 0. \end{align}

Subsituting (5) in the second term and by rearranging we get the final weak form as

Ω 1μ (×A)(×A) dΩ+Ω  JA dΩ+Γ (n×H)A dΓ=0.\begin{align} \int_{\Omega}\ \frac{1}{\mu}\ (\nabla \times \boldsymbol{A}) \cdot (\nabla \times \boldsymbol{A^\prime})\ d \Omega + \int_{\Omega}\ -\ \boldsymbol{J} \cdot \boldsymbol{A^\prime}\ d \Omega + \int_{\Gamma}\ (\boldsymbol{n} \times \boldsymbol{H}) \cdot \boldsymbol{A^\prime}\ d \Gamma = 0. \end{align}

Imposes a zero tangential magnetic field n×H=0\boldsymbol{n} \times \boldsymbol{H} = 0 on the boundary, equivalent to a perfect magnetic conductor (PMC). In the A-formulation, this is a natural boundary condition, meaning it is satisfied automatically if no other condition is applied.

Defines a remanent magnetization Br\boldsymbol{B_r} for permanent magnets. Can be specified as a constant vector or as a vector valued function.

How to use:

You can use either the matrix editor or the expression editor.

With the matrix editor, you must provide a 3×1 matrix for a 3D problem (2×1 for 2D, etc.):

Add remanence field vector values for each dimension, for example Br,x=1B_{r,x} = 1, Br,y=5B_{r,y} = 5 and Br,z=0B_{r,z} = 0 for 3D case.

In the expression editor, you can write the direct expression for this 3D case:

Example: [1; 5; 0]

This applies a 3D remanence field constraint of Br,x=1TB_{r,x} = 1\:T, Br,y=5TB_{r,y} = 5\:T and Br,z=0TB_{r,z} = 0\:T to specified node or a region. Same principles apply for 2D.

Adding spatially varying remanence field to permanent magnets

Unit: Remanence magnetic field in Teslas (T)

Imposes periodic boundary conditions on the magnetic vector potential field A\boldsymbol{A} between two boundaries. Reduces the computational domain size for geometrically symmetric or antisymmetric problems, avoiding the need to model the full geometry.

Example:

Periodicity is similar in every physics section. This example is from φ\varphi-formulation, but workflows are identical:

The periodicity of an electric motor allows modeling only a fraction of the full geometry, such as one pole pair or one quarter, while still capturing the complete field behavior.

Periodicity in electric motor

This formulation supports the following couplings:

A-v coupling (Current flow)
Used, for example, in electric motor simulations. Only available via scripting, but offers fast solution times, especially in 2D.