Function adas.gcr_adf10_to_adf11
def gcr_adf10_to_adf11(files=None, met_files=None, adf11=None, comments=None, project='Unknown', resolved=False)
-
Operates on adas208 produced partial adf10 files to make a single adf11 file.
Parameters
files
:str, list
- full name of adf10 files generated from adas208.
met_files
:str, list
- full name of adf10 metastable fraction files generated from adas208, not needed if resolved is True.
comments
:str, list
- additional comments for the end of the file as a list of strings.
project
:str
- project name. Default is 'Unknown'
resolved
:bool
- if True the adf11 file will be resolved by metastable, default is False which gives a stage-stage adf11 file.
Returns
code
:int
- success code
Notes
adas208 is the generalized collisional-radiative (GCR) population model. This code assembles a set of outputs from adas208 into full, or partial, iso-nuclear adf11 files.
The partial adf10 files must all be of the same class.
The partial adf10 files must have the same temperature and density grid since no interpolation/extrapolation is done by this routine.
The ionisation stages included in the adf11 file are determined from the set of adf10 files supplied.
There is no 'met' class adf11 since these are only required when generating unresolved adf11 files.
The other method of generating adf11 files from adf10 is to merge the partial adf10 from adas208 into iso-electronic collections with adas403 and to produce the adf11 file with adas404.
References
ADAS manual description of adas208: http://www.adas.ac.uk/man/chap2-08.pdf
ADAS manual description of adf11: http://www.adas.ac.uk/man/appxa-11.pdf
Version History
-
Martin O'Mullane, 30-09-2020
- First version
-
Martin O'Mullane, 28-03-2021
- Replace xxdata_10_p208 with xxdata_10 but use variant='p208' to make clear which type of adf10 file is being used.
Examples
The example assumes that adas208 was run on boron ions and the resulting adf11 file contains metastable-unresolved recombination rates for recombining stages 1+, 2+ and 3+. Note the parent metastable adf10 file is required to assemble the final unresolved coefficient.
>>> import adas as adas >>> files = ['acd208_b_02.dat', 'acd208_b_01.dat', 'acd208_b_00.dat'] >>> met_files = ['met208_b_03.dat', 'met208_b_02.dat', 'met208_b_01.dat'] >>> adf11 = 'acd11_b-test.dat' >>> adas.gcr_adf10_to_adf11(files=files, met_files=met_files, adf11=adf11, >>> project='test workflow', resolved=False)