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

Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on March 18, 2010, 04:31:44 pm



Title: Ejs Open Source Ideal Gas Model with Maxwell Distribution of Speed Java Applet
Post by: lookang on March 18, 2010, 04:31:44 pm
Ejs Open Source Ideal Gas Model with Maxwell Distribution of Speed Java Applet by Wolfgang Christian
name change is for google better search result for "Maxwell Distribution of Speed"

This is a legally remix applet license under GNU General Public License (GPL) version 2 http://www.opensourcephysics.org/misc/copyright.html , but please note that the narratives of books, manuals, and curricular material associated with this code are copyrighted by the authors and/or publishers which are not here anyway :)
Ejs Open Source Ideal Hard Disk Gas Model by Wolfgang Christian java applet remixed by lookang
Reference:
Ejs Open Source Ideal Hard Disk Gas Model by Wolfgang Christian http://www.compadre.org/osp/items/detail.cfm?ID=7573

i don't think i got the physics codes correctly implemented for e !=1


Title: Re: Ejs Open Source Ideal Hard Disk Gas Model by Wolfgang Christian
Post by: lookang on March 18, 2010, 04:36:45 pm
changes made to learn from the open source physics codes.

1. made n selectable by defining nmax and insert as the n maximum limit
2. made v0 selectable by changing the codes
3. made arrows array to be drawn to understand where the particles are heading
4. made text array to allow eye balling what each particle is doing
5 change some minor values to make cellSize selectable as well.
6 added e coefficient of restitution but the codes does not work well when e = 0 probably due to the collision detection codes, goes to a deep loop when too much particles are near each other and the model is not too correct as it behaves strangely, the particles all move to one side?

Enjoy!


Title: Re: Ejs Open Source Ideal Hard Disk Gas Model by Wolfgang Christian
Post by: ahmedelshfie on April 26, 2010, 08:31:24 pm
Is very interesting simulation prof lookang any way
I modified interface  ;)

Hard Disk Gas model displays a two-dimensional gas made out of hard disks.
Particles are initialized with a speed v=1 in a random direction and move with constant velocity until a collision occurs. 
You can modify this simulation if you have Ejs installed by right-clicking within the plot and selecting "Open Ejs Model" from the pop-up menu item.