Skip to content

Ballistic transport

This module contains implementations for calculating the ballistic transport inside structures.

machball.ballistic.ballistic

Solve the ballistic transport inside nanostructures using the Markov chain approach

solve_constant(st, beta0)

Solve the steady state reactive transport for a constant reaction probability.

Parameters:

Name Type Description Default
st Structure

nanostructure in which the ballistic transport takes place

required
beta0 float

sticking probability.

required

Returns:

Type Description
(ndarray, float)

Tuple of 1D array representing the outcome probabilities and the effective sticking probability

solve_ideal(st, beta0, betarec=0, endcov=0.95, ep=0.05, wt=0.01, verbose=True, return_betaeff=False)

Solve the reactive transport inside a nanostructure for an ideal self-limited process

The kinetic model is a first order irreversible Langmuir, where molecules react with an available surface sites with a reaction probability beta0. We can optionally define a coverage independent recombination probability betarec.

The simulation uses normalized time using the impingement rate of gas phase molecule into a single site as normalization units:

\[ \frac{1}{t_0}= \frac{1}{4} s_0 v_{th} \frac{p}{k_BT} s_0 \]

Parameters:

Name Type Description Default
st Structure

structure to be modeled

required
beta0 float

bare sticking probability for the self-limited process

required
betarec float

recombination probability

0
endcov float

termination condition, given by the final minimum surface coverage

0.95
ep float

maximum coverage variation allowed by the implicit method used to solve the evolution of surface coverage.

0.05
wt float

different in average surface coverage between write intervals

0.01
verbose bool

if true, outputs intermediate steps to stdout

True
return_betaeff bool

if true, returns also the effective sticking probability

False

Returns:

Type Description
Tuple(array)

returns a tuple containing the normalized times, the surface coverage at every point of the feature and time, and, if return_betaeff is true, the effective sticking probability.

solve_ideal2(st, beta0, betarec=0, endmode='average', startav=None, endcov=0.95, ep=0.05, wt=0.01, verbose=True, return_betaeff=False)

Solve the reactive transport inside a nanostructure for an ideal self-limited process

The kinetic model is a first order irreversible Langmuir, where molecules react with an available surface sites with a reaction probability beta0. We can optionally define a coverage independent recombination probability betarec.

The simulation uses normalized time using the impingement rate of gas phase molecule into a single site as normalization units:

\[ \frac{1}{t_0}= \frac{1}{4} s_0 v_{th} \frac{p}{k_BT} s_0 \]

Parameters:

Name Type Description Default
st Structure

structure to be modeled

required
beta0 float

bare sticking probability for the self-limited process

required
betarec float

recombination probability

0
endcov float

termination condition, given by the final minimum surface coverage

0.95
ep float

maximum coverage variation allowed by the implicit method used to solve the evolution of surface coverage.

0.05
wt float

different in average surface coverage between write intervals

0.01
verbose bool

if true, outputs intermediate steps to stdout

True
return_betaeff bool

if true, returns also the effective sticking probability

False

Returns:

Type Description
Tuple(array)

returns a tuple containing the normalized times, the surface coverage at every point of the feature and time, and, if return_betaeff is true, the effective sticking probability.

dose_ideal(st, tdose, beta0, betarec=0, startav=None, ep=0.05, verbose=True)

Return the surface coverage inside a structure after a dose of an ideal self-limited process

The kinetic model is a first order irreversible Langmuir, where molecules react with an available surface sites with a reaction probability beta0. We can optionally define a coverage independent recombination probability betarec.

The simulation uses normalized time using the impingement rate of gas phase molecule into a single site as normalization units:

\[ \frac{1}{t_0}= \frac{1}{4} s_0 v_{th} \frac{p}{k_BT} s_0 \]

Parameters:

Name Type Description Default
st Structure

structure to be modeled

required
tdose float

normalized dose time

required
beta0 float

bare sticking probability for the self-limited process

required
betarec float

recombination probability

0
startav array

fraction of available sites at the beginning of the dose

None
ep float

maximum coverage variation allowed by the implicit method used to solve the evolution of surface coverage.

0.05
verbose bool

if true, outputs intermediate steps to stdout

True

Returns:

Type Description
Tuple(array)

returns a tuple containing the normalized times, the surface coverage at every point of the feature and time, and, if return_betaeff is true, the effective sticking probability.

evolve_slowsat(st, beta1, beta2, f2, betarec=0, endmode='average', endcov=0.95, ep=0.05, wt=0.01, verbose=True, return_betaeff=False)

Solve the reactive transport inside a nanostructure for a soft-saturating self-limited process with two reaction pathways.

The kinetic model is a first order irreversible Langmuir with two types of surface sites, with the second pathway comprising a fraction f2 of the surface sites. Each pathway is characterized by its own reaction probability beta1 and beta2, and the evolution of its respective surface coverages is given by a first order irreversible Langmuir kinetics. We can optionally define a coverage independent recombination probability betarec.

The simulation uses normalized time using the impingement rate of gas phase molecule into a single site as normalization units:

\[ \frac{1}{t_0}= \frac{1}{4} s_0 v_{th} \frac{p}{k_BT} s_0 \]

Parameters:

Name Type Description Default
st Structure

structure to be modeled

required
beta1 float

reaction probability for the first self-limited process

required
beta2 float

reaction probability for the second self-limited process

required
f2 float

fraction of sites for the second pathway. It should be a number between 0 and 1.

required
betarec float

recombination probability

0
endcov float

termination condition, given by the final minimum surface coverage

0.95
ep float

maximum coverage variation allowed by the implicit method used to solve the evolution of surface coverage.

0.05
wt float

different in average surface coverage between write intervals

0.01
verbose bool

if true, outputs intermediate steps to stdout

True
return_betaeff bool

if true, returns also the effective sticking probability

False

Returns:

Type Description
Tuple(array)

returns a tuple containing the normalized times, the surface coverage at every point of the feature and time for each of the process and, if return_betaeff is true, the effective sticking probability.

ballistic_markov(sprobs, st, entrypoints, transients=True)

Solve the ballistic transport inside a structure.

The function solves the process as a Markov chain, where surfaces and entry points contains absorbing states (in the Markov chain sense) that terminates the stochastic process if a particle reacts or reaches one of the entry points (i.e. leaves the feature).

The initial condition is calculated from the view factors of the entry points, with the probability of entering through a particular entry point being proportional to its surface area. This is equivalent to considering that the pressure is the same at all entry points of the structure.

The probability of a particle reaching the interior of the feature is calculated from the view factor of each item in entrypoints. The probability is proportional to the area of each region in entrypoint. This is equivalent to considering that the pressure is the same at all entry points of the structure.

In order to properly model the reactive transport process, the sticking probabilities of each of the entry points should be set to 1, to indicate no reentry condition.

The outcome of the Markov chain process is an array of probabilities, indicating the probability that a particle reacts with that section of the structure or, in the case of the entry points, leaves the structure through that specific section. Consequently, one minus the sum of all the outcome probabilities for all the entrypoints defines the effective sticking probability, the probability that an incoming particle reacts somewhere inside the Structure.

Parameters:

Name Type Description Default
sprobs array

Sticking probabilities at each point of the feature. Entry points should have sticking probabilities equal to one.

required
st Structure

A structure variable, with well-defined areas and view factors for each of its elements.

required
entrypoints [int]

A list of indices indicating the entry points of the structure

required
transients bool

If true, returns the total flux reaching it section normalized to the total area of the entry points. Otherwise, returns the outcome probabilities.

True

Returns:

Type Description
array

if transients is true returns the total flux reaching each section normalized to the total area of the entry points. Otherwise, returns the outcome probabilities.