Note
SIKE is a work in progress and documentation will be coming soon. Please contact [email protected] for any questions running the code in the meantime.
SIKE (Scrape-off layer Impurities with Kinetic Electrons) is a simple atomic kinetics solver for impurity species relevant to magnetic fusion plasmas. It is intended to study the effect of non-Maxwellian electron distributions on mean ionisation, radiative loss rates, etc. For a set of atomic state densities
where
The SIKE model and atomic data is described in more detail in Power et al. 2025 PPCF 67 045030: https://doi.org/10.1088/1361-6587/adc200.
SIKE was developed to study the sensitivity of atomic rates to non-Maxwellian electron distributions in magnetic fusion plasmas. It is not currently as accurate as commonly used modelling databases such as ADAS, please see the notebook and comparison plots in the benchmarking directory to get an idea of the differences.
Note
SIKE is a python package, intended to work with python>=3.11. It is recommended to create and activate a virtual environment with conda (e.g. conda create -n sike python=3.11 && conda activate sike
) prior to following the quickstart steps below in order to avoid any conflicts with existing python environments.
-
Clone or download the repository, open a terminal in the top-level directory and run:
pip install .
-
Download and configure the atomic data:
python scripts/sike_setup.py
Note
If the download fails for any reason, see section on atomic data below for manual setup instructions.
-
In a python script or notebook, run the following code:
import numpy as np import sike nx = 100 Te = np.linspace(1,10,nx) ne = 1e20 * np.ones(nx) c = sike.SIKERun(ne=ne, Te=Te, element="C") ds = c.evolve(dt_s=1e0) sike.plotting.plot_nz(ds)
-
The above example was initialised with plasma temperature and density profiles. To use electron distributions instead:
import numpy as np import sike nx = 100 Te = np.linspace(1,10,nx) ne = 1e20 * np.ones(nx) hot_frac = 0.001 fe = sike.get_bimaxwellians(n1=hot_frac*ne, n2=(1-hot_frac)*ne, T1 = 50*np.ones(nx), T2 = Te) c = sike.SIKERun(fe, element="C") ds = c.evolve(dt_s=1e0) sike.plotting.plot_nz(ds)
The atomic data for SIKE has been derived using outputs from the Flexible Atomic Code (M. F. Gu, Canadian Journal of Physics 86, 2004) and FLYCHK (H. K. Chung et al. High Energy Density Physics 1, 2005).
Because the atomic data files are quite large, and not all users will need to download atomic data for all impurity species, it is not bundled along with the package. Instead, run the setup method to retrieve the atomic data from a data repository (zenodo). There are three options:
-
Run the script "scripts/sike_setup.py":
python scripts/sike_setup.py --savedir <SAVEDIR> --elements <ELEMENTS>
e.g.
python scripts/sike_setup.py --savedir /Users/username/Downloads/ --elements Li C
. -
or, in a Python script/notebook, run:
import sike sike.setup(elements=<ELEMENTS>, savedir=<SAVEDIR>)
e.g.
sike.setup(elements=["Li", "C"], savedir="/Users/username/Downloads/")
-
If the download fails, atomic data can be downloaded manually from the Zenodo record: https://zenodo.org/records/14205937. Select one or more elements to download, then extract the folders (named "Lithium", "Carbon", etc) to a local directory somewhere. Then pass this directory in the
atomic_data_savedir
argument to theSIKERun
initialisation, i.e.c = sike.SIKERun(..., atomic_data_savedir="<SAVEDIR>")
Above,
<ELEMENTS>
is a list of elements (specified by symbol) to download data for. If<ELEMENTS>
is empty orNone
, then all atomic data will be downloaded. Currently, the full list of elements for which data is available is:- Hydrogen ("H")
- Helium ("He")
- Lithium ("Li")
- Beryllium ("Be")
- Boron ("B")
- Carbon ("C")
- Oxygen ("O")
- Nitrogen ("N")
- Neon ("Ne")
- Aluminium ("Al")
- Argon ("Ar")
- Iron ("Fe")
- Krypton ("Kr")
- Molybdenum ("Mo")
- Xenon ("Xe")
- Tungsten ("W")
<SAVEDIR>
is the location of a directory where the atomic data will be saved. By default, a directory called "sike_atomic_data" will be created here, and the downloaded atomic data placed inside. If empty orNone
, then you will be prompted to input the location.