Blue area: probability density |ψ|². Orange rectangle: potential wall. Green dashed line: energy E. Real Crank-Nicolson solver.
This simulation solves the time-dependent Schrodinger equation in real time using the Crank-Nicolson method, an implicit finite-difference scheme that is unconditionally stable. You can observe how a quantum wave packet behaves when it encounters a rectangular potential barrier.
Watch the wave split into reflected and transmitted components at the barrier. Real-time R and T coefficients show the ratio.
When E < V0, classical physics says the particle cannot cross. But quantum mechanics allows a small probability to tunnel through.
Choose between Absorbing boundaries (wave passes through smoothly) or Infinite Wall (wave reflects like a potential well).
Monitor reflection coefficient R, transmission coefficient T, total norm, and absorption rate as the simulation runs.
The simulation is controlled entirely through the left panel. Here is a quick guide:
Tip: Press Space to quickly pause and resume without reaching for the mouse.
Set E > V0 to see the wave mostly pass over the barrier (classical). Set E < V0 to see quantum tunneling in action — the wave decays exponentially inside the barrier but a small portion emerges on the other side.
Wave packet dispersion is a real quantum effect from the Heisenberg uncertainty principle. A narrow packet (few cycles) contains a wide range of k-components that travel at different speeds, causing the wave to spread over time. More cycles = slower dispersion.
The R and T values shown are integrated from |psi|^2 on each side of the wall. They naturally satisfy R + T approximate to 1 (minus absorption at boundaries). Compare the displayed values with the analytic formula for a rectangular barrier.
Absorbing mode uses a Gaussian Complex Absorbing Potential (CAP) at the edges. The wave passes through without reflecting. Infinite Wall mode sets psi=0 at the edges — the wave bounces back, mimicking an infinite potential well.
Keep wall width small (0.08-0.20) for strong tunneling effects. Wider barriers (0.40+) suppress tunneling exponentially and behave more like a classical wall.
The time-dependent Schrödinger equation:
(in natural units ℏ=1, m=1). It is solved using the Crank-Nicolson finite-difference scheme.
When a quantum particle has energy E less than a barrier height V0, classical physics says it cannot cross. But quantum mechanics says the wavefunction decays exponentially inside the barrier, and if the barrier is thin enough, a measurable probability exists on the other side. This is quantum tunneling.
This is physical dispersion. A localized wave packet contains many different momentum components (Heisenberg uncertainty). Since each component travels at a slightly different speed, the packet spreads. Narrower packets (fewer cycles) disperse faster.
R (Reflection) is the fraction of probability density on the left side of the wall. T (Transmission) is the fraction on the right side. When E significantly exceeds V0, T approaches 100%. When E is far below V0, R approaches 100% (except for tunneling).
The Crank-Nicolson method is second-order accurate in both space and time, and unconditionally stable. With 720 grid points over x from -6 to 6 (dx approx 0.0167), the numerical error is very small. The R and T values match analytic predictions for rectangular barriers.
Yes. The page is fully responsive. On smaller screens the control panel becomes scrollable and the legend moves to the bottom. The simulation uses Canvas 2D which works on all modern mobile browsers.
This simulation is built as a single self-contained HTML file using the Canvas 2D API and pure JavaScript. No external libraries or dependencies are required. The Crank-Nicolson solver handles complex arithmetic via real and imaginary part separation, using the Thomas algorithm for tridiagonal systems.
For questions, suggestions, or bug reports, please email all4nmr@gmail.com.
Information Collection: This simulation runs entirely in your browser. No data is collected, stored, or transmitted to any server. The wavefunction computation, rendering, and UI interactions all happen locally on your device.
Local Storage: Your theme preference (dark/light mode) is saved in the browser's localStorage. This data never leaves your device.
Third-Party Services: If Google AdSense is enabled, it may set cookies and collect anonymized usage data for ad personalization. Please refer to Google's Privacy Policy for details.
No Tracking: This page does not use analytics, tracking scripts, or fingerprinting of any kind beyond what AdSense may require.