Jump to content

Need Help Understanding Magnetic Force


gurntmaster1

Recommended Posts

Hello world. I am currently working on a mod, trying to add (space magic fueled) future technologies. One device is an electromagnet, which can be used to build accelerator stations.

Currently it works by applying F force to the magnet and each vessel within M range. The formular is:

F: Force to apply

f: Force at 0 distance

m: Current distance between magnet and object

M: max distance that an object can be affected.

F = f * (1 - m / M)

Something tells me though that this isn't really how it works in real physics and as that is an important part of the gameplay, I would like to keep things as close to that as possible.

Could someone help me understand how a more accurate formular would look like?

Link to comment
Share on other sites

Sure. Its going to involve a factor of distance squared, as the force tails off following an inverse square rule.

Quick google reveals the following formula, which should be sufficiently similar to your own approximation, yet more accurate scientifically.

There are many equations relevant to magnetic force, but this one at least seems usable.

(from: https://en.wikipedia.org/wiki/Force_between_magnets)

F = [u * M1 * M2] / [4*pi*r^2]

Where:

F : the force between two magnets

M1: the pole strength of magnet 1 (there are many ways to quantify magnetic fields, but you can approximate this value as "magnet strength")

M2: same for magnet 2

u : permeability of free space (constant value, for vacuum it equals roughly 1.2566*10^-6)

r: separation between the two magnets

That should give you a decent force/distance curve, its probably within scope of KSP to modify the constants slightly to get a curve that is practically useful within the KSP universe.

Obviously magnetics gets very complicated when you get into the nitty-gritty, but the above should give you the combination of simple vs. realistic that you are looking for.

If anyone has more complete knowledge, feel free to contradict me, mine is based on a more broad scientific background, and google :)

Link to comment
Share on other sites

Thanks for the reply. Wow, the force degrades really fast, if i set (u * M1 * M2) so that F = 120 at r = 1, then F ~ 0.99 at r = 11 -_- I might just give real physics the finger on this one.

One thing that seems a bit odd is that as r gets closer to 0, F will get closer to infinity. I would have expected that there was a Max F at r = 0 (not possible according to this equation).

Link to comment
Share on other sites

Actually, it's a lot worse than that. Real magnets are dipoles. You can't have just the North pole of the magnet or just the South pole. You have to have both. (∇·B = 0) So the actual force from a magnet is going to drop as 1/r³. Which is why you don't really see magnets being used at range.

Link to comment
Share on other sites

Ouch, maybe I should either re-think it as a rail gun (applies large force at close range) or explain how it works through some other means (as mentioned space magic is kind of the theme, already got a propulsion which uses electricity to either reduce or reverse the effect of gravity). So, how would an artificial gravity field work :D (mostly in terms of degrading)?

Link to comment
Share on other sites

Ouch, maybe I should either re-think it as a rail gun (applies large force at close range) or explain how it works through some other means (as mentioned space magic is kind of the theme, already got a propulsion which uses electricity to either reduce or reverse the effect of gravity). So, how would an artificial gravity field work :D (mostly in terms of degrading)?

Induced (sourceless) artificial gravity will have all the same problems as magnetic force. You still get ∇·g ≈ 0 working against you.

In contrast, if you have an object inside a sufficiently long magnetic coil, the magnetic force is essentially constant inside. That's how real world coil guns work.

Link to comment
Share on other sites

*reads title*

WELCOME TO SCIENCE! xD (nobody actually understands the fundamental reason magnets work)

Ahem. The above responses are right though. Your original equation is modifying the force effectively by linear interpolation, making it decrease to zero in a linear fashion with distance. On a graph this would make a straight line (segment), which is why it's known as a linear function.

What you want is a rational function, i.e. one that makes a hyperbolic curve that decreases ever closer to zero without ever touching it, and which increases very sharply at short distances. The basic recipe is to divide by some version of the distance, e.g. F = f / m (but where f is the force at 1 unit rather than zero - because at zero units the force would be infinite).

In this particular case, due to the inverse square law, you want to be using the square of the distance rather than the distance directly, giving you:

F = f / (m * m)

From that point you just tune the scale for m and the magnitude of f until things play nice.

Link to comment
Share on other sites

If we're waving magic wands, you could say that the device actually works via hyperspace folding (or whatever other magical technobabble you like) to simulate an infinite virtual membrane with a given charge density (or current density, if you still want to use magnetics instead of electrics). Then it'll drop off like 1/r.

Link to comment
Share on other sites

Thanks for all of the replies, got a lot more than I had hoped for. Although I am not quite sure in what direction I will take the device, I guess it will depend on "gameplay". Your posts helped me get some perspective though, so they weren't in wain :).

Link to comment
Share on other sites

*reads title*

WELCOME TO SCIENCE! xD (nobody actually understands the fundamental reason magnets work)

Many people say so, but magnetism is well understood physics. Especially ferromagnetism (permanent magnetism of iron) is quite hard to understand or explain and it is omitted from physics textbooks except university level solid state physics books. Maybe that feeds such misunderstanding.

Real magnetic circuits are complicated and magnetic forces have low range. Air gaps in electric motors are millimeters, lifting electromagnets need a contact etc. Probably you have to use some arbitrary unit and accept contradiction with real physics. Or explain it with some magic magnetism. Real world have also other problem. There does not exist ferromagnetic material which is light enough for spacecrafts. Other materials feels only very negligible forces in magnetic field.

Link to comment
Share on other sites

^ I had a feeling someone would say this. I don't want to start a big debate, but long story short, we have plenty of math telling us how the forces behave, and we have some decent theories regarding waves, potentials, and carrier particles. Where those come from and what makes them tick, fundamentally, is still poorly understood, as it is for all fundamental forces.

Link to comment
Share on other sites

^ I had a feeling someone would say this. I don't want to start a big debate, but long story short, we have plenty of math telling us how the forces behave, and we have some decent theories regarding waves, potentials, and carrier particles. Where those come from and what makes them tick, fundamentally, is still poorly understood, as it is for all fundamental forces.

You are right. Ultimate answer to all scientific questions is that "world just seems to work so". If we find answer to some question we find also dozen new questions.

I replied because I have heard that so many people think that magnetism (especially ferromagnetism) is something specially poorly understood thing in physics. Even college teachers teach so. It is not true. Magnetism is as well understood part of electromagnetism as anything else. True reasons why we have electric charge and electromagnetic interaction are of course hidden but as far as we assume postulates of quantum electrodynamics we can calculate all detectable magnetic phenomena which our computers can handle. It just needs long and complicated calculations.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...