How Do You Model a Spring?

This was my greatest lecture. Yes, everyone has looked at springs before. But has anyone done all of this in one single lecture? Have they? Yes, they probably have. Here is my version. Stretching a Spring Here is a spring hanging vertically with a mass on the end – a 100 gram mass. The mass […]
I Photo
A spring. Image: Rhett Allain

This was my greatest lecture.

Yes, everyone has looked at springs before. But has anyone done all of this in one single lecture? Have they? Yes, they probably have. Here is my version.

Stretching a Spring

Here is a spring hanging vertically with a mass on the end - a 100 gram mass.

Image: Rhett Allain

The mass is just sitting there motionless. There is no acceleration and it is in equilibrium. What does this mean? This means that the net force in the y-direction (vertical direction) must be zero. I can draw a force diagram for this mass along with the forces as:

Summer 14 Sketches key

Since it's in equilibrium, if you know the mass you can find the force the spring exerts. What happens if you put a larger mass on the end of the spring? If you are careful, you can let go of the mass so that it stays in equilibrium. When this happens, the new larger mass will hang lower. The spring will stretch.

Let's put different masses on the spring and record how far it stretches. This is an actual picture of the chalk board in class.

Image: Rhett Allain

You can see the amount the spring has stretched (values on the right) and the mass on the spring. If I convert the mass to kilograms and multiply by the gravitational field, I get the spring force. Now, I can plot spring force vs. stretch (oh, convert stretch to meters instead of centimeters). Here is the data table.
plotlygraph
Yes, you can make that plotly graph right in class. It's that simple. And even if the data isn't perfect (it never is), you can get a nice linear fit. I didn't force the fit equation to go through the origin, but it shouldn't make much of a difference.

With this plot, you can see something awesome. The force a spring exerts is linearly proportional to the stretch of the spring. In fact, I could write an expression for the force a spring exerts as:

La te xi t 1

Here k could be called the spring constant and s is the amount the spring is stretched. For this particular spring, this constant would have a value equal to the slope of the linear function at 5.33 Newtons/meter. Yes, this is also called Hooke's law.

Oscillating a Spring

What happens when you pull down the mass just a little bit and let go? This happens:

Instead of looking at a very detailed analysis of the motion of this mass, let me just look at one thing: the period. How long does it take the mass to move up and then back down to its original position? Actually, this time is a bit short to easily measure with a stop watch. As a rough estimate, this mass oscillates 6 times in 7.3 seconds. That would give it a period of 1.2 seconds.

Of course, if I had more time I could put different mass on the spring and see how that changes the period. Remember, this is a lecture. I don't have much time.

Modeling the Motion of a Spring

I can't use the kinematic equations to find out how long a mass would take to oscillate. Why? Because as the mass moves down, the spring force changes. The key part of the kinematic equations is the idea that the acceleration is constant. If you have a changing force, you have a changing acceleration. The kinematic equations go out the door.

Are we lost then? No. We have numerical calculations. What if we look at the motion of a spring in just a very, very short time frame? In that short time frame, I can use the momentum principle to describe the change in motion of the mass. Here is how I could write that (in just the vertical direction so that these are scalars, not vectors).

La te xi t 1

Of course, this is the momentum principle and p = mv is the momentum. The second line gives the change in momentum over some time interval. It isn't correct since the spring force changes as it moves. But it's correct enough. This is the key to numerical calculations. I can use this to find the change in momentum. Also, since the time interval is short I can find the change in position.

La te xi t 1

So, in this short time interval I can find out the new momentum and the new position of the mass. However, since the time interval is so small I have to redo this calculation a bunch of times. A whole bunch of times. Since I really don't feel like doing that stuff, I'll have a computer do it.

Here is that program (you can play with it online if you have WebGL browser):

Glow Script ide

This program is simple enough that I can write it during the lecture class. Let me just point out a few lines to look at.

  • 3: this is the spring constant from previous experiment.
  • 8: I put the mass at about the same location below the spring as in the video.
  • 15: this line creates a graph. The data points are added to this plot in line 23.
  • 19: here I calculate the force. Notice that I don't even cheat. Usually when looking at a mass on a spring, humans usually just have the force from the spring. I don't do that. I have both the gravitational force AND the spring force.

You can run this program if you like. It shows a mass oscillating up and down - but it's not very exciting. Here is the cool part, the graph of position vs. time.

Glow Script ide

How long does it take the mass to get back to its starting point? You can see from the measurement tool that it has a period of 1.21 seconds. BOOM. Check that out. That's pretty much the same thing as in real life. I don't know about you, but this gets me pumped up. PUMPED.

But why is this awesome? Here is a simple graphic of what happened.

Summer 14 Sketches key

In general, this says "collect data" - "build a model" - "use the model to compare with data". This is how science works.

Conclusion

This was my greatest lecture. No one really learned that much.