make_wallmesh.m
SYNTAX: [vvPfils,vvTfils,Cvpol,Cvtor] = make_wallmesh(vvpolpts,torangs, ...
iclosepol,iclosetor,iplot,Rref);
PURPOSE: Generate filament array for mesh representation of toroidal
wall or wall segment.
INPUTS:
vvpolpts = array of poloidal points for wall representation (npts,2)
[R(:) Z(:)] [m]
torangs = toroidal angles for wall discretization [deg]
iclosepol = flag =1 to select closing of wall in pol direction (def=1)
iclosetor = flag =1 to select closing of wall in tor direction (def=1)
iplot = flag to select plotting if 3D geometry
OUTPUTS:
vvPfils = filament array for poloidal-pointing filaments in mesh representation
vvTfils = filament array for toroidal-pointing filaments in mesh representation
Cvpol = constraint matrix for poloidal filaments (total constraint
matrix is Cvv=[Cvpol Cvtor], total filament matrix is
vvfils = [vvPfils; vvTfils])
Cvtor = constraint matrix for toroidal filaments
RESTRICTIONS:
METHOD:
Two filament arrays are produced, one for poloidally-pointing filaments
and one for toroidally-pointing filaments. Poloidal and toroidal
filaments with the same index emerge from the same point. Filaments associated
with a given point are the right-pointing toroidal and the upward-pointing
poloidal filament.
Constraint matrix represents the node current equations: # of rows = total # of pts
(=npolpts*ntorpts), while # of columns = # of pol fils + # of tor fils
= 2x(tot # of pts). Constraint equation is thus C*I=0, so current vectors lie in
null space of constraint matrix.
Dependencies