Suppose we have a spring with a spring constant of [itex]k[/itex]. And it is attached to a magnet (or electromagnet) as in the following diagram that I've made: I was wondering if it is possible to write an equation for the magnitude of the magnetic field [itex]\vec{B}[/itex] required to compress the spring? Suppose we want to compress the coil for a specific distance d. All we know is [itex]k[/itex] (or the stiffness of the spring).The red area in the diagram is the electromagnet that can produce a reasonably uniform field of any strength we choose. P.S. I haven't tried this before experimentally, so I'm not sure if this arrangement actually works but I think if a permanent magnet is attached to the other side of the spring, the electromagnet would compress the spring much more easily. Here is the diagram: I'm curious how we can determine the amount of [itex]\vec{B}[/itex] needed to compress the spring.
What compresses the spring in graph 2? Is the spring itself ferromagnetic? In which amount? For a ferromagnetic spring (or the case of a permanent magnet in the correct orientation) I would always expect some compression. Calculating this might be tricky, and it could even have more than one stable point. In any way, k alone does not help.
If the field is uniform, why would the spring compress? Is there a current going trough it? Otherwise, you need a non-uniform field. The magnetic force depends on the actual configuration of the field (its gradient). So another parameter to consider.
Yes you are right. What I really meant was that the red magnet in my diagram is an electromagnet. So you can obtain any magnitude of magnetic field you want by adjusting the number of turns per unit length and current in its solenoid since: [itex]B= \mu_0 \frac{N}{l} I[/itex] So, how do we relate the gradient of the field that you've mentioned to the spring? The spring itself is made of iron so it's ferromagnetic. My question is, how much [itex]\vec{B}[/itex] is sufficient to overcome the stiffness of the spring and compress it for a distance [itex]d[/itex]? What are the concepts/equations involved? If [itex]k[/itex] alone doesn't help then what other parameters do we need?
If you know the field gradient everywhere, it should be possible to evaluate the force on the individual parts of the spring - if you know how the spring looks like (will depend on its mass probably its geometry). If you have that, you can approximate your spring as system of a lot small springs with forces in between and maybe take the limit for infinitely small spring elements. In equilibrium positions, the summed forces at every position are 0. As you can imagine, the general situation is quite tricky. It might be possible to find some effective approximations, but I would really try to test this experimentally first. The permament magnet at the other side simplifies the situation, if you can neglect the magnetic forces inside the spring. In this case, you have a single, position-dependent force F(x) (given by the field gradient and your magnet), and the restoring force -kx of the spring. Solving F(x)-kx=0 will give you equilibrium positions.
In order to compress the spring, the force applied to the spring due to the magnetic field must overcome the spring's restoring force. We know what the restoring force would equal to. But what is the equation describing the magnitude of the force [itex]F[/itex] on the the spring due to [itex]\vec{B}[/itex]?
This depends on your geometry, the field gradient and your attached mass and its own magnetic field. The product of magnetic field and field gradient, integrated over the volume of the mass, should give a good approximation.
Oh, it will work. Why not investigate it by constructing a few? You might find that a spiral spring lends better lends itself to your experiment. I leave you to determine whether spiralling out, or spiralling in, with distance is the way to go. Good luck with the investigtion! Leave the maths for later, first come to grips with the practical.