Skip to content

Scripts

Jon Drobny edited this page Feb 14, 2024 · 4 revisions

RustBCA comes with some Python scripts for running the code, generating data from empirical formulas, and some ion and material parameters for running simulations. These are located in the /scripts/ folder.

formulas.py

formulas.py includes empirical formulas for sputtering and reflection. Specifically, the script contains formulas for:

  • Thomas et al.'s reflection coefficient formula (thomas_reflection)
  • Wierzbicki and Biersack's reflection coefficient formula (wierzibicki_biersack)
  • Bohdansky's light and heavy ion sputtering yield formulas (bohdansky_light_ion and bohdansky_heavy_ion)
  • Yamamura's sputtering yield formula (yamamrua)

Each formula takes three arguments - ion, a dictionary with labels for material parameters (examples can be found in /scripts/materials.py, target, a similar dictionary, and energy_eV, the incident ion energy. Angular dependence is not included in these formulas, although forms of Yamamura and Bohdansky exist that include it.

An example usage can be found in examples/test_rustbca.py, where the reflection coefficient and sputtering yield of a RustBCA simulation is compared to Thomas' and Yamamura's formulas respectively.

materials.py

materials.py includes material parameters that can be used directly in formulas.py or as a repository for running simulations. An example is included below:

titanium = {
    'symbol': 'Ti', #chemical symbol
    'name': 'titanium', #common name
    'Z': 22, #atomic number
    'm': 47.867, #mass in amu
    'Es': 4.84, #surface binding energy in eV
    'Ec': 3.5, #cutoff energy in eV
    'Eb': 3., #bulk binding energy in eV
    'Q': 0.58, #parameter for Yamamura's formula
    'n': 5.67e28, #atomic number density in 1/m^3
    'W': 2.57, #parameter for Yamamura's formula
    's': 2.5 #parameter for Yamamura's formula
}

rustbca.py

rustbca.py has been largely deprecated; plotting functions still work but input file generation functions no longer work with current versions of RustBCA. See Issue #230.

Click Pages above to see all pages in the Wiki.

Start Here

Home page

Installation

Selected Benchmarks

Frequently Asked Questions

FAQ

This page is a work in progress.

Using the Standalone Code

Input Files

Output Files

Error Messages

Interaction Potentials

Standalone Code Examples

Layered Targets

2D Geometry

Spherical Geometry

3D Geometry

Gaseous Targets

Multiple Interaction Potentials

Output Histograms

Bindings

Python

C/C++

Fortran

Clone this wiki locally