calc_taupen.m
USAGE: >> taupen = calc_taupen(tok_data_struct,ipf,Rmeas,Zmeas,options);
PURPOSE: Function to calculate pentration time for generic tokamak
by driving PF coils with step CURRENT
to produce VV currents and calculate field at meas point
INPUTS:
tok_data_struct = standard TokSys vacuum objects structure
ipf = index of PF coil to drive and calculate measurement time
Rmeas,Zmeas = R,Z values at which to measure penetration [m]
options.iplot = (optional) flag to enable plotting of time history for
estimation of penetration time for PF ipf at (Rmeas,Zmeas).
Default = 1
options.Gpc = (optional) Green function object desired for penetration
time estimation. Must be a PF-coil-to-grid object.
Default = mpc
options.Gpv = (optional) Green function object desired for penetration
time estimation. Must be a VV-element-to-grid object.
Default = mpv
options.taupf = (optional) time constant for PF current rise [s]
Default = 1e-3.
options.tmax = (optional) max time for evolution [s]. Default = 50e-3
options.nt = (optional) # of time points in evolution.
Default = calculated on basis of taupf and tmax:
nt = 10*(tmax/taupf)
options.resv_fix = (optional) modified resv vector to use for
calculation. Default = resv from tok_data_struct.
OUTPUTS:
taupen = estimated penetration time for ipf and Rmeas,Zmeas
outputs = structure with other useful quantities
(Plots showing fit, if iplot=1)
RESTRICTIONS:
METHOD:
Run lsim for step CURRENT applied to PF coil ipf, generate field
history at (Rmeas,Zmeas) measurement point with field type specified
by options.Gpc, Gpv, fit result to exponential rise to extract approx
single time constant taupen. Fit only to early time corre. to one
e-folding (if were pure single-tau exponential) to extract effective
single time constant for dominant rise time... Remove all other PF coils from problem,
so they're not doing any shielding.
USE EXAMPLE:
>> tok_data_struct = load_tok_objects('kstar','2010','6565');
>> resv_fix = tok_data_struct.resv;
>> resv_fix(71:end) = resv_fix(71:end)*1000; kill all but VV walls
>> options.resv_fix = resv_fix;
>> taupfs = zeros(14,1); just SC PF's
>> for ii=1:14
>> [taupen,ymeas,t] = calc_taupen(tok_data_struct,ii,1.8,0,options);
>> taupfs(ii)=taupen;
>> end
Dependencies