CircularWire
- class plasmapy.formulary.magnetostatics.CircularWire( )[source]
Bases:
Wire
Circular wire (coil) class.
- Parameters:
Methods Summary
Calculate magnetic field generated by this wire at position
p
.Convert this
Wire
into aGeneralWire
.Methods Documentation
- magnetic_field(p) Quantity [source]
Calculate magnetic field generated by this wire at position
p
.- Parameters:
p (
Quantity
) – Three-dimensional position vector.- Returns:
B – Magnetic field at the specified position.
- Return type:
Notes
The magnetic field generated by a circular wire with constant electric current is found at a point in 3D space using the Biot–Savart law. The integral in the Biot–Savart law is approximated using the Gauss–Legendre quadrature.
Let the point where the magnetic field will be calculated be represented by the point \(p\) and the wire be represented by the parametric vector equation
\[\vec{l}(θ) = R\cos{θ} \hat{x} + R\sin{θ} \hat{y},\quad -π ≤ θ ≤ π\]where \(R\) is the radius of the circular wire. Further, let the displacement vector from a point on the wire to the point \(p\) be written as \(\vec{r}(θ) = \vec{p} - \vec{l}(θ)\).
The magnetic field \(B\) due to a current \(I\) is then found at the point \(p\) using the Biot–Savart law, which takes the form
\[\vec{B} = \frac{μ_0 I}{4π} \int_C \frac{d\vec{l} × \vec{r}}{|\vec{r}|^3}.\]This line integral is approximated using the Gauss–Legendre quadrature with \(n\) sample points:
\[\hat{B} ≈ \frac{μ_0 I}{4π} \sum_{i=1}^n w_i \frac{Δ\vec{l}(π x_i) × \vec{r}(π x_i)} {|\vec{r}(π x_i)|^3}\]where \(w_i\) is the \(i\text{th}\) quadrature weight and \(x_i\) is the \(i\text{th}\) root of the \(n\text{th}\) Legendre polynomial.
- to_GeneralWire()[source]
Convert this
Wire
into aGeneralWire
.