OpenSees Cloud

OpenSees AMI

OpenSees Restitution

21 Sep 2026 - Michael H. Scott


Despite complaints, OpenSees does not owe anyone compensation for non-convergent analyses. Upon review of the evidence, the damages are always found to be self-inflicted.

With the case closed, this post addresses how to confirm Newton’s law of restitution using OpenSees.

Elastic collision and impact problems involving the coefficient of restitution abound in rigid body dynamics textbooks. Flipping through my 7th edition of Hibbeler’s Engineering Mechanics: Dynamics, Problem 9-66 looked like a good candidate for verification.

A ball is thrown horizontally from a height of 3 ft with a speed of 8 ft/sec, then bounces once on a smooth surface and lands in a cup. What is the distance, d, to the cup if the coefficient of restitution between the ball and the surface is e=0.8?

The textbook solution is d=8.98 ft.

An OpenSees model for this problem is pretty simple. We will use a zero length element and the ViscoelasticGap material, implemented by Patrick Hughes. Other uniaxial materials, such as HertzDamp and JankowskiImpact, can model impact in a general zero length element. There are also specialized zero length elements for contact and impact.

Contact in the ViscoelasticGap material is based on a Kelvin-Voigt model where the contact damping ratio is related to the coefficient of restitution.

\[\zeta_c = \frac{-\log{e}}{\sqrt{\pi^2+\log^2{e}}}\]

Then, the contact damping is determined from the contact stiffness and the object mass.

\[c_c = 2\zeta_c\sqrt{k_c m}\]

The contact stiffness, kc, should be large enough to reasonably represent a rigid surface, but not so large there are convergence or time step issues. Of course, if the stiffness is too low, then it’s like the ball is bouncing off an energy-sucking foam mattress.

Now, let’s define the ViscoelasticGap model with gap parameter -3 ft, negative of the height at which the ball is thrown. The contact stiffness is set to kc=1e5 lb/ft, from which we can select an analysis time step. For this value of contact stiffness and the contact damping derived from the given coefficient of restitution, the contact duration is about 0.00175 sec. As a result, we will use an analysis time step of 1e-5 sec, which is small enough to resolve the contact duration.

import openseespy.opensees as ops
from math import pi,log

# Units = lb, ft, sec
lb = 1
ft = 1
sec = 1

g = 32.174*ft/sec**2

# Ball weight and mass
W = 1*lb
m = W/g

# Initial height and velocity
h0 = 3*ft
v0 = 8*ft/sec 

# Coefficient of restitution
e = 0.8

# Contact stiffness and damping
Kc = 1e5*lb/ft
zetac = -log(e)/(pi**2+(log(e)**2))**0.5
Cc = 2*zetac*(Kc*m)**0.5

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

ops.node(1,0,0); ops.fix(1,1,1)
ops.node(2,0,h0); ops.mass(2,m,m)

ops.uniaxialMaterial('ViscoelasticGap',1,Kc,Cc,-h0)

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

# Gravity
ops.timeSeries('Constant',1)
ops.pattern('Plain',1,1)
ops.load(2,0,-W)

# Initial velocity
ops.setNodeVel(2,1,v0,'-commit')

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

# Analysis duration and time step
Tfinal = 8.98*ft/v0
dt = 1e-5*sec 
Nsteps = int(Tfinal/dt)

for i in range(Nsteps):
    ops.analyze(1,dt)

A plot of its trajectory shows the ball bounces once, then lands in the cup at d=8.98 ft from the launch point.

To verify that the simulation reproduced the specified coefficient of restitution, we can examine the ball’s impact and rebound speeds. On the ball’s first bounce (impact), the vertical speed is 13.89 ft/sec. Immediately after rebound, the vertical speed is 11.10 ft/sec. The ratio of the rebound speed to the impact speed is 11.10/13.89=0.7991, which is approximately 0.8, the specified coefficient of restitution. We could increase the contact stiffness to get closer to 0.8, but that’s not necessary.

By now, you must be ready to get back to your IDAs of reinforced concrete moment frames. This post is the only restitution you’re going to get out of OpenSees.