Skip to content

Magnetism 𝜑-formulation

The Magnetism 𝜑 formulation solves for the magnetic scalar potential to describe magnetostatic fields. This approach is particularly efficient for large 3D non-conducting domains, where using the magnetic vector potential A\boldsymbol{A} would require a significantly higher number of degrees of freedom.

Our starting points along with the material relation are

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

Under the assumption of no current flow (J=0\boldsymbol{J} = 0), Gauss’s law for magnetism and Ampere’s law state

B=0×H=0.\begin{align*} \nabla \cdot \boldsymbol{B} &= 0 \tag{4} \\[5pt] \nabla \times \boldsymbol{H} &= 0. \tag{5} \end{align*}

The curl of H\boldsymbol{H} is zero, so H\boldsymbol{H} is a conservative field, meaning there exists a scalar function φ\varphi such that

H=φ.\begin{align*} \boldsymbol{H} = -\nabla \varphi. \tag{6} \end{align*}

Here, φ\varphi is called the magnetic scalar potential. Substituting (5)\text{(5)} and the constitutive relation B=μH\boldsymbol{B} = \mu \boldsymbol{H} into Gauss’s law for magnetism we get

μH=0μφ=0,\begin{align*} \nabla \cdot \mu \boldsymbol{H} &= 0 \tag{7} \\[5pt] \nabla \cdot \mu \nabla \varphi &= 0, \tag{8} \end{align*}

resulting in Laplace’s equation.

To obtain the weak form, multiply (8)\text{(8)} by the test function φ\varphi^{\prime} and integrate over the domain Ω\Omega:

Ω  (μφ)  φ  dΩ=0.\begin{align*} \int_{\Omega}\; \nabla \cdot (\mu \nabla \varphi)\; \varphi^{\prime}\; d \Omega = 0. \tag{9} \end{align*}

Using the Leibniz rule for nabla operator on the divergence term we get

Ω  (φ  μφ)  dΩ+Ω  (φμφ)  dΩ=0.\begin{align*} \int_{\Omega}\; \nabla \cdot (\varphi^{\prime}\; \mu \nabla \varphi)\; d \Omega + \int_{\Omega}\; -(\nabla \varphi^{\prime} \cdot \mu \nabla \varphi)\; d \Omega = 0. \tag{10} \end{align*}

Applying the divergence theorem on the divergence term we get

Γ  μφn φ  dΓ+Ω  (μφφ)  dΩ=0.\begin{align*} \int_{\Gamma}\; \mu \nabla \varphi \cdot \boldsymbol{n}\ \varphi^{\prime}\; d \Gamma + \int_{\Omega}\; -(\mu\nabla \varphi \cdot \nabla \varphi^{\prime})\; d \Omega = 0. \tag{11} \end{align*}

Rearranging the terms and using relation B=μH=μφ\boldsymbol{B} = \mu \boldsymbol{H} = -\mu \nabla \varphi on the Neumann term, we obtain the final weak formulation

Ω  (μφφ)  dΩ+Γ  (Bn)  φ  dΓ=0.\begin{align*} \int_{\Omega}\; (-\mu\nabla \varphi \cdot \nabla \varphi^{\prime})\; d \Omega + \int_{\Gamma}\; (-\boldsymbol{B} \cdot \boldsymbol{n}) \; \varphi^{\prime}\; d \Gamma = 0. \tag{12} \end{align*}

Applies a fixed value to the scalar potential 𝜑. Use this when you need to fix scalar potential at a node or within a region. This is often used as a gauge condition to ensure a unique solution.

How to useProvide a scalar field value in point or region in Amperes
Example𝜑𝜑 = 1000 applies a magnetic scalar potential of 1000 A to the specified region.
UnitMagnetic scalar potential in Amperes (A)

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 useYou can use either the matrix editor or the expression editor. With the matrix editor, provide a 3×1 matrix for a 3D problem (2×1 for 2D, etc.) with remanence field vector values for each dimension. In the expression editor, write the direct expression.
Example[1; 5; 0] applies a 3D remanence field of Br,x=1TB_{r,x} = 1\:T, Br,y=5TB_{r,y} = 5\:T and Br,z=0TB_{r,z} = 0\:T to the specified region. Same principles apply for 2D. See also Adding spatially varying remanence field to permanent magnets.
UnitRemanence magnetic field in Teslas (T)

Applies a lumped magnetic scalar potential 𝜑𝜑 or magnetic flux ΦΦ to a curve in the domain. Used to drive magnetomotive force or magnetic flux through a specific path, such as along a coil, without resolving the full field distribution.

How to useSpecify the target curve. From Actuation mode, select either magnetic scalar potential, magnetic flux or circuit coupling. Fill in the value.
Example𝜑=1000𝜑 = 1000 applies a magnetic scalar potential of 1000 A to the specified curve.
UnitMagnetic scalar potential in Amperes (A) or magnetic flux in Webers (Wb)

Applies a lumped current II or voltage VV through a cut surface in the domain. In the magnetic scalar potential formulation, cuts are required to make the domain simply connected, ensuring a unique solution for 𝜑. This interaction is used to drive current or voltage through conducting regions such as coils, without explicitly resolving the detailed field distribution inside the conductor.

How to useSpecify the target curve (must be a closed boundary of some surface). From Actuation mode, select either current, voltage or circuit coupling. Fill in the value.
ExampleI=100I = 100 applies 100 Amperes through the cut surface. See also Lump I/V Cut in Induction motor.
UnitCurrent in Amperes (A) or voltage in Volts (V)

Applies an external magnetic flux density Bext\boldsymbol{B}_{ext} to the simulation domain. This represents an imposed background field that interacts with the model. The field can be specified as a constant vector or spatially varying field.

How to useYou can use either the matrix editor or the expression editor. With the matrix editor, provide a 3×1 matrix for a 3D problem (2×1 for 2D, etc.) with external magnetic field values for each dimension. In the expression editor, write the direct expression.
Example[1; 5; 0] applies a 3D external magnetic field of Bext,x=1TB_{ext,x} = 1\:T, Bext,y=5TB_{ext,y} = 5\:T and Bext,z=0TB_{ext,z} = 0\:T to the specified region. Same principles apply for 2D.
UnitExternal magnetic field in Teslas (T)

Imposes periodic boundary conditions on the magnetic scalar potential 𝜑𝜑 between two boundaries. Reduces the computational domain size for geometrically symmetric or antisymmetric problems, avoiding the need to model the full geometry.

ExamplePeriodicity follows the same principles, regardless of which physics module it belongs to. See how periodicity is used in magnetism as a reference: Periodicity in electric motors

Ensures continuity of the magnetic scalar potential φ\varphi across an interface between two boundaries. Used to map the magnetic field continuously.

ExampleContinuity follows the same principles, regardless of which physics module it belongs to. See how continuity is used in magnetism as a reference: Continuity in electric motors