Crank-Nicolson Barrier Scattering and Transmission

Fire an electron wavepacket at a rectangular barrier and compare measured transmission with the analytic formula.

Check: running...
The sciencei hbar dpsi/dt = -(hbar^2/2m) d2psi/dx2 + V(x) psi (hbar^2/2m = 0.0381 eV nm^2 for an electron) Crank-Nicolson: (1 + i dt H/2hbar) psi(n+1) = (1 - i dt H/2hbar) psi(n) (unitary, tridiagonal solve) E < V0: T = 1 / [1 + V0^2 sinh^2(kappa a) / (4E(V0-E))], kappa = sqrt(2m(V0-E))/hbar E > V0: T = 1 / [1 + V0^2 sin^2(k2 a) / (4E(E-V0))], k2 = sqrt(2m(E-V0))/hbar

A Gaussian packet is not a single-energy wave, so a fair comparison averages the analytic T(E) over the packet momentum distribution |phi(k)|^2 proportional to exp(-2 sigma^2 (k-k0)^2) (only k > 0 counted). That packet-averaged value is the check target; the plain T(E0) is shown too. Narrow packets spread widely in energy, so the two differ most near resonances and steep parts of T(E).

Simplifications: 1D, one electron, rectangular barrier whose width is rounded to the 0.02 nm grid (the rounded width is used in the formula), no spin, a hard-wall box with a smooth absorbing layer beyond |x| = 8.5 nm (absorbed probability is removed, so T is measured as P(right)/(P(left)+P(right))). A few femtoseconds play out over seconds. During the collision interference fringes appear on the incoming side.