NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Electromagnetism => Topic started by: Fu-Kwun Hwang on May 18, 2005, 03:02:09 pm



Title: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on May 18, 2005, 03:02:09 pm
You will find magnetic field pattern for a current flow in a vertical wire.
Press "play", the wire  will become a circular current loop.
When it "paused" again, press "play" again. And it will wound in the form of a helix. (solensolid)
You can change the Radius R or change the Z-plane to view field distribution at different Z value.
The popup window shows the magnetic flux distribution.

-*-


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lj,h.ki on March 05, 2008, 03:16:50 am
hello, I'm a new member
I can't download the file :'(
I'm a teacher please help me
 :)


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on March 06, 2008, 12:19:46 pm
Did you find the "get file for offline use" button?
Or What kind of message you saw on the web page.

You need to provide more information, otherwise, I do not know how to help.


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lj,h.ki on March 08, 2008, 08:02:50 pm
yes I found the botton.

then it download a file that windows can't open. ???


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on March 09, 2008, 12:00:57 am
After you download the file. You need to unzip it.
If your window support java run time, you can double click linefield.jar and it will run.
Or you can open linefield.html with your browser.
If you do not have JAVA RUN TIME installed. You need to install it.


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 07, 2008, 05:27:54 pm
Hi prof :)

is it possible to create something like this on EJS ?


http://www.walter-fendt.de/ph14e/mfbar.htm

Walter Fendt did not open source his java applets, so i can't customize nor learn from his applet .

Thanks!


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 08, 2008, 10:24:19 am
Yes. The method is similar to simulation for drawing field line for static electric field.
Use EJS to calculate Bfield at any point in the region according to the source.
You can use current loops to simulate magnetic bar.

Suppose the point you want to draw field line is (x,y)
The differential equation is

dx/dt= Bfield component in x direction
dy/dt= Bfield component in y direction

And the particle will move along the field line.
Because you starts at one point , so you should use two particles to move in opposition direction to complete the field line.



Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 09, 2008, 03:07:39 pm
I just created another applet similar to the one at the above URL.



You can drag the magnetic needle to generate another set of magnetic field line.
It will keep last 10 traces.


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 12, 2008, 10:18:27 am
Thanks prof!!! u r the best


BTW ( by the way)
how do i combined the efforts by

This is a Graphic User Interface for Physlet builder
Physlet is java library for physics simulation created by Wolfgang Christian at Davidson College in the U.S.


into the EJS builder ?


I want to be able to make field lines drawn exactly the way it is drawn by  Physlet builder  ;D

most teachers want to concentrate on teaching instead of coding.

can the Physlet builder and EJS builder complement each other ?

i am studying your source code xml now :) thanks!


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 12, 2008, 02:28:25 pm
I do not know how to combined physlet library in EJS.
What do you mean by make field lines drawn exactly the way it is drawn by  Physlet builder?
You want to add single coil one by one?
Double click to draw field line?
...
Let me know what you want (in detail)!


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 12, 2008, 03:54:42 pm
What do you mean by make field lines drawn exactly the way it is drawn by  Physlet builder?
hoping of an EJS version with physlet builder kind of ease of making applet...


Anyway,
still keen on testing out your e-learning conference?

...need some guidance on the codes, the variables what they do... ;D

i am still analysing your codes and trying to make sense... i see how far i can understand first......
it will help if there were comments lines in the source codes LOL



Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 12, 2008, 09:34:32 pm
I just added comments in the EJS code. Please download it again.

We can try out online conference , but we need to online at the same time.
So we need to find out when will be the best time to do it. (communicate via private message!)


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 13, 2008, 08:45:52 am
can move the topic on "magnetic field of a bar magnet" be moved?

one applet, one topic for google bots to tag your resource well ( easy to find) :)

i can't move for u as i not moderator not admin :)


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 13, 2008, 11:06:11 am
I just added applet code for magnetic bar to new topic. It will be easier to generate new topic. :)


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 28, 2009, 01:38:22 pm
http://www.compadre.org/OSP/document/ServeFile.cfm?ID=8311&DocID=916#Doc916
has a wonderful copy of your applet

the internal coding has been redone to suit the new Ejs 3D objects.

i was having a hard time figuring out how to change the older objects into the newer ones especially the data field was b which was a 4 dimensional variable [][][][] while the newer Ejs objects didn't have 'data' field.  


They also have good description which is in a html page
Magnetic Field from Loops

The EJSMagnetic Field from Loops model computes the B-field created by an electric current through a straight wire, a closed loop, and a solenoid. The user can adjust the vertical position of the slice through the 3D field.

   1. Watch the simulation as the field changes from the field around a long straight current-carrying wire to the field near a coil. Explain what happens to the field. Inside a coil of many loops, why is the field fairly uniform near the center (think about vector addition and what vectors would be adding together near the center).
   2. There is an arrow on each end of the wire (red and blue).  Which one shows the direction of the current in the wire? Explain.
   3. The simulation also shows the magnetic flux. What is flux? Therefore, what do the different colors represent and why (i.e is pink higher flux than yellow or vice versa)? and what does "higher flux" mean in terms of the geometry and field strength?)?

Credits:

The Magnetic Field from Loops simulation was created by Fu-Kwun Hwang using the Easy Java Simulations (EJS) modeling tool and was adapted to EJS version 4.1 by Robert Mohr and Wolfgang Christian at Davidson College. Additional exercises written by Anne J. Cox. You can examine and modify the model for this simulation if you have Ejs installed by right-clicking within the simulation frame and selecting "Open Ejs Model" from the pop-up menu. Information about EJS is available at: and in the OSP ComPADRE collection .

Just sharing information. ;D


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on August 31, 2009, 02:37:13 pm
suggestion of further development. I tried to look in the codes but i cannot do it myself.

1. can make it possible to change the direction of the current? it seems to be only downwards for the moment. This can help learners to visualize the effect of the direction of current.

2. can make it obey the
 Bperpendicular = µoI / (2*pi*r)
where
    * µo, permeability of free space = 4*pi x 10-7 Tm/A
    * I, current flowing through the wire, measured in amps
    * B, magnetic field strength, measured in Tesla
    * r, distance from the wire, measured in meters
http://dev.physicslab.org/Document.aspx?doctype=3&filename=Magnetism_CurrentCarryingWires.xml

3. can add a 3D object of a hand to illustrate the Maxwell's Right Hand Grip Rule?(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=181.0;attach=1281;image)


4. Do u want to improve this version? It is yours i think, but the coding is different from the first post's xml.
Reference:
http://www.compadre.org/OSP/document/ServeFile.cfm?ID=8311&DocID=916#Doc916
written by Wolfgang Christian and Fu-Kwun Hwang
technical implementer: Robert Mohr
The EJS Magnetic Field from Loops model computes the B-field created by an electric current through a straight wire, a closed loop, and a solenoid. Users can adjust the vertical position of the slice through the 3D field.
I managed to do a bit here http://www.phy.ntnu.edu.tw/ntnujava/ntnujavazip.php?ejsuserjar=4621&type=xml

For your consideration



Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: Fu-Kwun Hwang on August 31, 2009, 04:49:58 pm
I just added options to change the current (from -1 to 1) and find out change in direction of B field.


Title: Re: Magnetic field pattern for (line/ coil/ solenoid)
Post by: lookang on September 04, 2009, 11:56:38 am
cool!
thanks i adapted the current slider to the OSP version here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1184.msg4622#msg4622