Function adas.read_adf14

def read_adf14(file=None, block=1, trec=[0.0], tdon=[0.0], mrec=0.0, mdon=0.0)

Interpolate/extrapolate thermal charge transfer rate coefficients from adf14 (TCX) files.

Parameters

file : str
full name of ADAS adf14 file
block : int
selected block
trec : float, array
receiver temperatures (eV)
tdon : float, array
donor temperatures (eV)
mrec : float
receiver mass (amu)
mdon : float
donor mass (amu)

Returns

coeff : float, array
ionisation rate coefficient (cm3 s-1)
info : dict
information from header line of the selected block in adf14 file
'donor'    : donor
'receiver' : receiver
'state'    : final state specifer

Notes

Calls a fortran based shared object file - not pure python.

References

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

Version History

  • Martin O'Mullane, 02-04-2021
    • First version

Examples

Extract the rate coefficient for deuterium D0 + D+ process.

>>> import adas as adas
>>> import numpy as np
>>> file='/home/adas/adas/adf14/tcx#h0/tcx#h0_h.dat'
>>> trec=[10, 30, 70, 100, 200]
>>> tdon=[10.0, 10.0, 10.0, 10.0, 10.0]
>>> coeff, info=adas.read_adf14(file=file, block=1, trec=trec, tdon=tdon,
...                             mrec=2.0, mdon=2.0)
>>> coeff
array([1.52919606e-08, 1.96295534e-08, 2.55287280e-08, 2.87857911e-08,
       3.67859531e-08])
>>> info
{'donor': 'H + 0 (1)', 'receiver': 'H + 1 (1)', 'state': 'TOTAL'}