# Heat capacity in gas simulation

I have a simulation with a bunch of particles with volume bouncing around in a box with no interaction between them, a hard-sphere gas. Initially, they all have the same momentum |p|=√(2⋅m⋅2/3⋅k⋅T) to have the average kinetic energy 3/2⋅k⋅T.

I'm asked to add a constant energy flux to the system (I solved it with a for statement that adds a little p contribution to every particle for each iteration) and to calculate the heat capacity at constant volume cv.

As cv is the partial derivative of <E> respect T I want to try plotting the average energy respect T but how I get the T value? I'm doing it right if I consider kT= <E>⋅2/3 knowing that I'm in an ideal approximation? How I could make it work for and interacting gas like Lennard-Jones?

## Answers and Replies

Andrew Mason
Science Advisor
Homework Helper
I have a simulation with a bunch of particles with volume bouncing around in a box with no interaction between them, a hard-sphere gas. Initially, they all have the same momentum |p|=√(2⋅m⋅2/3⋅k⋅T) to have the average kinetic energy 3/2⋅k⋅T.

I'm asked to add a constant energy flux to the system (I solved it with a for statement that adds a little p contribution to every particle for each iteration) and to calculate the heat capacity at constant volume cv.

As cv is the partial derivative of <E> respect T I want to try plotting the average energy respect T but how I get the T value? I'm doing it right if I consider kT= <E>⋅2/3 knowing that I'm in an ideal approximation? How I could make it work for and interacting gas like Lennard-Jones?
Welcome to PF adriplay!

The average energy per degree of freedom per particle is kT/2. So the average energy per particle associated with the 3 translational degrees of freedom is 3kT/2.

Cv = kT/2 x the total number of degrees of freedom. In order to determine the Cv of the system of particles you have to determine the total number of degrees of freedom of the particles in the system.

Since the particles are hard spheres with a finite volume, how many degrees of rotational freedom would they have?

To find the temperature change, once you get the DOF and ##C_v##, use ##C_v = \frac{\Delta U}{\Delta T}## where ##\Delta U## is the energy added to the system.
AM

• adriplay