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

"Choose a job you love, and you will not have to work for a day in your life." ...Confucius (551-479 BC)

 Pages: [1]   Go Down
 Author Topic: how to simulate flow of particles in a wire?  (Read 8394 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: November 13, 2009, 05:04:23 pm » posted from:Singapore,,Singapore

how to simulate flow of particles in a wire?

i analyze the method used here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=912.0

say for the loop wire

Code:
if(x2[j] else if(x2[j]>a-D*i)x2[j]-=D;

is used to trick the human eyes by telling when to disappear n appear a distance + or -D away.

i actually ran into some bug.
the codes works when the variables "lengthx" is 1.5 which is the same as your "D". perfect synchronization, the particles disappear n appear together of the visual effect of particle flow is achieved.

but when i create a slider, and move it,
the particles, dynamically re position but the spacing is funny, not equal.

the resultant new effect is not realistic enough to "trick" to human eye.

any tips for me to explore? my source is attached

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!
 *** There are 1 more attached files. You need to login to acces it! « Last Edit: November 13, 2009, 05:09:31 pm by lookang » Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: November 13, 2009, 05:22:25 pm » posted from:Singapore,,Singapore

not to worry!
i fixed it!

i changed the initialization page to
Code:
y3[i]=lengthz/2-lengthz/n*i; // BC
x2[i]=a-lengthx/n*i; //AB
x4[i]=a-lengthx/n*i; // DC
}

which then when the slider is moved
action
"
Code:
_initialize();
setparam ();

no problem now!!! cool!

really learnt a lot of (problem solving skills & critical thinking) from analyzing, making sense, remixing the virtual lab to suit my design ideas of how to finer customized the virtual lab.
fantastic pedagogy for learning problem solving skills & critical thinking

my physics knowledge comes alive in the java applet. cool way to assess my learning by portfolio like what prof wolfgang is doing i think.
 « Last Edit: November 13, 2009, 05:29:40 pm by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #2 on: November 13, 2009, 08:10:35 pm » posted from:Taipei,T\'ai-pei,Taiwan

Great! You are making it better and better.
 Logged
 Pages: [1]   Go Up
"Choose a job you love, and you will not have to work for a day in your life." ...Confucius (551-479 BC)