File:Leiterschaukel-lorentz-force-combined-field.svg
Summary
Category:Valid SVG created with Inkscape#Leiterschaukel-lorentz-force-combined-field.svgCategory:Created with Inkscape-defaultCategory:SVG created also with Inkscape
Description |
English: Leiterschaukel lorentz force (combined horseshoe and wire field) |
Date | |
Source | Own work |
Author | MikeRun |
Other versions |
![]() |
SVG development | |
Source code | Python code# paste this code at the end of VectorFieldPlot 3.0
doc = FieldplotDocument('VFPt_horseshoe-magnet-and-wire', commons=True,
width=600, height=600)
x0, y0 = 0.0, -1.0
h = 2.0
R = 1.0
r = 0.3
field = Field({'charged_discs':[ [x0-R-r, y0+h, x0-R+r, y0+h, -1], [x0+R-r, y0+h, x0+R+r, y0+h, 1] ], 'wires':[[0,y0+h-0.05,-0.2]]})
doc.draw_currents(field)
def startpath(t):
return sc.array([x0 + R - R*cos(t*2*pi), y0 + h + R*sin(t*2*pi)])
def dstartpath(t):
return (startpath(t+1e-6) - startpath(t-1e-6)) / 2e-6
def FieldSum(t0, t1):
return ig.quad(lambda t:
sc.cross(field.F(startpath(t)), dstartpath(t)), t0, t1)[0]
Ftotal = FieldSum(0, 1)
def startpos(s):
t = op.brentq(lambda t: FieldSum(0, t) / Ftotal - s, 0, 1)
return startpath(t)
n = 24
for i in range(n):
p0 = startpos((0.5 + i) / n)
line = FieldLine(field, p0, directions='both', maxr=1000)
fe = [True, False, False, True]
if i in [0, 1, 2, n-1, n-2, n-3]:
fe = [False, False, False, False]
min_arrows = 1
if i == n - 7:
min_arrows = 3
doc.draw_line(line, arrows_style={
'dist':2.0, 'fixed_ends':fe, 'min_arrows':min_arrows})
doc.write()
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
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.