Function adas.read_adf22

def read_adf22(files=None, energy=[0.0], te=[0.0], dens=[0.0], fraction=1.0)

Interpolate/extrapolate the beam emission coefficients (BMS) or excited beam fractions (BMP) from adf22 files. Constructs an effective value if more than one adf22 file is specified.

Parameters

files : str, array
full names of ADAS adf22 files
fraction : float, array
target ion fractions; same as number of adf22 files can be 2D with 1st dimension corresponding to the parameters and 2nd dimension being the files.
energy : float, array
requested beam energies (eV/amu)
te : float, array
requested temperatures (eV)
dens : float, array
requested densities (cm**-3)

Returns

coeff : float, array
total effective beam emissivity coefficient (ph cm3 s-1) or fractional population (dimensionless).

Notes

When more than one adf22 is specified a composite, or effective, value is calculated.

A 2D fraction array can be supplied to calculate stopping along a plasma profile. In this case te and dens could also vary.

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

Since the adf22 and adf21 formats are identical this routine calls read_adf21 and is provided for convenience.

References

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

Version History

  • Martin O'Mullane, 17-01-2020
    • First version

Examples

Fractional population of the n=3 level in the beam due to a 4% Be contaminated plasma.

>>> import adas as adas
>>> files=['/home/adas/adas/adf22/bmp10#h/bmp10#h_3_h1.dat',
...        '/home/adas/adas/adf22/bme97#h/bme97#h_be4.dat']
>>> fraction=[0.96, 0.04]
>>> energy=np.geomspace(1e3, 100.0e3, 4)
>>> te=np.zeros(4)+2.0e3
>>> dens=np.zeros(4)+6.0e13
>>> adas.read_adf22(files=files,fraction=fraction,energy=energy,te=te,dens=dens)
array([0.00080805, 0.00087072, 0.00128154, 0.00254549])