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.
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.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


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.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+