Function adas.run_adas212

def run_adas212(file=None, adf37=None, kappa=None, x=None, rlines=None, logfile=None)

Runs the adas212 code to map dielectronic recombination rates in adf09 files to adf04 files.

Parameters

file : str
full name of ADAS adf18 driver file
adf37 : str
full name of optional ADAS adf37 numerical, electron energy distribution file
kappa : float
optional parameter for kappa distribution
x : float
optional parameter for Druyvestyn distribution
rlines : str
name of a file to output the R-lines
logfile : str
name of log file, defaults to no output file

Returns

nothing - output files are written to disk
 

Notes

The usual, and default, operation is to map DR rates from one, or more, adf09 files onto any R-lines, presumed to be radiative recombination (via adas211), in the adf04 file. If the radiative recombination R-lines are not present, the code generates R-lines with just the DR rates.

Additionally these rates may be modified for non-Maxwellian electron energy distribution functions. For numerical EEDFs supply an adf37 file and for kappa or Druyvesteyn functions the kappa or x parameter are required. Choose just one of these options.

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

Version History

  • Martin O'Mullane, 12-07-2022
    • First version

Examples

Extract the rates from adf09 files for dielectronic recombination from Li+ to neutral Li0.

This is a slightly contrived example to avoid writing a new driver file. The adf04 file in the central ADAS adf18 driver file is replaced with the central ADAS version that does not include R-lines but the levels, and hence the mapping in the adf18 file, are the same.

>>> import adas as adas
>>> file='/home/adas/adas/adf18/a09_a04/drm96#li/drm96#li_li0.dat'
>>> a18,_ = adas.readfile(file)
>>> a18[2] = '"ADASCENT"/adf04/lilike/lilike_cpb02#li0.dat   : specific ion file'
>>> adas.writefile('/tmp/a18_driver', a18)
>>> adas.run_adas212(file='/tmp/a18_driver', rlines='/tmp/dr_lines.txt')
>>> res,_ = adas.readfile('/tmp/dr_lines.txt')
>>> res[10]
Out[1]: 'R  2  +2         3.24-14 3.77-14 5.20-14 2.47-13 4.25-13 2.85-13 1.40-13'