NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 27, 2020, 02:33:41 pm

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

 Pages: [1]   Go Down
 Author Topic: is there an easier way to draw static magnetic field lines of a bar magnet?  (Read 4851 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: August 08, 2012, 05:15:48 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

dear prof,

is there an easier way to draw static magnetic field lines of a bar magnet?

notice is my source codes the way i made the visible foe B=1, B=2, B=3, B=4?

i cant be doing this way for B=100 for example.

is there a way i can use array 3D trails ?
or is there a analyticCurve3D for array?

thanks!
 fieldlines.png (35.33 KB, 1366x768 - viewed 505 times.) *** There are 2 more attached files. You need to login to acces it! « Last Edit: August 08, 2012, 05:36:23 pm by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3086

 « Embed this message Reply #1 on: August 08, 2012, 05:35:53 pm » posted from:,,Satellite Provider

I think the way I calculated the field is by using Biot-Savart law.
Calculate magnetic field sue to a coil. The solenoid is simple copy of many coils. So just need to sum up the field from one coil.
You should be able to calculate it.

The magnetic field of a bar is the same as the field of a solenoid.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: August 08, 2012, 05:43:33 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

i do not mean to use Biot-Savart law which is computational expensive.

i am cheating using
analyticCurve3D

x = "0.5+0.5*Math.cos(theta)*Math.cos(0)-1*Math.sin(theta)*Math.sin(0)"
y = 0
z = "0+0.5*Math.sin(theta)*Math.sin(0)-1*Math.sin(theta)*Math.cos(0)"

transform "z:270d" etc to get the many lines i need.

is there a analyticCurve3D for array? which immediately draws the lines without ODE evolution.
thanks!
 Logged
 Pages: [1]   Go Up
Wisdom is to bring the best out of our students. ...Wisdom