Using a Bunch of Balls to Model the Ideal Gas Law in Python

Sdílet
Vložit
  • čas přidán 10. 12. 2023
  • Here I create a bunch of balls in python that are inside a spherical container. With that, I can let the balls bounce of the walls and act as an ideal gas. From that, I can calculate both the pressure and temperature.
    Here is the completed python code:
    trinket.io/glowscript/5c10c51012
    Here's a tutorial on python lists
    • Python Lists for Physi...

Komentáře • 9

  • @User-jr7vf
    @User-jr7vf Před 7 měsíci +4

    This guy knows no limit when it comes to creating interesting physics stuff in Python. 👍

  • @fizixx
    @fizixx Před 7 měsíci +1

    Super application, and it's always a plus when things behave as expected! :)

  • @mungorn
    @mungorn Před 7 měsíci

    At 23:00 it makes sense that the temperature should increase because with the shrinking sphere, the walls are doing positive work on the gas and you don't have any mechanism for heat removal (as far as I can tell) so it should effectively be an adiabatic compression.

  • @godphysics2473
    @godphysics2473 Před 7 měsíci +3

    The best physics teacher I’ve ever encountered in my 34 years of my life. I can’t thank you enough for the time and all the effort you put into these videos.
    Sorry for my English, I could not express myself in the way I’d like.
    Ideal gas and pressure fluctuation, Nice!
    God bless you!

  • @marcfreydefont7520
    @marcfreydefont7520 Před 7 měsíci +1

    Great video as usual. Any chance to see you treat balls interactions with each other?

    • @DotPhysics
      @DotPhysics  Před 7 měsíci

      Yes, I'm going to make another video with many interacting objects.

  • @copywright5635
    @copywright5635 Před 6 měsíci

    Perhaps I'm mistaken, but shouldn't the velocities have a Maxwell-Boltzmann distribution?