Diffusion of a 2D Gas JS Model Documents

This material has 3 associated documents. Select a document title to view a document's information.

Main Document

Diffusion of a 2D Gas JS Model 

written by Kostas Papamichalis

The Diffusion of a 2D Gas JS Model shows a 2D rectangle-shaped container is 2L long and L high that is divided into two equal square chambers D1 and D2 by a diaphragm. In the middle of the diaphragm, there is a gap of height h which is initially closed by a barrier. In the container, there are N identical but discrete particles. The particles interact in pairs. During each interaction, the momentum and energy of the pair are conserved. The interactions of particles with the walls of the container are elastic collisions.

At time t=0 all particles are in the left compartment D1 and have random positions and velocities. The initial velocity distribution of the gas, although it is not identical to the Maxwell-Boltzmann distribution, it is very "near" to this and, because of the p-p interactions, it converges extremely fast to it. Over time, particles are transferred through the gap from D1 to D2 and vice versa, so that the numbers of particles n1 and n2 in each chamber are changing. Over time, particles are transferred through the gap from D1 to D2 and vice versa, so that the numbers n1, n2 of particles in each chamber are changing. The program counts n1, n2 in real time and draws their graphs with time. On the other hand, a mathematical model has been composed, by which the variation of n1 and n2 is calculated over time and the corresponding graphs are depicted. The user compares the theoretical graphs with the experimental.

The user can select the values of the length h of the gap and the mean energy of the particles. He can also adjust the value of a statistical-phenomenological parameter, so that the agreement of the experimental data with the theoretical graphs be the best possible.

Released under a Creative Commons Attribution-Share Alike 4.0 license.

Last Modified October 9, 2020

Supplemental Documents

Diffusion model documentation 

A theoretical analysis of the diffusion model and activities.

Last Modified October 7, 2020

This file is included in the full-text index.

Source Code Documents

Diffusion Model Source Code 

The EJS source code for the Diffusion model.

Last Modified October 9, 2020