pretty pictures
|
one-dimensional solution
|
two-dimensional solution
You can download all the files in a single zip file.
|
TEN PARTICLES - equilibrium thermodynamics
In the first multiplot, the upper half shows
the positions of ten particles, and the low half shows the complete
state - both the positions (horizontal coordinates) and the
velocities (vertical coordinates).
The blue particles on the left have masses roughly equal to 1.0. The green on the right have masses roughly equal to 4.0. One of the predictions of statistical physics is that for a large system at equilibrium, the probability of any state is just exp(-beta E)/Z, where E is the energy of the state. This prediction has astonishing consequences. First, each particle's velocity should have a Gaussian distribution. Second, all valid positions are equiprobable, and the probability of the positions and the velocities is a separable distribution -- positions and velocities are independent. All valid positions are equiprobable, whatever the masses of the particles are. So changing the particle masses may change their typical velocities but it has no effect at all on their typical positions. |
|
A striking prediction of statistical physics is that both
distributions should be Gaussian, and the standard deviations
of v1 and v10 (velocities of particles 1 and 10) should be
in the ratio 2:1, because the mass ratio is 1:4.
|
|
|
|
ELEVEN PARTICLES - non-equilibrium thermodynamicsThe next pin-up in my picture gallery illustrates very different ideas. In the 10-particle example above,
we were assuming that equilibrium had been reached
and testing the predictions of equilibrium theory.
In my eleven-particle example, I have a large purple particle
which I call the piston plopped in the middle. The dynamics
are the same as normal, but its mass (40) is so much bigger
than the others, the behaviour of them all is radically altered.
In this simulation I set off all the particles with equal velocities.
This means the situation is not at all typical of an equilibrium
thermal distribution -- the big guy has far too much energy -- he has
roughly 75% of the energy and at equilibrium he'd expect to have
9%. So what happens for the whole simulation is non-equilibrium.
One way of thinking of the piston is that he's a lot like a wall,
pushing down on the green community and rushing away from the
blue - or vice versa. What happens to a gas that is rapidly
compressed or expanded by a moving piston? Well, it
depends exactly which sort of expansion we are discussing, but
an adiabatic expansion is one sort.
If the blue community and the green community both behave like
adiabatically expanded or compressed gases, what
would you predict their temperature and pressure to do as
a function of 'volume' (which means the accessible volume
given the piston position)? Maybe the motion of the
piston can be modelled using the idea that its acceleration
is the result of the pressure difference between the green
gas on the right and the blue gas on the left?
Under this theory, the piston should move approximately like a
simple harmonic oscillator.
What frequency does the adiabatic theory predict?
|
|
|
|
|
|
|
|
|
Bonk1.cc is a worked solution for the first task:
| |||
| This test program should be compiled and run in a shell. It reports for every test how big the errors in momentum and energy are. |
Bonkers1.cc is a worked solution for the next task:
| |||
|
The gnuplot file gnu10
|
Bonk.cc is a worked solution for the first task:
| |||