Maxwell’s equations
Gauss’s law \text{Gauss's law} Gauss’s law ∇ ⋅ D = ρ \nabla \cdot \boldsymbol{D} = \rho ∇ ⋅ D = ρ Gauss’s law for magnetism \text{Gauss's law for magnetism} Gauss’s law for magnetism ∇ ⋅ B = 0 \nabla \cdot \boldsymbol{B} = 0 ∇ ⋅ B = 0 Faraday’s law \text{Faraday's law} Faraday’s law ∇ × E = − ∂ B ∂ t \nabla \times \boldsymbol{E} = -\frac{\partial \boldsymbol{B}}{\partial t} ∇ × E = − ∂ t ∂ B Ampere-Maxwell law \text{Ampere-Maxwell law} Ampere-Maxwell law ∇ × H = J + ∂ D ∂ t \nabla \times \boldsymbol{H} = \boldsymbol{J} + \frac{\partial \boldsymbol{D}}{\partial t} ∇ × H = J + ∂ t ∂ D
Our starting points along with the material relation are
∇ ⋅ B = 0 ∇ × H = J B = μ H . \begin{align}
\nabla \cdot \boldsymbol{B} &= 0 \\[5pt]
\nabla \times \boldsymbol{H} &= \boldsymbol{J} \\[5pt]
\boldsymbol{B} &= \mu \boldsymbol{H}.
\end{align} ∇ ⋅ B ∇ × H B = 0 = J = μ H .
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} A
B = ∇ × A . \begin{align}
\boldsymbol{B} = \nabla \times \boldsymbol{A}.
\end{align} B = ∇ × A .
Vector A \boldsymbol{A} 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} H = μ 1 B = μ 1 ( ∇ × A ) .
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} ∇ × H = μ 1 ( ∇ × A ) = J .
To obtain the weak form, we multiply the strong form with the test function A ′ \boldsymbol{A}^\prime A ′ 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
∫ Ω ( ∇ × H − J ) ⋅ A ′ d Ω = 0 ∫ Ω ( ∇ × H ) ⋅ A ′ d Ω − ∫ Ω J ⋅ A ′ 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} ∫ Ω ( ∇ × H − J ) ⋅ A ′ d Ω = 0 ∫ Ω ( ∇ × H ) ⋅ A ′ d Ω − ∫ Ω J ⋅ A ′ d Ω = 0.
Using the identity for divergence of a cross product on the first term we get
∫ Ω ∇ ⋅ ( H × A ′ ) d Ω + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ 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} ∫ Ω ∇ ⋅ ( H × A ′ ) d Ω + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ d Ω = 0.
Applying the divergence theorem on the first term we obtain
∫ Γ ( H × A ′ ) ⋅ n d Γ + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ 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} ∫ Γ ( H × A ′ ) ⋅ n d Γ + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ d Ω = 0.
Using the scalar triple product rule on the boundary term we get
∫ Γ ( n × H ) ⋅ A ′ d Γ + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ 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} ∫ Γ ( n × H ) ⋅ A ′ d Γ + ∫ Ω H ⋅ ( ∇ × A ′ ) d Ω − ∫ Ω J ⋅ A ′ d Ω = 0.
Subsituting (5) in the second term and by rearranging we get the final weak form as
∫ Ω 1 μ ( ∇ × A ) ⋅ ( ∇ × A ′ ) d Ω + ∫ Ω − J ⋅ A ′ 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} ∫ Ω μ 1 ( ∇ × A ) ⋅ ( ∇ × A ′ ) d Ω + ∫ Ω − J ⋅ A ′ d Ω + ∫ Γ ( n × H ) ⋅ A ′ d Γ = 0.
Imposes a zero tangential magnetic field n × H = 0 \boldsymbol{n} \times \boldsymbol{H} = 0 n × 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 B r \boldsymbol{B_r} 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 B r , x = 1 B_{r,x} = 1 B r , x = 1 , B r , y = 5 B_{r,y} = 5 B r , y = 5 and B r , z = 0 B_{r,z} = 0 B 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 B r , x = 1 T B_{r,x} = 1\:T B r , x = 1 T , B r , y = 5 T B_{r,y} = 5\:T B r , y = 5 T and B r , z = 0 T B_{r,z} = 0\:T B 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} 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.