Thermal Contact

Program ThermalContact> models the behavior of two types of particles interacting through a Lennard-Jones potential and moving in a two-dimensional box. The Lennard-Jones parameters $\epsilon$ and $\sigma$ are different for the two types of particles, and the interaction of the particles between the two parts also has different values of $\epsilon$ and $\sigma$. The motion evolves using the numerical solution of Newton's second law. The velocity Verlet algorithm is used to update the positions and velocities of the particles. Each type of particle is initially separated by a wall, and the two types do not interact. After thermal equilibrium has been established, press the Contact button to turn on the interaction between the two types of particles. The potential energy per particle and the kinetic energy per particle is plotted versus time.

The goal of the simulation is to determine what quantity becomes equal when thermal equilibrium is reached after two systems are placed in thermal contact. This quantity must be related to the temperature.

Problem: Identification of the temperature
  1. Use Program ThermalContact to simulate two systems, $A$ and $B$, of particles that interact via the Lennard-Jones potential. Both systems are in a square box with linear dimension $L=12$. Toroidal boundary conditions are not used and the particles also interact with fixed particles (with infinite mass) that make up the walls and the barrier between them. Initially, the two systems are isolated from each other and from their surroundings. We take $N_A = 81$, $N_B = 64$, $\epsilon_{AA} = 1.0$, $\sigma_{AA}=1.0$, $\epsilon_{BB} = 1.5$, $\sigma_{BB}=1.2$, $\epsilon_{AB} = 1.25$, and $\sigma_{AB} = 1.1$. Run the simulation and monitor the kinetic energy and potential energy until each system appears to reach equilibrium. What is the average potential and kinetic energy of each system? Is the total energy of each system constant (to within numerical error)?
  2. Remove the barrier and let the particles in the two systems interact with one another. What quantity is exchanged between the two systems? (The volume of each system is fixed.)
  3. After equilibrium has been established compare the average kinetic and potential energies of each system to their values before the two systems came into contact.
  4. What quantity is the same in both systems after equilibrium has been established. Are the average kinetic and potential energies the same? What quantities would change if you doubled the number of particles and the area of each system? Would the temperature change? Does it make more sense to compare the average kinetic and potential energies or the average kinetic and potential energies per particle? Do any other quantities become approximately equal? What can you conclude about the possible identification of the temperature in this system?

    After the barrier has been removed, the average kinetic energy per particle for both systems becomes equal. It is natural to assume that the temperature is proportional to the average kinetic energy per particle, which is valid for systems of particles for which quantum effects can be ignored.

    You might have noticed that the final temperature is slightly higher than the initial temperatures of each system. This behavior seems inconsistent with what we observe in nature. That is, when two systems are placed in thermal contact the higher temperature decreases and the lower temperature increases. The reason for this inconsistency with what we observe in nature is that when we allow both sides of the system to interact in the simulation, we have added the extra interaction energy to the composite system.


Problem 1.5 in Statistical and Thermal Physics: With Computer Applications, 2nd ed., Harvey Gould and Jan Tobochnik, Princeton University Press (2021).

OSP Projects:
Open Source Physics - EJS Modeling - Tracker - Physlet Physics - Physlet Quantum Physics - STP Book