|
-
Apr 11th, 2006, 12:30 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Math Q
I'm making a short sub to calculate an electromagnets field strength.
I can't get 10 to the power of -7 to show properly here so
you can see the equation at this link:
http://education.jlab.org/qa/electromagnet_02.html
I want to make sure I have the Mu part programmed correctly.
Can someone tell me if this the is the right way to do it?
VB Code:
dMu = (4 * 3.141592) * (10 * Exp(-7))
-
Apr 11th, 2006, 12:33 PM
#2
Re: Math Q
dMu = 4 * 3.141592 * 10 ^ -7
-
Apr 11th, 2006, 12:34 PM
#3
Re: Math Q
 Originally Posted by longwolf
...I can't get 10 to the power of -7 to show properly
[/Highlight]
Try this instead:
-
Apr 11th, 2006, 12:55 PM
#4
Thread Starter
Frenzied Member
Re: Math Q
Thanks guys.
I know this is a bit off subject but the output seems to be very low when tested against a 300 turns coil at 1 amp.
It's only giving 0.000000037699104 Gauss.
Even 1/2 x 3/16 ceramic magnet has about 645 gauss.
Here's the whole sub:
VB Code:
Private Sub cmdAction_Click(Index As Integer)
Dim dMu As Double
' dMu = (4 * 3.141592) * (10 * Exp(-7)) '?
dMu = 4 * 3.141592 * (10 ^ (-7))
txtTesla.Text = CStr(dMu * Val(txtTurns.Text) * Val(txyAmps.Text))
txtGauss.Text = CStr(Val(txtTesla.Text) / 10000)
End Sub
-
Apr 11th, 2006, 01:13 PM
#5
Re: Math Q
This is way out of my area of expertise but are you using the proper formula? 10-7 is of course a very small number so in your formula you would need a very large number of Turns and/or amps to come up with a "reasonable" number. You seem to be ignoring B and gap.
-
Apr 11th, 2006, 01:19 PM
#6
Re: Math Q
If you run the numbers on a calculator, that's exactly what you get - 0.000000037699104. The program is working correctly - maybe the constants are off.
-
Apr 11th, 2006, 01:19 PM
#7
Thread Starter
Frenzied Member
Re: Math Q
B is the output that goes into txtTesla.text
And, in this case, there is no gap.
I take it that you're reading the original equation the same way I am, 10 to the -7.
BTW , how did you get that to post here as a sub script?
-
Apr 11th, 2006, 01:23 PM
#8
Re: Math Q
 Originally Posted by longwolf
B is the output that goes into txtTesla.text
And, in this case, there is no gap.
I take it that you're reading the original equation the same way I am, 10 to the -7.
BTW , how did you get that to post here as a sub script?
Well in this case it's a superscript but I did [sup]-7[/sup].
-
Apr 11th, 2006, 01:28 PM
#9
Re: Math Q
Since your magnet is not a "C" magnet it looks from what I see at this site that you need to input the dimensions of the magnet.
-
Apr 11th, 2006, 01:45 PM
#10
Thread Starter
Frenzied Member
Re: Math Q
I was an electrician, but this is a bit beyond my expertise too 
What got me interested is an electro mechanical device that claims to 'steer' two high powered magnets (about 4200 gauss each) using two coils at the specs I listed.
If you're curious, here are links:
http://www.peswiki.com/index.php/Art...by_Tim_Harwood
http://www.peswiki.com/index.php/Dir...inciple_device
It seems incredible that you could direct 8200 gauss using just 0.000000075398208 gauss.
The sub may be off for two reasons,
1. The page gave a bad formula
2. The formula may only work for an 'open air' coil' and doesn't take the soft iron core into account.
Oh well, Thanks again!
Last edited by longwolf; Apr 11th, 2006 at 01:49 PM.
-
Apr 11th, 2006, 01:49 PM
#11
Thread Starter
Frenzied Member
Re: Math Q
Thanks for the link Marty.
It's talking about permanent magnets.
I'm trying to find the strength of electro magnets with my code.
-
Apr 11th, 2006, 02:42 PM
#12
Thread Starter
Frenzied Member
Re: [RESOLVED] Math Q
just to beat a dead horse...
I made a mistake for the final txtGauss output, should have been * 10000
Also Mu DID need to be multiplied by the 'Permeability' of the core material.
For iron that's about 200.
So the final gauss for a 300 turn by 1 amp coil with a core is about 754 gauss.
A much more reasonable figure
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|