# A Continuous Solution for Mass/Spring w/ Friction

• I
• erobz
erobz
Homework Helper
Gold Member

Suppose we have mass ##m## attached to spring with constant ##k##, and some coefficient of kinetic friction ##\mu## between the mass and the surface. Its displaced from equilibrium by some distance ##x## at ## t = 0 ##. I've come up with the following ODE to described ##x(t)## using the Heavyside Step Function to capture the changing in direction of the frictional force as a function of ##\dot x ##:

$$m \ddot x = - kx + \mu m g \left( 1 - \frac{2}{1+ e^{- \beta \dot x}} \right)$$

where ##\beta## is some arbitrarily large positive constant.

I don't suspect that to have an analytical solution, but what are the alternatives for this type of problem?

erobz said:
what are the alternatives for this type of problem?
Why not a damped harmonic oscillator?

Frabjous said:
Why not a damped harmonic oscillator?
I suppose because of the lack of dependency of the friction force on ##\dot x ##?

erobz said:
I suppose because of the lack of dependency of the friction force on ##\dot x ##?
How do you mean that? The damped harmonic oscillator equation is $$m\ddot x =-c\dot x-kx.$$

kuruman said:
How do you mean that? The damped harmonic oscillator equation is $$m\ddot x =-c\dot x-kx.$$
Because the force of kinetic friction is constant in magnitude. The "kink" I'm asking about is the changing direction of that force depending on whether the mass is heading to the left or right. Thats why I introduce the Heavyside function.

Frabjous said:
I am not sure that you wrote your equation correctly in the OP.
I didn't catch anything.

if ##\dot x = 0 ## the entire factor (in parenthesis) on the last term is ##\approx 0## ( for an instant )

if ## \dot x > 0 ## ( mass heading to the right ) the factor is ##\approx -1## (friction pointing to the left).

if ##\dot x < 0 ## ( mass heading to the left ) the factor is ##\approx 1## (friction pointing to the right )

What did I miss?

Last edited:
erobz said:
What did I miss?
That I am an idiot.

erobz
Frabjous said:
That I am an idiot.
I know better than that!

Frabjous
Frabjous said:
I'll try to give them some consideration. First impression is they are treating it in a more sophisticated manner.

You could iterate with Green‘s Functions. I do not know if the solution converges.

Frabjous said:
You could iterate with Green‘s Functions. I do not know if the solution converges.
I'd have to go back to school for that!

erobz said:
Because the force of kinetic friction is constant in magnitude. The "kink" I'm asking about is the changing direction of that force depending on whether the mass is heading to the left or right.
See, e.g., this 2007 article from The Physics Teacher: An Oscillating System with Sliding Friction
The author considers the damped oscillator equation:$$m\ddot{x}=-k\left(x-x_{0}\right)\pm f$$where ##m## is the oscillator mass, ##k## the spring constant, ##x_0## the equilibrium position and ##f## is the constant magnitude of the friction force. With the initial condition that the spring is released from rest at the right turning-point ##A_0##, the solution is found to be:$$x\left(t\right)=\left(A_{0}-\frac{f}{k}\left(2n+1\right)\right)\cos\left(\omega_{0}t\right)+\left(-1\right)^{n}\frac{f}{k}+x_{0}$$ Here, ##\omega_{0}\equiv\sqrt{\frac{k}{m}}## is the oscillation frequency and ##n## counts the number of half-cycles of motion. Note that this solution ceases to apply when the motion stops; i.e., when the spring force is insufficient to overcome static friction at a turning point.

vanhees71 and erobz
renormalize said:
See, e.g., this 2007 article from The Physics Teacher: An Oscillating System with Sliding Friction
The author considers the damped oscillator equation:$$m\ddot{x}=-k\left(x-x_{0}\right)\pm f$$where ##m## is the oscillator mass, ##k## the spring constant, ##x_0## the equilibrium position and ##f## is the constant magnitude of the friction force. With the initial condition that the spring is released from rest at the right turning-point ##A_0##, the solution is found to be:$$x\left(t\right)=\left(A_{0}-\frac{f}{k}\left(2n+1\right)\right)\cos\left(\omega_{0}t\right)+\left(-1\right)^{n}\frac{f}{k}+x_{0}$$ Here, ##\omega_{0}\equiv\sqrt{\frac{k}{m}}## is the oscillation frequency and ##n## counts the number of half-cycles of motion. Note that this solution ceases to apply when the motion stops; i.e., when the spring force is insufficient to overcome static friction at a turning point.
I don't understand how ##n## is computed or utilized. is it ##n=1## the e.o.m up to the first turning point? Then ##n = 2 ## between the first and second turning points? It's no big deal, I'm probably not to shell out $200 to read the paper though. erobz said: I don't understand how ##n## is computed or utilized. is it ##n=1## the e.o.m up to the first turning point? Then ##n = 2 ## between the first and second turning points? It's no big deal, I'm probably not to shell out$200 to read the paper though.
##n=0## at ##t=0## and then increments by ##+1## every time the oscillator passes through a subsequent turning point. So the overall amplitude ##A_{0}-\frac{f}{k}\left(2n+1\right)## gets smaller each half-cycle (i.e., the oscillator is being damped) as time progresses:

And as I did, you can google "oscillation sliding friction" to find a wealth of free resources.

Motore and erobz
If I was playing with data, I would try correcting A (=√(2E/k)) with Edissipated=Ffriction times distance travelled

renormalize said:
See, e.g., this 2007 article from The Physics Teacher: An Oscillating System with Sliding Friction
The author considers the damped oscillator equation:$$m\ddot{x}=-k\left(x-x_{0}\right)\pm f$$where ##m## is the oscillator mass, ##k## the spring constant, ##x_0## the equilibrium position and ##f## is the constant magnitude of the friction force. With the initial condition that the spring is released from rest at the right turning-point ##A_0##, the solution is found to be:$$x\left(t\right)=\left(A_{0}-\frac{f}{k}\left(2n+1\right)\right)\cos\left(\omega_{0}t\right)+\left(-1\right)^{n}\frac{f}{k}+x_{0}$$ Here, ##\omega_{0}\equiv\sqrt{\frac{k}{m}}## is the oscillation frequency and ##n## counts the number of half-cycles of motion. Note that this solution ceases to apply when the motion stops; i.e., when the spring force is insufficient to overcome static friction at a turning point.
That's the correct equation of motion! I'd have written, however
$$m \ddot{x}=-k (x-x_0) -f \sign(\dot{x}).$$
You have to solve it piecewise starting from the initial conditions. You get harmonic motion in each interval, where ##\dot{x}## stays positive or negative. At times, where ##\dot{x}## changes sign also the friction force does, and that's why the harmonic motion changes according to this changed sign.

vanhees71 said:
That's the correct equation of motion! I'd have written, however
$$m \ddot{x}=-k (x-x_0) -f \sign(\dot{x}).$$
You have to solve it piecewise starting from the initial conditions. You get harmonic motion in each interval, where ##\dot{x}## stays positive or negative. At times, where ##\dot{x}## changes sign also the friction force does, and that's why the harmonic motion changes according to this changed sign.
I did that not too long ago. However, I added one more condition to be able to consider the difference between dynamic friction and static friction. Setting both values to be the same so it's closer to OP causes this result for the following initial conditions.
##m=1##; ##\mu_{dyn}=\mu_{stat}=0.5##; ##g=10##; ##x_0=6##; ##v_0=0##; ##k=5##
(I know, ##g=10m/s^2## feels bad. But the computer goes crazy otherwise. I'll show you what happens later if I try that).

If I try to write ##g=9.8## (or many other inputs) it seems the computer doesn't have enough precision when the mass is almost stopped because the friction force pushes it too far from equilibrium and it starts bouncing like crazy around that point. I could totally code that behavior out of the equations but I didn't do it. All plots are the same except those showing acceleration.
Lastly, as I said I added a condition to be able to catch the difference in static and dynamic friction. As a result, for some initial conditions, the mass can come to a stop at a point different than ##x=0##.
##m=1##; ##\mu_{dyn}=0.5##; ##\mu_{stat}=1.5##; ##g=10##; ##x_0=6##; ##v_0=0##; ##k=5##

By the way, I'm not sure about the results I got. I suspect there might be some minor bugs about the point where the mass changes direction but the results feel right on a first look. Feedback is welcome.

erobz said:
I don't suspect that to have an analytical solution, but what are the alternatives for this type of problem?
I hope this approach helps.

• Classical Physics
Replies
63
Views
3K
• Classical Physics
Replies
13
Views
1K
• Classical Physics
Replies
6
Views
626
• Introductory Physics Homework Help
Replies
2
Views
1K
• Classical Physics
Replies
131
Views
5K
• Introductory Physics Homework Help
Replies
2
Views
531
• Classical Physics
Replies
3
Views
738
• Introductory Physics Homework Help
Replies
6
Views
346
• Mechanics
Replies
4
Views
1K
• Classical Physics
Replies
17
Views
1K