Function adas.run_adas408

def run_adas408(adf03=None, adf35=None, te=None, dens=None, mass_h=None, mass_z=None, adf11types=None, passdir='./', ext='pass', filter=None, year=89, acdtype='RR+DR', prbtype='RR+DR+BR', logfile=None)

Runs ADAS408 to produce baseline adf11 files.

Parameters

adf03 : str
atompars data file
adf35 : str
energy transmission filter file
te : float, array
requested electron temperatures (reduced units) for adf25 driver file.
dens : float, array
requested electron temperatures (reduced units) for adf25 driver file.
mass_h : float
hydrogen isotope mass (only needed for ccd and prc)
mass_z : float
element isotope mass (only needed for ccd and prc)
adf11types : str, list
one of a selection from: 'acd', 'scd', 'ccd', 'plt', 'prb', 'prc', 'pls', 'zcd', 'ycd', 'ecd'. the default is to calculate all types.
passdir : str
location of where to write adf11 files, default is the directory from where the function is called
ext : str
extension label for adf11 file, default is 'pass'
year : int
year number for adf11 file, default is 89
filter : str
name of filter for use in naming adf11 file (only needed if an adf35 file is supplied)
acdtype : str
Choice for which processes are output in acd file. The default is all, ie radiative and dielectronic recombination. When set to 'RR' just the radiative recombination rates are output and 'DR' for just dielectronic recombination.
prbtype : str
Choice for which processes are output in prb file. The default is all, ie radiative and dielectronic recombination and bremsstrahlung. A single process can be selected by seeing this to 'RR', 'DR' or 'BR'
logfile : str
name of log file, defaults to no output file

Returns

nothing - the output is file written to disk
 

Notes

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

The filename follow the pattern, adf11typeYear_elem.filter.ext so names such as acd72_ni.dat and prb04_ni.sxr2.dat are typical.

References

ADAS manual description of adas408: http://www.adas.ac.uk/man/chap4-08.pdf

Version History

  • Martin O'Mullane, 12-05-2021
    • First version

Examples

Make baseline ionisation and recombination rate coefficient files for carbon.

>>> import adas as adas
>>> import numpy as np
>>> adf03 = '/home/adas/adas/adf03/atompars/atompars_mm#c.dat'
>>> te = np.geomspace(1, 30e3, 25)
>>> dens = np.geomspace(1e8, 1e15, 12)
>>> adas.run_adas408(adf03=adf03, te=te, dens=dens,
                     adf11types=['acd', 'scd'],logfile='paper-408.txt')

acd89_c.pass, scd89_c.pass and paper-408.txt will be written to the directory the routine was called from.