Jump to: navigation, search

3. Construction of the "ef950711.d3d" data-file

This is the input data file for programme "EFUND" and it resides in the directory "efit/green/run". The data file contains the specifications of the magnetic diagnostics, poloidal field coils and vessel. The contents of this data file (apart from the first few lines which are specific to the control of "EFUND") are written out during run time to a file "dprobe.dat" for use by the "EFIT" programme.


3.1. Description of variables

This section contains a description of the variables to which the "ef950711.d3d" data file assigns values. Note that in both the programmes "EFUND" and "EFIT", the numbers of diagnostic detectors and current carrying conductors are defined in parameter statements contained within the programme. Section 4 describes the source code modifications that may be required.

The following variables are assigned values by the "ef950711.d3d" data file (please refer to section 3.3 for a fuller description of the geometrical variables):

Note that data values are assumed to be written in SI units, apart from angles which are in degrees.

3.1.1. Magnetic probe diagnostics

variable[dim] description
mpnam2[magpri] (char*10) magnetic probe names.
xmp2[magpri] r-coordinates of magnetic probes.
ymp2[magpri] z-coordinates of magnetic probes.
amp2[magpri] angle of magnetic probes (measured counter-clockwise from positive r-direction) in degrees.
smp2[magpri] length of magnetic probes.
patmp2[magpri] (not required)

3.1.2. Flux loop diagnostics

variable[dim] description
lpname[nsilop] (char*10) flux loop names.
rsi[nsilop] r-coordinates of flux loops.
zsi[nsilop] z-coordinates of flux loops.
wsi[nsilop][1] width of flux loops.
hsi[nsilop][1] height of flux loops.
as[nsilop][1] angle of flux loops(1)
as2[nsilop][1] angle of flux loops(2)
  1. 1.0 1.1 1.2 1.3 Enables flux loops of finite cross-section area with tilt. Variables are defined like the p.f. coils below. Note, however, the option isn't guaranteed!

3.1.3. Current-carrying coils

Mainly for historical reasons, EFIT has four classes of current-carrying coils: f-coils, e-coils, a-coils and vessel segments. In principal coils can be defined using any of these conductor classes, however, there are certain features which are special to each class. The recommended conductor class to choose is as follows:

  • F-coils. Define all p.f. coils apart from the ohmic heating coil in this category. It is probably also a good idea to put the vessel currents in this class.
  • E-coils. Define the ohmic heating coil in this class.
  • A-coils. This class was for the advanced divertor coils installed on D-3D, and its use on other machines is not recommended.
  • Vessel segments. Vessel segments can be defined in this class, but there is more flexibility available (!?) in the fitting procedure if they are defined as f-coils.
F-coils
variable[dim]description
turnfc[nfcoil]number of turns for each p.f. coil.
rf[nfcoil]r-coord of p.f. coil centre
zf[nfcoil]z-coord of p.f. coil centre
wf[nfcoil]width of p.f. coil (delta-r)
hf[nfcoil]height of p.f. coil (delta-z)
af[nfcoil]angle of p.f. coil(1)
af2[nfcoil]angle of p.f. coil(2)
E-coils
variable[dim]description
re[necoil]r-coord of o.h. coil centre
ze[necoil]z-coord of o.h. coil centre
we[necoil]width of o.h. coil (delta-r)
he[necoil]height of o.h. coil (delta-z)
ecid[necoil]group index of coil. Coils which must carry identical current, should be placed in the same coil group.
A-coils
variable[dim]description
racoil[nacoil]
zacoil[nacoil]
hacoil[nacoil]
wacoil[nacoil]
Vessel segments
variable[dim]description
rsisvs[nvesel]resisitivity in vessel, may be used for post-processor calculations.
vsname[nvesel](char*10) vessel segment names
rvs[nvesel] r-coord of vessel segments.
zvs[nvesel]z-coord of vessel segments.
wvs[nvesel]width of vessel segments.
hvs[nvesel]height of vessel segments.
avs[nvesel]angle of vessel segments (1)
avs2[nvesel]angle of vessel segments (2)

3.1.4. Programme-control variables

variabledescription
RLEFT r-min value of solution grid
RRIGHTr-max value of solution grid
ZBOTOz-min value of solution grid
ZTOPz-max value of solution grid
NSMP2Number of divisions to use for computing response of magnetic probes
IGRID flag: set to 1 in order to generate the greens functions associated with the plasma current.
IACOILflag: (obsolete) set to 0.
IECOILflag: set to 1 in order to generate the greens functions associated with the o.h. coils.
IFCOILflag: set to 1 in order to generate the greens functions associated with the p.f. coils.
ISLPFCflag: (obsolete) set to 1.
IVESL flag: set to 1 in order to generate the greens functions associated with the vessel segements.


3.2. Structure of the "ef950711.d3d" data-file

The structure of this data file can be a little confusing. Most of the variables are read in as namelist variables. Additional variables that are (mostly!) not in the namelist are read-in afterwards.

Namelist variables The following is a list of the namelist variables:

  • All "programme control variables" These must be placed at the very top of the namelist (see also section 5).
  • All magnetic probe information.
  • All flux loop information.
  • Some vessel information: RSISVS, VSNAME.
  • Some f-coil information: TURNFC
  • All a-coil information.

Variables following namelist The following variables are read in after the namelist:

  • Some f-coil information: RF,ZF,WF,HF,AF,AF2.
  • All e-coil information.
  • Some vessel information: RVS,ZVS,WVS,HVS,AVS,AVS2.
  • Optionally, all flux loops information, if it was not defined in the namelist.

The precise structure of the "ef950711.d3d" data-file is rather awkward due to the use of formatted read statements. An old "ef950711.d3d" file in directory /efit/green/run should exist and may serve as a guide to writing the new data file. In addition, it is essential to see how the data is read-in. The following is based on the EFIT source code:

     namelist/in3/mpnam2,xmp2,ymp2,amp2,smp2,rsi,zsi,wsi,hsi,as,
    .  as2,lpname,rsisvs,vsname,turnfc,patmp2,racoil,zacoil,
    .  hacoil,wacoil
       open(unit=80,status='old',file='lao$efund:dprobe.dat')
       rsi(1)=-1.
       read (80,in3)
       read (80,10200) (rf(i),zf(i),wf(i),hf(i),af(i),af2(i),
    .          i=1,nfcoil)
       if (rsi(1).lt.0.)
    .  read (80,10200) (rsi(i),zsi(i),wsi(i),hsi(i),as(i),as2(i),
    .          i=1,nsilop)
       read (80,10220) (re(i),ze(i),we(i),he(i),ecid(i),
    .                                  i=1,necoil)
       if (ifitvs.gt.0.or.icutfp.eq.2) then
         read (80,10200) (rvs(i),zvs(i),wvs(i),hvs(i),
    .                                  avs(i),avs2(i),i=1,nvesel)
10200 format (6e12.6)
10220 format (5e10.4)

Note that the vessel information is only used if vessel segements are to carry current (ifitvs=1) or if there force-free currents in the scrape off layer (icutfp=2). The default for both these variables is zero. (These are EFIT variables, and are not contained in the EFUND code.)


3.3. Representation of conductors with finite cross-section

The diagrams below illustrate how conductors with finite cross-section can be represented. Non-rectangular coils may be represented in one of two ways by setting AC or AC2 to a non-zero value. Note that not more than one of these variables must be set to a non-zero value.

                                 xxxx           
                             xxxx   x
                         xxxx       x
                     xxxx           x       ---                 xxxxxxxxxxxxx   
                 xxxx               x        |                xx         xx     
        ---  xxxx                   x        |              xx         xx       
         |   x          X        xxxx      HC             xx         xx          
         |   x      (rc,zc)  xxxx            |          xx   X     xx           
       HC    x           xxxx                |        xx (rc,zc) xx             
         |   x       xxxx                    |      xx         xx               
         |   x   xxxx                        |     xx         xx                
        _|_  xxxx   ^                       --- xxxxxxxxxxxxx    ^              
                  AC )                                        AC2  )            
             |----------WC----------|           |---WC------|                   

     variable           description
     ******************************************* 
       (rc,zc)    centre point of coils  
       hc         height of coil
       wc         width of coil
       ac         anti-clockwise rotation of coil
       ac2        anti-clockwise rotation of coil