NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
February 19, 2018, 09:05:27 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  
"Reflect, review and renew constantly." ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Magnetic field generated bar magnet  (Read 15935 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3079



WWW
«
Embed this message
on: August 13, 2008, 08:43:04 am »

Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
If java program did not show up, please download and install latest Java RUN TIME

You can drag the magnetic neddle to generate another sets of magnetic field line when the simulation is in pause state (when it finish generate the field line or click pause button).




Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
If java program did not show up, please download and install latest Java RUN TIME
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1782


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: August 13, 2008, 06:07:21 pm »

my journey:

1. added mbar.gif graphics into folder _data/mbar.gif
so now i can compile it n it works nicely.

question:

reference:http://upload.wikimedia.org/math/5/f/f/5ff6494ee391f0ac7cfd0da8851422f3.png
can explain is this the Biot–Savart law you used to model the magnetic feild lines? 

compare it with the code
Code:
double r2,r3,f;
// caluclate magnetic field at point xp,yp use Biot-Savart Law Fproportional to dlXr/r^3
public double calFx (double xp,double yp) {
 f=0;
 for(int i=0;i  for(int j=0;j  r2=(xp-xc[j])*(xp-xc[j])+(yp-yc[i])*(yp-yc[i])+zc[i]*zc[i];
  r3=r2*Math.sqrt(r2);
  f-=(yc[i]*(yp-yc[i])-zc[i]*zc[i])/r3;
  }
 }
 return f;
}
public double calFy (double xp,double yp) {
 f=0;
 for(int i=0;i  for(int j=0;j  r2=(xp-xc[j])*(xp-xc[j])+(yp-yc[i])*(yp-yc[i])+zc[i]*zc[i];
  r3=r2*Math.sqrt(r2);
  f+=yc[i]*(xp-xc[j])/r3;
  }
 }
 return f;
}

it looks different, sorry it is difficult to follow, as Biot-Savart Law i don't have a deep understanding

i am usuallly on MSN microsoft messager : lookang , can add me as frd then maybe we can arrange to discuss the applet?
« Last Edit: August 13, 2008, 06:11:25 pm by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3079



WWW
«
Embed this message
Reply #2 on: August 14, 2008, 11:53:27 pm »

Original form for Biot-Savart Law is
d\vec{B}=\frac{\mu_0}{4\pi} \frac{I\,d\vec{l}\times\hat{r}} {r^2}

For the calculation in the code. I use another variable(cst) to represent \frac{\mu_o\, I}{4\pi}
And transform \frac{I\,d\vec{l}\times\hat{r}}{r^2} into \frac{I\,d\vec{l}\times\vec{r}}{r^3}
Where \hat{r}= \frac{\vec{r}}{r}.

\vec{l} is in y-z plane. corresponds to (yc,zc) in the code.
and \vec{r} corresponds to (xp-xc,yp-yc,zc)
Then calculate the cross product for the above two vector.

The integration is done by sum of components from all the coil segments.
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1782


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: September 24, 2009, 02:23:56 am » posted from:Fiesso D\'artico,Veneto,Italy

good sharing by W. K. Adams, Co-Director PhET Interactive Simulations University of Colorado, Boulder, USA
http://www.fisica.uniud.it/URDF/mptl14/dtlprogramme.htm
http://phet.colorado.edu/simulations/sims.php?sim=Faradays_Electromagnetic_Lab#topics

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


Gold mine find written by Wolfgang Christian, Francisco Esquembre, and Anne Cox
http://www.compadre.org/osp/document/ServeFile.cfm?ID=9414&DocID=1310#Doc1310


* barmagnet.PNG (92.44 KB, 1021x603 - viewed 479 times.)
« Last Edit: September 24, 2009, 02:31:57 am by lookang » Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1782


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: September 28, 2009, 09:00:19 am » posted from:Singapore,,Singapore

there is a remix version here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1210msg4759;topicseen#msg4759
enjoy
Logged
Pages: [1]   Go Up
  Print  
"Reflect, review and renew constantly." ...Wisdom
 
Jump to:  


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.807 seconds with 22 queries.since 2011/06/15