Search :


Simple one-dimensional Hamiltonian simulations

Here, we simulate a one-dimensional system containing just two particles - the driver and the piston. The masses are 1 and 10 respectively. Thermalizations occur only in the following 3 situations:
  1. When the driver hits the left-hand wall, at q1=0. (Here, its velocity is drawn from the correct distribution for wall-hitting particles at equilibrium, which is ~ |v| exp(-mv^2/2). Note the factor of |v|, which is required because we are thermalizing particles when they pass a particular point. If we were thermalizing particles at particular times, this factor would be omitted.) [Similar correct thermalizations are used in situations 2 and 3 below.]
  2. When the piston hits its personal wall, which we put at q2=0.001.
  3. On every 200th collision between piston and driver. (This tweak was put in to avoid infinitely long simulations when the piston and driver chatter against each other.)
The figures below are available as postscript files. | 268K Demo | 33K Energy |





Site last modified Tue Jul 5 12:32:01 BST 2005