MagnetostaticPDEComponent[vars,pars]
yields a current-free magnetostatic PDE term with variables vars and pars.
MagnetostaticPDEComponent
MagnetostaticPDEComponent[vars,pars]
yields a current-free magnetostatic PDE term with variables vars and pars.
Details
- MagnetostaticPDEComponent is typically used to generate a magnetostatic equation for permanent magnets with model variables vars and model parameters pars.
- MagnetostaticPDEComponent returns a sum of differential operators to be used as a part of partial differential equations:
- MagnetostaticPDEComponent models static magnetic fields produced by permanent magnets and other current-free magnetic sources.
- MagnetostaticPDEComponent models magnetostatic phenomena with the dependent variable
and the magnetic scalar potential.
is in units of amperes [
], independent variables
in units of [
]. - Stationary variables vars are vars={Vm[x1,…,xn],{x1,…,xn}}.
- MagnetostaticPDEComponent generally does not produces a time-dependent PDE.
- To model permanent magnets, the MagnetostaticPDEComponent equation is given as:
is the vacuum permeability in units of [
] and
the magnetization vector in units of [
].- The magnetization vector
specifies the magnetic dipole moment per unit volume within a material, indicating the strength and direction of its magnetic properties. - An alternative to the magnetization vector
, is the remanent magnetic flux density vector
in units of [
]. The MagnetostaticPDEComponent equation is given as:
is the unitless recoil permeability.- For linear materials, like iron, the MagnetostaticPDEComponent equation simplifies to:
is the unitless relative permeability.
can be isotropic, orthotropic or anisotropic.
can be a function of the magnetic field and describe nonlinear materials.- The implicit default boundary condition for the magnetostatic model is a 0 MagneticFluxDensityValue.
- The units of the magnetostatic model terms are in [
]. - The following parameters pars can be given:
-
parameter default symbol "Magnetization" {0,…}
, magnetization vector in [
]"RegionSymmetry" None 
"RelativePermeability" 1
, unitless relative permeability"RemanentMagneticFluxDensity" {0,…}
, remanent magnetic flux density in [
]"Thickness" 1
, thickness in [
] "VacuumPermeability" 
, vacuum permeability in [
] - All parameters may depend on the spatial variable
and dependent variable
. - The number of independent variables
determines the dimensions of
or
and the length of vectors
,
and
. - The models are available in a 2D, a 2D axisymmetric and a 3D form.
- A possible choice for the parameter "RegionSymmetry" is "Axisymmetric".
- "Axisymmetric" region symmetry represents a truncated cylindrical coordinate system where the cylindrical coordinates are reduced by removing the angle variable as follows:
-
dimension reduction equation 2D 

- In 2D, when a "Thickness"
is specified, the MagnetostaticPDEComponent equation is given as: - The input specification for the parameters is exactly the same as for their corresponding operator terms.
- If no parameters are specified, the default magnetostatic PDE is:
- If the MagnetostaticPDEComponent depends on parameters
that are specified in the association pars as …,keypi…,pivi,…, the parameters
are replaced with
.
Examples
open all close allBasic Examples (3)
Define a default magnetostatic PDE model:
MagnetostaticPDEComponent[{Subscript[V, m][x, y], {x, y}}, <||>]Set up a magnetostatic model with particular material parameters:
MagnetostaticPDEComponent[{Subscript[V, m][x, y, z], {x, y, z}}, <|"RelativePermeability" -> Subscript[μ, 𝓇]|>]To model a permanent magnet in 2D with a rectangular cross section, define the mesh to use:
mesh = \!\(\*GraphicsBox[«2»]\);Visualize the internal boundaries of the magnet region:
Show[HighlightMesh[mesh, {...}], PlotRange -> {{-0.08, 0.08}, {-0.15, 0.15}}]Solve the magnetostatic PDE model with a magnet transversely magnetized in the direction of the
axis:
VmFun = NDSolveValue[{MagnetostaticPDEComponent[{Vm[x, y], {x, y}}, <|"Magnetization" -> {0, Piecewise[{{400000, RegionMember[Rectangle[{-0.05, -0.1}, {0.05, 0.1}]][{x, y}]}}, 0]}|>] == 0, MagneticPotentialCondition[x == -1 || x == 1 || y == -1 || y == 1, {Vm[x, y], {x, y}}, <||>]}, Vm, {x, y}∈mesh]Show[Graphics[{Gray, Rectangle[{-0.05, -0.1}, {0.05, 0.1}]}], StreamPlot[Evaluate[-Grad[VmFun[x, y], {x, y}]], {x, -0.3, 0.3}, {y, -0.3, 0.3}, StreamColorFunction -> "Rainbow"]]Scope (3)
Specify a magnetostatic PDE with a magnetization vector of
in units of [
]:
MagnetostaticPDEComponent[{Subscript[V, m][x, y], {x, y}}, <|"Magnetization" -> {0, Quantity[200000, "Amperes"/"Meters"]}|>]Define a symbolic 2D axisymmetric magnetostatic PDE:
MagnetostaticPDEComponent[{Subscript[V, m][r, z], {r, z}}, <|"RelativePermeability" -> Subscript[μ, 𝓇], "VacuumPermeability" -> Subscript[μ, 0], "RegionSymmetry" -> "Axisymmetric"|>]Define a 3D magnetostatic model with particular material parameters:
MagnetostaticPDEComponent[{Subscript[V, m][x, y, z], {x, y, z}}, <|"RelativePermeability" -> Subscript[μ, rec], "VacuumPermeability" -> Subscript[μ, 0], "RemanentMagneticFluxDensity" -> {Brx[x, y, z], Bry[x, y, z], Brz[x, y, z]}|>]Applications (1)
To model a 3D cylinder permanent magnet, set up variables:
vars = {Vm[x, y, z], {x, y, z}};Define the magnet region of height
[
] and radius
[
]:
magnet = Cylinder[{{0, 0, -1 / 10}, {0, 0, 1 / 10}}, 1 / 10];Define the magnetization vector:
pars = <|"Magnetization" -> {0, 0, Piecewise[{{1*^5, RegionMember[magnet][{x, y, z}]}}, 0]}|>;Subscript[Γ, p] = MagneticPotentialCondition[x ^ 2 + y ^ 2 + z ^ 2 >= 2 ^ 2, vars, pars]Set up the mesh with a sphere of air of
[
] that represents the surrounding volume:
mesh = \!\(\*Graphics3DBox[«5»]\);Visualize the magnet cylinder that is inside the mesh:
Show[Graphics3D[{Opacity[0.1], magnet}, Boxed -> False], HighlightMesh[RegionBoundary[mesh], {}, PlotTheme -> "Lines"]]Set up the magnetostatIc PDE component:
op = MagnetostaticPDEComponent[vars, pars];VmFun = NDSolveValue[{op == 0, Subscript[Γ, p]}, Vm, {x, y, z}∈mesh]Show[Graphics3D[{LightGray, magnet}], StreamPlot3D[Evaluate[-Grad[VmFun[x, y, z], {x, y, z}]], {x, -0.5, 0.5}, {y, -0.5, 0.5}, {z, -0.5, 0.5}, ...], Rule[...]]Related Guides
History
Text
Wolfram Research (2025), MagnetostaticPDEComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/MagnetostaticPDEComponent.html.
CMS
Wolfram Language. 2025. "MagnetostaticPDEComponent." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MagnetostaticPDEComponent.html.
APA
Wolfram Language. (2025). MagnetostaticPDEComponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MagnetostaticPDEComponent.html
BibTeX
@misc{reference.wolfram_2026_magnetostaticpdecomponent, author="Wolfram Research", title="{MagnetostaticPDEComponent}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MagnetostaticPDEComponent.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_magnetostaticpdecomponent, organization={Wolfram Research}, title={MagnetostaticPDEComponent}, year={2025}, url={https://reference.wolfram.com/language/ref/MagnetostaticPDEComponent.html}, note=[Accessed: 12-June-2026]}