NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
September 26, 2020, 01:45:45 pm

Wisdom is to bring the best out of our students. ...Wisdom

 Pages: [1]   Go Down
 Author Topic: Ejs Open Source Bar Magnetic Field Lines Model Java Applet  (Read 11371 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: September 10, 2012, 08:25:26 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

Ejs Open Source Bar Magnetic Field Lines Model Java Applet

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!

work in progress.

My own naive idea is to use analyticCurve3D but i haven't seen any example on a family of analyticCurve3D, so each is drawn as a single analyticCurve3D.

the match is close but not very accurate
http://en.wikipedia.org/wiki/Ellipse
An ellipse in general position can be expressed parametrically as the path of a point (X(t),Y(t)), where
Minimum = 0
Maximum = 2*Math.PI
Variable = "theta"
X() = "1.4+1.4*Math.cos(theta)*Math.cos(0)-1.4*Math.sin(theta)*Math.sin(0)"
z()= "0+0.5*Math.sin(theta)*Math.sin(0)-1*Math.sin(theta)*Math.cos(0)"
 fieldlinestet.png (19.58 KB, 588x452 - viewed 588 times.) « Last Edit: December 13, 2012, 07:34:13 am by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: December 13, 2012, 02:03:18 pm » posted from:-,-,SINGAPORE

still cannot make the sim run without run-time errors.
attached is the new sim with 2 sets of field lines
 *** There are 1 more attached files. You need to login to acces it! Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #2 on: December 15, 2012, 09:29:21 pm » posted from:,,Satellite Provider

You have learned how to draw electric field line from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.0

You can use the same method to draw magnetic field line.

I tried to open ejs model from your jar file. However, I was not able to understand what you were doing in the model (evolution page: lambdax, lambday, lambdaz???)
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: December 15, 2012, 09:47:11 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

You have learned how to draw electric field line from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.0

You can use the same method to draw magnetic field line.

I tried to open ejs model from your jar file. However, I was not able to understand what you were doing in the model (evolution page: lambdax, lambday, lambdaz???)
it is very difficult for me to implement it is 3D as i only have very limited knowledge, the codes you invented http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.0 are too advanced for me redesign in 3D.
i can remix

I tried to open ejs model from your jar file. However, I was not able to understand what you were doing in the model (evolution page: lambdax, lambday, lambdaz???)
according to prof mike gallis http://www.compadre.org/osp/bulletinboard/TDetails.cfm?ViewType=2&TID=2226&CID=51612&#PID51613

For a parameterized path in space λ(t) tangent in space which "follows" a field E(r) the rate of change of the path (the "velocity" of the trajectory) is in the direction of the field. The first try:

dλ(t)/dt = E(λ(t))

this method works in principle, but in numerical approaches, the computed path λ(t) will have large step sizes where the field is strong, which is probably undesireable. I prefer:

dλ(t)/dt = E(λ(t))/|E(λ(t))|

which gives the path a "constant velocity".

For a dipole field (from Jackson):

E(r) = (3n(p⋅n)-p)/|r-r0|3
r = field point
r0 = location of dipole
p = dipole moment
n = normal vector pointing from source to field point = (r-r0)/|r-r0|

For the example coded here, the source is at the origin (r0 = 0) and the dipole is oriented along the z axis. With the coordinates of the field point given as x,y,z (and r= x2+y2+z2)1/2 ) the field components are
Ex=3xzp/r5
Ey=3yzp/r5
Ez=3z2p/r5 -p/r3
 « Last Edit: December 15, 2012, 09:55:12 pm by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #4 on: December 17, 2012, 12:49:23 pm » posted from:Taipei,T'ai-pei,Taiwan

OK. I understand what you are trying to do now. I will try to check out your model and see what I can do to help!

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #5 on: December 18, 2012, 08:53:43 pm » posted from:,,Satellite Provider

The following is the version modified from your EJS model.

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!
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #6 on: December 19, 2012, 07:46:12 am » posted from:-,-,SINGAPORE

The following is the version modified from your EJS model.

hi prof!
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #7 on: December 20, 2012, 06:55:06 pm » posted from:,,Satellite Provider

Sorry! I should have checked it. It is OK now.
 Logged
 Pages: [1]   Go Up
Wisdom is to bring the best out of our students. ...Wisdom