If you compress or pull on a gas in a container, the gas behaves like a spring. This well known fact reflects countless (by a human) collisions of molecules with the container walls and is a basis for counting the number of molecular degrees of freedom at a given temperature with simple macroscopic observations revealing the quantum nature of their submicroscopic degrees of freedom. [1] But what if it was a single particle gas?
This Live Script simulates a single particle moving freely between a fixed wall and a plunger as the plunger compresses or expands the available volume. The collision times and changing particle velocity and plunger position are calculated explicitly and the average pressure, internal energy, and work done on the gas are calculated as functions of volume.
For elastic collisions with the plunger, the pressure-volume relationship is as expected for adiabatic compression. For inelastic collisions conserving the particle speed, the pressure-volume relationship is that expected for isothermal compression. Collisions with intermediate energy transfer result in intermediate thermodynamic relationships.
This script may interest students and instructors of physics and other fields. The script containers sliders so the user may adjust various parameters and explore.
引用格式
Duncan Carlsmith (2024). Single Particle Gas Simulation (https://www.mathworks.com/matlabcentral/fileexchange/166386-single-particle-gas-simulation), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2024a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!SingleParticleGasSimulation folder
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |