File:Current-loop-in-homogenous-magnetic-field-rotation.svg

Summary

Description
English: Rotation of a current loop in a homogenous magnetic field (red arrows show lorentz force)
Date
Source Own work
Author MikeRun
SVG development
InfoField
Source code
InfoField

Python code

# paste this code at the end of VectorFieldPlot 3.0
import math

for alpha in [0,45,90]:
    alphaInRadians = alpha*(math.pi/180)
    doc = FieldplotDocument('current-loop-in-homogenous-magnetic-field-'+str(alpha)+'-deg', width=400, height=400, commons=True)
    field = Field([ ['homogeneous', {'Fx':0, 'Fy':1}], ['ringcurrent', {'x':0, 'y':0, 'phi':alphaInRadians, 'R':1, 'I':1}] ])
    doc.draw_currents(field)
    startx = -2
    endx = 2
    starty = 2
    endy = -2
    nlines = 11
    xoffset = (endx - startx) / nlines
    for i in range(nlines):
        posx = startx + (i)*xoffset+xoffset/2
        print("posx = "+str(posx))
        line = FieldLine(field, [posx, endy], start_v=[0, 1], directions='forward')
        doc.draw_line(line, linecolor='#000000', arrows_style={'min_arrows':2, 'max_arrows':2})
    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#Current-loop-in-homogenous-magnetic-field-rotation.svg
Category:Self-published work Category:Lorentz force Category:Magnetic fields around current loops
Category:CC-BY-SA-4.0 Category:Lorentz force Category:Magnetic fields around current loops Category:Self-published work Category:Valid SVG created with VectorFieldPlot code