Skip to content

ohmic_tok.m

Basic Information

  USAGE:  ohmic_dist_data = ohmic_tok(ohmic_calc_inputs)

  PURPOSE: Calculates the Best Ohmic current distribution for F coils

  INPUTS: [default]
    ohmic_calc_inputs = structure, containing one or more of following:
     flux0=       target flux at center, scaler (Vs) [1]
     bz_targ=     target vertical field scaler or (npt,1) (T) [0]
     ic_min       if exists => minimum coil current (A) => ic_min= -14500
     ic_max       if exists => maximum coil current (A) => ic_max= +14500
                  length(ic_min) = 1 or max(cccirc)

     npt=         Number of points on boundary for 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];
     d_plasma=    Triangularity of breakdown circle [0];

     minimize_i = 0.1;  Includes currents in opts. to reduce +-I [0]
                  minimize_i weights how much I smooting to perform
                  Value of 0 to 0.1 are reasonable

     tok_data_struct if this exists then uses existing tok_data_struct
                     if it doesnt exist then loads KSTAR vacuum objects
     cccirc=      circuit connection matrix [from tok_data_struct]
     pause_it=   1; => pause between figures [0];
     tokamak=    tokamak name prepended to each plot title [];

  OUTPUTS:
   ohmic_dist_data = structure, containing:
     icc_ohmic=   Optimum Ohmic Terminal Current on circuit (cccirc) [12,1] (A)
     ic_ohmic =   Optimum Ohmic Terminal (All Coil) Current vector [16,1] (A)
     ict_ohmic=   Optimum Ohmic Amp-Turn Current vector [16,1] (A-Turns)
     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:
     reads in MA-turns standard tokamak vacuum objects
     calculates

  NOTE: Should work on any tokamak with gneralization of cccirc stuff below

  METHOD:
     Determine optimum Coil current distribution using least square technique
     to produce a uniform 1 Vs flux on the boundary see ohmic_dist.m
     now very similar to CUROPT by including Bz and constraints on currents
     now calculates based on terminal currents rather than (amp-turns)

Dependencies