NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Thermodynamics => Topic started by: Fu-Kwun Hwang on February 16, 2008, 12:34:04 pm



Title: ideal gas law: PV=nRT
Post by: Fu-Kwun Hwang on February 16, 2008, 12:34:04 pm
User can change Pressure(P), Velocity(v), Temperature (T), number of particle (N) and width of the system.
However, I did not add Volume as an adjustable parameter, because we are simulated an equilibrium state.

-*-


Title: Re: ideal gas law: PV=nRT
Post by: lookang on November 25, 2008, 08:16:26 am
i notice when P increase drastically,

the particles can go through the walls, is that the intended simulation or it is a collision boundary issue with the simulation (bug)?



Title: Re: ideal gas law: PV=nRT
Post by: Fu-Kwun Hwang on November 25, 2008, 09:15:35 am
You could say that it is a bug. However, it is happened when you try to simulate very high pressure and very small volume of the system.
The simulation time step is 20 frames per second. If the velocity is too large or the volume is too small,  you will find similar cases happened.

Simulation is based on model. And most model has it own limitation. I can use some trick to prevent similar case, however, user will not know s/he has reach the limitation of the simulation. So I will keep it like that.

You might want to check out another version (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=25.msg3292#msg3292) (with fixed volume option).


Title: Re: ideal gas law: PV=nRT
Post by: lookang on March 16, 2010, 04:35:26 pm
greeting Prof Hwang!

i been trying to remix this applet, with some success. :) check out the attachment or http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1455msg5504;topicseen#msg5504

I have 2 (modeling) problems i want to add into the simulation.

1. collisions between particles ( current model is missing this, only collision with walls)
2. some way to show Maxwell distribution of speeds like http://www.chm.davidson.edu/vce/kineticmoleculartheory/Maxwell.html

chance to work on my attachment http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=632.0;attach=1736 below and build on each other's effort to make a fantastic Ideal Gas Model based on Kinetic Theory of Gas applet jointly?  ;D

1 and 2 seems a bit difficult for me, thanks for your consideration and let me know how should i progress.



Title: Re: ideal gas law: PV=nRT
Post by: Fu-Kwun Hwang on March 16, 2010, 05:17:22 pm
1. Please check out Browian motion (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=178.0) if you really want to add collision between particles.

The above applet take care of collision between  all particles. However, adding above effect would not make much different result from the simulation. It will need more time to calculate possible collision between any two particles.
 A loop with 400*400 checking for collision.

You can add Maxwell distribution of speeds , however, it only make sense if you have enough number of particles.
Otherwise, it would not make the simulation better (it might be even worse).
If you increase number of particles to 4000, the computational time will increase 100 times compared to 400 particles.

We can add more physics conditions into simulation, but does it make the simulation better for teaching purpose.
If you want to simulate physics effect, then it is another story.

Make up your mind : what is the purpose of the simulation?  What is the goal for the simulation?
What you want the user to learn from the simulation?

Sometime, it will become more difficult for students if too complex variables are introduced to the model.
Adding all the features together might not be a better solution.


Title: Re: ideal gas law: PV=nRT
Post by: lookang on March 16, 2010, 09:03:12 pm
1. Please check out Browian motion (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=178.0) if you really want to add collision between particles.
Thanks! will explore

The above applet take care of collision between  all particles. However, adding above effect would not make much different result from the simulation. It will need more time to calculate possible collision between any two particles.
 A loop with 400*400 checking for collision.
reference: http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1455msg5504;topicseen#msg5504

My friend (LeeTL) in school wanted a simulation to be used for students to play with, and according to the assumption number 2.All collisions between gas molecules are elastic and all motion is frictionless (no energy is lost in collisions or in motion), I thought it would be good to show it in the simulation, instead of telling the students the assumptions are not modeled in our applet.


You can add Maxwell distribution of speeds , however, it only make sense if you have enough number of particles.
Otherwise, it would not make the simulation better (it might be even worse).
If you increase number of particles to 4000, the computational time will increase 100 times compared to 400 particles.
I was thinking of using a tactics or trick like a time interval and keep adding, as long as i am able to approximately show molecules has different speeds, it should be fine, the Maxwell distribution does not need to be ideal, just to illustrate molecules at the same temperature, it is likely the molecules has different speed but the vrms helps us to determine the temperature.


We can add more physics conditions into simulation, but does it make the simulation better for teaching purpose.
If you want to simulate physics effect, then it is another story.
Just the 6 assumptions of Kinetic theory of gases http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1455msg5504;topicseen#msg5504 as best as i can represent and model the assumptions.

Make up your mind : what is the purpose of the simulation?  What is the goal for the simulation?
What you want the user to learn from the simulation?
let students interact with applet and and make sense of the physics.

Sometime, it will become more difficult for students if too complex variables are introduced to the model.
Adding all the features together might not be a better solution.
i see and agree. let try it with the students and see what they say, will post their feedback!


Title: Re: ideal gas law: PV=nRT
Post by: Fu-Kwun Hwang on March 16, 2010, 09:07:59 pm
It does make sense that if you start a simulation in which all the particles are having the same speed but random direction( or any velocity distribution). If collision is added between particles, you will find after some time, all the velocity will be close to Maxwell distribution of speeds (It need to be a 3D simulation). As far as I know, Wolfgang already designed a simulation to illustrate the above physics phenomena.


Title: Re: ideal gas law: PV=nRT
Post by: lookang on March 16, 2010, 09:53:05 pm
found Ejs Hard Sphere Gas Model by Wolfgang Christian http://www.compadre.org/STP/items/detail.cfm?ID=7574 only after you mention. will explore it too. thanks!


unfortunately when i googled "ejs kinetic theory of gas applet" and i didn't find wolfgang's model.


Title: Re: ideal gas law: PV=nRT
Post by: mickey2times on September 29, 2014, 09:57:37 am
Hello Professor,

I was using this simulation in my class as a virtual lab so the students could discover the relations between pressure, volume, temperature and between temperature and v(rms)  My students realized that (with the initial conditions) when the temperature is increased above 800 the volume reading stops going up (freezes at 400), but the visual volume increases.  Is there a physical reason that I am not aware of for the volume to stop increasing with temperature (when pressure is constant) or is the sim giving the wrong reading.

thank you again for all your great simulations.

Mike Maloney
Somerville High School


Title: Re: ideal gas law: PV=nRT
Post by: Fu-Kwun Hwang on September 29, 2014, 08:22:40 pm
I am sorry that it is a bug in the program. I just fixed it.
Thank you for your feedback. :-)


Title: Re: ideal gas law: PV=nRT
Post by: mickey2times on September 03, 2015, 02:05:14 am
sorry this is a year late, but thanks for updating it, and for all your other sims.  I really like this simulation as a vitrual lab for my high school students to take data and develop the ideal gas law and kinetic theory themselves, as it is hard to usually get good data for this in high school.


Title: Re: ideal gas law: PV=nRT
Post by: lookang on September 03, 2015, 08:04:49 am
We also have an alternative model here
http://iwant2study.org/ospsg/index.php/interactive-resources/physics/03-thermal-physics/01-kinetic-model/106-ideal-gas-model-based-on-kinetic-theory-of-gas

The difference is this run on JavaScript n will run on mobile operating systems like Android and iOS.


Title: Re: ideal gas law: PV=nRT
Post by: mickey2times on September 14, 2015, 07:50:07 am
thanks, but that link seems to be broken.  I can see the other sims on that site, but not the ideal gas law one.


Title: Re: ideal gas law: PV=nRT
Post by: lookang on September 14, 2015, 10:13:06 pm
Thank you for reporting bug.
The link works now and the direct link ishttp://iwant2study.org/lookangejss/03thermalphysics_08kineticmodel/ejss_model_gas2DPVnRTwee12brownianFKH/gas2DPVnRTwee12brownianFKH_Simulation.xhtml

Enjoy!