NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
September 26, 2020, 06:21:53 am

Life well spent is long. ..."da Vinci (1452-1519, Italian artist, sculptor, painter, architect, engineer and scientist) "

 Pages: [1]   Go Down
 Author Topic: Ejs Open Source Brownian Motion Gas Model Java Applet by Professor Paco & Hwang  (Read 21916 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: March 19, 2010, 03:45:42 pm » posted from:Singapore,,Singapore

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

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• 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!

 Brownian_Motion.png (33.02 KB, 480x561 - viewed 1487 times.) « Last Edit: April 19, 2012, 12:52:14 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: March 21, 2010, 10:15:30 pm »

1 color the background green
3 added elastic between particles slider
4 a couple of check-boxes for visualization
 Ejs_Open_Source_Brownian_Motion_Gas_Model_Java_Applet_by_Professor_Paco_&_Hwang.png (55.67 KB, 578x688 - viewed 3590 times.) « Last Edit: December 29, 2010, 01:29:46 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: March 29, 2010, 03:26:26 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

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, 03:44:10 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: April 19, 2012, 11:54:05 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

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
 brownianmotion.png (58.75 KB, 578x688 - viewed 2616 times.) « Last Edit: April 19, 2012, 12:02:29 pm by lookang » Logged
frodo
Newbie

Offline

Posts: 5

 « Embed this message Reply #4 on: April 19, 2012, 07:45:43 pm » posted from:Provincetown,Massachusetts,United States

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
 Logged
frodo
Newbie

Offline

Posts: 5

 « Embed this message Reply #5 on: April 19, 2012, 07:53:44 pm » posted from:Provincetown,Massachusetts,United States

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
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #6 on: April 19, 2012, 08:30:19 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

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

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
 Logged
frodo
Newbie

Offline

Posts: 5

 « Embed this message Reply #7 on: April 19, 2012, 11:49:18 pm » posted from:NEW ENGLAND,NORTH DAKOTA,UNITED STATES

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!
 Logged
 Pages: [1]   Go Up
Life well spent is long. ..."da Vinci (1452-1519, Italian artist, sculptor, painter, architect, engineer and scientist) "