Kinetic Theory Simulation
The entire story is divided in 4 parts:
1. Objective
2. Theory (Extended Article)
3. Simulation (Extended Article)
4. Observations
Objective
Kinetic Theory is a classical model of thermodynamics in which microscopic properties (position, velocity and number of particles) is used to explain the macroscopic properties (Temperature, Pressure, Energy and Entropy). The beauty of the theory is in the fact that we can explain macro scale evolution by using simple Newton’s Laws of motion at microscopic level between molecules.
In the simulation, I have implemented the phenomenon of heat transfer between two bodies. This has been explained in details in Theory section. The main objective is to study how the entropy evolves with time during the heat transfer. And see that in fact, the kinetic theory model gives the same evolution of temperature as is given by Newton’s Law of cooling.
Theory
Kinetic Theory of Gases:
Relation between Temperature and velocities of particles:
where T is the temperature of system, R is universal gas constant and m, M, v, N are atomic mass, Molar mass, velocity and number of particles.
Boltzmann Velocity distribution in 2-D:
The significance of Boltzmann Distribution is that if we leave a system with any initial condition bounded within walls, the velocities will eventually evolve into Boltzmann Distribution.
I have written a detailed description and derivation of these equations in a separate blog (since generally Boltzmann Velocity distribution is given for 3-D) which can be found here.
Just to give you a feel of why I we expect Newton’s Law of cooling from Kinetic Theory. Let there be two systems, Box A and Box B with temperature of A greater than that of B. So from Boltzmann Distribution, A will contain more greater velocity particles as compared to Box B.
Now when we open the barrier, the particles will mix, greater velocity particle from A will move to B and lesser velocity particles will come to A. This will result in decrease in temperature of A and increase in temperature of B. This is what we expected. Now initially the distribution is very large causing rapid change of temperature but with time the systems will become more uniform causing lesser and lesser change in temperature. You feel the Newton’s Law of cooling!
Simulation
I have written a separate article on how I designed the simulation which can be found here.
In the simulation, heat transfer is simulated between two systems. As soon as, we open the barrier using Open The Barrier button, the particles start to travel between the systems causing a change in velocity of particles and thus the temperature of the systems changes. The velocity distribution of both systems and the Temperature change with time are plotted in graphs on the right side. Also you can generate several type of conditions based on number of particles, mass of particles and Initial Temperature of the systems. Just for an example: You can create heat transfer between source and sink by providing a system with comparatively very large number of particles (which will thus act as source).
Another important feature of the simulation is that you can download the data of evolution of systems (namely Temperature and Number of particles of both systems). To download the data:
- Click on Opaque Background button.
- Download Data button will be visible on the right top side.
Observations
The data obtained from simulation gives the following result for simulation. As expected, the change in exponential in nature. However, we see certain irregularities. This is because environment temperature is not same.
However, the main theme of the simulation, entropy, is still incomplete. I am not being able to find the write way to express entropy. One possible way is to explore how the number of particles is changing.
If you run the simulation for large temperature difference, you will observe that higher temperature particles isn’t giving lower temperature particles chance to escape and they are limited to corner in their box. This might also giving me some clue. Let’s see.
Enjoy !!