If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #4321
Joined: Sun Jan 08 2012, 05:10PM
Location: Illinois
Posts: 5
I am trying to write a program to optimize coil parameters to get the greatest magnetic field density. I looked up the equations for magnetic field density, and found B = u0 * NI/L for the b field density. But this equation says that the field strength is dependent on the # of turns per meter (N/L) and current. This would seem to imply that the best coil would always be the one with the shortest possible length, 1 turn per layer, and multiple layers, because it would have the highest current. Having more turns on each layer wouldn't affect the magnetic field density, it would only negatively impact the amount of current available because of the increased resistance. I always thought field strength was proportional to the total # of turns and current. Am I interpreting the equation incorrectly, or is the best coil really one with the shortest length?
Registered Member #1451
Joined: Wed Apr 23 2008, 03:48AM
Location: Boulder, Co
Posts: 661
To maximize the field density, you want to maximize turns per meter, not just turns. The best coil will be one with the highest number of turns per unit length, not the shortest.
Registered Member #4321
Joined: Sun Jan 08 2012, 05:10PM
Location: Illinois
Posts: 5
But resistance goes up if you increase the length and add more turns per layer, so current goes down, and since the total number of turns has no effect on field density, I would still think that a shorter coil is better, at least up to some practical limit.
Registered Member #1451
Joined: Wed Apr 23 2008, 03:48AM
Location: Boulder, Co
Posts: 661
That equation assumes ideal wires, so I'm not completely sure what the best configuration would be. The resistance would not go up enough adding two or three turns per layer to negate the advantage of more turns. But isn't this what your program is going to find out? I'd start by fixing the number of layers however, too many variables isn't always a good thing.
Registered Member #2099
Joined: Wed Apr 29 2009, 12:22AM
Location: Los Altos, California
Posts: 1716
Welcome to 4hv, CT.
You are using a very simple formula, which is strictly valid only for an infinite, straight solenoid. Might give a reasonably accurate value near the center of a finite solenoid with large length/diameter ratio. For stubby coils, flat ones, ones with finite thickness, or ones with ferromagnetic material nearby, you need other formulas, or numerical field solvers.
Here's a reference I like. Check out the closed-form formula for "On-axis fields due to round, finite, air core solenoids". See if it matches your formula in the limit, as the length becomes very large and the place of interest is well inside the coil.
[edit] Also please note: 1) the magnetic attraction of a small iron particle depends on the -gradient- or space derivative of the magnetic flux density. That's why there is no force within an infinite solenoid, or in the center of a finite one.
2) as you add turns, you could increase the wire thickness to keep the resistance constant. You will find that the current in any efficient coilgun coil is limited by inductance more than by resistance. A more accurate way to model the attractive force on a magnetic core is from the derivative of inductance with respect to core position.
Registered Member #4237
Joined: Tue Nov 29 2011, 02:49PM
Location:
Posts: 117
I have written such a program in Wolfram Mathematica. You can alter every coil and cap bank parameter (length, inner diam., outer diam., wire thickness, wire resistance, capacitance, voltage, etc), and it'll give you various graphs, showing all you need to know about the firing of your coil. I'll post the code here, but if you don't have wolfram mathematica, you can't use it for much... Unless someone re-writes it into flash or something. If anyone want to this, I'll be more than happy to explain the code in detail. Here are screengrabs of an earlier version of the code, showing a function depending on time and coil thickness (ignore "70ms").Linkylink And here are a screengrab of how the code I posted looks. It's depending only on time, you edit the other parameters in real-time using the sliders.More links
EDIT: How the hay do I spoiler text?
This version of the code calculates the length of the coil based on inner coil diameter and a set weight for the projectile. The smaller the diameter is, the longer the coil will be. It can easily be changed to allow for manual editing of the coil length.
Registered Member #4321
Joined: Sun Jan 08 2012, 05:10PM
Location: Illinois
Posts: 5
@kludgesmith Thanks for the link. It's much nicer than reading through wikipedia.
1) the magnetic attraction of a small iron particle depends on the -gradient- or space derivative of the magnetic flux density. That's why there is no force within an infinite solenoid, or in the center of a finite one.
I guess this is why the position of the projectile in the coil matters so much, and the strongest magnetic attraction is not when the projectile is almost completely in the coil. But I think the field max field strength would still give you a good idea of the total impulse the projectile will get from the coil.
Pinkamena, I like the graphs that your program produces. I've been having a hard time getting my python3 program to graph points directly, although I can still graph easily by copy and pasting into excel. But why did you choose to calculate the H field of the coil? I thought B fields were more accurate for solenoid coils.
I'll upload my program when I've finished it. It doesn't account for capacitor discharge but it allows you to put in a range of values to radius and length and it determines the best combo.
Registered Member #4237
Joined: Tue Nov 29 2011, 02:49PM
Location:
Posts: 117
capacitortree wrote ...
Pinkamena, I like the graphs that your program produces. I've been having a hard time getting my python3 program to graph points directly, although I can still graph easily by copy and pasting into excel. But why did you choose to calculate the H field of the coil? I thought B fields were more accurate for solenoid coils.
Registered Member #4321
Joined: Sun Jan 08 2012, 05:10PM
Location: Illinois
Posts: 5
Well I finally finished the program. You can input a range of lengths, outer radii, and gauges, and it gives you the best values and some nice graphs. It requires python3.2 and gnuplot. It automatically outputs graphs on linux, I think it should run on windows if you comment out some code at the bottom and run gnuplot separately (there is a note about it in the program).
I think I got rid of all the bugs, but its always possible there are still some. ]coilgun7.py.zip[/file]
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.