Arrgh. There is more than one way to orient magnets such that they attract each other, and our mental pictures have been misaligned.
By the way, I actually have worked out a lot of this stuff already, in a somewhat more precise form. For permanent dipoles: http://www.physicsinsights.org/force_on_dipole_1.html (NB -- this is all in geometrized cgs units so it may look like it's missing something -- no mu_0, no "c", as far as the eye can see.) And, regarding interactions between electromagnets and permanent magnets, here: http://www.physicsinsights.org/magnetic_motors_1.html Paul wrote: [ ... snip chop slice ... ] > Stephen A. Lawrence wrote: > > > You need to flip one so they're N-S, S-N for there > to be attraction > > They attract until they are perfectly aligned NS NS. When they're aligned N | | | | S N | | | | S they can flip (rotate) so that they're aligned NS || || || || SN and, in fact, if you jiggled them a little and then let them have their way, that's exactly what they'd tend to do. It's a lower energy configuration than the end-to-end configuration, which is most apparent when you model them as magnetic monopoles stuck to the ends of rods. In any case, if they're aligned NSNS they'll attract, and if they're side by side aligned N/S S/N they'll attract, also, and in both cases the torque will be zero because the torque is proportional to the mis-alignment of the dipole vector and the field vector. And, of course, the field vector points straight out the end (parallel to the dipole), but for positions "next to" the magnet it points opposite to the direction of the dipole. > >, and in that case the fields cancel as they > approach. > > That's not true. When aligned they are NS NS. That > is full magnetic alignment and they > do *not* cancel. The net field increases. It increases versus a single magnet, that's true. But compared with two distant magnets? I'm not so sure; we need to ask: Does the field increase or decrease as they're drawn apart along a line? The approximations come thick and fast as one tries to picture this: N---S N---S draw one away this way--> I _think_ net field energy increases as they're pulled apart (which would make sense, energywise!) but I haven't worked this one out for real. [ snip ] > Two aligned electromagnets do not repel. They > *attract*. Arrgh. We're both right. If they're end-to-end they attract when they're aligned. If they're side by side they attract when they're misaligned. > That's backwards. :) As they attract and move closer > there's back EMF, which consumes > energy from the battery. Yes, no matter the alignment, we "pay" for the work done as they pull themselves together, by pumping in electrical energy.