File:VFPt rotating-charged-sphere-approx-(rings,7-wires).svg

Uploaded by MikeRun
Upload date 2021-04-02T11:09:26Z
MIME type image/svg+xml
Dimensions 600 × 600 px
File size 78.5 KB

Summary

Description
English: appoximate magnetic field of a rotating charged sphere (7 ringcurrents; current decreases with cos() to the poles)
Date
Source Own work
Author MikeRun
Other versions

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 3.0
import math

doc = FieldplotDocument('VFPt_rotating-charged-sphere-approx-(7-wires)',  width=600, height=600, commons=True)
additional_wires_per_hemisphere = 3
total_wires = 2*additional_wires_per_hemisphere+1
sphere_radius = 1
current_max = 1
currents = [[0,0,0,sphere_radius,current_max]]
phi = math.pi/(2*total_wires)
for i in range(additional_wires_per_hemisphere):
    for j in [-1,1]:
        currents.append([j*math.sin((2*(i+1))*phi)*sphere_radius,0,0,math.cos((2*(i+1))*phi)*sphere_radius,math.cos((2*(i+1))*phi)*current_max])
field = Field({'ringcurrents':currents})
for x0, y0, off in [[-0.3719,-1.2553,0], [0.3719,-1.2553,0],
    [0.,-0.9802,0], [0.,-0.7820,0], [0.,-0.6297,.5], [0.,-0.4882,.5],
    [0.,-0.3490,.5], [0.,-0.2098,.5], [0.,-0.0700,.5], [0.,0.0700,.5],
    [0.,0.2098,.5], [0.,0.3490,.5], [0.,0.4882,.5], [0.,0.6297,.5],
    [0.,0.7820,0], [0.,0.9802,0], [-0.3719,1.2553,0], [0.3719,1.2553,0]]:
    line = FieldLine(field, [x0, y0], directions='both', maxr=5)
    doc.draw_line(line, arrows_style={'dist':2,
        'min_arrows':1, 'max_arrows':4, 'offsets':[off,0.5,0.5,1.0-off]})
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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts