File:VFPt Solenoid correct3 Babs.svg

Summary

Description
English: Diagram of a solenoid and its magnetic field lines. The shape of all lines was computed according to the laws of electrodynamics. The color indicates the absolute field strength of the magnetic field from zero field (white) to the maximum field strength (blue).
Date
Source Own work
Author Geek3
Other versions
SVG development
InfoField
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 1.10
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
doc = FieldplotDocument('VFPt_Solenoid_correct3_Babs',
    width=490, height=490, unit=100, commons=True)
field = Field({'coils':[[0, 0, 0, 0.49, 0.98, 1]]})

B0 = 1. / (2. * 0.98)
Babs = lambda xy: sc.linalg.norm(field.F(xy))
doc.draw_scalar_field(func=Babs, vmin=0, vmax=B0)

n = 8
for a in [-0.455, -0.385, -0.275, -0.165, -0.055, 0.055, 0.165, 0.275, 0.385, 0.455]:
    line = FieldLine(field, [0, a], directions='both', maxr=5)
    doc.draw_line(line, linewidth=1.0, arrows_style={
        'dist':1.5, 'min_arrows':1, 'max_arrows':3,
        'offsets':[1, 0.25, 0.25, 1], 'scale':2})
field.add_element('wires', [ [x, 0.49, 1] for x in sc.linspace(-0.84, 0.84, 7)] + [ [x, -0.49, -1] for x in sc.linspace(-0.84, 0.84, 7)])
doc.draw_currents(field)
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.
Category:CC-BY-SA-4.0#VFPt%20Solenoid%20correct3%20Babs.svgCategory:Self-published work
Category:Magnetic fields around solenoids Category:Photos by User:Geek3 Category:VFPt electric and magnetic fields (image set)
Category:CC-BY-SA-4.0 Category:Magnetic fields around solenoids Category:Photos by User:Geek3 Category:Self-published work Category:VFPt electric and magnetic fields (image set) Category:Valid SVG created with VectorFieldPlot code