MagneticFluxDensity[vars,pars,spotential]
yields the magnetic flux density from the scalar magnetic potential spotential
.
MagneticFluxDensity[vars,pars,vpotential]
yields the magnetic flux density from the vector magnetic potential vpotential
.
MagneticFluxDensity
MagneticFluxDensity[vars,pars,spotential]
yields the magnetic flux density from the scalar magnetic potential spotential
.
MagneticFluxDensity[vars,pars,vpotential]
yields the magnetic flux density from the vector magnetic potential vpotential
.
Details
- MagneticFluxDensity is typically used to compute the magnetic flux density
, also called the magnetic induction, from a potential. - Since a magnetic potential is not directly measurable, the magnetic flux density is often used as a proxy.
- Typically, spotential is the result of solving a MagnetostaticPDEComponent PDE or vpotential of a MagneticPDEComponent PDE.
- For a magnetic scalar potential
in units of amperes [
] MagneticFluxDensity computes:
is the magnetic flux density in units of [
],
is the unitless relative permeability,
is the vacuum permeability in units of [
] and
the magnetization vector in units of [
].- For a magnetic vector potential
in units of [
], MagneticFluxDensity computes: - The magnetic flux density
has units of [
] or, alternatively, [
]. - MagneticFluxDensity uses the same variables vars specification as MagnetostaticPDEComponent or MagneticPDEComponent.
- MagneticFluxDensity uses the same parameter pars specification as MagnetostaticPDEComponent or MagneticPDEComponent.
Examples
open all close allBasic Examples (2)
Compute the magnetic flux density for a scalar
:
MagneticFluxDensity[{Vm[x, y], {x, y}}, <|"VacuumPermeability" -> Subscript[μ, 0]|>, Subscript[V, m][x, y]]Compute the magnetic flux density for a vector potential
:
MagneticFluxDensity[{{Ax[x, y, z], Ay[x, y, z], Az[x, y, z]}, {x, y, z}}, <|"VacuumPermeability" -> Subscript[μ, 0]|>, {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]}]Scope (3)
Compute the magnetic flux density for a scalar
with magnetization vector component
:
MagneticFluxDensity[{Vm[x, y], {x, y}}, <|"VacuumPermeability" -> Subscript[μ, 0], "Magnetization" -> {Subscript[M, x][x, y], 0}|>, Subscript[V, m][x, y]]Compute the magnetic flux density for a vector potential
with magnetization vector component
:
MagneticFluxDensity[{{Ax[x, y, z], Ay[x, y, z], Az[x, y, z]}, {x, y, z}}, <|"VacuumPermeability" -> Subscript[μ, 0], "Magnetization" -> {0, Subscript[M, z][x, y, z], 0}|>, {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]}]Compute a reduced magnetic flux density for a vector potential
:
MagneticFluxDensity[{{0, 0, Az[x, y]}, {x, y}}, <|"VacuumPermeability" -> Subscript[μ, 0]|>, {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]}]Applications (2)
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}}]Set up the variables and parameters:
vars = {Vm[x, y], {x, y}};
pars = <|"Magnetization" -> {0, Piecewise[{{400000, RegionMember[Rectangle[{-0.05, -0.1}, {0.05, 0.1}]][{x, y}]}}, 0]}|>;Solve the magnetostatic PDE model with a magnet transversely magnetized in the direction of the
axis:
VmFun = NDSolveValue[{MagnetostaticPDEComponent[vars, pars] == 0, MagneticPotentialCondition[x == -1 || x == 1 || y == -1 || y == 1, vars, pars]}, Vm[x, y], {x, y}∈mesh]Compute the magnetic flux density:
fluxDensity = MagneticFluxDensity[vars, pars, VmFun]Visualize the magnetic flux density:
Show[Graphics[{Gray, Rectangle[{-0.05, -0.1}, {0.05, 0.1}]}], StreamPlot[fluxDensity, {x, -0.3, 0.3}, {y, -0.3, 0.3}, StreamColorFunction -> "Rainbow"]]To model a long wire of circular cross section, define the mesh to use:
mesh = [image];wireRegion = Disk[{0, 0}, 0.2];Set up the variables and parameters:
vars = {{0, 0, Az[x, y]}, {x, y}};
pars = <|"ExternalCurrentSource" -> {0, 0, Piecewise[{{1, RegionMember[wireRegion][{x, y}]}}, 0]}|>;Solve the magnetic PDE model with a uniform current density in the
direction in the wire:
AFun = NDSolveValue[{MagneticPDEComponent[vars, pars] == 0, MagneticPotentialCondition[x ^ 2 + y ^ 2 >= 1, vars, pars]}, vars[[1]], {x, y}∈mesh]Compute the magnetic flux density:
fluxDensity = MagneticFluxDensity[vars, pars, AFun]Visualize the magnetic flux density:
Show[StreamPlot[fluxDensity, {x, y}∈mesh], Graphics[{Darker[Orange], wireRegion}]]Related Guides
History
Text
Wolfram Research (2026), MagneticFluxDensity, Wolfram Language function, https://reference.wolfram.com/language/ref/MagneticFluxDensity.html.
CMS
Wolfram Language. 2026. "MagneticFluxDensity." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MagneticFluxDensity.html.
APA
Wolfram Language. (2026). MagneticFluxDensity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MagneticFluxDensity.html
BibTeX
@misc{reference.wolfram_2026_magneticfluxdensity, author="Wolfram Research", title="{MagneticFluxDensity}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/MagneticFluxDensity.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_magneticfluxdensity, organization={Wolfram Research}, title={MagneticFluxDensity}, year={2026}, url={https://reference.wolfram.com/language/ref/MagneticFluxDensity.html}, note=[Accessed: 12-June-2026]}