calc_bd_traj_tok.m
SYNTAX: calc_bd_traj_tok
PURPOSE: Compute breakdown current and voltage trajectories based on
vacuum model M*dI/dt + R*I = V*v.
INPUT: [default]
r_plasma = Major R of plasma center (m)
z_plasma = Z of plasma center (m)
a_plasma= minor radius of plasma (m)
npts_opt = number of points on boundary of plasma to optimize at
Psidot_tgt= d/dt(Psi) at plasma center (scalar OR 1 x ntimes vector)
optionally if exist('Emax') => Psidot_tgt computed from Emax
Br_tgt = target radial field at pts on circle (npts_opt x 1 vector
OR npts_opt x ntimes matrix for time-dependent)
Bz_tgt = target vertical field at pts on circle (npts_opt x 1 vector
OR npts_opt x ntimes matrix for time-dependent)
Bzdot_tgt = dBz/dt at plasma center (scalar OR 1 x ntimes vector)
wbr = vector of length npts_opt defining weights on Br at opt pts
OR npts_opt x ntimes matrix for time-dependent)
wbz = vector of length npts_opt defining weights on Bz at opt pts
OR npts_opt x ntimes matrix for time-dependent)
wbzdot = weight on Bzdot at plasma center (scalar OR 1 x ntimes vector)
wpsidot = weight on Psidot at plasma (scalar OR 1 x ntimes vector)
Vmin = minimum allowed voltage vector
Vmax = maximum allowed voltage vector
Idotmax = limits on absolute value of derivative of current in coils
times = times at which flux, field, voltage target values specified
nps = number of power supplies to drive (this needs to be
generalized to specification of how to reduce degrees of
freedom for optimization problem)
I_init = initial currents vector (size = ncx x 1 for PF currents only
OR (ncx+nvx) x 1 including vessel; optional, default = all zeros)
pause_it= 1; => pause between figures [0];
rckts= array of Rckts values [ncx,max(iswtimes)]
sets: Rckts= rckts(:,iswtimes(kk))
Rckts= additional circuit resistance - set to rckts (if rckts exists)
cccirc= coil connective vector => defines final coil current states
vccirc= voltage connection vector (like cccirc but for voltage inputs)
default: [1:size(Bmat,2)]; => all input coils (kstar default)
EAST: [1:6 1:6]
iswtimes= times at which switch system matrix [1,zeros(size(times)-1,1)];
icoilc= print out of coilc_1.dat, _2.dat ... [0]
ptimes= print times of coilc_?.dat files and incurment contour plots
[times(1), 0 times(end)];
OUTPUT:
Itraj = Current trajectories (ntimes x ncx)
Vtraj = voltage trajectories (ntimes x nvoltx)
psi_plasma = Flux at plasma center (ntimes x 1) (Vs)
bz_opt0 = Bz at plasma center (ntimes x 1) (T)
where: ncx= max(cccirc), nvoltx= max(vccirc)
RESTRICTIONS:
(1) Assumes that nps power supplies are the first nps out of ncx.
(2) The PCS input mechanism (waveforms) restricts what can be used for
voltage trajectories. This code assumes piecewise linear voltages
continuously connected at discretely specified points. An alternative
could be to use piecewise constant voltages that are discontinuous at
these points. Minimum spacing of these points is 1ms. I'm not sure
which alternative is better in this case.
(3) At present it expects imks=1 iterminal=1
which brings in all objects in A, H, Ohm
It is not clear if routine will work with other combination
METHOD:
Written to be consistent with:
J.A.Leuer and J.C.Wesley, ITER Plasma Startup Modeling, 15th IEEE/NPSS
Symp. on Fusion Eng., Oct.11-15, 1993, Hyannis, MA, p629
NOTE that current derivative constraint is only imposed at times in the
input vector "times" - this is an approximation only.
Dependencies