make_hel_fils.m
SYNTAX: [fils,frac,Paths,fracp] = make_hel_fils(polpts,mmode,nmode, ...
Rref,phase,iplot)
PURPOSE:
Construct helical filament sets for nonaxisymmetric mode on continuous
surface such as plasma or vessel wall.
INPUTS:
polpts = set of poloidal points = (npts,2) matrix [x,z] [m]
mmode = m poloidal mode number
nmode = n toroidal mode number
Rref = reference major radius [m]
phase = (optional) phase relative to toroidal angle phi=0;
phase=0 (default) gives cos mode, phase=-pi/2 gives sin mode.
iplot = (optional) flag to select plotting: 0=no plot(default), 1= plot
helicity = (optional) +1 for LH (default), -1 for RH
OUTPUTS:
fils = matrix describing set of filaments in [x1,y1,z1,x2,y2,z2] format
frac = fraction of current in each filament (const on each hel winding)
Paths = cell array of filament sets corr to each *path* in hel windings
(note that the Paths cell array is a *column* cell array,
dims {npaths,1} to allow row dimension to be used for modes...)
NOTE WELL that the Paths matrices are in FILC format!!!
fracp = vector of fracs corr to each *path*
RESTRICTIONS:
# of pts in polpts must be even multiple of mmode, and should be >> 1
(for example for 3,1 mode must have multiple of 3, like 24, 36, 60...
Multiples of 12 are nice, since contain factors 2,3,4)
METHOD:
Dependencies