WOLFRAM|DEMONSTRATIONS PROJECT

Simulating Real Gases in 2D

This Demonstration simulates the effects of intermolecular forces on the pressure and temperature of
n
gas particles enclosed in a spherical container. The interparticle forces are constructed to have a finite range. The time-stepping algorithm that is employed takes advantage of this to reduce the time complexity, which for pairwise forces normally is
O(
2
n
)
, to the much more manageable
O(n)
.
In addition to pressure and temperature, you can see some derived thermodynamic quantities as functions of time, represented as curves. For closer inspection, you can select the time interval for display. Time-step selection is automatic. You can set container size to grow or shrink slowly and you can heat or cool the gas. You can switch the forces between particles from one type to another and vary their magnitude and sign.
The initial positions of the particles form a lattice such that the spheres of influence just touch. You control the lattice sites that are occupied by setting a probability. The initial velocities are set with random direction and an absolute value that gives the total system a selected temperature. This enumeration makes clear that many parameters can be set, allowing various kinds of observations being made. The detailed explanations of these parameters are given in the form of annotations that appear as you mouse over them. To read the annotations, you may need to pause the program by unchecking the run box.