Interpolation of Ground Acceleration

There was a question on GitHub a few months about whether or not OpenSees uses linear interpolation when the analysis time step is smaller than the time step (digitization) of an input ground acceleration.

This is a good question as I’ve used other software that does not interpolate and instead uses the acceleration of the closest data point, turning the acceleration record into a bar chart instead of a line graph. However, this is not a big deal for practically all ground motion records.

Anyway, the short answer is “Yes, OpenSees uses linear interpolation”.

This post provides the long answer though, i.e., “Yes, and here’s one way to figure it out”.

Ground acceleration records end up in a Path time series in OpenSees, so all we have to do is define a linear ground acceleration using two temporally distant points, e.g., (0,0) and (2,-g), then see if the response is the expected oscillation about a ramp function, or something else.

import openseespy.opensees as ops


g = 386.4
m = 1.0
Tn = 0.2
k = m*(2*3.14159/Tn)**2

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


time = [0,2]
accel = [0,-g]



Tf = 1.0
dt = 0.02
Nsteps = int(Tf/dt)

for i in range(Nsteps):

Using an analysis time step much smaller than the time between the ground acceleration data points, the results show the dynamic response oscillates about the static solution for a linearly increasing load.

Thus, OpenSees linearly interpolates the ground acceleration between the two points that define the time series.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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