do_breakdown_tok.m
USAGE: [IM,figure_num]= do_breakdown_tok(IM_inputs,ramp_inputs, ...
model_inputs,figure_num,pcs_files,pause_it)
PURPOSE: Calculates Best Initial Magnetization and Breakdown Trajectories
INPUTS (defaults=[..]):
structure IM_inputs (Initial Magnetization (& Breakdown Ramp) Input):
flux0= target flux at center (Vs) [3]
bz_targ= target vertical field scaler or (npt,1) (T) [-0.00015]
ic_min if exists => minimum coil current (A) []
ic_max if exists => maximum coil current (A) []
npt= Number of points on boundary for IM optimization [101]
r_plasma= Major radius of breakdown circle [1.8];
z_plasma= Z Location of center of breakdown circle [0];
a_plasma= Minor radius of breakdown circle [0.4];
k_plasma= Elongation of breakdown circle [1.8];
d_plasma= Triangularity of breakdown circle [.5];
structure ramp_inputs (Breakdown Ramp Input):
times time (s) interval for ramp, [0.001*[-12:1:12]'];
times(1)= start ramp from IM, (negative start time) [-0.012]
time=0 => breakdown time, (vector should have 0 in it)
time(end)= end of simulation [+0.010]
iswtimes [zeros(size(times))]
Emx Central Electric Field times(1)=> times=0 (V/m) [0.3]
Emn Central Electric Field at end of simulation [0.2]
volt_fac= Voltage fractional increase for Ip calculation from VV EMF (1)
li= Plasma internal inductance [0.5]
beta= Plasma Beta [0];
cejima= Ejima coeficient for calculation of resistive flux [0.5];
ip_factor= Ip multiplier => reduce current requirement (and Bz) [1];
decay_index= n=-Rp/Zpt*Br_pt/Bz => 0 < n_stable < 1.5; [0.8]
Vlimits = voltage limits on power supplies [make limits proportional
to Nturns: 1-turn_Volt*N_turn= Vterminal_voltage]
slew_limit= Idot limit on coils [19.5e+3 = ~ 20kA/s]
wbr [200*[0, 1/sqrt(2) 1 1/sqrt(2) 0 1/sqrt(2) 1 1/sqrt(2)]']
wbz [200*[1, 1/sqrt(2) 0 1/sqrt(2) 1 1/sqrt(2) 0 1/sqrt(2)]']
wbzdot = [1]
wpsidot = [0.2]
structure model_inputs:
Vmat = (must be in PCS order)
tok_data_struct
cccirc= PF circuit grouping
vccirc = [1:max(cccirc)]
vvgroup= VV grouping [vvid vvfraction] => 2 column matrix []
nps = number of power supplies
scale_R_scpf [1]
PSsys = power supply models (not used?)
Rckt = resistances to add/replace coil resistance (essentialy 0) with
switched in circuit resistors. Order must correspond to internal
states.
General Control Input
pcs_files= 0; 1= Ouput PCS files on completion, 0=no files [0]
pause_it= 0; => no pause, 1= pause, # = pause(pause-it) [0];
OUTPUTS: (primary output is "*.dat" files for PCS input [pcs_files=1])
structure IM:
icc_ohmic= Optimum Ohmic Terminal Current vector (A)
ic_ohmic = Optimum Ohmic Terminal Current vector (A-Turns)
ict_ohmic= Optimum Ohmic Amp-Turn Current vector (A)
fl = Flux on Boundary (Vs)
br = Br-field on Boundary (T)
bz = Bz-field on Boundary (T)
rpt zpt = R,Z boundary points used in analysis (m)
err = Average Error in booundary flux value (Delta_Vs/Vs)
Plots:
figure(1): geometry -- Flux contour -- cccirc numbering -- coil current
figure(2): geometry -- B-field contour -- A-turn for full coil system
figure(3): flux variation around circumference of breakdown circle
figure(4): B-field variation around circumference of breakdown circle
RESTRICTIONS:
uses standard tokamak vacuum objects for all magnetics
Produces Amp-Turns. Should work on any tokamak but needs gneralization
of cccirc code.
METHOD:
Determine optimum Coil current distribution using least square technique
to produce a uniform 1 Vs flux on the boundary see ohmic_dist.m
Dependencies