This demo solves Schrödinger's Equation in the presence of a potential. That is,
withhbar = 1
and µ = 1
. (Actually, please don't rely on the scale factors! I haven't carefully verified them since they don't affect the behavior to within a constant multiple of the inputs.)
This simulation uses RK-4 temporal integration and spectral differentiation (differentiation via the FFT) in space. Spectral derivatives resolve wavenumbers perfectly, as opposed to typical second order finite differences which tend to lead to heavy dispersion. The boundary conditions are implemented using the Perfectly Matched Layer (PML) of Berenger [1].
- Reflection and transmission across a potential barrier
- Spreading of the wave packet (higher-frequency components move faster)
- Bouncing in a potential well
In the demo, the blue and green lines are the real and imaginary components of the wavefunction, with the envelope displayed in black. The red represents the potential barrier with scale displayed on the right, and the gray represents the perfectly matched layer which suppresses reflections.
- Verify and tighten up the constant scale factors
[1] Berenger, J.-P. "A Perfectly Matched Layer for the Absorption of Electromagnetic Waves", Journal of Computational Physics. 114, 185-200 (1994).
© 2016 Ricky Reusser. MIT License.