Two Sprung Masses and Some Friction Force

In Problem 13-13 from Hibbeler 14th edition, blocks A and B, of weight 8 lb and 6 lb, respectively, rest on a flat surface. A spring of stiffness 20 lb/ft is placed between the blocks. The blocks are pushed together, compressing the spring 0.2 ft, then the blocks are released to slide along the surface. The coefficient of kinetic friction between the blocks and the surface is 0.2.

  • What is the acceleration of the blocks the instant after they are released? (This is what the textbook problem asks).
  • How far do the blocks slide before coming to a stop? (Not asked in the textbook, I added this question for kicks).

There’s more than one approach to modeling this problem in OpenSees. I used three nodes–a node for block A, a node for block B, and a reaction node. All three nodes are at the same location. Although it could be taken into account, the initial length of the spring is not important.

I assume the spring is not attached to the blocks, so the uniaxial material for the spring element is elastic-no-tension (ENT) instead of Elastic. To represent the initial spring compression, I used the InitStrain wrapper material.

import openseespy.opensees as ops

# Units = lb, ft, sec

g = 32.2

WA = 8 # Weight of block A
WB = 6 # and block B
k = 20 # Spring stiffness
s0 = 0.2 # Initial spring compression
mu = 0.2 # Coefficient of kinetic friction

ops.wipe()
ops.model('basic','-ndm',1,'-ndf',1)

ops.node(0,0); ops.fix(0,1)
ops.node(1,0); ops.mass(1,WA/g)
ops.node(2,0); ops.mass(2,WB/g)

ops.uniaxialMaterial('ENT',1,k)
ops.uniaxialMaterial('InitStrain',2,1,-s0)

ops.element('zeroLength',1,1,2,'-mat',2,'-dir',1)

Modeling kinetic friction is not so straightforward with OpenSees. There are several friction models available for friction bearing elements; however, the elements assume their connected nodes have rotational DOFs, which is suitable for frame models, but gets cumbersome for dinky little problems of particle kinematics like the one at hand.

Fortunately, there is a CoulombDamper uniaxial material which can be used with zero length elements. The material takes an initial stiffness and friction force as inputs. For this analysis, the initial stiffness can be zero and the friction force is the product of the coefficient of kinetic friction and the weight of each block (normal force between each block and the surface). These materials connect each block with the reaction node.

ops.uniaxialMaterial('CoulombDamper',11,0,mu*WA)
ops.uniaxialMaterial('CoulombDamper',12,0,mu*WB)

ops.element('zeroLength',2,0,1,'-mat',11,'-dir',1)
ops.element('zeroLength',3,0,2,'-mat',12,'-dir',1)

Yeah, I’m kinda cheating because I know the normal force a priori. In general, the normal force should be calculated during the analysis. To that end, I could use the FlatSliderBearing element and the Coulomb friction model, but I don’t want to deal with rotational DOFs and all the extra stuff that comes with these elements. Another option would be to write a zero length friction element. I don’t want to deal with that either.

At any rate, with the model defined, we can start the analysis.

ops.analysis('Transient','-noWarnings')

dt = 0.005
Tmax = 0.5
while ops.getTime() < Tmax:
   ops.analyze(1,dt)

The spring force and motion of the blocks are plotted below. The initial acceleration is 9.66 ft/s2 for block A (to the left) and 15.0 ft/s2 for block B (to the right). These results match the answers in the back of the book!

The block motions pass all the standard checks. The spring force is zero and the block accelerations are constant after the spring decompresses, the velocities are maximized when accelerations are zero, etc.

When the blocks stop moving, the acceleration flip flops due to the friction model compensating for small velocities oscillating around zero. Numerical damping can help. Adjusting the Newmark parameters to \gamma=0.6 and \beta=0.3 will provide some numerical damping while maintaining stability. But we lose second order accuracy, which is not a big deal for this problem.

ops.integrator('Newmark',0.6,0.3)

Re-running the analysis with numerical damping gives the results below. The acceleration decays pretty quickly after the blocks stop moving.

The plots make sense, but an animation brings the results to life.

Attempt this analysis yourself and make some changes. How far do the blocks move when the ends of the spring stay attached to the blocks? Change the spring material from ENT to Elastic. Can you increase the coefficient of friction to the point where the blocks don’t move at all?


The title of this post is a play on the chorus “two turntables and a microphone” from Beck’s “Where It’s At”.

One thought on “Two Sprung Masses and Some Friction Force

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.