### Author Topic: Individual and Resultant Force Magnetic Field of a wire and external mag. field  (Read 19751 times)

#### lookang

• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
##### Individual and Resultant Force Magnetic Field of a wire and external mag. field
« on: October 28, 2009, 12:24:22 am »
Individual and Resultant Force Magnetic Field of a Current-Carrying Rectangular Coil in a External Magnetic Field.

I am wondering if i can use this http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1266msg4902;topicseen#msg4902

Or the original http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=912.0 also can?

to create a checkbox for

some beginning trainee teacher wanted a picture of magnetic field of a current carrying wire in a external magnetic field like the attached picture right side resultant diagram.

i don't seem to have seen it before as an applet here.
for ur consideration
« Last Edit: October 28, 2009, 12:28:33 am by lookang »

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. field
« Reply #1 on: October 28, 2009, 06:09:29 pm »
Is it a Current-Carrying Rectangular Coil (3D model)or two parallel wire with current in opposite direction (2D model)?

#### lookang

• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. fi
« Reply #2 on: October 28, 2009, 07:16:25 pm »
3d would be fantastic .

2d would be ok too

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. field
« Reply #3 on: October 28, 2009, 11:01:17 pm »
Here is the field structure produced from two long wires.
It is shown in 2D (I am afraid it will be too complicated to display it in 3D -- too many arrows).

You can use mouse to drag both wires to change separation between wires.
If you click inside the region, field line pass throught that point will be traced out.

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!

#### lookang

• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. field
« Reply #4 on: November 06, 2009, 03:29:26 pm »
This is fantastic applet, it will add to your collection of good simulations for physics learners.

two questions,

1. how can i automatically plot the magnetic field lines?
for example, http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=740.0

2.i changed the dt from 0.5 to 2 but it looks rougher (less accurate). how to make the drawing of magnetic field lines faster n still accurate?

i edited your applet and i notice a bug, changed it for u already. it is posted here and i think i will start a new post on it here http://www.phy.ntnu.edu.tw/ntnujava/index.php?board=28.0

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!
« Last Edit: November 06, 2009, 05:30:29 pm by lookang »

#### lookang

• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. field
« Reply #5 on: December 10, 2009, 12:32:50 am »
Hi prof hwang,[noeqn]

did u notice that only one applet loads correctly on this forum page.

the second applet failed to load.

i noticed this happened also in other 2 applet pages
the error message is
Java Plug-in 1.6.0_17
Using JRE version 1.6.0_17-b04 Java HotSpot(TM) Client VM
User home directory = C:Users160
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
q: hide console
s: dump system and deployment properties
0-5: set trace level to
----------------------------------------------------

java.lang.ClassNotFoundException: users.sgeducation.lookang.MagneticField2Wire_pkg.MagneticField2WireApplet.class
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager\$AppletExecutionRunnable.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://www.phy.ntnu.edu.tw/ntnujava/ejsuser/14019/users/sgeducation/lookang/MagneticField2Wire_pkg/MagneticField2WireApplet/class.class
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: users.sgeducation.lookang.MagneticField2Wire_pkg.MagneticField2WireApplet.class
java.lang.ClassNotFoundException: users.sgeducation.lookang.MagneticField2Wire_pkg.MagneticField2WireApplet.class
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager\$AppletExecutionRunnable.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://www.phy.ntnu.edu.tw/ntnujava/ejsuser/14019/users/sgeducation/lookang/MagneticField2Wire_pkg/MagneticField2WireApplet/class.class
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: users.sgeducation.lookang.MagneticField2Wire_pkg.MagneticField2WireApplet.class

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: Strange EJS jar file
« Reply #6 on: December 10, 2009, 06:21:20 pm »
and the class file is located at
users/sgeducation/lookang/ejs_MagneticField2Wire/MagneticField_pkg/MagneticField2Qire.class

However, the java was looking for users/sgeducation/lookang/MagneticField2Wire_pkg/MagneticField2WireApplet.class

You have one more level of structure. That is the reason why it was not working.

Please do not use the same filename as your folder name if you want to add one more level file structure.

, open it with EJS , rebuild it and upload it again.

#### lookang

• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
##### Re: Individual and Resultant Force Magnetic Field of a wire and external mag. field
« Reply #7 on: December 10, 2009, 09:50:13 pm »
please delete the early jar post as i cannot modify it. not needed, it now also loads correctly, just let it be then.

wait, it still cannot be viewed
Please check. it works now! after re start firefox. thanks!

btw u realized the model bug in your applet?
your top post applet shows the field vector is for out of plane out of plane current. it is a small error which i already remodel accurately in my remixed of your applet. http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1290

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!
« Last Edit: December 10, 2009, 10:02:16 pm by lookang »