Computational Methods Junior Honours : Checkpoint 6

This checkpoint investigates many particle gas simulations.

It is expected that you will need to work rather more independently on this checkpoint.

Boltzmann distribution and the Ideal Gas Law


You will set up a simulation of a number of particles in a box at a given temperature. This means microscopically that the distribution
of velocities must display the Boltzmann distribution as a set of initial conditions.

The particles will be run initially without interactions (ideal gas). The particles must be reflected at the walls of the box, and the momentum
impulse contributes to the pressure on the wall. Later, inter-particle forces will be introduced, and deviations from the ideal gas law measured.

Code 1: Extend a class ParticlesForceBox from ParticlesForce.

Code 2: Implementing initial conditions:

Write a seperate program to generate a Boltzmann distribution as the initial particle state, with uniformly distributed random locations.

Code 3: Implementing the simulation:

You should write a programme to use your ParticlesForceBox class that reads its initial particle state, runs it for some time,
and, when finished, both prints the average pressure over this time interval and prints the final particle state to a new file.

     Calculating the pressure


Calculation 1: Verify ideal gas law

Optional:

Calculation 2: Deviations from Ideal Gas Law

And finally ... mission accomplished!