Potential pedagogical Python exercises
These potential classroom exercises have a variety of origins:
- PHYS 211E and PHYS 212E
- PHYS 221 lab
- M.L.'s ideas when first considering what could be done with the
PHYS 222 "fourth hour."
- M.L.'s "play" over the years.
Quantum mechanics
Solutions of time-independent Schrödinger equation -- "shooting
method"
Translation of method of PHYS 212 lab to python. I used this as an
exercise during a fourth-hour session in PHYS 212E with this
handout. In some sense this was
redundant with the regular 212 lab they had done, but the
method was a bit different, the programming tool was different,
we looked at some different systems, and we were more careful about
using dimensionless quantities. One other difference was
that we started with the infinite square well; the shooting method
in this case has to hit a specific point. In the units of the
exercise, the energy of the \(n = 1\) state was 1. When students
find the energy of the \(n=2\) state to be 4, it's a good starting
place for discussion, i.e., "What do you expect this energy to be?"
Solutions of time-independent Schrödinger equation -- "method
of finite differences"
Find all bound state energies and wavefunctions "at once" via linear
algebra.
- Infinite square well
html
ipynb
- Finite square well
- Harmonic oscillator
html
ipynb
- Hydroden radial equation
html
ipynb
- Arbitrary 1-D potential (not converted to Python yet - see Mathematica
notebook)
- 2-D square well (not converted to Python yet - see Mathematica
notebook)
- 2-D harmonic oscillator (not converted to Python yet - see Mathematica
notebook)
- Helium atom -- surprisingly accurate results!
(not converted to Python yet - see Mathematica
notebook)
Quantum dynamics
These notebooks come from a PHYS
212E exercise in Spring 2018 (with slight updates 12/20).
- animation of superposition of particle-in-a-box states
html
ipynb
- animation of superposition of small number of harmonic oscillator
stateshtml
ipynb
- animation of "coherent" states of harmonic
oscillator; minimum uncertainty states that oscillate
classically without changing shape
html
ipynb
Scattering
This exercise is designed to introduce students some computer skills that
they probably haven't seen much before: reading and parsing of large
data files, and binning of data. It is also designed to give students
a stronger sense of how the theoretically derived diffential cross-section
is connected in a straightorward way to data from
scattering experiments. It also is meant to reinforce basic notions
of solid angle.
Statistical Mechanics / Quantum statistics
- Translation of PHYS 211 Entropy and Temperature lab to python.
Can be used as a reminder of 211 concepts and as an
introduction to python tools used in the exercises below.
html,
ipynb
- Extension of PHYS 211 Entropy lab to treat particles
in harmonic traps, and subsystems of distingulishable
particles, bosons, and fermions
Particles in traps share the same space, so nature
of particles (distinguishable, boson, fermion) must
be considered when calculating multiplicities. Full
discussion in
manuscript I have written for AJP.
html,
ipynb
- Further extension of PHYS 211 Entropy lab. Uses computer
enumeration of microstates to demonstrate origin of Bose-Einstein
and Fermi-Dirac distributions in system of trapped particles.
Full discussion in manuscript cited above.
html,
ipynb
- Use computer enumeration of microstates to
demonstrate onset of Bose-Einstein
Full discussion in manuscript cited above.
html,
ipynb
- Translation of computations in my AJP paper on Bose-Einstein
condensation to python (This paper was the basis for an Exercise in
Schroeder's Thermal Physics text.)
html,
ipynb
- Energy distribution in an Einstein solid. Shows approach of
energy distribution in the micrononical ensemble to that of
canonical ensemble.
html,
ipynb