A spectral solver for Schrödinger’s equation

Here is a MATLAB program for solving the 1D time-dependent Schrödinger equation:
http://jftsang.com/code/schrodinger_spectral.m

You can specify a potential function and an initial condition, and the solver calculates the wavefunction at future times. Hopefully this will be useful for getting some intuition as to how solutions to Schrödinger’s equation behave.

Details

The solver uses a spectral method which performs the time-integration exactly. Errors come from the spatial discretisation. The calculation is done in a periodic domain, so edge effects may affect your solution, especially in scattering problems.

Postprocessing

Fourier-transforming the solution in space tells you about the relative strengths of different wavenumber components of the solution, and therefore about the momentum distribution at each time.

Fourier-transforming in time tells you about the different frequency components in the solution, which you can use to identify energy eigenstates. Note that you might have to calculate the solution for a long time before you have enough periods for the Fourier transform to be precise enough.

Not-so-continuum mechanics: A talk for the LMS

I will be speaking at the London Mathematical Society’s Graduate Students’ Meeting tomorrow morning, on Not-so-continuum mechanics: Mathematical modelling of granular flows. It’s meant to be a gentle introduction to granular phenomena, and I will introduce a basic version of the μ(I) rheology, a fairly (but not universally!) successful description of granular flow. Here’s a practice version of the talk.

The talks are meant to be aimed at `a general mathematical audience’. My talk assumes no mathematical knowledge beyond A-level Mechanics. I’m having some trouble understanding some abstracts for the other talks, and I’m not sure if my talk is just better-aimed at a general audience, or if theirs are, and there are just huge gaps in my mathematical training (which there are: I’ve never done any algebra beyond basic group theory, or any number theory or combinatorics).

Genesis, academia version

In the beginning, God created the universe. On the first day, God said: ‘Let there be light.’ And there was light. And God saw the light, that it was good.

On the second day, God made the firmament to divide the waters which were under the firmament from the waters which were above the firmament.

On the third day, God created the dry land, and the trees, flowers and grass, and saw that it was good.

On the fourth day, God created the sun, the moon and the stars, and introduced the seasons.

Whilst doing so, the Head of Department (on whose right hand sits God) asked him to review a number of funding proposals, which meant he didn’t have time to make more stars to fill up the vast void of space.

On the fourth evening, God noticed a bug with the light code that meant that the speed of the light from distant stars depended on the season. So he stayed up late fixing that.

On the fifth day, God unexpectedly had to give a lecture because his colleague went to a conference without telling anybody.

On the sixth day, God was creating Man, and was trawling through pages and pages of Matlab documentation when a system administrator decided it was time for a server reboot. The code for telepathy has been lost.

On the seventh day, God finally had some time to catch up with a huge number of emails. Undergraduates will understand why human supplications seldom receive a response.

A frivolous observation on milk

When microwaving a mug of milk, it sometimes goes all over the microwave. (The same happens with canned soup.) I’ve noticed that this tends to happen more often with whole milk than with semi-skimmed milk. My hypothesis is that in whole milk, the higher fat content means that an elastic layer of fat builds up on the surface, which traps any vapour, preventing it from leaving and causing its pressure to increase until the layer bursts suddenly.