Skip to content

Monte Carlo Modeling of Secondary Electron Emission using fully DFT input

Notifications You must be signed in to change notification settings

uw-cmg/MAST-SEY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAST-SEY is an open-source Monte Carlo code capable of predicting secondary electron emission using input data generated entirely from first principle (density functional theory) calculations. It utilises the complex dielectric function and Penn's theory for inelastic scattering processes, and relativistic Schrödinger theory by means of partial-wave expansion method to govern elastic scattering. It allows to not only use the momentum independent (q=0) dielectric function but also to include explicitly calculated momentum dependence, as well as to utilise first-principle density of states in secondary electron generation.

For more details please refer to the paper which this code accompanies, which is to be cited whenever the code is used:

Maciej P. Polak and Dane Morgan, MAST-SEY: MAterial Simulation Toolkit for Secondary Electron Yield. A Monte Carlo Approach to Secondary Electron Emission Based On Complex Dielectric Functions, Comput. Mater. Sci. 193 (2021), 110281 (https://doi.org/10.1016/j.commatsci.2021.110281)

Installation

  1. Download the source code and compile. Optimal performance is achieved with Intel compilers:
icc -std=c++11 -g -O3 -o mast_sey mast_sey.cpp

Compiling with gcc is also possible, although the code works twice slower, version > 6.2 of gcc is required:

g++ -std=c++11 -g -O3 -o mast_sey mast_sey.cpp

-Ofast and architecture specific optimization flags may be used but the performance is unlikely to get noticeably better.

  1. Download the elsepa code (https://doi.org/10.1016/j.cpc.2004.09.006, https://doi.org/10.1016/j.cpc.2020.107704).

  2. Unzip the downloaded w4hm5vymym-1.zip file and unpack the file inside:

unzip w4hm5vymym-1.zip
unzip elsepa-2020.zip
  1. Move the elsepa2020.patch patch inside the elsepa-2020 directory and apply it:
cd elsepa-2020
patch < ../elsepa2020.patch

If for some reason you wish to use the old version of elsepa the elsepa_old.patch is available too.

  1. Compile the patched elsepa:
ifort -o elsepa elscata.f

or

gfortran -o elsepa elscata.f
  1. Add write permissions to all density files for convenience:
chmod +w database/z_*
  1. Make sure that the necessary files are executable:
chmod +x /path/to/your/elsepa/elsepa /path/to/your/mastsey/mast_sey /path/to/your/mastsey/getDDCS
  1. Add the directories containing compiled elsepa and mast_sey to your PATH.
export PATH=/path/to/your/elsepa:/path/to/your/mastsey:${PATH}

Usage

The code is executed in two steps:

The "prepare" step

This step postprocesses the input files to a form convenient for the second step to use. It takes the dielectric function eps.in or the energy loss function elf.in, and using the parameters contained in material.in, prepares the cumulative integrals of cross sections. These results are stored in inelastic.in and elastic.in. Additionally a file mfp.plot is generated, and allows for a convenient plotting of the inelastic and elastic mean free paths, which are generated in this step as well. This step is performed only once for each case.

The command below is an example of how to run the "prepare" step:

mast_sey prepare -e 1000 100 -i 100 50 -qdep DFT -elastic P DHFS FM

The user should be greeted with the default MAST-SEY output screen. It contains the basic info along with a short feedback on the chosen options and files used. If a basic error is detected, it will be displayed here. In all the input values are correct, a progress bar on the bottom should start filling up (although for accurate calculations it may take a while for even the first bar to appear).

A detailed list of options is given upon execution of the code with the -h flag:

MAterials Simulation Toolkit for Secondary Electron Emission (MAST-SEY)
Cite as: https://doi.org/10.1016/j.commatsci.2020.XXXXXX
(c) 2020 Maciej P. Polak (mppolak@wisc.edu) & Dane Morgan

Input options:

"prepare" as first argument will run input preparation from "eps/elf.in" and "material.in"
otherwise, the "simulate" version will be executed

"prepare" options:
-e       [iniE(eV,optional) range(eV) grid] energy range and grid (def: 1000 500)
-lin     generate the energy grid on a linear scale (default is logarithmic)
-i       [ICS q-int] grids for ICS and q integration (def: 1000 100)
-qdep    [SPA/SSPA/CUSTOM] specify type of q-dependence of ELF (def: SPA)
-sumr    output sum rules for plotting
-saveq   [E_grid q_grid q_max] save q-dependence for plotting
-elastic [nuclear electron exchange (SOLID LDA opt.)] models to use in elastic scattering (def: F TFM FM)
         nuclear: [P]oint/[U]niform/[F]ermi
         electron: [TFM]Thomas–Fermi–Moliere/[TFD]Thomas-Fermi-Dirac/[DHFS]Dirac–Hartree–Fock–Slater/[DF]Dirac-Fock
         exchange: [NO]/[FM]Furness–McCarthy/[TF]Thomas-Fermi/[RT]Riley–Truhlar
         (optional): [SOLID] muffin-tin model potential
         (optional): [LDA] LDA correlation–polarization potential model

"simulate" options:
-e       [incident_energy(eV)] energy of incident energy
-m       [number_of_e-] number of incident electrons (def: 1000)
-core    [energy(eV)] allow secondaries to come from bound states
-dos     [FEG (optional)] generate secondaries from joint DOS from prepared "jdos.in"
         or from parabolic free electron gas approximation (FEG)
-pa      [angle(deg)] angle of incident electrons with respect to surface normal
-coord   save travel paths of e-
-distr   save distribution of secondaries
-noang   use classical approach to inelastic angle scattering
-noout   supress all output

-v       display version of the code
-h       this message


Please be careful when giving input arguments, there is no extensive input checks
Example executions:
./mast_sey prepare -e 700 1000 -i 200 100 -elastic F TFD TF
./mast_sey -e 350 -m 10000

The examples directory contains examples that showcase most of the capabilities of the code. They serve as a tutorial for the code and also allow to reproduce the results presented in the paper which this code accompanies: Maciej P. Polak and Dane Morgan, MAST-SEY: MAterial Simulation Toolkit for Secondary Electron Yield. A Monte Carlo Approach to Secondary Electron Emission Based On Complex Dielectric Functions, Comput. Mater. Sci. 193 (2021), 110281 (https://doi.org/10.1016/j.commatsci.2021.110281)

Two material systems are considered: [copper] and [aluminium].

Each directory contains all the neccessary input files and a set of commands that should be executed. It also contains a directory with the calculations already completed, for comparison.

It is highly recommended to execute the code on multiple cores for efficiency. For that users might find particularily helpful the GNU Parralel software.

About

Monte Carlo Modeling of Secondary Electron Emission using fully DFT input

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published