Published July 1, 2025 | Version v1
Software Open

SPRAY – SPuttering simulation via RAYtracing of particles

Description

SPRAY – SPuttering simulation via RAYtracing of particles

Python 3 Code for simulation of rough surface sputtering / ion reflection, using repository data from one-dimensional BCA simulations and microscopy image input Independent on lateral / vertical height of image or resolution (as long as enough RAM is provided). The working principle is described in greater detail in the supplementary material to the following publication:

C. Cupak, P.S. Szabo, H. Biber, R. Stadlmayr, C. Grave, M. Fellinger, J. Brötzner, R.A. Wilhelm, W. Möller, A. Mutzke, M.V. Moro, F. Aumayr, Sputter yields of rough surfaces: Importance of the mean surface inclination angle from nano- to microscopic rough regimes, Appl. Surf. Sci. 570 (2021) 151204. https://doi.org/10.1016/j.apsusc.2021.151204.

Files contained:

  • SPRAY_V4_73.py – the main code; Run this to run the simulation
  • roughness2D.py – provides all necessary classes and methods 
  • read_data.py – provides methods to read in the 1D BCA input data
  • Data.zip – example for 1D BCA data structure necessary to run SPRAY simulations. Should be extracted such that the directory "Data" is in the same directory as SPRAY_V4_73.py
    • Data/SDtrimSP_AngleEnergySweep.dat is a table of relevant sputter yields for all target species as a function of energy and incidence angle
    • Data/table1.txt gives data on atomic masses, etc.
    • Data/Atoms/ contains emission files for the sputtered recoils. Follow the naming convention: The integer in the file name gives the projectile incidence angle.
    • Data/Ions/ contains emission files for the reflected projectiles. Same naming convention as above
  • README.md – a description of the code, the inputs and outputs; basically this description
  • SPRAY.inp – an exemplary input file containing all necessary input parameters

The necessary inputs are described in greater detail below.

System requirements:

Tested and developed for usage under LINUX (Ubuntu 20.04.2 LTS and newer); For (old version) ready for Win10, contact the depositors.
Recommended PC specification: 

  • 16GB RAM (for larger + high resoluted images, more is always better),
  • 4 physical CPU Cores (the more you have, the faster it should work)
  • Some GB empty space on disk. For high statisical parameters for SPRAY simulation (pi, ns, ss), the emission list files can easily reach data volume in GB range

Required Python3.8 libraries:

To be installed prior execution by pip install; the listed versions provided stable execution during benchmarking:

  • numpy (1.20.2)
  • matplotlib (3.4.1)
  • psutil (5.8.0)
  • numpy-stl (2.16)
  • pandas (1.2.3)
  • vtk (9.0.1)
  • all other libraries should be available by default

For convenience, a requirements.txt is provided; can be used with pip install -r requirements.txt

Necessary Input:

Input file "SPRAY.inp": 

General user input parameters need to be defined in the "SPRAY.inp" file

  • number of primary ions pi
  • number of sputtered atoms per primary ion ps
  • number of secondary sputtered atoms ss (if ss larger than 0, also ri needs to be larger than 0)
  • number of CPU cores (or available virtual cores) used for this simulation np
  • desired incidence angles for simulation (sa, ba, ia) = starting, last and increment step of angles
  • List of elements, starting with the ion species, for the composition of the target. Order should be consistent with order in provided repository data (see below). et
  • declaration of path to repository data directory. if "loc" is listed, then the data repo needs to be locally in the same directory as SPRAY executable di
  • a factor corresponding to the size of central irradiated area of the surface (0.8 = 80% recommended to prevent corner effects) as
  • declaration of the surface input file type (either "xyz" or "stl" is supported) sf
  • number of reflected ions per primary ion ri
  • azimuthal angle mode aa (x, rand); x = classic from x axis, rand = random azimuthal impact 
  • flag for display setting ds. Default option "no" (e.g., for headless computers without screen). "No" activates Xvfb environment to create a virtual desktop. 

Microscopy images:

A flexible number (at least one) of microscopy images can be provided:

  • should be in form of a text file with .xyz file ending
  • Header lines needs to be marked with "#"
  • Take care: Greek letters or special characters like ä, ö, ü etc... may cause encoding troubles!
  • The shape of the data should be in 3 columns, representing the lateral x and y and vertical height z values
  • The unit should be in m, (will be converted to microns during SPRAY execution); 
  • all 3 coordinates need to be in the same unit
  • ideally, the minimum surface height and xy coordinate is set to 0. 
  • ATTENTION: Surface may not be properly hit by primary ions if the surface consists of a rather smooth, flat plane with some single spikes under grazing ion incidence! Especially important for AFM images with artifacts

STL file inputs:

A flexible number (at least one) of .stl files can be provided:

  • can be generated by any method, e.g., Solidworks,...
  • both surfaces, but also closed volumes should be supported
  • the units in the file should be in microns (principally the simulation is scale independent, but the print outputs are declared as microns)
  • the reference frame must be the following: lateral coordinates are x and y. Positive z values correspond to height value sthe ion beam (if ion incidence angle > 0°) comes from the positive x axis.
  • the lateral coordinates of the computational volume must start at x = y = 0, and should be strictly positive.
  • ideally, also the minimum z value should be 0


BCA simulation repositories: 

all stored in the folder Data

  • ATTENTION: This record contains just dummy data for illustration purposes, since this repository is usually large in volume (GB range). Moreover, a it has to be provided by the user for every target-projectile combination anyway.
  • Principally, any BCA code can be used for repository creation, but the shape of the data needs to be suitable
  • Sweep file (fine discretisation for 0-89° ion incidence and for 50eV - max. energy), which provides Sputter Yields and reflection coefficients for all target elements and reflection coefficients for the ions. Name = "*_AngleEnergySweep.dat" 
  • Periodic table of elements (Name = "table1.txt"); necessary to load amu for given elemental species
  • Repository files including emission trajectories of both sputtered ions and reflected ions. These simulations need to be performed assuming a flat target of the same composition as also used for the Sputteryield Sweep file (see -> before). A set of simulations is required, where various ion incidence angles are used with relatively fine discretisation. It is important that the simulated angles range from 0 to 85 deg, 5deg increments. For repository simulations using Tri3dyn (2019-2020) or SDtrimSP (V6), useful python routines for data shaping are available by the authors. Ask the depositors if required.
  • emission list files sputtered atoms: individual files with the trajectories of a single atom species of the target need to be provided (no mixed emission files) for each incidence angle simulated. Files need to be located in folder structure: Data/Atoms/angle/... (each inc. angle case is collected in a subfolder) coordinates in accordance to system of TRI3DYN. It is recommended to compare the shape of these files according to the provided dummy repository data: Data/Atoms/... principally columnar shape like: x,y,z (directional vector components, normalised)
  • emission list files reflected ions: individual files with the trajectories of reflected ions need to be provided for each incidence angle simulated. files need to be located in folder structure: Data/Ions/... (each inc. angle case is collected in a file) coordinates in accordance to system of TRI3DYN. It is recommended to compare the shape of these files according to the provided dummy repository data: Data/Ions/... principally columnar shape like: Energy,x,y,z (directional vector components, normalised) for the reflected ions, also the kinetic energy after reflection needs to be considered, which influences secondary sputtering events.
  • It has to be noted that the sputteryields / reflection coefficients are taken from the Sweep Repository only. The emission list files are just the basis for the emission distribution utilised in SPRAY, while always a fixed and constant number of trajectories is taken as sample from these emission lists: (i.e.: ps = 100 virtually sputtered atoms for each primary ion impact, ss = 50 virtually secondary sputtered atoms for a reflected ion impact). Therefore, the length of the emission list files or their origin (BCA Code) must not directly be connected to the results of the Sweep Repository. However, a large number of emission trajectories in these files is beneficial to have a representative distribution at hand.

Output of simulations:

  • effective Sputter Yields
  • 3D emission list files of successfully sputtered atoms and reflected ions (Attention, it's in TRI3DYN coordinates due to historic reasons!) Furthermore, only the azimuthal angle option "x" should be used, as otherwise the emission is a-priori equally distributed. The emission files, however, contain the relevant azimuthal angle in rad which was selected (0.0 for option x, otherwise between 0.0 to 2*pi), which you may use to back-shift those data.
  • global results file (all surfaces, simulated angles, simulated target elements)
  • in surface file specific subfolders: specific results (for all simulated incidence angles, elements...)
  • for each surface, a stl file for visualisation purposes is generated. Also necessary for raytracing
  • for each surface, a png image of the stl file is provided in the folder Surface_PNGs

Licenses

The data is licensed under CC-BY, the code is licensed under MIT.

Files

README.md

Files (187.3 KiB)

Name Size
md5:651965f6711902c17d1ee8497afae541
71.0 KiB Preview Download
md5:03d487a9cf07377aa84c434b934c52ec
18.3 KiB Download
md5:4f4e1022fc255bad7cc2229430ae499b
9.6 KiB Preview Download
md5:60176e8aae580e3821dba0fd0d49a296
276 Bytes Preview Download
md5:0d7a5038079d9b4ba7390b7fe64bb660
37.3 KiB Download
md5:a6bf003dc0347979061fb4efa9f63c0d
1.3 KiB Download
md5:408bec12bbc4f8b9268c80c230b73127
49.5 KiB Download

Additional details

Related works

Is referenced by
Journal Article: 10.3847/PSJ/aca402 (DOI)
Journal Article: 10.1016/j.nme.2023.101507 (DOI)
Journal Article: 10.1103/PhysRevMaterials.7.065406 (DOI)
Journal Article: 10.1016/j.nimb.2024.165442 (DOI)
Is supplement to
Journal Article: 10.1016/j.apsusc.2021.151204 (DOI)