Jump to: navigation, search

Instructions for using the EFIT code for disruption analysis

Arnie Kellman, May 4, 1992

This memo provides a simple users guide to the operation of EFIT for disruption analysis. If EFIT is run with the default settings on discharges following major disruptions or during vertical displacement events, the code will typically have either an extremely large chi-squared (greater than 100, often large than 1000) or it will not converge. Special options for disruption analysis are described below. A good first guess for a SNAP file to use for disruption analysis is the file EFIT:EFIT_SNAP.DAT_SCRAPE. A copy of this file is included at the end of this memo. Copy this file into the file EFIT_SNAP.DAT in your area before you run the EFIT code. Remember that if there is a version of EFIT_SNAP.DAT in your area, EFIT will use that version rather than the default version in the EFIT: area. Therefore, when you are done with the disruption analysis, remember to either delete this file or switch to a different directory.


SCRAPEOFF LAYER CURRENTS

When discharges undergo a loss of vertical stability, currents can develop on the open field lines that surround the plasma, ie, the field lines that terminate on the vessel wall rather than closing on themselves. These currents, often referred to as "attached currents" or "halo currents", have been measured to be as large as 20 to 25% of the initial plasma current and have a significant effect on the plasma equilibrium. The current on these open field lines can also become large during and following the thermal quench phase of disruptions, so they must be included in the equilibrium model in EFIT to properly model the discharge.

The option in the EFIT code that includes the attached currents is turned on by setting ICUTFP = 2, KSKIPVS = 1, FCURBD=1, PCURBD=1, VSDAMP = 0.25 and ALPHAFP < 1.0. ALPHAFP is the variable that describes the width of the scrapeoff layer in which the halo currents flow. When ALPHAFP = 1.0, the width of the current layer outside the last closed flux surface is zero. When ALPHAFP = 0.0, the current layer extends either to the first separatrix surface surrounding the last closed flux surface or, if there is no external separatrix, it can flow anywhere inside the chamber . It is assumed that no current flows outside this external separatrix. ALPHAFP can be varied from 0 to 1. The variable ICUTFP = 2 permits currents to flow parallel to the magnetic field lines in this region because the pressure and pressure gradients are set to zero, (j x B) = 0. FCURBD=1 sets FF'=0 at the boundary of the scrapeoff layer and PCURBD=1 sets p'=0 at the boundary of the last closed flux surface, i.e. it sets the pressure gradient equal to zero at the edge of the main body of the plasma.

To determine the plasma equilibrium during a disruption, the code should be run for many different values of ALPHAFP varying from 0 to 1. The value of ALPHAFP which minimizes chi-squared corresponds to the best fit to the equilibrium.


VESSEL CURRENT

When EFIT is used to determine plasma equilibrium during normal non-disrupting discharges, it does not use the experimentally measured F-coil currents, but rather adjusts the 18 F-coil currents in order to match the measured flux and magnetic field. In addition, the vessel current is not included. If there is any vessel current, it is included in the F-coil currents that are determined by the code. During disruptions, however, the vessel current is typically large and can be comparable to the plasma current, so these currents should be included in the equilibrium fit.

EFIT divides the vessel into 24 segments and fits the current in these segments, however, it is difficult for the code to determine both the 18 F-coil currents and the 24 vessel segments. Therefore, when the fitting of the vessel current is desired, the measured F-coil current values should also be included in the fitting. To enable the vessel current fitting, set IFITVS = 1 and to include the F-coil data in the fitting, set FWTFC = 18*1.0. When the vessel currents are being included, EFIT uses the measurement of the external Rogowski, RL01, to determine the total current in both the plasma and the vessel. In the graphical output that shows the plasma shape, the value shown as the measured plasma current is actually this total current measurement including the vessel current.


TIME AVERAGING

Time averaging should not be used during the disruptions because the process is typically fast compared to the digitizing rate. To disable the averaging of all the magnetic signals except for the loop voltage (magnetic probes, flux loops, toroidal field, ohmic coil and F-coil current), set IAVEM = 0. To disable the averaging for the loop voltage, set IAVEV = 0.


ADDITIONAL OPTIONS

The following options use variables that must be set from the data input file because they do not appear in the EFIT_SNAP.DAT file. To create the input file, run EFIT in the "input" file mode and then edit this file (K0<shot>.<time>) to change the variables. Some of the variables listed below do not appear in the input file, but they can be added.

When the plasma gets very far away from the midplane (greater than 20-30 cm), EFIT will often have trouble in the BOUND routine because it initializes the current profile at the wrong vertical position. The default value for initializing the profile is to use the value given by ZP (EFIT actually calculates the ZP signal based on the magnetic probes and flux loops rather than using the signal calculated by the analog hardware, although the answers should be identical). However, when the plasma moves far from the midplane, there is often a large discrepancy between the vertical position given by ZP (optimized for centered plasmas) and the actual position of the current center. To fix this problem, set the variables ZELIP and ZBOUND equal to the position of the plasma current centroid (in meters) determined from the ZC value in the MFIT code.

When the plasma gets very far off axis, its size is very small and this will often result in an error in the routine CONTOUR (in the PSIAX section). This can be remedied by setting the variable ICNTOUR=1. This skips the usual contour routine.

After the thermal quench, the plasma stored energy is typically close to zero. The constraint that the stored energy be equal to zero can be added, by requiring that beta poloidal be equal to zero. To do this,

set the number of constraints equal to 1,

KCALPA=1,

set the appropriate element in the constraint matrix to 1

CALPA(1,1)=1,

and set the constraint vector equal to a small number

XALPA=7000.

The value of 7000 is actually small. The units are the MKS units of pressure gradient with the derivative with respect to poloidal flux. Typical values are above 105 nt/m2/weber/rad. When this additional constraint is used, an extra degree of freedom can be added back into the current profile, if desired, by setting KFFCUR=3. Typically KFFCUR=2. If you want beta poloidal to be above zero, the value of XALPA can be set to be a larger value.

A typical EFIT_SNAP.DAT file for a disruption is shown below.

 $efitin
  mxiter=25             itek=4
  scrape=0.04           nextra=0           kframe=2
  qvfit=0.0             fwtbp=0.          kffcur=2         kppcur=1
  fwtqa=0.00            icutfp=2
  iavem=0               iavev=0            pcurbd=1.        fcurbd=1.
  ifitvs=1                      alphafp=0.0     vsdamp=0.25   kskipvs=1
  fwtsi =   1., 1., 1. ,1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1.
  fwtmp2=  1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1.
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
                1.
  fwtcur=  9.
  fwtfc =  18*1.
 $
  NAMELIST input parameters               03/07/91
  calfa  : P' constraint matrix
  cgama  : FF' constraint matrix
  errmin : minimum convergence error before exit
  error  : relative convergence error desired
  fcurbd : 1. for zero FF' at edge, 0 for finite FF'
  fwtbp  : 1 for similar P' and FF' profiles, 0 otherwise
  fwtcur : fitting weight for plasma current, RL01 if use
           vessel
  fwtgam : MSE
  fwtmp2 : fitting weight for magnetic probes
  fwtqa  : axial q constraint, 1 to include, 0 for none
  fwtsi  : fitting weight for flux loops
  iavem  : +- averaging time in ms for magnetic data
  iavev  : +- averaging time in ms for loop voltage
  ifitvs : 1 to include vessel model
  itek   : plotting option, 0 for none, 4 for DISPOP file 55MFIT.POP
  keqdsk : 0 binary EQDSKs, 1 for ascii
  kffcur : number of fitting parameters in FF'
  kppcur : number of fitting parameters in P'
  mxiter : maximum iteration numbers, - for iteration history
  nextra : number of external field lines to plot
  pcurbd : 1. for zero P' at edge, 0 for finite P'
  qvfit  : constrainted axial q value
  scrape : total radial width in m to plot external field lines
  xalpa  : P' constraints vector
  xgama  : FF' constraint vector
  zelip  : initial guess for bounbary surface vertical position in m,
           > 1.e7 for guess based on magnetic probe signals