File:VFPt cylindrical magnets repelling.svg

Summary

Description
English: Magnetic field of an two ideal cylindrical magnets with their axis of symmetry inside the image plane. Both magnets are aligned on their common axis in different directions, which creates an repelling force between like magnetic poles.
Date
Source Own work
Author Geek3
Other versions Field lines match the experimental field shape in .
SVG development
InfoField
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 1.0
doc = FieldplotDocument('VFPt_cylindrical_magnets_repelling', commons=True)
field = Field({'coils':[[-1.5, 0, 0, 0.25, 0.75 ,1], [1.5, 0, 0., 0.25, 0.75 ,-1]]})
doc.draw_magnets(field)
n = 15
for i in range(n):
    for x0 in (-1.5, 1.5):
        a = -0.25 + 0.5 * (0.5 + i) / n
        if i in [5, 6, 8, 9]: d = 'backward'
        else: d = 'both'
        if i == n/2: of = [1.0, 0.5, 0.5, 0.2]
        else: of = [1.0, 0.5, 0.5, 1.0]
        line = FieldLine(field, [x0, a], directions=d, maxr=10.0)
        doc.draw_line(line, arrows_style={'dist':1.7, 'offsets':of})
for x0, y0 in ((-0.11, -1), (0.11, -1), (-0.11, 1), (0.11, 1)):
    line = FieldLine(field, [x0, y0], directions='both',
        maxr=10.0, bounds_func=lambda p: abs(p[0])-1.5)
    doc.draw_line(line, arrows_style={'dist':1.7, 'offsets':[0.5, 0.5, 0.8, 1.0]})
doc.write()

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
Category:License migration redundant#VFPt%20cylindrical%20magnets%20repelling.svgCategory:GFDL#VFPt%20cylindrical%20magnets%20repelling.svg
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#VFPt%20cylindrical%20magnets%20repelling.svg
You may select the license of your choice.
Category:Self-published work
Category:Field lines around magnets (image set) Category:Field lines around magnets Category:Bar magnets Category:Photos by User:Geek3 Category:Magnetic force
Category:Bar magnets Category:CC-BY-SA-3.0 Category:Field lines around magnets Category:Field lines around magnets (image set) Category:GFDL Category:License migration redundant Category:Magnetic force Category:Photos by User:Geek3 Category:Self-published work Category:Valid SVG created with VectorFieldPlot code