Recent content by leibo

  1. L

    Python What Could be Causing Discrepancies in My Python Gas Simulation?

    This is the most updated version. now the kinetic energy (temperature) is calculated with Vrms. The ratio PA/NT is almost constant and stands on about 1.03 (when you scroll down the upper wall , reducing the area to about half of the original area, the pressure is doubled (-:) from...
  2. L

    Python What Could be Causing Discrepancies in My Python Gas Simulation?

    Thank you very much for your answer. I took into consideration the adjustments for 2D, yet the data I get is not enough accurate. I did not include the measuring code for simplicity. Since the temperature is proportional to the kinetic energy (to be precise - it is proportional to the RMS...
  3. L

    Python What Could be Causing Discrepancies in My Python Gas Simulation?

    Hello. I wrote a simple gas simulation in python, with pygame. In the simulation the atoms collide elastic collisions with each other and with the walls. Although the simulation does run and the collisions look realistic, when I try to calculate physical parameters like p,T,V,n and compare them...
  4. L

    Undergrad How to simulate pressure in an ideal gas simulation

    Yes, you are right, it's a simulation of very simple real gas, rather than an ideal gas. I understand I can not decide the values of all 4 variables n,p,V,T. Yet, I can suddenly change T, with constant n, and V,P would change correspondingly to the equation. In the same way I want to be able to...
  5. L

    Undergrad How to simulate pressure in an ideal gas simulation

    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...
  6. L

    Graduate Ideal Gas Simulation: Troubleshooting Pressure and Gas Constant in 2D Model

    Molecules of an ideal gas do interact through elastic collisions. They do not interact through electric attraction forces. according to Wikipedia: "the ideal gas model depends on the following assumptions...All collisions are elastic and all motion is frictionless (no energy loss in motion or...
  7. L

    Graduate Ideal Gas Simulation: Troubleshooting Pressure and Gas Constant in 2D Model

    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...
  8. L

    Derivation of kintetic theory equation

    thanks, but I am not sure I fully understand you. is the factor 1/3 really comes to "correct" the worng assumption that no clashes are made during the travel from one wall to the other? if so, maybe you know where can I find a rigorous and accurate derivation of this factor and all the equation...
  9. L

    Derivation of kintetic theory equation

    Hello. My question is related to the derivation of the equation pv=1/3nMwC^2. Most of the derivations i have seen assume that the average time between colisions, t, is 2l/Vx when l is the length of the cube. When assuming this, you actually assume that each molecule travel from one wall to...