Skip to content

Tutorial

Machball computes the evolution in surface coverage inside nanostructures for self-limited processes such as atomic layer deposition (ALD) or atomic layer etching (ALE).

This tutorial assumes that the user has a working Python environment and that Machball is already installed in the system.

Ballistic transport

In order to compute the ballistic transport inside a nanostructure, Machball needs information about the view factors connecting different points of a structure. Machball codifies this information in its Structure class.

machball.structure.Structure

Implement a geometrical feature as an array of areas and view factors.

A Structure is just an array of areas and view factors. It optionally allows to define regions as either individual indices or as slices.

Parameters:

Name Type Description Default
areas array

1D array with the areas of each element in the structure

required
qij array

2D array with the view factors for all the elements. qij[i,j] represents the view factor of section i from section j

required
regions dict of list of ints

a dictionary partitioning the structure into a series of regions

None
coords iterable object

a list of elements containing geometrical information on each structure

None

Structure implements a structure discretized in a finite number of sections. A Structure object requires three key pieces of information: the view factors qij codified as a 2D numpy array, the area of the different elements, and a list of the sections representing the opening of the feature.

Specific structures

Machball implements a few examples of the most commonly used nanostructures, such as circular vias, infinite rectangular trenches, and tapered circular vias.

machball.ballistic.Via

Bases: Feature

Implement a circular via

A Via is composed of Nz + 2 elements, with the first and last elements corresponding to the opening and the base, respectively.

The view factors are calculated assuming a cosine law distribution, which corresponds to the behavior expected both from diffuse reemision and a non-directional flux of incident species.

Parameters:

Name Type Description Default
AR float

Aspect ratio, defined as the depth to diameter ratio

required
Nz int

Number of vertical sections in the discretized wall

required

machball.ballistic.Trench

Bases: Feature

Implement a rectangular trench

A trench is composed of Nz + 2 elements, with the first and last elements corresponding to the opening and the base, respectively.

The view factors are calculated assuming a cosine law distribution, which corresponds to the behavior expected both from diffuse reemision and a non-directional flux of incident species.

Parameters:

Name Type Description Default
AR float

Aspect ratio, defined as the depth to width ratio

required
Nz int

Number of vertical sections in the discretized wall

required

These classes automatically calculate the view factors for the user. For instance, if we want to work with a 100 aspect ratio circular via discretized in 200 equally spaced segments, we just use:

from machball.ballistic import Via
st = Via(100, 200)

Saving and loading structures

It is possible to save and load the structures from file. Machball currently supports two formats: a pickle format using Python's pickle module and a txt numpy array format:

machball.structure.save_structure(filename, st, mode='pickle', areafile=None)

Save a structure to a file

There are two options: saving the structure as a pickle, which retains all metadata (entrypoints, coordinates, regions), or just the view factors and areas as numpy arrays. In this second case, if areafile is provided the view factors and areas are saved in different files. Otherwise, the areas are saved as a first column of a NxN+1 array.

Parameters:

Name Type Description Default
filename str

file name

required
st Structure

the structure to be saved

required
mode (pickle, numpy)

If "pickle" saves it as pickle.

'pickle'
areafile str

Optional additional filename for storing the areas when saving as numpy array.

None

machball.structure.read_structure(filename, mode='pickle', areafile=None)

Read a Structure from file

There are two options: reading the structure as a pickle or as numpy arrays. In this second case, if an optional areafile is provided the areas are retrieved from that file. Otherwise, the areas are saved as a first column of a NxN+1 array in filename.

Parameters:

Name Type Description Default
filename str

file name

required
mode (pickle, numpy)

If "pickle" saves it as pickle.

'pickle'
areafile str

Optional additional filename for storing the areas when saving as numpy array.

None

Returns:

Name Type Description
st Structure

structure read from file

We can use these functions as follows:

save_structure("via.pickle", st, mode="pickle")
st2 = read_structure("via.pickle", mode="pickle")

save_structure("via.dat", st, mode="numpy")
st3 = read_structure("via.dat", mode="numpy")

save_structure("via.dat", st, mode="numpy", areafile="via_areas.dat")
st4 = read_structure("via.dat", mode="numpy", areafile="via_areas.dat")

The key difference between the pickle and numpy modes is that when saving and loading numpy arrays we lose all the additional metadata. This means that we have to manually set the entrypoints unless it uses the default value (first section in the array is the entrypoint).

Defining an ALD process

Machball implements an ideal self-limited process through its class ALDIdeal, which models the self-limited adsorption of a precursor molecule as a first order irreversible Langmuir kinetics.

The first step is to import the class:

from machball import ALDIdeal

A self limited process is then defined as:

ald = ALDIdeal(beta0=1e-2, MM=100, T=473,
    p0=100, s0=10e-20, betarec=0)

The parameters that we need to pass to define a self-limited process includes the reaction probability beta0, the molecular mass in atomic mass units MM, the process temperature T in Kelvin, the precursor pressure p0 in Pa, the area of an absorption site s0 in square meters, and finally an optional parameter codifying a recombination probability betarec (zero by default).

Ballistic transport

Once it has been installed, Machball is trivial to use. Here is a simple snippet to model the transport inside a circular via:

from machball import ALDIdeal
from machball.ballistic import Via
ald = ALDIdeal(1e-2, 100, 473, 10, 10e-20, betarec=0)
st = Via(50, 100) # Aspect ratio, and number of segments
dose_times, coverages = ald.saturation_ballistic(st)

The variables dose_times and coverages are a 1D array with dose times and a 2D array with the fractional coverage profile inside the via for each of the times.