GeneralWire¶
-
class
plasmapy.formulary.magnetostatics.
GeneralWire
(parametric_eq, t1, t2, current: Unit(‘A’))¶ Bases:
plasmapy.formulary.magnetostatics.Wire
General wire class described by its parametric vector equation
- Parameters
parametric_eq (Callable) – A vector-valued (with units of position) function of a single real parameter.
t1 (float) – lower bound of the parameter, smaller than t2
t2 (float) – upper bound of the parameter, larger than t1
current (
astropy.units.Quantity
) – electric current
Methods Summary
magnetic_field
(p[, n])Calculate magnetic field generated by this wire at position
p
Methods Documentation
-
magnetic_field
(p: Unit(‘m’), n: numbers.Integral = 1000)¶ Calculate magnetic field generated by this wire at position
p
- Parameters
p (
astropy.units.Quantity
) – three-dimensional position vectorn (int, optional) – Number of segments for Wire calculation (defaults to 1000)
- Returns
B – magnetic field at the specified positon
- Return type
Notes
For simplicity, we segment the wire into n equal pieces, and assume each segment is straight. Default n is 1000.
\[\vec B \approx \frac{\mu_0 I}{4\pi} \sum_{i=1}^{n} \frac{[\vec l(t_{i}) - \vec l(t_{i-1})] \times \left[\vec p - \frac{\vec l(t_{i}) + \vec l(t_{i-1})}{2}\right]} {\left|\vec p - \frac{\vec l(t_{i}) + \vec l(t_{i-1})}{2}\right|^3}, \quad \text{where}\, t_i = t_{\min}+i/n*(t_{\max}-t_{\min})\]