GeneralWire
- class plasmapy.formulary.magnetostatics.GeneralWire(parametric_eq, t1, t2, current: Quantity)[source]
Bases:
Wire
General wire class described by its parametric vector equation.
- Parameters:
Methods Summary
magnetic_field
(p[, n])Calculate magnetic field generated by this wire at position
p
.Methods Documentation
- magnetic_field(p: Quantity, n: int = 1000) Quantity [source]
Calculate magnetic field generated by this wire at position
p
.- Parameters:
- Returns:
B – Magnetic field at the specified position.
- Return type:
Notes
The magnetic field generated by a wire with constant electric current is found at a point in 3D space by approximating the Biot–Savart law.
Let the point where the magnetic field will be calculated be represented by the point \(p\) (with associated position vector \(\vec{p}\)) and the curve \(C\) defining the wire by the parametric vector equation \(\vec{l}(t)\) with \(t_{\min} \leq t \leq t_{\max}\). Further, let the displacement vector from the wire to the point \(p\) be written as \(\vec{r}(t) = \vec{p} - \vec{l}(t)\).
The magnetic field \(\vec{B}\) generated by the wire with constant current \(I\) at point \(p\) can then be expressed using the Biot–Savart law, which takes the form
\[\vec B = \frac{\mu_0 I}{4\pi} \int_C \frac{d\vec{l} \times \vec{r}}{|\vec{r}|^3}\]where \(\mu_0\) is the permeability of free space.
This line integral is approximated by segmenting the wire into \(n\) straight pieces of equal length. The \(i\text{th}\) wire element can be written as \(\Delta\vec{l}_i = \vec{l}(t_i) - \vec{l}(t_{i - 1})\) where \(t_i = t_{\min} + i(t_{\max}-t_{\min})/n\). Further, the displacement vector from the center of the \(i\text{th}\) wire element to the position \(\vec{p}\) is \(\vec{r}_i = \vec{p} - \frac{\vec{l}(t_i) + \vec{l}(t_{i-1})}{2}\).
The integral is then approximated as
\[\vec B \approx \frac{\mu_0 I}{4\pi} \sum_{i=1}^{n}\frac{\vec{\Delta l}_i \times \vec{r}_i}{\left| \vec{r}_i \right|^3}.\]