# NTNUJAVA Virtual Physics LaboratoryEnjoy 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 March 10, 2010, 06:00:27 pm

 Title: magnetNcoil Post by: Fu-Kwun Hwang on March 10, 2010, 06:00:27 pm The following applet show interaction force between a circular current loop in magnetic field generated by a magnet.Red arrow show the direction of the current.Blue arrow are force $\vec{F}=i d\vec{\ell}\times \vec{B}$ due to current loop in magnetic field generated by a magnet.You can change the location of magnet with two sliders (move in y/z direction).The radius R of the current loop can be changed with slider,too.Click play to trace out the magnetic field lines (produced by magnet). Title: Re: magnetNcoil Post by: lookang on July 05, 2010, 08:51:18 am Hi prof, this applet is simply fantastic!the play button seems to work only for the initial conditions.i moved the slider and click play, it doesn't seems to show the magnetic field lines from the bar magnet.chance to check it out and enhance it? thanks! :Dquestion:i would make x slide able all the way inside the metal coil, it is the calculation is different thus u made it to only move on the one side of the coil?It would be a great tool if they can explore left, centre and right of the coil.for ur consideration! Title: Re: magnetNcoil Post by: Fu-Kwun Hwang on July 05, 2010, 11:59:28 am Thank you for the bug report.It should be fixed now. Please check it again! Title: Re: magnetNcoil Post by: lookang on July 05, 2010, 11:37:06 pm bug when z =! 0.by the way is it that the codes to draw magnetic field lines is hard that the reason why i haven't seen much magnetic field lines in Ejs applet?only magnetic field vectors is pretty common now :)i being thinking i need to add magnetic field lines one day on all my other applets because the sg syllabus still mention it. or should the syllabus be changed to include field vectors to replace field lines? Title: Re: magnetNcoil Post by: Fu-Kwun Hwang on July 06, 2010, 11:40:49 am Bug for z!=0 is fixed!Thank you! Title: Re: magnetNcoil Post by: lookang on July 06, 2010, 04:02:39 pm Quote from: lookang on July 05, 2010, 11:37:06 pmshould the syllabus be changed to include field vectors to replace field lines concept?any thoughts on this? Title: Re: magnetNcoil Post by: Fu-Kwun Hwang on July 06, 2010, 05:34:59 pm It is much easier to calculate the field vector.However, the simulation need to following the field vector in order to draw the field line.You might want to check out how the field lines were generated from field vector. (the evolution page)It might be easier for students to visualize magnetic field line than magnetic field vector. Title: Re: magnetNcoil Post by: ahmedelshfie on July 06, 2010, 05:58:09 pm Another ask when i set value R=0.5,y=0.5,z=-0.000 I notice line begin from gray arrows so i ask teacher physic and we test so find that:Line begin from gray arrow not begin from N i add button step for we test step by step and can watch lines more slowly So prof my ask when set value that i typing up line begin from gray arrows or must begin from NI will attach image for applet by value that i set up and how he begin Title: Re: magnetNcoil Post by: lookang on July 06, 2010, 06:27:06 pm to ahmedI think It does not matter because the field lines is just the line of force if there is a particle that is affected by the field lines.Starting from the N pole has some advantage when we explain it to students.To prof Hwang.Can add the field lines arrows too to make the visualization of field lines consistent with the convention adopted by textbook? Thanks ! Title: Re: magnetNcoil Post by: ahmedelshfie on July 06, 2010, 06:35:09 pm Is not a bug but I'm just notice so i perfer ask prof to understand this part However you think this point no make students mix or someting like it ?Prof Hwang could you if have time modified applet to when run line begin from N Thanks Title: Re: magnetNcoil Post by: Fu-Kwun Hwang on July 06, 2010, 10:08:21 pm The purpose of the above applet is to show the force on a current loop in a magnetic field.$\vec{F}= I d\vec{\ell}\times \vec{B}$The magnetic field line is a by product.So all the magnetic field line pass throught the current (event when magnet is off-axis).That is the reason , the field line starts from the current loop.If you just need to show magnetic field lines for a bar magnet, I can modify the code to create another simulation:1. remove current loop and other.2. let field line starts from N pole. Title: Re: magnetNcoil Post by: ahmedelshfie on July 06, 2010, 11:15:41 pm I'm plane publish this simulation so in books here show line Begin from NThey may no understand java is not easy do the same like education or books howeverApplet is wonderful.If have a way to modified code it will be nice for line start fron NThank you prof about help Title: Re: magnetNcoil Post by: lookang on August 20, 2010, 08:34:02 am found this Title: The Falling Coil Applet(http://web.mit.edu/8.02t/www/802TEAL3D/pirelli_images/fallingcoil200.jpg)An interactive Java 3D applet field shows the field configuration around a non-magnetic ring as it falls under gravity in the field of a fixed magnet. In the initial configuration the coil has no resistance and levitates in the field of the magnet. Hit run and let the ring bounce several times. At the bottom of a bounce hit the "iron filings" box to see a representation of the complete field. Hit run again and increase the resistance to "10" using the slider. Watch the subsequent behavior of the ring.The Ejs applet above is fantastic! now with field lines too! thanks Prof Hwang. i will download and learn  ;)http://web.mit.edu/8.02t/www/802TEAL3D/teal_tour.htmthis The Falling Coil Applet by MIT (http://web.mit.edu/8.02t/www/802TEAL3D/graphics/navbars/topnav/physics802.gif) has a special button on the middle right, it is called magnetic field lines by iron filing.i think it is drawn using a techniques called line "Dynamic Line Integral Convolution for Visualizing Streamline Evolution"The paper is herehttp://icampus.mit.edu/projects/Publications/TEAL/DynamicLineIC.pdfThe way they did it was by using a plane, to allow such a visualization (http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=1449.0;attach=3356;image). I can't understand the mathematics, maybe you can explore if it can be done on Ejs! Thanks!Pedagogy wise, it is a good visualization feature to have, because it allow students to relate back to real life "iron filing" representation of magnetic field lines.for your consideration :) Title: Re: magnetNcoil Post by: lookang on September 01, 2010, 01:57:25 pm yes, i tried to change the codes to make it possible to change the number of lines, i think it was some np or something, if i start with 2, it draw correctly.but when i add slider to control it, it was some new errors i have no seen before and it was stuck for a while.the final goal is i hope to make it like the MIT TEAL applets visualization, which i should be able to do more it i can figure out the codes better, like the vernier caliper model, DC motor etc.i seem to have misplaced the working file, will attach it when i find it Title: Re: magnetNcoil Post by: Fu-Kwun Hwang on September 01, 2010, 03:30:30 pm nc is the number of coils for the calculation.np is the number of points for each coil for the calculation.Number of filed lines are defined by nf (default=24). You might be able to change it to smaller value.However, you can not change it to larger number without redefine all those array for (xf,yf,zf,...).You need to redefine the default for nf if you need more number of lines and do not forgot to call _initialize(). Title: Re: magnetNcoil Post by: dona4997 on June 06, 2015, 10:14:45 am I can't see the image. Please help me. Thank you. Title: Re: magnetNcoil Post by: lookang on June 06, 2015, 12:56:07 pm Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list