bld_subelements.m
SYNTAX: [geometry,lnrect,snrect] = ...
bld_subelements(cond_data,nrect,allow_filaments)
PURPOSE: Split conductors into rectangular subelements.
INPUT:
cond_data = data describing geometry of conductor
Format of this data has each column = [Z;R;dZ;dR;AC;AC2], where:
Z = z centroids of conductors (m)
R = r centroids of conductors (m)
dZ = height of conductors (m)
dR = width of conductors (m)
AC = angle between coil and horizontal (degrees)
AC2 = angle between coil and horizontal (degrees)
At most one of AC, AC2 is nonzero and indicates type of parallelogram:
xxxx
xxxx x
xxxx x
xxxx x --- xxxxxxxxxxxxx
xxxx x | xx xx
--- xxxx x | xx xx
| x X xxxx dZ xx xx
| x (R,Z) xxxx | xx X xx
dZ x xxxx | xx (R,Z) xx
| x xxxx | xx xx
| x xxxx | xx xx
_|_ xxxx ^ --- xxxxxxxxxxxxx ^
AC ) AC2 )
|----------dR----------| |---dR------|
nrect = number of rectangles to partition conductors. Interpretation
depends on size of this object:
scalar: nrect = number of rectangles across largest of conductor
minimum dimensions (thickest conductor). All
partitioning automatically computed from this. (Gives
roughly constant subrectangle size over all conductors.)
length vector == 2: nrect specifies FIXED nshort x nlong
partitioning, nshort refers to min(dR,dZ)
2 x nconductors or nconductors x 2: nrect specifies FIXED
values of (nshort, nlong) for each conductor
nconductors length vector: nrect specifies fixed nshort for
each conductor, nlong computed by dR/dZ scaling
allow_filaments = set to 1 to allow filament (dR=dZ=0) coils, otherwise
an error message will be printed if this is detected
OUTPUT:
geometry = 7 x n matrix describing all subelements of all conductors
Each column has the following information:
[z of current element; r of current element;
conductor number; dz of subelement; dr of subelement;
row number of element within conductor;
column number of element within conductor]
lnrect = number of rectangles in longer dimension, for each conductor
Dependencies