Function adas.run_adas314

def run_adas314(adf01=None, amdon=0.0, amrec=0.0, catype='TT', trd=None, etout=None, flat=False, zero=True, outfile=None, logfile=None)

Runs the adas314 program to generate effective CX cross sections from adf01 data and output the results in an adf01 file.

Parameters

adf01 : str
full name of ADAS adf01 charge exchange cross section file
amdon : float
atomic mass of the donor - defaults to element in adf01.
amrec : float
atomic mass of the receiver - defaults to element in adf01.
catype : str
type of conversion 'tt' : thermal/thermal - equal temperatures for donor and receiver 'tr' : thermal receiver, monoenergetic donor - must set trd 'td' : thermal donor, monoenergetic receiver - must set trd 'me' : special monoenergetic case
trd : float
donor energy for catype == 'tr' receiver energy for catype == 'td'
etout : float, array
temperatures (eV) for output data set for the 'tt', 'td', 'tr' cases, energy/amu for output data set for 'me'.
flat : bool
if True extrapolate to lower energies by setting these to first energy in the adf01 file. Default is False.
zero : bool
if True extrapolate to lower energies by setting these to 0.0. default is True.
outfile : str
full name of ADAS adf01 output file
logfile : str
name of log file, defaults to no output file

Returns

Notes

Calls a fortran executable code and communicates via a bi-directional pipe connected to stdout.

If amdon and amrec and not supplied the routine uses the mass given by xxeiam() for the elements given in the adf01 file. The central ADAS adf01 files usually have H as the donor so this value will be 1.0.

References

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

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

Version History

  • Martin O'Mullane, 06-01-2023
    • First version

Examples

Make a thermal-thermal adf01 for C5+.

>>> import adas as adas
>>> import numpy as np
>>> adf01='/home/adas/adas/adf01/qcx#h0/qcx#h0_old#c6.dat'
>>> adas.run_adas314(adf01=adf01, amdon=2.0, amrec=12.0,
...                  catype='TT', etout=[5.0e3, 10.0e3, 25.0e3],
...                  outfile='c6.dat')