Function adas.xxdata_37

def xxdata_37(file=None)

Reads an adf37 electron energy distribution file (EEDF) file and returns all of its contents in a dictionary.

Parameters

file : str
full name of ADAS adf37 file

Returns

fulldata : dict
contents of the adf37 file
    'file'       :  adf37 filename
    'title'      :  header for file
    'icateg'     :  category of file
                      1 => superposition
                      2 => numerical
    'ieunit'     :  energy units of distribution function
                      1 => kelvin
                      2 => eV
    'nenerg'     :  type 1 => number of distribution families
                         2 => number of energy points
    'nblock'     :  type 1 => number of members in output family
                         2 => number of effective temperatures
    'nform1'     :  type of threshold behaviour
                      1 => cutoff
                      2 => energy^param1
    'nform2'     :  type of high-energy behaviour
                      1 => cutoff
                      2 => energy^(-param2[0])
                      3 => exp(-param2[0]*energy)
                      4 => exp(-param2[0]*energy^param2[1])
    'param1'     :  parameter of threshold form
    'param2'     :  parameter of high-energy form
    'ea'         :  energy points of tabulation
                      array(nblock,nenergy)
    'fa'         :  distribution function tabulation
                      array(nblock,nenergy)
    'mode_eng'   :  most probable energy (eV), array(nblock)
    'median_eng' :  median energy (eV), array(nblock)
    'teff'       :  effective temperature (eV), array(nblock)

Notes

Pure python routine.

References

ADAS manual description of adf37: http://www.adas.ac.uk/man/appxa-37.pdf

Version History

  • Martin O'Mullane, 17-07-2018

    • First version
  • Martin O'Mullane, 23-11-2019

    • Use the adas readfile routine to read in file.

Example

An EEDF from a kinetic code.

>>> import adas as adas
>>> file='/home/adas/adas/adf37/JET_SOL_example.dat'
>>> fulldata = adas.xxdata_37(file)
>>> fulldata['ea'][0,0:fulldata['nenerg']:5]
array([1.00e-01, 5.01e+01, 1.00e+02, 1.50e+02, 2.01e+02, 2.51e+02,
       3.01e+02, 3.51e+02, 4.01e+02, 4.51e+02, 5.01e+02, 5.51e+02,
       6.02e+02, 6.52e+02, 7.02e+02, 7.52e+02, 8.02e+02, 8.52e+02,
       9.02e+02, 9.52e+02, 1.00e+03, 1.05e+03, 1.10e+03, 1.15e+03])
>>> fulldata['fa'][0,0:fulldata['nenerg']:5]
array([2.00e-01, 1.73e-04, 1.12e-04, 7.19e-05, 4.61e-05, 2.92e-05,
       1.88e-05, 1.14e-05, 7.10e-06, 4.30e-06, 2.71e-06, 1.63e-06,
       1.02e-06, 6.44e-07, 3.27e-07, 2.25e-07, 1.55e-07, 9.46e-08,
       5.39e-08, 2.27e-08, 1.56e-08, 1.08e-08, 1.82e-08, 2.42e-09])