File:VFPt solenoid-field-animation.gif

VFPt_solenoid-field-animation.gif(320 × 280 pixels, file size: 283 KB, MIME type: image/gif, looped, 40 frames, 3.9 s)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

edit
Description
English: Solenoid fieldlines animation. A transformation from a circular current loop to an elongated ideal solenoid is shown.
Date
Source Own work
Author Geek3
GIF development
InfoField
 
This plot was created with VectorFieldPlot.
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 2.5

nframes = 40
L0 = 1.0
R = 0.4
nlines = 12
width = 320
height = 280

for iframe in range(nframes):
    doc = FieldplotDocument('VFPt_solenoid-field-animation_{:03d}'.format(iframe),
        width=width, height=height, commons=True)
    if iframe < nframes / 2:
        l = L0 * iframe / (nframes/2.)
    else:
        l = L0 * (2. - iframe / (nframes/2.))
    print l
    
    if l <= 0.:
        field = Field({'ringcurrents':[[0, 0, 0, R, 1]]})
    else:
        field = Field({'coils':[[0, 0, 0, R, l, 1]]})
    
    def f_arrows(xy):
        return xy[0] * (sc.hypot(xy[0]/1.2, xy[1]/1.45) - 1.)
    def f_cond(xy):
        return fabs(xy[1]) > R or fabs(xy[0]) > 1e-6
    
    for il in range(nlines):
        a = (-1 + 2 * (0.5 + il) / nlines) * R
        line = FieldLine(field, [0, a], directions='both', maxr=7.)
        doc.draw_line(line, arrows_style={'at_potentials':[0.],
            'potential':f_arrows, 'condition_func':f_cond})
    
    doc.write()
for i in *.svg; do rsvg -w 320 -h 280 $i $(echo $i | sed s/svg/png/) && convert -scale 320x280 $(echo $i | sed s/svg/png/) $(echo $i | sed s/svg/gif/); done
gifsicle -d5 -l0 --colors 16 --comment "https://commons.wikimedia.org/wiki/File:VFPt_solenoid-field-animation.gif" VFPt*.gif > animation.gif
gifsicle -b animation.gif -d100 "#0" -d5 "#1-19" -d100 "#20" -d5 "#21-39"
rm VFPt*.png VFPt*.gif

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
current16:41, 4 January 2020Thumbnail for version as of 16:41, 4 January 2020320 × 280 (283 KB)Geek3 (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata