Esempio n. 1
0
def Helmholtz():
    current = 1.0  # amps
    Rring = 1.0
    RingList = [[current, Rring / 2.0, Rring], [current, -Rring / 2.0, Rring]]
    fieldfile = "Helmfield.txt"
    fieldfind(Rring, RingList, fieldfile)
    fieldplot(fieldfile)
def SimpleSeg():
    from CollectionViewer import collviewer_natural
    current=1.0
    L=1.0
    LineSegList=[LineSeg(Vector((0,0,0),type="CARTESIAN"),Vector((0,0,L),type="CARTESIAN"))]
    #collviewer_natural(linelist=[[l,(0,0,0)] for l in LineSegList])
    fieldfile="SingSegfield.txt"
    fieldfind(L,LineSegList,fieldfile)
    fieldplot(fieldfile)
Esempio n. 3
0
def Maxwell():
    current = 1.0
    Rring = 1.0
    # [turns,z,radius]
    cylind = Cylinder(Vector((0, 0, -10), type="CARTESIAN"), Vector((0, 0, 10), type="CARTESIAN"), Rring)
    HelixSegList = RingMaker(sqrt(3) / 2.0, 1, 16, cylind)
    HelixSegList.extend(RingMaker(-sqrt(3) / 2.0, -1, 16, cylind))
    fieldfile = "Maxwellfield.txt"
    fieldfind(Rring, HelixSegList, fieldfile)
    fieldplot(fieldfile)
def MultiSimpleSeg():
    from CollectionViewer import collviewer_natural
    from scipy import arange
    current=1.0
    numsegs=10
    L=1.0
    dL=L/float(numsegs)
    starts=arange(0,L,dL)
    LineSegList=[LineSeg(Vector((0,0,a),type="CARTESIAN"),Vector((0,0,a+dL),type="CARTESIAN")) for a in starts]
    #collviewer_natural(linelist=[[l,(0,0,0)] for l in LineSegList])
    fieldfile="MultiSingSegfield.txt"
    fieldfind(L,LineSegList,fieldfile)
    fieldplot(fieldfile)