Magnetic Fields for a Pair of Parallel Currents and for a Ring Current

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

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.


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.


Contributed by: Y. Shibuya (September 2012)
Open content licensed under CC BY-NC-SA



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.

Ring Current

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 .


[1] G. Lehner, Electromagnetic Field Theory for Engineers and Physicists, 1st ed. (M. Horrer, trans.), New York: Springer, 2009.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.