- #1
leibo
- 11
- 1
Hi
I built with Python a simulation of an ideal gas in 2D, treating the molecules as hard spheres with elastic collisions. I am trying to test the experimental values of P,T etc. in the simulation versus the theoretical values. however, I have two problems:
1) when comparing the pressure in the simulation to the pressure predicted from P=NmVx^2/a^2 (when N in number of molecules, m is the mass of each molecule and a^2 is the area of the box) I consistently get approximately the right values, but they are higher by a factor of 1000. What can be the reason?
2) I wonder how should I adjust the value of the gas constant R to the fact that in the simulation distances and velocities are measured with unites of pixels and pixels/iteration rather than by meters and meters/sec?
Thanks in advance and sorry for my poor english
I built with Python a simulation of an ideal gas in 2D, treating the molecules as hard spheres with elastic collisions. I am trying to test the experimental values of P,T etc. in the simulation versus the theoretical values. however, I have two problems:
1) when comparing the pressure in the simulation to the pressure predicted from P=NmVx^2/a^2 (when N in number of molecules, m is the mass of each molecule and a^2 is the area of the box) I consistently get approximately the right values, but they are higher by a factor of 1000. What can be the reason?
2) I wonder how should I adjust the value of the gas constant R to the fact that in the simulation distances and velocities are measured with unites of pixels and pixels/iteration rather than by meters and meters/sec?
Thanks in advance and sorry for my poor english