1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

6) How does computer software plot magnetic field lines?

  1. Apr 25, 2010 #1
    How does computer software plot magnetic field lines where the density of lines represent flux density? How does the software know which points to start plotting from in order to come out with a true representation?
  2. jcsd
  3. Apr 25, 2010 #2


    User Avatar
    Homework Helper

    I've seen one example in which you would have to click on a point and the software would plot the line that goes through that point. Of course, in that case the density of lines may or may not represent the flux density, depending on where you click.

    Off the top of my head, I suppose you could start at the point of largest magnetic field (call the value B) and plot the field line going through there. Then move some reasonable distance R to one side (perpendicular to the magnetic field vector); call the magnetic field value there B' and plot another field line going through that point. Then move over again by the distance R'= RB/B' and plot another line, etc. until you reach the edge of the graph or something.

    If you don't wind up getting a good answer here, you might have better luck asking on a computer programming Q&A site (such as stackoverflow.com).
  4. Apr 25, 2010 #3
    well the best way I could think of doing it is this: Do you remember during your studies (if you've got this far) when you came across a bar magnet that looked like a tear drop? and you'd have noticed that the smaller the area the higher the density of magnetic field points intersecting the surface. (lets for now keep it 2d). Then you could plot the magnetic field lines with the differential of the curvature of the object. That being the quicker the curve fell or the larger the value of the differential, then the more lines you will plot. Say if you plotted 1 line for every degree of curvature, you should in theory plot the magnetic field lines. The only issue with this is, obviously magnetic field lines curve to join up with the opposite conventional pole. So you'd have to write the code so that the corresponding angle from the other pole joined up with the original. And to my knowledge that should work for most circumstances, although it sounds in my head like that would really work for a conventional rectangular bar magnet. :S.
  5. Apr 25, 2010 #4
    Thank you.
    I have recently downloaded this software for drawing magnetic field lines. It is very good! Go try it.
    Upon successfully using the software to draw the field lines that I wanted( very fast performance) on the PC, this question of how the software works is really haunting me.
  6. Oct 13, 2011 #5
    the information above was useful, i need a software that will plot me the magnetic field, the link above is not working, if any one have the setup please give me the link
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook