Quantcast
Channel: Classical Physics
Viewing all articles
Browse latest Browse all 57941

How to simulate pressure in an ideal gas simulation

$
0
0
Hello

I wrote a simple simulation of an 2D ideal gas, with elastic collisions. I wonder how should I simulate the pressure that is implemented on the particles in the box, by a piston with certain weight. it's easy to adjust the area of the box and the temperature of the particles which is proportional to the velocity squared, but I don't know how to change the pressure directly.

Thanks!

Viewing all articles
Browse latest Browse all 57941

Trending Articles