File:VFPt bar-magnet-forces.svg
Page contents not supported in other languages.
Tools
Actions
General
In other projects
Appearance
Size of this PNG preview of this SVG file: 520 × 600 pixels. Other resolutions: 208 × 240 pixels | 416 × 480 pixels | 666 × 768 pixels | 887 × 1,024 pixels | 1,775 × 2,048 pixels | 572 × 660 pixels.
Original file (SVG file, nominally 572 × 660 pixels, file size: 92 KB)
This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionVFPt bar-magnet-forces.svg |
English: Top: Exactly computed field lines of magnetic field B of a cylindrical bar magnet with several euqipotential lines of the magnetic scalar potential. The B-field is proportional to the force exerted on external magnetic north-poles. Bottom: Exactly computed field lines of grad(abs(B)) of a cylindrical bar magnet with several euqipotential lines of abs(B). This field is proportional to the force exerted on small magnetizable particles, such as iron filings. |
Date | |
Source | Own work |
Author | Geek3 |
SVG development InfoField | This plot was created with VectorFieldPlot. |
Source code InfoField | Python code# paste this code at the end of VectorFieldPlot 3.2
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
docB = FieldplotDocument('VFPt_bar-magnet-forces',
commons=True, width=400, height=300)
R = 0.3
L2 = 1.
m = 1.
def bounds_func(xy):
out_magnet = min(L2 - fabs(xy[0]), R - fabs(xy[1]))
out_image = max(fabs(xy[0]) - 2.0, fabs(xy[1]) - 1.5)
return max(out_magnet, out_image)
Hfield = Field([ ['charged_disc', {'x0':-L2, 'y0':-R, 'x1':-L2, 'y1':R, 'Q':-m*.5/L2}],
['charged_disc', {'x0':L2, 'y0':-R, 'x1':L2, 'y1':R, 'Q':m*.5/L2}] ])
Bfield = Field([ ['coil', {'x':0, 'y':0, 'phi':0, 'R':R, 'Lhalf':L2, 'I':m/(R**2*pi)}] ])
phi0 = Hfield.V((L2, R/2))
rstart = 0.35
startpath = Startpath(Bfield, lambda t: array((L2-rstart*cos(t), (R+rstart)*sin(t))),
t0=asin(R/(R+rstart)), t1=2*pi-asin(R/(R+rstart)))
nlines = 16
for iline in range(nlines):
p0 = startpath.startpos((iline + 0.1) / (nlines - 0.8))
line = FieldLine(Bfield, p0, directions='both', maxr=20, bounds_func=bounds_func)
docB.draw_line(line, linewidth=2,arrows_style={'potential':Hfield.V,
'at_potentials':[Hfield.V((-1.4*L2, 2*R)), Hfield.V((1.4*L2, 2*R))]})
print('computing contours...')
#docB.draw_scalar_field(func=Hfield.V, cmap=docB.cmap_AqYlFs, vmin=-phi0, vmax=phi0)
docB.draw_contours(func=Hfield.V, linewidth=0.8, linecolor='#555555',
levels=sc.linspace(-phi0, phi0, 17))
docB.draw_object('rect', {'x':-2.005, 'y':-1.505, 'width':4.01, 'height':3.01,
'fill':'none', 'stroke':'#aaaaaa', 'stroke-width':0.03})
docB.draw_magnets(Bfield)
docB.write()
docGrad = FieldplotDocument('VFPt_bar-magnet-forces_grad',
commons=True, width=400, height=300)
def GradH(xy):
d = 1e-6
Hx0 = vabs(Hfield.F((xy[0] - d, xy[1])))
Hx1 = vabs(Hfield.F((xy[0] + d, xy[1])))
Hy0 = vabs(Hfield.F((xy[0], xy[1] - d)))
Hy1 = vabs(Hfield.F((xy[0], xy[1] + d)))
grad = array(((Hx1 - Hx0) / (2*d), (Hy1 - Hy0) / (2*d)))
return grad
Gradfield = Field([ ['custom', {'F':GradH, 'V':lambda xy: -vabs(Hfield.F(xy))}] ])
B0 = -Gradfield.V((L2, R/2))
startpath = Startpath(Gradfield, lambda t:
array((1.6*cos(2*pi*t), 0.9*sin(2*pi*t)+0.2*sin(6*pi*t))))
nlines = 32
for iline in range(nlines):
p0 = startpath.startpos((iline + 0.5) / nlines)
line = FieldLine(Gradfield, p0, directions='both', maxr=10, bounds_func=bounds_func)
docGrad.draw_line(line, linewidth=2, arrows_style={'potential':Gradfield.V,
'at_potentials':[Gradfield.V((1.4*L2, 2*R))]})
print('computing scalar field.')
#docGrad.draw_scalar_field(func=Gradfield.V, cmap=docGrad.cmap_AqYlFs, vmin=-B0, vmax=B0)
docGrad.draw_contours(func=Gradfield.V, linewidth=0.8, linecolor='#555555',
levels=B0*sc.arange(-8.5, 0)/9)
docGrad.draw_object('rect', {'x':-2.005, 'y':-1.505, 'width':4.01, 'height':3.01,
'fill':'none', 'stroke':'#aaaaaa', 'stroke-width':0.03})
docGrad.draw_magnets(Bfield)
docGrad.write()
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
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.
Items portrayed in this file
depicts
28 June 2020
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:39, 28 June 2020 | 572 × 660 (92 KB) | Geek3 | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Short title | VFPt_bar-magnet-forces |
---|---|
Image title | VFPt_bar-magnet-forces
created with VectorFieldPlot 3.2 https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot about: https://commons.wikimedia.org/wiki/File:VFPt_bar-magnet-forces.svg rights: Creative Commons Attribution ShareAlike 4.0 |
Width | 572 |
Height | 660 |
Retrieved from "https://en.wikipedia.org/wiki/File:VFPt_bar-magnet-forces.svg"