File:VFPt sphere-magnet-inside.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(SVG file, nominally 600 × 600 pixels, file size: 30 KB)

Summary

Description
English: Drawing of a homogeneously magnetized spherical magnet with exactly computed magnetic field lines. A spherical magnet has the remarkable property that its field outside the magnet is identical to that of an ideal point-like dipole. Inside the magnetized volume, the field is exactly constant and aligned along the north-south axis. The shown B-field points straight from south to north inside the magnet, whereas the H-field, although identical to B in free space, would point from north to south inside the magnet.
Date
Source Own work
Author Geek3
Other versions
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with VectorFieldPlot.
 
This file uses embedded text.
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 3.3
doc = FieldplotDocument('VFPt_sphere-magnet-inside', commons=True,
    width=600, height=600)

x0, y0 = 0.0, 0.0
R = 1.0
dipole_field = Field([ ['dipole', {'x':0, 'y':0, 'px':0, 'py':1}] ])
def spheremagnet_F(xy):
    r = xy - sc.array((x0, y0))
    if vabs(r) < R:
        # inside the field is indeed constant
        return dipole_field.F(sc.array((0, R)))
    else:
        # outside the field is exatly that of a point-dipole
        return dipole_field.F(r)

field = Field([ ['custom', {'F':spheremagnet_F}] ])

nlines = 18
for iline in range(nlines):
    p0 = (R * (2 * (iline + 0.5) / nlines - 1), 0.)
    line = FieldLine(field, p0, directions='both', maxr=7)
    doc.draw_line(line, arrows_style={'scale':1.2, 'at_potentials':[0],
        'potential':lambda xy: xy[1] * (vabs(xy) - 2.3)})

# draw the spherical magnet
g = doc.draw_object('g', {'id':'sphere',
    'transform':'translate({},{})'.format(x0, y0)}, bg=True)
doc.draw_object('circle', {'cx':'0', 'cy':'0', 'r':str(R),
    'style':'fill:#80e680; stroke:none;'}, group=g)
doc.draw_object('path', {'d':'M -1,0 A 1,1 0 0 0 1,0 L -1,0 Z',
    'style':'fill:#ff8080; stroke:none;'}, group=g)
doc.draw_object('circle', {'cx':'0', 'cy':'0', 'r':str(R),
     'style':'fill:none; stroke:#000000; stroke-width:0.04;'}, group=g)

doc.write()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

14 July 2018

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:10, 18 January 2021Thumbnail for version as of 13:10, 18 January 2021600 × 600 (30 KB)Geek3less field lines. Arrows distributed in a circle
20:05, 14 July 2018Thumbnail for version as of 20:05, 14 July 2018600 × 600 (33 KB)Geek3User created page with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Metadata