calc_eddy_flux.m
SYNTAX: [flux,B,Br,Bz,ivv,t_ivv,imc]=
calc_eddy_flux(shotnum,tok_data_struct,rtimes,t,Icoils,...
psidata,probedata,options,plasma)
PURPOSE: Compute flux/field in vacuum region for multiple rtimes using a
fit to measured diagnostics, then compute approximate loop voltage.
Fit may optionally use eigenmode approximation of vessel or do full
integration of VV eddy currents for fitting vessel effects, include
axisymmetric magnetic materials, and/or include Ip effects.
INPUT: [default]
shotnum = number of shot to reconstruct
rtimes = time steps at which to reconstruct vacuum flux/field
t = time vector for data signals
Icoils = PF coil current data
psidata = flux loop data
probedata = magnetic probe data
options
cccirc = PF coils circuit connection mapping
Pcc = mapping from coil states to all PF coils
(only one of cccirc or Pcc should be provided)
clevels = # levels on contour plots [10]
idxbp = indices of B-probes to fit [all=1:nbp]
idxfl = indices of flux loops to fit [all=1:nfl]
idxvv = indices of VV elements to use [all=1:nv]
ieddy = 0: Use eigenmode expansion of VV to fit vv currents
1: Use integrated VV eddy currents for fitting
navg = # time points over which measurements are averaged [3]
neig = # eigenmods to reating if ieddy=0 [10]
pause_it = pause after plots for inspection (1=yes 0=no) [0]
plotb = plot magnetic fields (1=yes 0=no) [1]
plotfl = plot magnetic flux (1=yes 0=no) [1]
(SEE calc_vv_eddy for further options)
plasma (see calc_vv_eddy)
NOTE: To reproduce results of calc_vac_flux simply put ieddy=0.
OUTPUT:
flux = magnetic flux at plasma grid points for each time step
B,Br,Bz = magnetic field """"
ivv = calculated vessel currents (if ieddy = 1)
t_ivv = time vector for calculated vessel currents
imc = magnetization currents
Plots:
1. contour plots of magnetic flux and field over the kstar x-section
RESTRICTIONS:
1. Assumes that all data is uniformly sampled & in same time intervals
WRITTEN BY: Jim Leuer ON 9/22/06
Optimization part taken from M. Walkers calc_vac_flux and modified.
also different plot features
@(#)calc_eddy_flux.m 1.7 02/02/10