Skip to content

make_tok_objects.m

Basic Information

  USAGE:  make_tok_objects(make_tok_inputs,procedures)

  PURPOSE: Script to calculate vacuum data objects (e.g. mutuals, Green fns)
    for a tokamak system model. The "minimal" set of objects which must be
    defined is VV, FC.

  INPUTS (see TokSys_Users_Guide.pdf):
   make_tok_inputs = data structure defining how to make data objects.
     This structure must contain:
       tokamak = string defining tokamak being constructed, used in file names
       config_name  = string label identifying machine configuration (Warning:
            non-alphanumeric chars in config_name may cause problems)
       datadir = directory where files defining tokamak are located
    vvdata_file  = Filename for vvdata data (must be of form *.data)
                 (actually just has to have 4 characters after ".", and
                 must have a name distinct from all the other *.data)
    fcdata_file  = Fcoil data file (name must be of same form as vvdata)
    fcnturn_file = file with PF turns
    nminvv       = # of conductors in *min* dimension of vacuum vessel elts
                 (can be scalar or vector with length=#vessel elts)
    nminfc       = # of conductors in *min* dimension of fcoils
                 (can be scalar or vector with length=#fcoils)
    Vessel resistance data, either:
      etav       = VV resistivity vector, uOhm-m
            OR
      vvres_file = file with vessel element (terminal) resistances (Ohms)
    PF coil resistance data, either:
      etaf       = Fcoil resistivity vector, uOhm-m
                (NOTE: for SC coils, set etaf=1e-3*eta(Cu))
            OR
      fcres_file = file with coil element (terminal) resistances (Ohms)
    TD coil resistance data, either:
      etat       = TD coil resistivity vector, uOhm-m
            OR
      tdres_file = file with coil element (terminal) resistances (Ohms)
     Optionally, it may contain:
    ecdata_file  = Ecoil data file (name must be of same form as vvdata)
    ecturn_file  = ecoil turn groupings
    vvfrac_file  = file with vacuum vessel fractions of currents
    fldata_file  = Flux loop data file
    bpdata_file  = Bprobe data file
    msedata_file  = MSE loci file
       rldata_file  = Rogowski loop data file
       lvdata_file  = Loop voltage data file
    limdata_file = file containing limiter definition data (npts x 2)
    nr,nz        = # of grid elem. in r,z dir. (if~=0, must also enter
                     values for rgmin,rgmax,zgmin,zgmax - see below)
    rgmin,rgmax  = Min,max in major radial dimension on plasma grid [m]
    zgmin,zgmax  = Min,max in vertical dimension on plasma grid [m]
    E-coil resistance data (required if ecdata_file used), either:
      etae       = Ecoil resistivity vector, uOhm-m
            OR
      ecres_file = file with coil element (terminal) resistances (Ohms)
    fcnames_file = file containing fcoil names
    vvnames_file = file containing vessel element names
    flnames_file = file containing flux loop names
    bpnames_file = file containing Bprobe names
    msenames_file = file containing names of MSE channels that view points in msedata
       rlnames_file = file containing Rogowski loop names
       lvnames_file = file containing loop voltage names
    nminec       = # of conductors in *min* dimension of ecoils. Required if
        ecdata_file is used. (scalar or vector of length=#ecoils)
    nmingg       = scalar # of conductors in *min* dimension of plasma grid
            Required if plasma grid inputs used.
       plot_tok_geo_fn = string defining script to execute to plot the geometry
                of the device (e.g. 'plot_kstar_geo', 'plot_east_geo'...
                   set to 'generic' (default) to use default to plot X-section
       ecsignals_file = E coil signal names file
       fcsignals_file = F coil signal names file
       flsignals_file = flux loop signal names file
       bpsignals_file = B probe signal names file
       rlsignals_file = Rogowski loop signal names file
       lvsignals_file = loop voltage signal names file
       procedures   = array of strings defining procedures to operate on the
                     data after generation (optional, default = [])

  OUTPUTS: save files
    <tokamak>_obj_<config_name> = contains structure tok_data_struct, units= terminal, MKS
                (in file name, '/' replaced by '-', ' ' by '_', '\' by '')

Dependencies