Magnetic Fields for a Pair of Parallel Currents and for a Ring Current
This Demonstration calculates magnetic fields for a pair of oppositely directed parallel currents and also for the cross-section of a ring current passing through the plane. The currents are assumed to be filamentary in either case.[more]
For a pair of parallel currents, the magnetic field pattern depends on the separation distance .
For a ring current, the magnetic field is calculated using a complete elliptic integral. The pattern depends on the ring radius .
In both cases, you can vary the current and length . The magnetic field and energy intensities are indicated by variations in color.[less]
Snapshot 1: pair of opposing parallel currents , separated by a small distance
Snapshot 2: ring current of for ring of diameter 1 m
Snapshot 3: a ring current with small diameter; the field resembles that of a magnetic dipole
In the both cases, the magnetic fields are calculated from vector potential using .
The energy density is given by .
The vector potential is determined as follows.
Pair of Opposing Parallel Currents
Designating the line current vector by and the separation length by , we find , where , are the distances to the currents.
Using cylindrical coordinates with current and radius , we find , , , where is the distance to the center, and .
In the actual calculation, Cartesian coordinates are used and the symmetry axis is changed from to .
 G. Lehner, Electromagnetic Field Theory for Engineers and Physicists, 1st ed. (M. Horrer, trans.), New York: Springer, 2009.