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 May 16, 2005, 02:55:49 pm



Title: Browian motion
Post by: Fu-Kwun Hwang on May 16, 2005, 02:55:49 pm
Qualitative evidence of the microscopic nature of gases is shown by an effect called Brownian motion.
All the particles are moving with different velocity and in random direction.
The only interaction between partciles is coiision.
There is one larger particles which will be collide by surrounding particles and the behavior is similar to a random walk pattern.
This simulation let you get a visual representation of Brownian motion.
-*-

[ejsapplet]

Here is a related youtube movie
[youtube=FAdxd2Iv-UA&hl]


Title: topic178
Post by: noha khaled on November 27, 2005, 04:47:34 am
[b:d5f38f5fff]Good morning,

I read that one of einstein's three papers published in 1905 is about browno\ian motion , it states that the perpendicular distance moved by a brownian particle is directly propotional as the square root of the time , for example in four seconds it moves 2 cm, in nine seconds it moves 3 cm and so on , so the body is slowing down , it is deccelarating , what is the reason for this deccelaration and what is the effect causing it , is it related to the soultion ??

Thanks :) [/b:d5f38f5fff]


Title: can''t get
Post by: alphadp on March 25, 2006, 10:54:02 pm
i can't get the applet file from this page
ie shows "no privilege"


Title: Brownian motion
Post by: pyragas on April 02, 2006, 11:16:04 pm
The new aplet for Brownian motion is very nice.
Can you send it to me for off line use?
Thank you in advance.
Kestutis


Title: Offline use
Post by: rhipple on April 03, 2006, 07:15:48 am
If you register with an email address, they will be emailed to you automatically


Title: the reason
Post by: alphadp on April 04, 2006, 06:57:15 pm
i have find the  :?:
i have the ZoomAlarm firewall
when i turn off it
all OK :D
the ejs is so great,it help me a lot
thanks Prof. Fu-Kwun Hwang and National Taiwan Normal University
you have done great work :!:  :!:  :!: ...


Title: topic178
Post by: sarig on July 24, 2006, 10:19:27 pm
The applet is great. thank you
 :D


Title: Re: Browian motion
Post by: Yves on September 21, 2007, 11:06:00 am
Dear Professor and All,

How do I download this file? The download button doesn't work.

Thanks.


Title: Re: Browian motion
Post by: Fu-Kwun Hwang on September 21, 2007, 04:40:12 pm
Sorry! It should work now. Please try it again!


Title: Re: Browian motion
Post by: Yves on September 21, 2007, 09:11:04 pm
Thanks, Prof. Much appreciated.

This is a great site to learn about Brownian motion!  :)


Title: Ejs Open source Best Brownian motion java applet
Post by: lookang on March 19, 2010, 01:44:15 pm
This is the best particles collision java applet i have ever seen.
800 particles and still not lag! it is incredible.
will study it carefully and add it here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1455.msg5505#msg5505
Well done! credits to Francisco Esquembre and Fu-Kwun Hwang for this Best Brownian motion java applet  ;D


Title: Ejs Open source Brownian Motion Applet
Post by: lookang on March 19, 2010, 03:29:05 pm
Dear Prof,

Is it normal is terms of the computation that there is a small total kinetic energy (TKE) and total momentum (TMOM) lost in this model?

I hope i coded the TKE and TMOM correct.

Whichever solver Euler, Euler-Richardson, ......, QSS 3 etc there seems to be a small loss.

it that true? can i verify this model's has computation carried over error ?
[eye]
[ejsapplet]
[/eye]


Title: Re: Browian motion
Post by: Fu-Kwun Hwang on March 19, 2010, 04:43:15 pm
Euler's method is only good for constant motion (velocity is constant).
Euler-Richardson or midpoint method is good for constant acceleration.

Normally, I use Runge-Kutta 4th order method, it is rough 100 times better resolution than midpoint error. This is good for most cases.
Sometime, I used Runge-Kutta Fehlberg adjustable time step method for interaction for like 1/r2 (when r is small , the error become larger).
However, you need to asjust time step carefully.
Smaller time will give you smaller run time error until run-offer error become major problem (10-6 for float, 10-13 for double).
If the particle size is very small , or there are many particels. the error will accumuate.

You need to study numerical method to understand what is the best way to used for different cases.

I would suggest you use Runge-Kutta 4th order method for most of the cases.
The error could be due to numerical method. However, it could be due to the coding.

You can calculate error if you know the theoretical value in advance.
Otherwise, it will depend on how much you know about the system to have a better guess.


Title: Re: Browian motion
Post by: lookang on March 23, 2010, 10:40:43 pm
I would suggest you use Runge-Kutta 4th order method for most of the cases.
The error could be due to numerical method. However, it could be due to the coding.

i was analyzing the codes and realized
Code:
public double getA (int i,double[] v) {
 if(i==0)return 0; // b*v[0]; i removed the b*v[0]; because original used a speed decay constant b = -.25 i think
 else return 0;
}

after i change it to return 0, the TKE is constant now!
cool! so it was the coding.
for your info.


Title: Re: Browian motion
Post by: Fu-Kwun Hwang on March 24, 2010, 07:44:08 am
The above code was designed for Browian motion, so a relatively large object was collided by many small particles. The larger object will experience some resistance when it is moving in a fluid, That is why I add a damping factor there. Sorry for the confusion.


Title: Re: Browian motion
Post by: lookang on March 24, 2010, 11:12:17 am
no problem, all is good


Title: Re: Browian motion
Post by: smith88 on August 18, 2011, 04:03:28 am
You will find applets web pages translated into different language format here. You are all welcomed to translate our applet into your local language, please send me translated copy to share with more users.


Title: Re: Browian motion
Post by: frodo on April 19, 2012, 01:53:12 am
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


Title: Re: Browian motion
Post by: lookang on April 19, 2012, 11:37:53 am
hi jake,
are you referring to this
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1484.0


Title: Re: Browian motion
Post by: frodo on April 19, 2012, 08:12:04 pm
yes, but i am not sure how my post ended up here. yes I am referring to the page you have linked. I am not sure where to incorporate your code and I was wondering how it would be possible to concentrate the yellow dots to the center of the view panel so that it looks like diffusion of a few particles moving from an area of high concentration...

What are your thoughts?

Thanks again

jake