Skip to content

make_rec_fils.m

Basic Information

  SYNTAX:  [RECpts,RECfils] = make_rec_fils(zphis,thetas,rs,tilts,dzphis, ...
                     hs,Rref,nfils)

  PURPOSE:  Construct corner pts and filaments for picture frame coils
        in *toroidal* geometry (with horizontal legs curving around
        toroidal direction, but not necessarily
        at same minor or major radius...).

  INPUTS: (vectors are all 1x2)
    zphis = vector of phi=toroidal angle positions of frame
        *centers*. [rad]
    thetas = vector of theta (angular) positions of frame centers [rad]
        poloidal angle rel. to the major axis of the torus at R=Rref
    rs = vector of R (major radial) positions of frame centers [m]
    tilts = angle made by normal vector to picture frame (generated by
        right hand rule from coil current) rel to major radius R [rad]
        (when coil frame is *vertical* the tilt = 0)
    dzphis = vector of full widths of frames angular width dphi in [rad]
    hs = vector of full heights of frames [m]
    Rref = Reference major radius for toroidal case
    nfils = (opt) vec of # of sub-filaments to split legs into (def=10)

  OUTPUTS:
    RECpts = matrix of points making up rec coil rows of [x,y,z]
    RECfils = matrix of filaments [x1,y1,z1,x2,y2,z2]


  RESTRICTIONS:

  METHOD:
    For toroidal geometry, r,phi in this code
    correspond to x,y plane in mut_fil_fil (which is the plane defined by
    major radius and toroidal angle phi in torus), and theta is poloidal
    angle in tokamak convention. The z direction is thus the same as the
    usual convention for tokamak geometry: poloidal, or "vertical" z.
    Rref is used as ref major radius of torus for applying poloidal angles.

Dependencies