# Force between magnets

#### qwr

##### Member
I was thinking about this again due to a comment by @Dante Newbie saying how magnetic strength isn't linear. As an aside, if we were working with springs, we could use Hooke's law for force $$F = k x$$ for distance $$x$$ that is not too small or large.

Not surprisingly, the math is much more complicated for magnets, even for large distances. Now I am far from a physicist and the main info I could find is https://en.wikipedia.org/wiki/Force_between_magnets#Force_between_two_cylindrical_magnets, which references Vokoun, David; Beleggia, Marco; Heller, Ludek; Sittner, Petr (2009). "Magnetostatic interactions and forces between cylindrical permanent magnets". Journal of Magnetism and Magnetic Materials. 321 (22): 3758–3763.
http://jontalle.web.engr.illinois.edu/Public/Allen/Noori-pdf/VokounBeleggiaHellerSittner.09.pdf The result is in a fully analytic form with elliptic integrals. For large distances, the force is something on the order of $$1 / x^2$$, but my layperson skimming of the paper tells me the force would be a sigmoidal shape like arrangement (i) in the figure from the paper

Hopefully a real physicist can come along and actually numerically compute the integrals for cube magnets.

#### Dan the Beginner

##### Member
I am interested to know as well, since I wrote that based what I remember from my high school physics lesson nearly 50 years ago. Your graph looks very linear, probably because the distance (x-axis) is a log scale.. What I remember is something simple like this here:

In addition, I would like to know from the physicist whether it is possible to have a cube with electric coils to reinforce the little magnets, and if so, speed variable magnetic strength. (Magnets moving in cylinders within the coils, pushed by the magnetic force generated as well as by the spring.) Battery power is needed but perhaps not too bad, if this works. The faster you turn, the more electricity is supplied to the coils to get more magnetic strength. Also the faster your turn, the more the centrifugal force pushing on on the springs and that may be used to put the magnets further towards the other magnet. I know, pigs might fly if we are imaginative. I thought those springs in the WRM 2021 and Tornado 2 look like they could have been the electric coils as well as springs.

Last edited:

#### xyzzy

##### Member
My eyes just completely glazed over the elliptic integrals and refused to parse them. (This must be how you guys feel when I start rambling about maths…)

For large distances, the force is something on the order of 1 / x^2 ,
On the order of $$1/x^4$$, actually, under the assumption that the distance is large compared to the magnet radius and thickness. (See the paragraph just under Fig 2 in the paper you linked.)

If magnetic monopoles existed, then it would (probably) be correct to say that the force between two magnetic monopoles obeys the inverse square law. But, as far as we know, magnetic monopoles don't exist.

In the magnetic charge model, a magnet is treated as comprising a positive magnetic charge and a negative magnetic charge (of the same magnitude), and then you can treat the forces experienced by the positive/negative charges as obeying inverse square law, but you now also have to account for cancellations. The negative charge on magnet A will interact with both the positive charge and the negative charge on magnet B, and these forces will mostly cancel each other out if magnet B is small. Likewise for the positive charge on magnet A, and the resulting force will have the opposite sign to what the negative charge experiences if magnet A is small enough, so that's yet another source of cancellation. That's why the magnetic force obeys an inverse quartic law under a large-distance approximation.

#### Dan the Beginner

##### Member
Er, OK. I can see there's a lot more to this than meets the eye.

qwr

#### povlhp

##### Member
My GuHong has a very focused magnet field. The N35 in my RS3M is way wider/softer.
that is important as well.
My guess it that is dependent both on the distance of the magnets and their strength.

Last edited:

#### qwr

##### Member
Ok, I don't understand the math at all, but I can blindly plug-in numbers. Doing trivial simplifications for identically sized magnets, the main force equation from Eq (14) is
$F_z = -8 \pi K_d R^2 \int_0^\infty J_0 \left( \frac{rq}{R} \right) \frac{J_1^2(q)}{q} \sinh^2(q \tau) e^{-q \zeta} dq$
where $$-8 \pi K_d$$ is some constant (the paper's experiment uses $$K_d \approx 0.5$$), $$R$$ is magnet radius, $$r$$ is the lateral displacement, $$\tau$$ is magnet aspect ratio of height to diameter, $$Z$$ is the distance between magnet centers, and $$\zeta = Z/R$$ which is ratio distance between centers. See Fig 1. Also $$J_0, J_1$$ are modified Bessel functions of the first kind. For common axis, $$J_0(0) = 1$$ so that simplifies in eq (4).

Unfortunately I probably typed it in wrong or have some misunderstanding because I the integral doesn't converge for Fz[2, 0, 1/2, 3]

Code:
Kd = 0.5;
Fz[R_, r_, \[Tau]_, Z_] := -8 Pi Kd R^2 NIntegrate[BesselI[0, r q / R] (BesselI[1, q]^2/q) Sinh[q \[Tau]]^2 Exp[-q Z / R], {q, 0, Infinity}]