File:VFPt superconductor cylinder B-field.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Deformation of a previously homogeneous magnetic field around an ideal diamagnetic infinite cylinder with very small permeability (e.g. a superconductor). Inside the cylinder the B-field vanishes, but the H-field is finite and uniform. The magnetic field lines are accurately computed.
Date
Source Own work
Author Geek3
Other versions VFPt superconductor ball B-field.svg, VFPt superconductor cylinder B-field potential+contour.svg
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with VectorFieldPlot.
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 2.4
doc = FieldplotDocument('VFPt_superconductor_cylinder_B-field',
    width=600, height=600, commons=True)
field_direction = [0.0, -1.0]
r = 1.2
field = Field([['homogeneous', {'Fx':field_direction[0], 'Fy':field_direction[1]}],
    ['dipole2d', {'x':0, 'y':0, 'px':-2*pi*r**2*field_direction[0],
                              'py':-2*pi*r**2*field_direction[1]}]])

# draw the superconducting cylinder
cylinder = doc.draw_object('g', {'id':'metal_cylinder'})

def triangle_path(phi1, phi2, r):
    x1, y1 = r * cos(radians(phi1)), r * sin(radians(phi1))
    x2, y2 = r * cos(radians(phi2)), r * sin(radians(phi2))
    d = 'M {:.4f},{:.4f}'.format(x1, y1)
    d += ' A {:.4f},{:.4f} 0 0 1 {:.4f},{:.4f}'.format(r, r, x2, y2)
    d += ' L {:.4f},{:.4f}'.format(-x2, -y2)
    d += ' A {:.4f},{:.4f} 0 0 0 {:.4f},{:.4f}'.format(r, r, -x1, -y1)
    d += ' L {:.4f},{:.4f} Z'.format(x1, y1)
    return d

def grey(bright):
    return '#' + 3 * ('%02x' % int(256. * bright - 0.5))

doc.draw_object('circle', {'cx':0, 'cy':0, 'r':'{:.4f}'.format(r),
    'style':'fill:' + grey(0.75) + '; stroke:none'}, group=cylinder)

for phi0 in [0]:
    ncolors = 25
    for a in sc.linspace(.5 / ncolors, 1 - .5 / ncolors, ncolors):
        bright = 0.75 + 0.15 * a
        phi1 = phi0 - 60 * (acos(2. * a - 1) / pi)**1.5
        phi2 = phi0 + 60 * (acos(2. * a - 1) / pi)**1.5
        d = triangle_path(phi1, phi2, r)
        doc.draw_object('path', {'d':d,
            'style':'fill:' + grey(bright) + '; stroke:none'}, group=cylinder)

doc.draw_object('circle', {'cx':0, 'cy':0, 'r':str(r),
    'style':'fill:none; stroke:black; stroke-width:0.02'}, group=cylinder)

nlines = 20
for i in range(nlines):
    a = -3 + 6 * (0.5 + i) / nlines
    line = FieldLine(field, [a, 8], maxr=16, pass_dipoles=1)
    doc.draw_line(line, arrows_style={'dist':4,
        'offsets':{'leave_image':0.3, 'enter_image':0.3},
        'fixed_ends':{'leave_image':True, 'enter_image':True} })

doc.write()

Licensing

[edit]
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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current12:47, 13 October 2019Thumbnail for version as of 12:47, 13 October 2019600 × 600 (31 KB)Geek3 (talk | contribs)User created page with UploadWizard

Metadata