# Behaviour of permanent magnet within air solenoid

I am struggling to understand the behaviour of a cylindrical permanent magnet (PM) within an air solenoid. I have searched extensively and have so far have not found any diagrams or explanations on PM behaviour within solenoids.

Initially I started with the copper wire wrapped around the shorter bobbin. When I passed a direct current through the solenoid, the PM was pulled toward the centre of the solenoid (position 1).

I then wound a longer solenoid with the same wire expecting the same effect and expecting to get longer 'travel' on the PM when it was pulled into the solenoid. Instead I found that the PM stopped at position 2 instead of the centre of the solenoid. When I removed the PM and inserted it on the other end of the solenoid it stopped at position 3. I can push the PM further within the solenoid by applying some force and it then jumps to the other position on the other side (from 2 to 3 and vice versa).

Why does the PM behave like this and what part of the interaction between its magnetic field and that of the solenoid am I failing to understand?

All of Mark's assumptions and deductions are correct. There is a small join in the centre of the long solenoid's bobbin (which I made by joining two shorter bobbins). The first two layers of copper wire had to "jump" this join which is why the solenoid's magnetic field is non-uniform and is exactly as Mark has described it.

• What happens if you move the PM to the center? Does it stay there? Apr 6, 2021 at 1:03
• @DKNguyen - If the PM orientated such that the north pole is on the right, it will not stay in the centre. However, if the PM is flipped such that the north pole is on the left, it will remain in the centre of the solenoid (*provided that it is not allowed to flip itself back to the previous orientation - in which case it would return to positions 2 or 3). The physics behind this behaviour has been very well explained by Mark H in his recently added answer.
– Milo
Apr 6, 2021 at 21:28

What you are discovering is the behavior of dipoles in non-uniform fields. Your permanent magnet is a magnetic dipole (having two poles, north and south) and the solenoid creates the strong field inside the space within the coil.

In order to think about what should happen, let's pretend that magnetic monopoles exist, that is, isolated north and south poles [note]. Magnetic monopoles in magnetic fields act just like electric charges (or, electric monopoles) in electric fields. Positive magnetic monopoles (north poles) feel a force in the direction of magnetic fields, and negative magnetic monopoles (south poles) feel a force in the opposite direction of magnetic fields. Now, a dipole is like a north and south monopole of equal strength attached to each other with a small separation between them. Let's look at a dipole in a uniform field and see what happens. A uniform field is one that has the same magnetic field strength and direction at every point.

The blue tube is the dipole with its north end marked with + and its south end marked with -. The maroon arrows represent the magnetic field with uniformity indicated by the arrows being the same size. In this setup, the positive end feels the same force as the negative end. Since the two ends pull in opposite directions, the total force is zero and the dipole does not move. If the magnetic field in your solenoid was completely uniform, then there would be no pushing or pulling force on the permanent magnet. You would be able to place the permanent magnet anywhere within the tube and have it sit there not moving.

Now, let's look at a non-uniform field. A non-uniform field is one that varies in strength or direction at different locations.

The field still points to the right, but the field gets stronger to the right (shown by the arrow being larger). Since the north pole is to the right, it feels a stronger force than the south pole. The forces no longer balance, and the dipole is pulled to the right (indicated by the blue arrow). If the field to the left was stronger, then the south pole would feel the stronger force and the dipole would be pulled to the left.

Judging by your description of your experiment, I'm going to guess that the field strength inside the solenoid looks something like this:

Outside the solenoid, the field rapidly drops to zero. Inside, the field always points in the same direction, but with varying strength. In the plot above, the field is always positive, which I will say means pointing to the right. The larger the value on the plot, the stronger the field points to the right. Now, let's insert the dipole from the left side.

Just like with the simpler picture above, the positive/north end of the dipole is in a stronger field, so the dipole is pulled to the right because the pull to the left on the negative/south end is weaker. Let's push the dipole in farther.

Now, the negative/south end of the dipole feels the stronger field, so the leftward force overcomes the rightward force on the positive/north end. The dipole is pulled to the left. So, where the magnetic field is strongest is a stable equilibrium point inside the solenoid. This corresponds to position 2 in your photograph. By the same reasoning, the other peak on the right will also be a stable equilibrium position and would correspond to position 3 in your photograph.

Since the field is symmetrical, it seems like is should be possible to get the magnet to sit in the middle of the solenoid, right? Let's see what happens when the dipole is flipped so the poles face the opposite way.

Using the same reasoning, we see that the positive/north end sees a stronger field and feels a stronger force than the negative/south end, so the force is to the right. Similarly, the force points the opposite way on the other side of the trough.

Now, the negative/south pole sees a stronger field and feels a stronger force, so the dipole is pushed to the left. The minimum field in the middle is now a stable equilibrium.

If I'm correct, I would predict that getting the permanent magnet to rest in the middle of the solenoid requires flipping the magnet's orientation to the opposite of that when it rests in positions 2 and 3 (if you can prevent the magnet from rotating, see question 6 below).

1. What is the shape of the field in your shorter solenoid?
2. Why is there only one equilibrium point?
3. What happens when you flip the permanent magnet and attempt to place it inside the short solenoid?
4. Why do opposite poles of permanent magnets attract?
5. What happens to a solenoid when it is not aligned with the field? Try inserting the permanent magnet into the solenoid so that its poles are perpendicular to the solenoid field. Explain what happens in terms of the 2-monopole model of the dipole.
6. At the end of my answer, I said that the middle of the solenoid can be an equilibrium position by flipping the permanent magnet. Is this a stable equilibrium?
7. Pick a position within the solenoid and try to wrap the wire around the spool in such a way that a permanent magnet will be attracted to that position no matter where it starts within the spool.

[note] No magnetic monopole has ever been found in any experiment. They are just a useful model that is both simple and predictive of experiments.

• So is it just because the OP did not wind the coil evenly? Apr 6, 2021 at 22:00
• @DKNguyen That's right. It's actually really hard to create uniform fields with an electromagnet. At my last job where we built electromagnets for particle accelerators, there was a specific machine for winding coils. It was a slow process that involved a machinist hammering the wire into the correct place every quarter turn. Before that, software was used to plan out the exact placement of the wires in the coil. Apr 7, 2021 at 0:19
• I wound a coil a month ago with the help of the machinist on a lathe. It was a pain in the ass and I gave up after two layers. I've not yet tested to see if is sufficient, but it was a pain enough that I would rather have stopped then and tested to see if it was enough than to keep on going to make sure it was. I hate round magnet wire now lol. So what's an easier way? Rolling copper sheet with an insulating film the same length as the core around the core? Apr 7, 2021 at 0:57
• @DKNguyen We used square profile copper wire, something like this: mwswire.com/magnet-wire/square-magnet-wire. I would think this would allow for easier wire placement and tighter packing. Apr 7, 2021 at 2:56