File:VFPt cylindermagnet field-representations.svg
Contents
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
| DescriptionVFPt cylindermagnet field-representations.svg |
English: Three different representations of the magnetic field of a cylindrical bar magnet. Left: Iron filings. Center: field lines. Right: compass needles. The shape and direction of the field was accurately computed in all three cases. |
||
| Date | |||
| Source |
Own work This file was derived from: Ironfilings cylindermagnet.svg This file was derived from: Magnet compasses.svg |
||
| Author | Geek3 | ||
| SVG development InfoField |
| ||
| Source code InfoField | Python code# paste this code at the end of VectorFieldPlot 2.5
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
doc = FieldplotDocument('VFPt_cylindermagnet_field-representations', commons=True,
width=600, height=600)
R = 0.6
Lhalf = 1.0
field = Field([['coil', {'x':0, 'y':0, 'phi':pi/2, 'R':R, 'Lhalf':Lhalf, 'I':1}]])
doc.draw_magnets(field)
n = 26
for i in range(n):
a = R * (-1 + 2. * (0.5 + i) / n)
line = FieldLine(field, [a, 0.], directions='both', maxr=5.0)
def arrow_pot(xy):
return (((xy[0]/(2.5*R))**2+(((xy[1]-Lhalf)/(2*R))**2)-1) *
((xy[0]/(2.5*R))**2+(((xy[1]+Lhalf)/(2*R))**2)-1))
if i in [0, n-1]:
arrow_pot = lambda xy: xy[1]
doc.draw_line(line, arrows_style={'scale':1.3,
'at_potentials':[0.], 'potential':arrow_pot,
'condition_func':lambda xy: fabs(xy[0])>R or fabs(xy[1])>Lhalf})
doc.write()
|
Licensing
- 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
Items portrayed in this file
depicts
24 March 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:57, 24 March 2020 | 1,860 × 620 (296 KB) | wikimediacommons>Geek3 | Uploaded own work with UploadWizard |
File usage
There are no pages that use this file.