pub fn refract_out(e: f64, dir: [f64; 3], e_s: f64) -> Option<(f64, [f64; 3])>Expand description
Planar surface barrier at a face with outward normal along x (sign of
dir[0] gives which face).
A particle with energy e reaching the face with direction cosine
c = |dir[0]| to the normal escapes if e c^2 > e_s (the planar barrier
model: only the normal component of the momentum is reduced, by the
surface binding energy E_s). P. Sigmund, Phys. Rev. 184 (1969) 383;
W. Eckstein, Computer Simulation of Ion-Solid Interactions (Springer,
1991). Outside, the energy is e - e_s, the parallel momentum is unchanged
and the normal component satisfies e' c'^2 = e c^2 - e_s (refraction away
from the normal).
Returns Some((energy outside, direction outside)), or None if the
particle cannot escape (the caller reflects it specularly).