ElectricCurrentDensityValue[pred,vars,pars]
represents a current density boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
ElectricCurrentDensityValue[pred,vars,pars,lkey]
represents a current density boundary condition with local parameters specified in pars[lkey].
ElectricCurrentDensityValue
ElectricCurrentDensityValue[pred,vars,pars]
represents a current density boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
ElectricCurrentDensityValue[pred,vars,pars,lkey]
represents a current density boundary condition with local parameters specified in pars[lkey].
Details
- ElectricCurrentDensityValue specifies a boundary condition for ElectricCurrentPDEComponent and is used as part of the modeling equation:
- ElectricCurrentDensityValue is used to model an electric current density
in [
], normal to the boundary, that enters or leaves through a boundary. - A positive value denotes an inward electric flow, and a negative value denotes an outward flow.
- ElectricCurrentDensityValue models an electric current density
, normal to the boundary, with dependent variable
in volts [
] and independent variables
in [
]. - Stationary variables vars are vars={V[x1,…,xn],{x1,…,xn}}.
- Frequency-dependent variables vars are vars={V[x1,…,xn],ω,{x1,…,xn}}.
- ElectricCurrentDensityValue with a specified scalar electric current density
, normal to the boundary, models: - ElectricCurrentDensityValue with a specified electric current density vector
[
], models: - with
a unit normal. - ElectricCurrentDensityValue with a specified current
[
], normal to the boundary, models: - with
[
] the boundary area. Currents are automatically converted to a normal electric current density
. - Model parameters pars are specified as for ElectricCurrentPDEComponent.
- The following additional model parameters pars can be given:
-
parameter default symbol "BoundaryUnitNormal" Automatic 
"Current" 
, electric current in [
]"CurrentDensity" {0,...}
, electric current density in [
]"NormalCurrentDensity" 
, normal electric current 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 convert the current
from units [
] to [
]. - To localize model parameters, a key lkey can be specified and values from association pars[lkey] are used for model parameters.
- A prescribed electric current density boundary condition can be used with:
-
analysis type applicable Frequency response Yes Stationary Yes - ElectricCurrentDensityValue evaluates to a NeumannValue.
- The boundary predicate pred can be specified as in NeumannValue.
- If the ElectricCurrentDensityValue 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 symbolic electric current density boundary condition:
ElectricCurrentDensityValue[x >= 0, {V[x, y], {x, y}}, <|"NormalCurrentDensity" -> Jn|>]Set up a symbolic electric current density boundary condition with a current density:
ElectricCurrentDensityValue[x >= 0, {V[x, y], {x, y}}, <|"CurrentDensity" -> {J0x, J0y}|>]Model a copper wire that is excited with a direct current (DC) of
[
] with a current density boundary condition at the lower-left boundary and with a zero electric potential condition at the lower-right boundary.
Set up the stationary current PDE model variables
and
:
vars = {V[x, y], {x, y}};
pars = <|"Material" -> Entity["Element", "Copper"]|>;op = ElectricCurrentPDEComponent[vars, pars];Define the geometry of the wire:
Ω = RegionUnion[Rectangle[{0, 0}, {1 / 3, 1}], Rectangle[{1 / 3, 2 / 3}, {2, 1}], Rectangle[{2 - 1 / 3, 0}, {2, 1}]];RegionPlot[Ω]Specify ground potential at the lower-right boundary:
Subscript[Γ, ground] = ElectricPotentialCondition[x >= 2 - 1 / 3 && y == 0, vars, pars, <|"ElectricPotential" -> 0|>];Specify an inward current flow at the lower-left boundary:
Subscript[Γ, source] = ElectricCurrentDensityValue[x <= 1 / 3 && y == 0, vars, pars, <|"Current" -> 1|>];Vfun = NDSolveValue[{op == Subscript[Γ, source], Subscript[Γ, ground]}, V, {x, y}∈Ω]Visualize the electric potential:
DensityPlot[Vfun[x, y], {x, y}∈Ω, ...]Scope (6)
Create an electric current density boundary condition:
ElectricCurrentDensityValue[x == 0, {V[x, y, z], {x, y, z}}, <|"CurrentDensity" -> {10, 0, 0}|>]Create an electric current density boundary condition with a boundary unit normal
:
ElectricCurrentDensityValue[x == 0, {V[x, y], {x, y}}, <|"CurrentDensity" -> {10, 0}, "BoundaryUnitNormal" -> {-1, 0}|>]Create an electric current density boundary condition with
:
ElectricCurrentDensityValue[x == 0, {V[x, y, z], {x, y, z}}, <|"NormalCurrentDensity" -> Jn|>]Create an electric current density boundary condition with a current
:
ElectricCurrentDensityValue[x == 0, {V[x, y, z], {x, y, z}}, <|"Current" -> I0|>]Create an electric current density boundary condition in 2D with a current
and a thickness
:
ElectricCurrentDensityValue[x == 0, {V[x, y], {x, y}}, <|"ElectricalConductivity" -> σ, "Thickness" -> d|>, <|"Current" -> I0|>]Create a parametric-frequency electric current density boundary condition:
ElectricCurrentDensityValue[x == 0, {V[x, y, z], ω, {x, y, z}}, <|"Current" -> (4I0 Subscript[ω, 0]/ π ω)|>]Applications (2)
3D Stationary Analysis (1)
Model a copper spiral inductor that is excited with a current density normal to the left boundary and has a zero electric potential boundary condition at the right boundary.
Define the spiral inductor geometry:
Ω = RegionUnion[Cuboid[{0, 0, 0}, {2, 1, 1}], Cuboid[{1, 1, 0}, {2, 8, 1}], Cuboid[{2, 7, 0}, {8, 8, 1}], Cuboid[{7, 7, 0}, {8, 0, 1}], Cuboid[{7, 0, 0}, {3, 1, 1}], Cuboid[{3, 1, 0}, {4, 6, 1}], Cuboid[{4, 6, 0}, {6, 5, 1}], Cuboid[{6, 5, 0}, {5, 2, 1}], Cuboid[{5, 2, 1}, {6, 3, 1.2}], Cuboid[{5, 2, 1.2}, {10, 3, 2.2}]]Set up the stationary current PDE model variables
and
:
vars = {V[x, y, z], {x, y, z}};
pars = <|"Material" -> Entity["Element", "Copper"]|>;Specify an inward current flow on the left boundary:
Subscript[Γ, source] = ElectricCurrentDensityValue[x == 0, vars, pars, <|"NormalCurrentDensity" -> 10|>];Subscript[Γ, ground] = ElectricPotentialCondition[x == 10, vars, pars];Vfun = NDSolveValue[{ElectricCurrentPDEComponent[vars, pars] == Subscript[Γ, source], Subscript[Γ, ground]}, V, {x, y, z}∈Ω]Compute the current density vector:
Jfield = -QuantityMagnitude[pars["Material"]["ElectricalConductivity"]] * Grad[Vfun[x, y, z], {x, y, z}];Visualize the current density magnitude:
SliceDensityPlot3D[Sqrt[Total[Jfield ^ 2]], {{"XStackedPlanes", 10}, {"YStackedPlanes", 10}, {"ZStackedPlanes", 5}}, {x, y, z}∈Ω, ...]Frequency Analysis (1)
Model a dielectric material of a cylindrical capacitor that is excited with an alternating current (AC ) of
[
], with a current density boundary condition at the upper boundary, which represents one of the capacitor electrodes, and with a zero electric potential boundary condition at the lower boundary.
Set up the frequency current PDE model variables
:
vars = {V[x, y, z], ω, {x, y, z}};Define the frequency and the period:
f0 = 60;
T0 = 1 / f0;r0 = 0.01;
h = 0.001;
Ω = Cylinder[{{0, 0, 0}, {0, 0, h}}, r0];Specify an electrical conductivity
and a relative permittivity
:
pars = <|"ElectricalConductivity" -> 1*^-8, "RelativePermittivity" -> 2|>;Specify the ground potential at the lower boundary:
Subscript[Γ, ground] = ElectricPotentialCondition[z == 0, vars, pars];Specify an inward current flow at the upper boundary:
Subscript[Γ, current] = ElectricCurrentDensityValue[z == h, vars, pars, <|"Current" -> 1*^-7|>];op = ElectricCurrentPDEComponent[vars, pars];Solve the harmonic PDE for
[
]:
Vfun = NDSolveValue[{(op /. {ω -> 2 Pi f0}) == Subscript[Γ, current], Subscript[Γ, ground]}, V, {x, y, z}∈Ω]Transform the voltage at the upper boundary to the time domain:
Vlist = Table[{t, Re[Vfun[0, 0, h] * Exp[I ω t] /. {ω -> 2 Pi f0}]}, {t, 0, 3 * T0, T0 / 100}];Visualize the voltage at the upper plate of the capacitor:
ListLinePlot[Vlist]Tech Notes
Related Guides
History
Text
Wolfram Research (2024), ElectricCurrentDensityValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ElectricCurrentDensityValue.html.
CMS
Wolfram Language. 2024. "ElectricCurrentDensityValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ElectricCurrentDensityValue.html.
APA
Wolfram Language. (2024). ElectricCurrentDensityValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ElectricCurrentDensityValue.html
BibTeX
@misc{reference.wolfram_2026_electriccurrentdensityvalue, author="Wolfram Research", title="{ElectricCurrentDensityValue}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ElectricCurrentDensityValue.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_electriccurrentdensityvalue, organization={Wolfram Research}, title={ElectricCurrentDensityValue}, year={2024}, url={https://reference.wolfram.com/language/ref/ElectricCurrentDensityValue.html}, note=[Accessed: 12-June-2026]}