# FiniteStraightWire¶

class plasmapy.formulary.magnetostatics.FiniteStraightWire(p1: Unit(‘m’), p2: Unit(‘m’), current: Unit(‘A’))

Finite length straight wire class.

The p1 to p2 direction is the positive current direction.

Parameters
• p1 (Quantity) – Three-dimensional Cartesian coordinate of one end of the straight wire.

• p2 (Quantity) – Three-dimensional Cartesian coordinate of another end of the straight wire.

• current (astropy.units.Quantity) – Electric current.

Methods Summary

 Calculate magnetic field generated by this wire at position p Convert this Wire into a GeneralWire.

Methods Documentation

magnetic_field(p)

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

Let $$P_f$$ be the foot of perpendicular, $$θ_1$$ ($$θ_2$$) be the angles between $$\overrightarrow{PP_1}$$ ($$\overrightarrow{PP_2}$$) and $$\overrightarrow{P_2P_1}$$.

to_GeneralWire()

Convert this Wire into a GeneralWire.