NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations!
July 24, 2014, 07:06:27 pm

"Life is the beaty of art, heart, and humanity."...Wisdom

 Pages: [1]   Go Down
 Author Topic: Ejs Open Source Motion of Charge Particle in Electric & Magnetic Field in 3D  (Read 8733 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message on: October 26, 2010, 05:13:59 pm » posted from:-,-,SINGAPORE

Ejs Open Source Charge Particle in Electric & Magnetic Field Java Applet in 3D
Ejs Open Source Motion of Charge Particle in Electric & Magnetic Field in 3D
reference:
this is a remix of Charge Trajectories in 3D Electrostatic Fields Model written by Andrew Duffy http://www.compadre.org/osp/items/detail.cfm?ID=9997
with help from Charged particle motion in static Electric/Magnetic field by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1431.0
zoom in and out graphics are taken from creative commons license http://findicons.com/icon/86740/zoom_in?width=16#

this is remixed to support content learning of small part of electromagnetism similar to Escape from Centauri 7 http://gli.lsl.nie.edu.sg/projects_centauri.html.
But the link Escape from Centauri 7 here is about learning to scientist the goal is different.
whereas the applet is more suited for inquiry learning for content knowledge with a shorter time frame, perhaps 1.5 hours during practical periods. Here, becoming a scientist is also "achieved" but not as explicit as Escape from Centauri 7.

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!

This model is created with the following 6 equations., derivation and checked by lookang
dx/dt = vx
dy/dt = vy
dz/dt = vz
dvx/dt = q*(Ex+(vy*Bz-vz*By))/m
dvy/dt = q*(Ey+(vz*Bx-vx*Bz))/m
dvz/dt = q*(Ez+(vx*By-vy*Bx))/m

Newton's 2nd Law F = ma,
because cross product is v^B in x direction is (vy*Bz-vz*By), refer to cross product literature
q*Ex + (vy*Bz-vz*By)*q = m*dvx/dt

because cross product is v^B in y direction is -(vx*Bz-vz*Bx), refer to cross product literature
q*Ey + (vz*Bx-vx*Bz)*q = m*dvy/dt

because cross product is v^B in z direction is (vx*By-vy*Bx), refer to cross product literature
q*Ez + (vx*By-vy*Bx)*q = m*dvz/dt

A Charge in Electric and Magnetic Fields by Andrew Duffy
In this simulation, you can investigate a charged particle, and the forces exerted on that charged particle by electric and/or magnetic fields. First, see how the charge behaves when exposed to just an electric field. Then, see how the charge behaves when exposed to just a magnetic field. Finally, if you'd like, turn both fields on and see what happens.

Activities by Andrew Duffy
Start with no initial velocity, and with just the electric field turned on. What does the charged particle do? If you reverse the sign on the charged particle, what happens?
Now, give the charged particle an initial velocity in the x-direction. Try turning on the electric field in just the x-direction, and then in just the y-direction. What do you observe about the motion of the charged particle in these cases? Write down the expression for the force the electric field exerts on the charged particle. Are your observations consistent with this expression?
Once again, start with no initial velocity, and with just the magnetic field turned on. What does the charged particle do? If you reverse the sign on the charged particle, what happens?
Now, give the charged particle an initial velocity in the x-direction. Try turning on the magnetic field in just the x-direction, and then in just the z-direction. What do you observe about the motion of the charged particle in these cases? Write down the expression for the force the magnetic field exerts on the charged particle. Are your observations consistent with this expression?
Finally, turn on both electric and magnetic fields, and see what kind of motions you can get.
 Ejs_Open_Source_Motion_of_Charge_Particle_in_Electric_&_Magnetic_Field_in_3D.png (39.16 KB, 758x634 - viewed 157 times.) « Last Edit: October 31, 2010, 10:11:01 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: October 26, 2010, 05:15:48 pm » posted from:-,-,SINGAPORE

zoom in and out graphics from http://findicons.com/icon/86740/zoom_in?width=16#
Ejs Open Source Motion of Charge Particle in Electric & Magnetic Field in 3D

1 redesign layout to suit my usual design to ease of learning for students who use my design before
2 color scheme B field orange, E field red etc
3 added B and E field visualization arrow and text on (xf,yf,zy) thanks to http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1431.0
4 changes to axes view because (x,y,z) allows for association of motion
5 added new panel for each variable text field text and slider combined for maximum usability to explore infinite options but with slider ease to closest true
6 added F_E and F_B for association of field direction to force
7 adopted a column vector representation consistently
8 added zoom in and out graphics from zoom in and out graphics are taken from creative commons license http://findicons.com/icon/86740/zoom_in?width=16#
11 fix a bug of the initial velocity not read by simulation by initialize() the buttons with
vx = vxinit; // added by lookang
vy = vyinit;
vz = vzinit;
idea from http://surendranath.tripod.com/Applets.html
12 need to add Bz and vx only circle
By and vx only circle
Bx and vx only straight line uniform
vx and By and Bz circle
vx and vy and By helix

13 need to add vx and Ey parabola
vx and Ex straight line accelerate motion
vx and Ez parabola

14 vx Ey and Bz where q*Ey = vx*Bz*q straight line velocity selector
vx=vy=vz = 0 Ex and Bz many semi circle
vx and Ex and Bz spring like path
 zoom_in.png (0.84 KB, 16x16 - viewed 571 times.)  zoom_out.png (0.81 KB, 16x16 - viewed 562 times.) « Last Edit: October 31, 2010, 10:11:38 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: October 27, 2010, 08:04:22 am » posted from:-,-,SINGAPORE

For 5058 PHYSICS (WITH SPA) ORDINARY LEVEL 2011
21. Electromagnetism
Content
• Magnetic effect of a current
• Applications of the magnetic effect of a current
• Force on a current-carrying conductor
• The d.c. motor
Learning Outcomes:
Candidates should be able to:
(c) describe experiments to show the force on a current-carrying conductor, and on a beam of
charged particles, in a magnetic field, including the effect of reversing
(i) the current
(ii) the direction of the field

same for 5116 SCIENCE (PHYSICS, CHEMISTRY) & 5117 SCIENCE (PHYSICS, BIOLOGY)

For This specific learning outcome, the following Activity / Exercise is suggested by lookang.

A) when velocity of charged particle is parallel to magnetic field ( Newton's 1st law of motion )
1 the simulation can be used to explore force on beam of charged particles q in a magnetic field B.
2 set the vxo = 0.6 m/s, Bx = 1 T, By = 0 T, Bz = 0 T, click on the run button to start the simulation.
3 record the path (trail left behind the particles motion) of the charged particle q.
4 record the quantities x,y,z for displacement, vx,vy,vz for instantaneous velocity and the magnetic force F_Bx, F_By,F_Bz.
5 you should move the perspective in the world view to get a better view of the motion and try to understand the motion is 3D and then 2D if it is possible to simplify.
5 set the vxo = 0.8 m/s, Bx = 1 T, By = 0 T, Bz = 0 T, click on the run button to start the simulation.
6 repeat steps 3 to 5
7 set the vxo = 1.0 m/s, Bx = 1 T, By = 0 T, Bz = 0 T, click on the run button to start the simulation.
8 repeat steps 3 to 5
9 continue to explore more vxo if necessary, and draw observable patterns or trends in path of the charged particle, record down what did you see.
hint: path is straight line, circular motion, parabolic etc?
10 now, change Bx = -1 T instead and repeat steps 2 to 9 with Bx = -1 T to explore what happens when the direction field is reverse.
11 write down what is the generalized rule when a charged particle traveling in a x direction meets a non-zero Bx field.
12 you should explore the other sliders to verify your step 11 if need.

B) when velocity of charged particle is perpendicular to magnetic field ( circular motion due to force is perpendicular to velocity )
1 the simulation can be used to explore force on beam of charged particles q in a magnetic field B.
2 set the vxo = 0.6 m/s, Bx = 0T, By = 2 T, Bz = 0 T, click on the run button to start the simulation.
3 record the path (trail left behind the particles motion) of the charged particle q.
4 record the quantities x,y,z for displacement, vx,vy,vz for instantaneous velocity and the magnetic force F_Bx, F_By,F_Bz.
5 you should move the perspective in the world view to get a better view of the motion and try to understand the motion is 3D and then 2D if it is possible to simplify.
5 set the vxo = 0.8 m/s, Bx = 0 T, By = 2 T, Bz = 0 T, click on the run button to start the simulation.
6 repeat steps 3 to 5
7 set the vxo = 1.0 m/s, Bx = 0 T, By = 2 T, Bz = 0 T, click on the run button to start the simulation.
8 repeat steps 3 to 5
9 continue to explore more vxo if necessary, and draw observable patterns or trends in path of the charged particle, record down what did you see.
hint: path is straight line, circular motion, parabolic etc?
10 now, change By = -2 T instead and repeat steps 2 to 9 with By = -2 T to explore what happens when the direction field is reverse.
11 write down what is the generalized rule when a charged particle traveling in a x direction meets a non-zero By field.
12 you should explore the other sliders to verify your step 11 if need.

C) when velocity of charged particle is perpendicular to magnetic field ( circular motion due to force is perpendicular to velocity )
1 the simulation can be used to explore force on beam of charged particles q in a magnetic field B.
2 set the vxo = 0.6 m/s, Bx = 0T, By = 0 T, Bz = 2 T, click on the run button to start the simulation.
3 record the path (trail left behind the particles motion) of the charged particle q.
4 record the quantities x,y,z for displacement, vx,vy,vz for instantaneous velocity and the magnetic force F_Bx, F_By,F_Bz.
5 you should move the perspective in the world view to get a better view of the motion and try to understand the motion is 3D and then 2D if it is possible to simplify.
5 set the vxo = 0.8 m/s, Bx = 0 T, By = 0 T, Bz = 2 T, click on the run button to start the simulation.
6 repeat steps 3 to 5
7 set the vxo = 1.0 m/s, Bx = 0 T, By = 0 T, Bz = 2 T, click on the run button to start the simulation.
8 repeat steps 3 to 5
9 continue to explore more vxo if necessary, and draw observable patterns or trends in path of the charged particle, record down what did you see.
hint: path is straight line, circular motion, parabolic etc?
10 now, change Bz = -2 T instead and repeat steps 2 to 9 with Bz = -2 T to explore what happens when the direction field is reverse.
11 write down what is the generalized rule when a charged particle traveling in a x direction meets a non-zero Bz field.
12 you should explore the other sliders to verify your step 11 if need.

Rise Above Question:
in B and C, how is the path of the charged particle different?
what can be concluded about the effect of reversing the effect of Bx.
what can be concluded about the effect of reversing the effect of By.
what can be concluded about the effect of reversing the effect of Bz.

Challenging question:
in A, B, and C the charged particle is assumed to be +1 C, what is the effect of changing q = - 1 C ?
hint: F = v^B.q where ^ is cross product.
in A, B, and C the charged particle is assumed to be +1 kg, what is the effect of changing m = + 2 kg ?
hint: Newton's 2nd Law: Fnet = m.a
set the vxo = 0 m/s, observe the resultant nmotion of q. Why did the q not move?
suggest a method to set q into motion despite when t =0 s, vxo = 0 m/s.
hint: need to explore another kind of field, called electric field!
Enjoy!
 « Last Edit: October 27, 2010, 09:23:21 am by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: October 27, 2010, 10:18:22 am » posted from:-,-,SINGAPORE

9646 H2 PHYSICS (2011) Physics Higher 1 2011 8866 only (e)
15. Electromagnetism
Content
• Force on a current-carrying conductor
• Force on a moving charge
• Magnetic fields due to currents
• Force between current-carrying conductors
Learning Outcomes
Candidates should be able to:
(e) predict the direction of the force on a charge moving in a magnetic field.
(f) recall and solve problems using F = v.B.q.sinθ.
(g) describe and analyze deflections of beams of charged particles by uniform electric and uniform magnetic fields.
(h) explain how electric and magnetic fields can be used in velocity selection for charged particles.

assume vyo = 0 m/s, vzo = 0 m/s
E
explore when vxo = 0 m/s
1 the simulation can be used to explore F_B force on beam of charged particles q in a magnetic field B.
2 set the vxo = 0 m/s, Bx = 1 T, By = 0 T, Bz = 0 T, click on the run button to start the simulation.
3 record the path (trail left behind the particles motion) of the charged particle q.
hint: it is stationary? record it
4 try other values of Bx, then follow by By, then follow by Bz.
hint: it is stationary? record it
what can be concluded about the relationship of v to F_B ?

E1 explore when vxo = 1 m/s
1 set the vxo = 1 m/s, Bx = 1 T, By = 0 T, Bz = 0 T , (optional) click on the run button to start the simulation.
2 record the direction of F_B (view the applet, as well as the column F_Bx, F_By and F_Bz to make sense)
3 try other values of Bx, then follow by By, then follow by Bz.
4 record your data systematically in a table

E2 explore when vxo = -1 m/s
1 set the vxo = -1 m/s, Bx = 1 T, By = 0 T, Bz = 0 T , (optional) click on the run button to start the simulation.
2 record the direction of F_B (view the applet, as well as the column F_Bx, F_By and F_Bz to make sense)
3 try other values of Bx, then follow by By, then follow by Bz.
4 record your data systematically in a table

E3 to scaffold the learning, verify this hypothesis that claims
F_B = v^B*q for advanced learners
or
using left hand rule, F_B (thumb) B (index finger) and i (middle finger) in 90 degree angle to each other, can be used to predict the direction of the F_B. for normal learners.
hint: direction of +i is the same as +q, because i = d(N.q)/dt
discuss with your classmates to verify this relationship.

E4 Extend this hypothesis to vxo = 0 m/s, vyo = 1 m/s, vzo = 0 m/s
vary the values of Bx = 1 T, By = 0 T, Bz = 0 T
Bx = 0 T, By = 1 T, Bz = 0 T
Bx = 0 T, By = 0 T, Bz = 1 T
can F_B = v^B*q or left hand rule, F_B (thumb) B (index finger) and i (middle finger) still predict the direction of the force?
record down the data your observed

E5 Extend this hypothesis to vxo = 0 m/s, vyo = 0 m/s, vzo = 1 m/s
vary the values of Bx = 1 T, By = 0 T, Bz = 0 T
Bx = 0 T, By = 1 T, Bz = 0 T
Bx = 0 T, By = 0 T, Bz = 1 T
can F_B = v^B*q or left hand rule, F_B (thumb) B (index finger) and i (middle finger) still predict the direction of the force?
record down the data your observed

E6 q is negative
with reference to activity E1, explore when vxo = 1 m/s
1 set the vxo = 1 m/s, Bx = 1 T, By = 0 T, Bz = 0 T , (optional) click on the run button to start the simulation.
1.5 change q to -1 C
2 record the direction of F_B (view the applet, as well as the column F_Bx, F_By and F_Bz to make sense)
3 try other values of Bx, then follow by By, then follow by Bz.
4 record your data systematically in a table
what can be concluded about the effect of q on the direction of F_B ?
how does the left hand rule stand up to this new data?
discuss how to rationalize this especially with respect to i = d(N.q)/dt
discuss with your classmates to make sense of this new data on the relationship: left hand rule, F_B (thumb) B (index finger) and i (middle finger).

 « Last Edit: December 20, 2010, 11:33:51 am by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #4 on: November 08, 2010, 03:00:30 pm » posted from:Apo,Armed Forces Pacific,United States

interesting.
i have not encounter this before until today.
http://demonstrations.wolfram.com/ChargedParticleInUniformElectricAndMagneticFields/
think the commercial software also has the same idea of open source.
the simulations are not bad, the codes seems to be mathematical based as well.

guess the main difference is teacher can make free sims on easy java simulation to benefit humankind, improve learning in classroom, improve own pedagogical understanding, professional develop and learn.
 « Last Edit: November 08, 2010, 03:02:58 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #5 on: January 06, 2011, 01:28:53 pm » posted from:,,Singapore

hi lookang,
this is joshi from India.
A very happy and full of physics new year. Hope you are doing well in life.
I am in a calculation phase of a simulation - 'motion of charge in magnetic field'. so you know that in a complex situation, such as injecting a particle into magnetic field at some angle theta, will make the particle to follow helical trajectory.
since u know that it is better to give liberty to user to orient magnetic field along any direction (i.e. not restricting it along x,y,z - axes). The same is true for velocity also.
Now all references i have referred derive equation of helix considering z-axis as its center axis for sake of simplicity and not any arbitrary axis.
So can u derive/give me a general equation of a helix (with center axis being any 3D line)?
take it as a first challenge (from my side) for our brainstorming friendship.............
chintan joshi

The equations are as above in the first post
This model is created with the following 6 equations., derivation and checked by lookang
dx/dt = vx
dy/dt = vy
dz/dt = vz
dvx/dt = q*(Ex+(vy*Bz-vz*By))/m
dvy/dt = q*(Ey+(vz*Bx-vx*Bz))/m
dvz/dt = q*(Ez+(vx*By-vy*Bx))/m
 « Last Edit: January 06, 2011, 01:37:28 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1728

http://weelookang.blogspot.com

 « Embed this message Reply #6 on: January 07, 2011, 01:24:31 pm » posted from:-,-,SINGAPORE

can u tell me the equation of a helix with pitch b, radius a and its axis along the vector (p,q,r)?

- joshi

to get a helix
set vx and By to perform circular motion
add vy for the uniform motion

i did not work out the equation for infinite cases like what you are asking for.
i just tell the simulation what to do and step increase in dt.

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3053

 « Embed this message Reply #7 on: January 07, 2011, 03:58:20 pm » posted from:Taipei,T'ai-pei,Taiwan

I think what joshi want is a solution to the above equations.
May be joshi was not using EJS or joshi did not know how to solve it.

It will be difficult to find a solution without know the form for the electric field E and magnetic field B.

It is relatively easy for inject a particle into a uniform magnetic field region.

You will find partial circular motion.
Assume the velocity $\vec{v}$ has component parallel to magnetic field $\vec{v_p}$ and perpendicular to component $\vec{v_n}$
i.e. $\vec{v}=\vec{v_p}+\vec{v_n}$
There is no force along the magnetic field, so it will move with constant speed along the direction of magnetic field with speed $v_p$
The velocity component perpendicular to magnetic field will cause particle to move in a circular orbit, which satusfy the following condition
$m \frac{v_n^2}{r}= q v_n B$. i.e. $r= \frac{m v_n}{qB}$.

If the charged particle is in a uniform magnetic initially, then it will move with helix orbit.
However, if a charged is moving from a region where there is no magnetic field, and enter a region with uniform magnetic field.
The charged particle will exit the magnetic field within one resolution of circular motion.
Please check out Electron in magnetic field
 Logged
 Pages: [1]   Go Up
"Life is the beaty of art, heart, and humanity."...Wisdom