# InfiniteStraightWire

class plasmapy.formulary.magnetostatics.InfiniteStraightWire(direction, p0: Quantity, current: Quantity)[source]

Bases: Wire

Infinite straight wire class.

Parameters:

Methods Summary

 Calculate magnetic field generated by this wire at position p.

Methods Documentation

magnetic_field(p) [source]

Calculate magnetic field generated by this wire at position p.

Parameters:

p (astropy.units.Quantity) – Three-dimensional position vector.

Returns:

B – Magnetic field at the specified position.

Return type:

astropy.units.Quantity

Notes

The magnetic field generated by a straight wire with infinite length and constant electric current is found at a point in 3D space using the Biot–Savart law.

Let the point where the magnetic field will be calculated be represented by the point $$p$$, a point on the wire by $$p_0$$, and the direction of the wire as the vector $$\vec{l}$$. The magnetic field $$\vec{B}$$ generated by the wire with constant current $$I$$ at point $$p$$ is then expressed using the Biot–Savart law which takes the form

$\vec{B} = \frac{\mu_0 I}{2\pi |\vec{r}|} \hat{B}$

where $$\mu_0$$ is the permeability of free space, $$|\vec{r}| = |\vec{l} \times (\vec{p} - \vec{p}_0)|$$ is the perpendicular distance between the wire and the point $$p$$, and

$\hat{B} = \frac{\vec{l} \times (\vec{p} - \vec{p}_0)} {|\vec{l} \times (\vec{p} - \vec{p}_0)|}$

is the unit vector in the direction of the magnetic field at point $$p$$.