Function adas.adas316_mc
def adas316_mc(te, tp, dens, densp, energy, itype=[0], n=[0], n11=[0], scale=[1.0], adf02=None, adf25=None, n_pop=[3], adf26=None)
-
Calculates the beam stopping and beam level populations for a single set of conditions. Arbitrary scaling of up to 100 cross sections may be applied to enable uncertainty propagation.
Parameters
te
:float
- electron temperature
tp
:float
- ion temperature (eV)
dens
:float
- electron density (cm-3)
densp
:float
- ion density (cm-3)
energy
:float
- beam energy (eV/amu)
a02file
:str
, optional- adf02 file with low level ion impact cross section data if not specified the central ADAS recommendation data is used
a25file
:str
, optional- a driver file for adas316 - it is optional here because suitable defaults for all settings are provided, but if supplied the adf25 values will overwrite these defaults but not for (te, tp, dens, denp, bmener).
itype
:int, array
, optional- type of cross section
0 = do not apply any scaling 1 = electron impact excitation 2 = electron impact ionisation 3 = H+ impact excitation 4 = H+ impact ionis + CX 5 = Zimp ion impact excitation 6 = Zimp ion impact ionis + CX
n
:int
, optional- n level for ionisation or upper n for excitation
n11
:int
, optional- lower n for excitation
scale
:float
, optional- multiplier applied to cross section
n_pop
:int, array
, optional- requested n levels for population output, defaults to 3
a26file
:str
, optional- detailed output listing - set to 'NULL'
Returns
bms
:float
- beam stopping coefficient (cm3/s)
pop
:float, array
- populations of the n levels requested in n_pop
Notes
To calculate unmodified quantities set itype to 0.
For Monte Carlo analysis the distribution of uncertainties in a cross section must be seup outside this routine and expressed as a scaling factor applied to the nominal cross section. For transitions (electron or ion ipact) n and n' are needed, for ionization just the n level is required.
Calls a fortran based shared object file - not pure python.
References
Version History
- Martin O'Mullane, 18-06-2020
- First version
Examples
Calculate the beam stopping and beam emission (Balmer-alpha) coefficients for a beam of 70keV/amu in a plasma with Te=3keV, Tion=2keV, electron and ion densities of 1e13 cm-3.
>>> import adas as adas >>> bms, pop = adas.adas316_mc(3e3, 2e3, 1e13, 1e13, 70e3) >>> aval_32, fval_32 = adas.r8ahnn(3, 2) >>> print('BMS, BME = ', bms, pop[0]*aval_32/1e13) BMS, BME = 8.698086939785687e-08 3.4138487684754903e-09
And the beam stopping when the primary ion-impact ionization cross section is increased by 15%
>>> bms, _ = adas.adas316_mc(3e3, 2e3, 1e13, 1e13, 70e3, itype=[4], n=[1], scale=[1.15]) >>> print('BMS = ', bms) BMS = 9.631255343883777e-08