NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
July 26, 2014, 02:03:23 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"In theory, theory and practice are the same. In practice, they are not." ..."Albert Einstein (1879~1955, Mathematical physicist, Nobel Prize 1921-Physics)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Ejs Open Source Cyclotron Java Applet in 3D  (Read 13081 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
on: December 07, 2010, 11:44:37 pm » posted from:Singapore,,Singapore

Ejs Open Source Cyclotron Java Applet in 3D
this is my attempt at the assignment given for the construction of Cyclotron
reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1972.0 which is a derived work from
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1450msg5484;topicseen#msg5484 Created by prof Hwang
I thank Prof Hwang for his valuable help in supporting my learning

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
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!


reference: http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/cyclot.html
The cyclotron was one of the earliest types of particle accelerators, and is still used as the first stage of some large multi-stage particle accelerators. It makes use of the magnetic field Bz on a moving charge to bend moving charges into a semicircular path between accelerations by an applied electric field Ey. The applied electric field Ey accelerates charged particles between the "gaps" of the 2 magnetic field region as shown. The electric field Ey is reversed at the cyclotron frequency to accelerate the electrons back across the gap.

How the cyclotron works? http://en.wikipedia.org/wiki/Cyclotron and http://webphysics.davidson.edu/physlet_resources/bu_semester2/c13_cyclotron.html
The charged particles, injected near the center of the magnetic field Bz, accelerate only when passing through the gap between the electric field Ey electrodes with increase in kinetic energy. The perpendicular magnetic field Bz bends moving charges into a semicircular path between the magnets with no increase in kinetic energy. The magnetic field causes the charge to follow a half-circle that carries it back to the gap. While the charge is in the gap the electric field Ey is reversed, so the charge is once again accelerated across the gap. The cycle continues with the magnetic field in the dees continually bringing the charge back to the gap. Every time the charge crosses the gap it picks up speed. This causes the half-circles in the dees to increase in radius, and eventually the charge emerges from the cyclotron at high speed.
The combined motion is a result of increasing energy of the particles in electric field Ey and the magnetic field Bz forces the particles to travel in an increasing radius of the circle after each entry into the other magnetic field. This results in a spiral path of which the particles than emerged at a higher speed than when it was injected into the center of the magnetic field Bz.

Uses of the cyclotron http://en.wikipedia.org/wiki/Cyclotron
For several decades, cyclotrons were the best source of high-energy beams for nuclear physics experiments; several cyclotrons are still in use for this type of research.
Cyclotrons can be used to treat cancer. Ion beams from cyclotrons can be used, as in proton therapy, to penetrate the body and kill tumors by radiation damage, while minimizing damage to healthy tissue along their path.

Problems solved by the cyclotron http://en.wikipedia.org/wiki/Cyclotron
The cyclotron was an improvement over the linear accelerators
Cyclotrons accelerate particles in a spiral path. Therefore, a compact accelerator can contain much more distance than a linear accelerator, with more opportunities to accelerate the particles.

Advantages of the cyclotron http://en.wikipedia.org/wiki/Cyclotron
Cyclotrons produce a continuous stream of particles at the target, so the average power is relatively high.
The compactness of the device reduces other costs, such as its foundations, radiation shielding, and the enclosing building.


* Ejs Open Source Cyclotron Java Applet in 3D.PNG (51.37 KB, 704x621 - viewed 622 times.)
« Last Edit: February 24, 2011, 02:52:26 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: December 08, 2010, 07:53:37 am » posted from:-,-,SINGAPORE

changes made:
1 added Ey field visualization
2 added custom force() to act only when inside the space between the 2 magnets and always in the direction of vy thus the frequency of Ey is simulated through the vy sign change.
3 added Ey vs time graph for visualizing the square wave in http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/cyclot.html thanks to Nat Ng suggestion in facebook
4 added KE graph to check that ΔKE after each linear path in the gap is constant.
24 Feb 2011
fix a bug on the visual of Bz
Code:
if (Bzshow==true)sp[i]=true; // controller for drawing Bz
if (Bzshow==false)sp[i]=false; // completely off Bz visual
if (calF(xp[i],yp[i],1)==0)sp[i]=false; // if no Bz calculated, no draw
 yp2[i]=-yp[i]; // duplicate for other magnet
« Last Edit: February 24, 2011, 02:53:31 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #2 on: December 08, 2010, 07:55:08 am » posted from:-,-,SINGAPORE

good resources:
http://webphysics.davidson.edu/physlet_resources/bu_semester2/c13_cyclotron.html by Davidson College
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=33 by Fu-Kwun Hwang Cyclotron
http://www.schulphysik.de/ntnujava/cyclotron/cyclotron.html mirror of Fu-Kwun Hwang Cyclotron
http://www.phys.uu.nl/~engelb/elkbphyslets/Cyclotron/cyclotron.html mirror of Fu-Kwun Hwang Cyclotron
http://www.aug.edu/~chmtmc/ntnujava/cyclotron/cyclotron.html mirror of Fu-Kwun Hwang Cyclotron
http://egeducation1.blogspot.com/2010/11/cyclotron.html mirror of Fu-Kwun Hwang Cyclotron
http://www.fed.cuhk.edu.hk/sci_lab/ntnujava/cyclotron/cyclotron.html mirror of Fu-Kwun Hwang Cyclotron

http://www.kcvs.ca/site/projects/physics_files/newCyclotron/Cyclotron.swf by Andrew Martin King Centre Visualization in Science http://kcvs.ca
http://www.wainet.ne.jp/~yuasa/flash/EngCyclotron.swf simple animation
http://www.mksfoundation.com/SiteFlash/Magnetism/09_Cyclotron.swf simple animation by MK Srivastava
http://ubpheno.physics.buffalo.edu/~dow/PASI2007/website/Cyclotrons%20and%20Synchrotrons.swf PowerPoint by Drew Weymouth
« Last Edit: December 08, 2010, 01:16:14 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: December 10, 2010, 08:22:40 am » posted from:-,-,SINGAPORE

  
exercises by lookang: adapted from http://webphysics.davidson.edu/physlet_resources/bu_semester2/c13_cyclotron.html

The building of the cyclotron model is based on a optional activity in http://www.opensourcephysics.org/items/detail.cfm?ID=8984 Charge in Magnetic Field Model written by Fu-Kwun Hwang edited by Robert Mohr and Wolfgang Christian
The learning from this optional activity demonstrate student's learning in performance tasks. 5 stars!

There are many activities that can be design in this simulation.
refer to http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1972.0 for Charge Particle in Magnetic Field B Java Applet in 3D

Prior Knowledge required
charged particles
electric field & magnetic field

Engage
1. Early years scientists accelerate particle in linear accelerators but they face a problem of the need for a long linear path to accelerate the particle. Can you think of a way to reduce the need for a long path?
hint: look at the running track of a stadium, can you think of a way to bend the particle with the magnetic field and accelerate with electric field?

Stadium image by jjjj56cp, licensed under Creative Commons Attribution 2.0 Generic

After some discussions, students can share their ideas through oral/verbal presentation.
Teacher can praise some of the ideas and point them to Ejs as a means to test out their ideas using this Ejs simulation codes as templates for implementation.


Explore
1. Explore the simulation, this simulation is designed with a charge particle in a system of magnetic fields in z direction.
2 The play button runs the simulation, click it again to pause and the reset button brings the simulation back to its original state.
3 select Bz =0 (key in the value 0 follow by "enter" on keyboard), Ey =0, vy = 60, and play the simulation. Notice that the path of the particle in a straight line in the y direction. What is the physics principle simulatted here.
hint: newton's 1st law
4 reset the simulation.
5 using the default values(Bz =1, Ey=0, Vy=60), play the simulation. what did you observe? explain the motion in terms of the influences of magnetic field (assume gravitational effect can be neglected)
6 explore the slider x, y, and z. what do these sliders control?
7 explore the slider vx, vy, and vz. what do these sliders control?
8 by leaving the cursor on the slider, tips will appear to give a description of the slider. you can try it the following sliders such as the charge q, mass m, radius of dee(magnets) R.
9 there are some values radius of circular path r, kinetic energy of particle KE, resultant velocity vr and resultant force F on the m.
10 vary the simulation and get a sense of what it does.

11 reset the simulation
12 using the values(Bz =1, Ey=0, Vy=60, Ey =10. observe the difference in the introduction of Ey in the gaps.
13 notice that the Ey field is alternating, explain the purpose of this Ey in this simulation.
14 propose the logic deployed by this simulation to time the switching of Ey. Can you think of other swtiching logic?
15 note the first time the charge crosses the whole gap its kinetic energy increases by an amount ΔK. determine this value from looking at the value bar of KE, you may select the checkbox to view the scientific graph of KE vs t.
answer: 2421.4-2021.5 = 399.9 ≈ 400 J
16What is the change in kinetic energy associated with just moving in each half-circle in a dee (the magnetic field).
hint: look at the value bar of KE, you may select the checkbox to view the scientific graph of KE vs t.
Explain:
16 explain why this it is so?
hint: In the dee(magnetic field) the force on the charge comes from the magnetic field, so the force is perpendicular to the velocity. The speed, and hence the kinetic energy, stays constant, so the change is zero.
17 The first time the charge crosses the gap its kinetic energy increases by an amount ΔK say 400 J. Assuming the electric field in the gap is the same magnitude at all times but in opposite direction to earlier time, what is the change in kinetic energy the second time the charge crosses the gap?
hint: 2819.5-2421.4 = 398.1 ≈ 400 J
Elaborate
18 suggest with reason why the values for 15 and 17 are not exactly the same
hint: look at the value of vx
answer: the exiting from magnetic field causes the vx to be slightly bigger than 0, thus the resultant velocity is increased very slightly.
Evaluate:
19 A scientist ask a question "To increase the speed of the particles when they emerge from the cyclotron. Which is more effective, increasing the electric field Ey=-Vy/dy across the gap or increasing the magnetic field Bz in the dees? " play the simulation for different initial condition and design an experiment with tables of values to record systematically, determine what is the more "effective" method. State your assumptions made.
hint: assumption is outside physical radius of dee = R is fixed.
the start velocity vy =0
the start x = 0
Note that whatever the magnitudes of the fields the final half-circle the charge passes through in the dee has a radius approximately equal to R, the radius of the dee itelf. The radius of the circular path of a charged particle in a magnetic field is:
N2L: F = ma
circular: v.B.q = m.v^2/r
r = mv/Bq.
In this case the speed of the particle is RBq/m = v
Therefore the final kinetic energy is:
KE = 1/2 mv2 = 1/2. m. (RBq/m)^2 = 1/2. R^2q^2B^2/m

Have Fun!







* Panathinaiko-Stadium.jpg (65.66 KB, 600x400 - viewed 2623 times.)
« Last Edit: December 10, 2010, 10:15:50 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: October 04, 2011, 02:50:15 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

bug in iMac
java.lang.NullPointerException
   at users.sgeducation.lookang.chargeinNScyclotron_pkg.chargeinNScyclotronView.reset(chargeinNScyclotronView.java:1831)
   at org.colos.ejs.library.Animation.reset(Unknown Source)
   at users.sgeducation.lookang.chargeinNScyclotron_pkg.chargeinNScyclotronSimulation.(chargeinNScyclotronSimulation.java:23)
   at users.sgeducation.lookang.chargeinNScyclotron_pkg.chargeinNScyclotron.(chargeinNScyclotron.java:142)
   at users.sgeducation.lookang.chargeinNScyclotron_pkg.chargeinNScyclotronApplet.init(chargeinNScyclotronApplet.java:27)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1640)
   at java.lang.Thread.run(Thread.java:680)

the interesting thing i tried to open in iMac to recompile the source code but the Ejs console says "
error in reading file.

Logged
Pages: [1]   Go Up
  Print  
"In theory, theory and practice are the same. In practice, they are not." ..."Albert Einstein (1879~1955, Mathematical physicist, Nobel Prize 1921-Physics)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Ejs Open source Magnitude of a vector java applet
Collaborative Community of EJS
lookang 1 8791 Last post November 04, 2008, 12:47:47 pm
by lookang
Ejs Open source Newton's Cradle java Applet by Paco customized by lookang
Collaborative Community of EJS
lookang 11 13812 Last post May 17, 2011, 02:53:45 am
by lookang
Ejs open source Linear Equation Interactive Java Applet
Collaborative Community of EJS
lookang 8 9031 Last post November 11, 2011, 10:48:33 pm
by Fu-Kwun Hwang
Ejs Open Source Bouncing Ball with Drag Java Applet
Collaborative Community of EJS
lookang 2 10722 Last post March 09, 2011, 10:00:28 pm
by lookang
Ejs Open Source Capacitor java applet
Collaborative Community of EJS
lookang 0 4259 Last post December 21, 2010, 03:18:29 pm
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.057 seconds with 24 queries.since 2011/06/15