Author Topic: Ejs Open Source Brownian Motion Gas Model Java Applet by Professor Paco & Hwang  (Read 23590 times)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Ejs Open Source Brownian Motion Gas Model Java Applet by Professor Paco & Hwang, now remixed by lookang so i can learn from examining the codes legally because the condition of use is attribution of original authors.

Reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=178.msg791#msg791

Brownian motion
What?
This is a simulation of Brownian motion of a big particle (dust particle) that collides with a large set of smaller particles (molecules of a gas) which move with uniform motion in different random directions.

How?
The Brownian motion of a particle in a liquid is thus due to the instantaneous imbalance in the combined forces exerted by collisions of the particle with the much smaller liquid molecules (which are in random thermal motion) surrounding it. http://en.wikipedia.org/wiki/Brownian_motion

Why?
The mathematical model of Brownian motion has several real-world applications. An often quoted example is stock market fluctuations. http://en.wikipedia.org/wiki/Brownian_motion

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


« Last Edit: April 19, 2012, 01:52:14 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
changes made:

1 color the background green
2 added elastic wall slider
3 added elastic between particles slider
4 a couple of check-boxes for visualization
« Last Edit: December 29, 2010, 02:29:46 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
good YouTube on Real Life Brownian Motion as explained by Professor Bowley discusses Albert Einstein, Brownian motion and whether pollen is alive. More videos at http://www.sixtysymbols.com/


other applets:
http://galileo.phys.virginia.edu/classes/109N/more_stuff/Applets/brownian/brownian.html
« Last Edit: March 29, 2010, 04:44:10 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Lookang,

I like what you have done to the brownian motion applet. I was wondering if you could help me make an additional modification. I am trying to increase the number of Particle[0] to an array size so that the user can input a number of "yellow" particles say from 1 to 20 particles. I am having a difficult time doing this for I am a novice at the coding part of ejs.

Thank you for any help or insight you can give me.

Thanks

jake

done!
the extra codes are:
// set
for (int counter=0; counter pxset[counter]= x[counter];
  pyset[counter]= y[counter];
}

the rest is easily to figure out when you are inside EJS right?
hope this is what you need :)
enjoy!

my blog has the entry too
http://weelookang.blogspot.com/2010/06/ejs-open-source-brownian-motion-gas.html
« Last Edit: April 19, 2012, 01:02:29 pm by lookang »

frodo

  • Newbie
  • *
  • Posts: 5
Lookang,

I am honored that you have taken the time to help me. You expertise is much appreciated. The code you created:

Quote
// set
for (int counter=0; counter pxset[counter]=  x[counter];
  pyset[counter]=  y[counter];
}

Should it go into the initialization screen or a new tab on the custom screen? The variable "counter" will then have to be declared on the variables page and it is an array? I am unsure, but that is what I think so far. Please correct me if I am wrong. It also looks like I need to declare pxset and pyset. Are those double type variables? Then do I need to create a slider that is linked to the "counter" variable?

I understand how the basic parts of EJS work, where I am learning is how to make sense of arrays and how to link the appropriate variables to visual objects. This is very complicated, although I enjoy trying to figure out how to do it.  I am truly a novice, but I am excited to learn. This is going to help out so much in my classroom.

Thank you again for your help Lookang!!!!

-jake

frodo

  • Newbie
  • *
  • Posts: 5
Oh there is one more thing I was hoping for, is to have the larger yellow particles concentrated to one area in the view panel. I am hoping to show how a spray of perfume may diffuse across a room as time progresses. I was looking at your blog, very cool by the way, and noticed that the yellow particles were spread out at the start of the simulation. I hope to have mine highly concentrated to one spot to start with. If you have suggestions that would be fantastic.

Thanks again Lookang!!!

jake

p.s. I am following your blog now ;)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
you can watch these first
http://weelookang.blogspot.com/2011/02/easy-java-simulation-tutorial.html
or
http://www.um.es/fem/EjsWiki/Main/Webcasts

i am not sure if i can find time to make video tutorial.

maybe i try if time permits


your question:
to make the perfume particles come together,
u can try to change the codes to instead of random start positions

to a fix position of your choice

try it and let us know if you are progressing :)

frodo

  • Newbie
  • *
  • Posts: 5
Sounds great!!!

I am making a little progress and I will let you know the out come as well as come up with specific questions.

Thanks again!!!!

This forum is a CoLos al help!