NTNUJAVA Virtual Physics Laboratory (Java Simulations in Physics)
December 02, 2008, 01:02:55 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This site host hundreds of physics related java simulations under create common license. All registered user will be able to get files for offline use when user login and view the simulation. Switch to this new system on 2007/02/14. (previous system2001-2007, 1996-2001) ,Check out Chinese forum to find more simulations and resources in Chinese.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Brownian Motion  (Read 173102 times)
0 Members and 1 Guest are viewing this topic.
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« on: January 29, 2004, 08:38:56 PM »

Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME
There are 8 translations,
or


Qualitative evidence of the microscopic nature of gases is shown by an effect called Brownian motion.
This java applet shows Brownian motion for gas molecules.
(Gas molecules in a container continually collide with one another and with the walls of the container.
    Keep in mind : this is a slow motion and magnified view in a small area.


    Each circle represents a gas molecule.

    N is the total number of molecules in the area.
      Enter value into the Text Field and press RETURN.

    m2/m1 is the mass ratio of red ball to gray ball.

    (Try it, and find out the difference)


    Press + will have a smaller time interval. (faster motion)

    Press - for slower motion.
    Click trace check box to show the trace for one of the molecules (red).
      Click it again to turn it off and clear the screen.


    Right Click to stop the animation, click it again to resume.
     While the animation is stopped, drag the red ball to relocate its position.
    If you click No boundary checkbox, particles moving to the right edge will appear at left edge again (No collision with the wall).


Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME
There are 8 translations,
or
Logged
Guest
« Reply #1 on: January 30, 2004, 11:13:41 AM »

Subject: Brownian motion
Date: Sat, 5 Sep 1998 10:18:45 +0100
From: "Peter Mussard" <p.mussard@sfxavier.ac.uk>
To: <hwang@phy03.phy.ntnu.edu.tw>
The animation is good, but the text 'Green dots are velocity distribution of the
molecules' doesn't make sense.

Peter Mussard

p.mussard@sfxavier.ac.uk
Logged
Guest
« Reply #2 on: July 11, 2004, 06:46:34 PM »

[quote:f669a5a961="Anonymous"]Subject: Brownian motion
Date: Sat, 5 Sep 1998 10:18:45 +0100
From: "Peter Mussard" <p.mussard@sfxavier.ac.uk>
To: <hwang@phy03.phy.ntnu.edu.tw>
The animation is good, but the text 'Green dots are velocity distribution of the
molecules' doesn't make sense.

Peter Mussard

p.mussard@sfxavier.ac.uk[/quote:f669a5a961]
but the text about "the text 'Green dots are velocity distribution of the
molecules'doesn't make sense" doesn't make sense. what text about green dots? what tokking u?
Logged
Guest
« Reply #3 on: July 11, 2004, 06:55:58 PM »

sometimes the red ball gets stuck in the top left corner and won't move at all. Why? (i tried noboundary too, but the ball stayed still.)
Logged
ibum
Newbie
*
Posts: 0


« Reply #4 on: July 11, 2004, 07:01:54 PM »

[quote:490d1a9613="Anonymous"][quote:490d1a9613="Anonymous"]Subject: Brownian motion
Date: Sat, 5 Sep 1998 10:18:45 +0100
From: "Peter Mussard" <p.mussard@sfxavier.ac.uk>
To: <hwang@phy03.phy.ntnu.edu.tw>
The animation is good, but the text 'Green dots are velocity distribution of the
molecules' doesn't make sense.

Peter Mussard

p.mussard@sfxavier.ac.uk[/quote:490d1a9613]
but the text about "the text 'Green dots are velocity distribution of the
molecules'doesn't make sense" doesn't make sense. what text about green dots? what tokking u?[/quote:490d1a9613]
what tokking u? sounds like me!
and btw, sometimes the red ball gets stuck in the top left corner (as i have said earlier), and sometimes it disappears!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #5 on: May 16, 2005, 02:53:33 PM »

Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME

The following is new verision of brownian motion created with EJS.


Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME
« Last Edit: March 02, 2007, 11:49:43 PM by Fu-Kwun Hwang » Logged
kuschei
Newbie
*
Posts: 1

physics


« Reply #6 on: July 03, 2005, 05:05:12 PM »

Smiley
Logged

joe01
alphadp
Newbie
*
Posts: 3


« Reply #7 on: March 22, 2006, 04:11:19 PM »

fine fine fine...
but where is the Applet files of the new verison
i want it :shock:
will you send it to me (email)
thank you Cheesy
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #8 on: March 05, 2007, 02:40:29 PM »

Just click "download applet files for offline use" button, if you login to the forum.
Logged
vvelemir
Newbie
*
Posts: 3


« Reply #9 on: April 09, 2007, 11:35:42 PM »

Thank You. Smiley
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #10 on: April 25, 2007, 03:14:45 PM »

I am doing alot of research on financial markets. Is it possible to create for this 2 dimensional plot a 1 dimensional brownian function with time on x-axis?

thx a lot
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #11 on: April 26, 2007, 04:09:03 PM »

You want the horizontal axis to be time, however, what will be the vertical axis?  (Click load ejs as signed applet and make some modifications- add another plotting panel and add some traces , then you will get what you wanted! ).

Tell me in more detail what you want, and I will show you how to do it with ejs.
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #12 on: May 09, 2007, 03:37:24 PM »

I would like to see somthing like this:

http://www.mscf.uky.edu/~mai/java/stat/brmo.html

on the left the brownian motion and on the right a one dimension plot of it.

thx a lot for your help...

P.S.: I cannot get the source code for the java applet from the other weblink.
I need this applet a little bit larger to see the fine structure.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #13 on: May 11, 2007, 04:51:17 PM »

You can add any diagram easily with ejs.
1. Click "loaded ejs as signed applet"
2. You will need to give permission for browser to load ejs into your computer (If it is the first time you click that button)
3. When EJS is fully loaded (It will take a few minutes for first time user).
4. You will find introduction/model/view panels. You can find out how the variables are defined, what kind of equations were used,...etc from model panel. The x,y coordinate for the big particle is defined as px,py in the model. The time is defined as t.
5. Click View panel to add a new window to display diagram.
 1) add a dialog window (You can adjust the size and location).
 2) add a plottingPanel to plot diagram.
 3) add a trace element to display trace for (t,py)
 4) assign variable t, py as x,y properties for trace.
 5. Click run button to create a new simulation with the diagram you want.

I have created a flash motion to demonstrate the above steps. However, the interface were shown  in Chinese Because I am running it with my Chinese OS.

You can also save the ejs locally.
« Last Edit: May 11, 2007, 09:42:01 PM by Fu-Kwun Hwang » Logged
Doc_B
Newbie
*
Posts: 7


« Reply #14 on: May 12, 2007, 01:47:25 AM »

Thanks, thanks a lot for your help. I watched your Flash Animation 15 times to set all parameters correctly. But lastly it will not run. I got 100 errors. After playing around with it and tested this applet without modifying anything, it gave me also these errors.
What I did was: I loaded the ejs by clicking on the "load ejs as signed applet" button and then hit the right green arrow. The applet was not runnig and I got these Error-Messages in the lower subgraph.
Perhaps I have something to change on my computer settings.

Thanks for your help....
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #15 on: May 14, 2007, 03:24:34 PM »

Finally its working on my Notebook.
Is it possible to create this applet like the original Java Applet with entering the Numbers of Particles and No Boundary on icons. I tried it, but I couldn`t find a solution.
"Trace" is working fine now...

Thanks a lot for your help.
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #16 on: May 14, 2007, 03:35:02 PM »

After saving the original and my new created applet, I am getting after executing these *xml Files on both the same error. Please try it also.
This creates the Error:

<Name>
N> 5.0
  ]]>
  </Value>
  <Type>double</Type>
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #17 on: May 14, 2007, 05:23:44 PM »

Everything is working well now.

The only thing now is to add icons for Number of Particles and No Boundary.

thanks in advance ......
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #18 on: May 15, 2007, 10:10:39 PM »

I should have told you, if you are serious about it. You should download EJS and installed it directly into your computer. Load EJS as a signed applet is a quick way to run EJS inside a browser. Please check out  Easy java simulation (Download and related informations)
Copy the previous saved source code brownianmotion.xml to EJS/Simulation

Click EjsConsole.jar under EJS. A local EJS version will be ready for you.
It will be faster and you can work off-line.

Do you mean you want to change the number of particles shown in the simulation?
In the model, number of particle is defined as n(the default value is 800).
If you want to change the number of particle in the simulation.
I would suggest you go to the model panel.
Find out variable n under tab-name (Disks)
Left click n, then right click to select "add a variable".
Then enter n1 as variable name, set default value to n. (or n/2 or whatever reasonable value),
Then switch Constraints tabs.
Change all the n in the for loop to n1. (You only need to change two "n" to "n1". So all the calculation are with number of n1 particles)
If you want you can also change "n" in initialization page to "n1".
Now, it is all done with the model.

We need to change the VIEW. Find ParticleSet and ArrowSet.
Change the property "Elements" from "n" to "n1".
Add we need to modify GUI to set n1.
You can add slider or NumberField for your pourpose.
Or if you do not need the "size" slider , just change the property of "Slidersize".
 1. change it variable from "sizen" to n1.
 2. set minimum to minimun number of particle.
 3. set maximum to n.
 4. set Format field to something like "n=0" or "n=#"
You will see the change at the same time in the editor window.

Run the new simulation and you will be able to get a new simulation you want.

Please take a look at EJS manual or document from EJS's home site.
http://fem.um.es/
You can download latest version from their web site ,too.
Logged
Doc_B
Newbie
*
Posts: 7


« Reply #19 on: May 16, 2007, 04:36:01 PM »

thanks a lot for your help. Yes I downloaded the software and changed already the inputs and I created new icons. Everything is working now. My last question is: Is there a way to get no boundary for the main particle?

thx again for helping me!!!

Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #20 on: May 16, 2007, 10:24:46 PM »

You will find the following codes in the Constrain page:

//vdistribution();
for (int i=0; i  double r = diameter/2;
  double d = y-ymin-r;
  if (vy<0 && d=-vy; }
  d = ymax-r-y;
  if (vy>0 && d=-vy; }
  d = x-xmin-r;
  if (vx<0 && d=-vx; }
  d = xmax-r-x;
  if (vx>0 && d=-vx; }
}

The above codes let particle changes direction when it hit the wall.
The id for main particle is 0, so change the above code 
from for i=0  to for i=1
Then,main particle will not be bounded to the simulation region.
You may add whatever conditions you want into the Constraint page(s).
Logged
vinduwa
Newbie
*
Posts: 1


« Reply #21 on: November 27, 2007, 05:25:48 AM »

Prof Hwang;

 Could you please send me the source code of Brownian Motion. Thank you..My e-mail is vinduwa@yahoo.com

Vindu Kathriarachchi


 
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1182



WWW
« Reply #22 on: November 27, 2007, 08:56:49 AM »

Click DOWNLOAD just below EJS simulation, you will get EJS source code.
Logged
plack
Newbie
*
Posts: 1


WWW
« Reply #23 on: November 02, 2008, 02:52:20 AM »

Very interesting ..Thanks prof. Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!