OSP-based Programs for Advanced Physics:
Quantum-mechanical Superposition Programs
The curricular material uses the QMSuperpositionApp
to show wave functions in color-as-phase representation (hbar = 2m = 1).
The position-space energy eigenstates and their energies are calculated either
numerically for any user-defined potential energy function, V(x),
or calculated analytically for the special cases of the infinite square well,
the periodic infinite well, and the simple harmonic oscillator.
You can change the following parameters in the OSP Control window:
-
numpts: sets the number of points at which the animation will be
calculated and drawn on the graphs. For numerical solutions, this is
an extremely important parameter which ensures that the wave function will
be calculated properly.
-
psi range: sets the y range for the wave function graph.
-
dt: sets the time step. This is important for viewing
revival behavior. It is also important if you change the behavior of
the animation or the energy scale as both of these changes can affect how
the animation appears. Once you have a decent looking animation,
changing the time step allows you to fine-tune the animation to focus on
certain aspects of the animation.
-
x min: sets the minimum x that will be shown in the graphs.
This will also set where the well begins for infinite well potentials.
-
x max: sets the maximum x that will be shown in the graphs.
This will also set where the well ends for infinite well potentials.
-
re coef: sets the real part of the expansion coefficients.
This is a comma delimited list. For example, {0,0,0,1} would set the
real part of c4 = 1.
-
im coef: sets the imaginary part of the expansion coefficients.
This is a comma delimited list. For example, {0,0,0,1} would set the
imaginary part of c4 = 1.
-
V(x): sets the potential energy function. This can be done
two different ways: entering in an analytic expression for the potential or
entering the words well or
sho. Entering an analytic expression will
force the program to calculate the energy eigenstates in position space
numerically before the superposition is calculated. Since the infinite
square well (well) and simple harmonic oscillator (sho) are such common
problems, and their eigenstates can be written analytically, these two cases
are hard-coded in analytically if you use well or sho as the potential
energy function.
-
energy scale: sets the energy (and therefore the time) scale for
the animation. A value of 1 sets hbar2/2m = 1. For
infinite square well revivals it is often convenient to set the energy scale
equal to 2/π as this recasts the time in terms of the revival time.
-
time format: sets the number of digits in the time
display. For example setting the time format to 0.000 will make the
animation display 3 digits after the decimal point. This is important
if the dt set is very small.
-
style:
sets the style for the plotting of the wave function. Since the wave
function is complex, the style sets how the complex nature of the wave
function is to be plotted. There are several options
phase shows
amplitude as the height of the wave function and color as the phase.
reim
shows the real and imaginary components of the wave function. The
default value is phase.
-
hide frame:
is a Boolean which sets the visibility of the wave function panel.
This option is useful for cases where one only wants to show the additional
panel (probability, <x>, <p>, etc.) The default value is false.