Using a Bunch of Balls to Model the Ideal Gas Law in Python
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...
This guy knows no limit when it comes to creating interesting physics stuff in Python. 👍
Glad you think so!
Super application, and it's always a plus when things behave as expected! :)
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.
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!
You're very welcome!
Great video as usual. Any chance to see you treat balls interactions with each other?
Yes, I'm going to make another video with many interacting objects.
Perhaps I'm mistaken, but shouldn't the velocities have a Maxwell-Boltzmann distribution?