MagneticFluxDensityValue[pred,vars,pars]
represents a magnetic flux density boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
MagneticFluxDensityValue[pred,vars,pars,lkey]
represents a magnetic flux density boundary condition with local parameters specified in pars[lkey].
MagneticFluxDensityValue
MagneticFluxDensityValue[pred,vars,pars]
represents a magnetic flux density boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
MagneticFluxDensityValue[pred,vars,pars,lkey]
represents a magnetic flux density boundary condition with local parameters specified in pars[lkey].
Details
- MagneticFluxDensityValue specifies a Neumann boundary value for the MagnetostaticPDEComponent.
- MagneticFluxDensityValue specifies a boundary condition for the MagnetostaticPDEComponent and is used as part of the modeling equation:
- MagneticFluxDensityValue is typically used to model a magnetic flux density
field in units of [
] that enters or leaves a boundary. - A positive value denotes the inward magnetic flux, and a negative value denotes an outward flux.
- MagneticFluxDensityValue models a magnetic flux density
, normal to the boundary with dependent variable
in volts [
] and independent variables
in [
]. - Stationary variables vars are vars={Vm[x1,…,xn],{x1,…,xn}}.
- The linear form of MagnetostaticPDEComponent with vacuum permeability
in units of [
] and relative permeability
is given by: - MagneticFluxDensityValue with a specified scalar magnetic flux density
, normal to the boundary, models: - MagneticFluxDensityValue models a specified magnetic flux density vector
[
] with unit normal
: - Model parameters pars are specified as for MagnetostaticPDEComponent.
- The following additional model parameters pars can be given:
-
parameter default symbol "BoundaryUnitNormal" Automatic 
"MagneticFluxDensity" {0,...}
, magnetic flux density in [
]"NormalMagneticFluxDensity" 
, normal magnetic flux density in [
]"Thickness" 
, thickness in [
] - All model parameters may depend on the spatial variables
. - In two dimensions, the parameter "Thickness" is taken into account.
- To localize model parameters, a key lkey can be specified, and values from association pars[lkey] are used for model parameters.
- MagneticFluxDensityValue evaluates to a NeumannValue.
- The boundary predicate pred can be specified as in NeumannValue.
- If the MagneticFluxDensityValue 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)
Set up a magnetic flux density boundary condition:
MagneticFluxDensityValue[{x, y}∈Subscript[Γ, b], {Subscript[V, m][x, y], {x, y}}, <|"MagneticFluxDensity" -> {B0x, B0y}|>]Set up a normal magnetic flux density at the boundary:
MagneticFluxDensityValue[{x, y}∈Subscript[Γ, b], {Subscript[V, m][x, y], {x, y}}, <|"NormalMagneticFluxDensity" -> Subscript[B, n]|>]Set up a normal magnetic flux density at a boundary for a 2D magnetostatic model that has a thickness
:
MagneticFluxDensityValue[{x, y}∈Subscript[Γ, b], {V[x, y], {x, y}}, <|"Thickness" -> d|>, <|"NormalMagneticFluxDensity" -> Subscript[B, n]|>]Scope (2)
Create a magnetic flux density boundary condition with a boundary unit normal
:
MagneticFluxDensityValue[x == 0, {Subscript[V, m][x, y, z], {x, y, z}}, <|"MagneticFluxDensity" -> {10, 0, 0}, "BoundaryUnitNormal" -> {-1, 0, 0}|>]Create a normal magnetic flux density boundary condition:
MagneticFluxDensityValue[y == 0, {Subscript[V, m][x, y, z], {x, y, z}}, <| "RelativePermeability" -> Subscript[μ, r], "VacuumPermeability" -> Subscript[μ, 0]|>, <|"NormalMagneticFluxDensity" -> Subscript[B, n]|>]Applications (1)
Model an iron cube embedded inside air and emerged in a homogeneous magnetic field of
[
] directed along the
axis. The domain is composed of an iron cube of length
[
]. Due to symmetry, only 1/8 of the whole domain is simulated. The air boundary surrounding the iron cube is modeled as a second cube of length
[
].
mesh = \!\(\*Graphics3DBox[«6»]\);The mesh has internal boundaries that represent the inner iron cube.
ironCube = Cuboid[{0, 0, 0}, {0.02, 0.02, 0.02}];Visualize a wireframe of the mesh with the iron cube inside:
Show[HighlightMesh[RegionBoundary[mesh], {}, PlotTheme -> "Lines"], Graphics3D[{Gray, ironCube}]]vars = {Vm[x, y, z], {x, y, z}};The parameters to be used are the permeability of vacuum
and iron
.
pars = <|"RelativePermeability" -> Piecewise[{{1000.0, RegionMember[ironCube][{x, y, z}]}}, 1] * IdentityMatrix[3]|>;To specify the homogeneous magnetic field across the domain, an outward magnetic flux density
normal to the boundary at
is specified.
Set up the magnetic flux density condition:
fluxDensity = 1;
Subscript[Γ, n] = MagneticFluxDensityValue[z == 0.1, vars, pars, <|"NormalMagneticFluxDensity" -> -fluxDensity|>]Solve the magnetostatic PDE model:
VmFun = NDSolveValue[{MagnetostaticPDEComponent[vars, pars] == Subscript[Γ, n], MagneticPotentialCondition[z == 0, vars, pars, <||>]}, Vm, {x, y, z}∈mesh]Compute the magnetic field intensity:
HField = -Grad[VmFun[x, y, z], {x, y, z}];Show[Graphics3D[{{Gray, ironCube}}, Boxed -> False], VectorPlot3D[HField, {x, y, z}∈mesh]]Related Guides
History
Text
Wolfram Research (2025), MagneticFluxDensityValue, Wolfram Language function, https://reference.wolfram.com/language/ref/MagneticFluxDensityValue.html.
CMS
Wolfram Language. 2025. "MagneticFluxDensityValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MagneticFluxDensityValue.html.
APA
Wolfram Language. (2025). MagneticFluxDensityValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MagneticFluxDensityValue.html
BibTeX
@misc{reference.wolfram_2026_magneticfluxdensityvalue, author="Wolfram Research", title="{MagneticFluxDensityValue}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MagneticFluxDensityValue.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_magneticfluxdensityvalue, organization={Wolfram Research}, title={MagneticFluxDensityValue}, year={2025}, url={https://reference.wolfram.com/language/ref/MagneticFluxDensityValue.html}, note=[Accessed: 12-June-2026]}