Schrödinger Wave + Potential Wall

Blue area: probability density |ψ|². Orange rectangle: potential wall. Green dashed line: energy E. Real Crank-Nicolson solver.

Wave energy E
Wall potential V₀
Wall width
Sim speed
Wave cycles
Reflection R
Transmission T
|ψ|² probability density
ψ(x) real wave
V(x) potential wall
E energy line
Space = pause. Absorbing: wave passes through boundaries. Infinite Wall: boundaries reflect.

Interactive Quantum Wave Simulation

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.

Wave Reflection & Transmission

Watch the wave split into reflected and transmitted components at the barrier. Real-time R and T coefficients show the ratio.

Quantum Tunneling

When E < V0, classical physics says the particle cannot cross. But quantum mechanics allows a small probability to tunnel through.

Boundary Modes

Choose between Absorbing boundaries (wave passes through smoothly) or Infinite Wall (wave reflects like a potential well).

Real-Time Diagnostics

Monitor reflection coefficient R, transmission coefficient T, total norm, and absorption rate as the simulation runs.


How to Use

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.


Scientific Tips

Over-Barrier vs Tunneling

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.

Why the Wave Spreads

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.

Reflection and Transmission

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.

Boundary Conditions Matter

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.

Narrow vs Wide Barriers

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.


Frequently Asked Questions

What equation is being solved?

The time-dependent Schrödinger equation:

iℏ ∂ψ/∂t = −½ ∂²ψ/∂x² + V(x)ψ

(in natural units ℏ=1, m=1). It is solved using the Crank-Nicolson finite-difference scheme.

What is quantum tunneling?

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.

Why does the wave spread out over time?

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.

What do R and T mean?

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).

How accurate is this simulation?

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.

Does this run on my phone?

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.


About

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.


Privacy Policy

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.