OpenSees Cloud

OpenSees AMI

Earthquake Engineering Experts Hate Me for This One Weird Trick

Original Post - 10 Jun 2024 - Michael H. Scott

Visit Structural Analysis Is Simple on Substack.


I was a structural engineer who dabbled in earthquake engineering simulation. Then one day I stumbled upon a weird trick to get ground displacement history from a ground acceleration record. The trick was simple. It worked right away. I couldn’t believe it.

The trick did not require additional libraries or writing a loop. Just a simple addition to any dynamic analysis. It cost very little when done properly.

Then came the blowback. The ground motion experts said “You’re not using baseline corrected acceleration records”. The finite element experts said “You introduced rigid body modes”.

Despite the problems, I was determined to share this weird trick with the OpenSees community.

But what is OpenSees? OpenSees is the Open System for Earthquake Engineering Simulation, a finite element software framework for simulating the response of structural and geotechnical systems to earthquakes and other natural hazards such as wind and tsunamis.

OpenSees is written in C++ and links to Fortran-based packages for solving linear systems of equations. Users interact with OpenSees by writing scripts in either Tcl or Python. Users can also build and analyze OpenSees models in the cloud from any device.

Sign up for a free OpenSees Cloud account today!

In addition to state of the art finite element models, OpenSees was built for high performance computing (HPC). Users can run OpenSees for embarrassingly parallel applications, e.g., with many earthquake records, or for partitioning large models across multiple processors. If you don’t want to buy expensive hardware or wait for days in a job queue, you can create an Amazon Machine Image (AMI) with the latest OpenSees and MPI already installed, just minutes away from fulfilling your HPC needs.

Launch an OpenSees AMI with up to 384 GB RAM and 96 CPUs!

Whether using Tcl or Python, on a personal device or in the cloud, many users of OpenSees input ground accelerations via the UniformExcitation load pattern with a time series that contains the ground acceleration record.

Unlike a MultipleSupport load pattern, which imposes different ground motions at discrete locations in an OpenSees model, a UniformExcitation load pattern imposes the same ground motion to the entire model.

However, a UniformExcitation does not actually move the ground during an OpenSees analysis. Instead, the pattern imposes effective earthquake forces to the dynamic DOFs of the model, in the direction of excitation.

The motion of the ground is generally important in earthquake engineering, not just for demand parameters, but also for viewing the model response. Several model viewers are available for OpenSees, including an in-browser, three.js viewer in OpenSees Cloud.

Sign up for a free OpenSees Cloud account today!

Consider an OpenSees model with a single node having unit mass for each DOF along with a uniform excitation.

import openseespy.opensees as ops

g = 386.4

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

ops.node(1,0,0)
ops.mass(1,1,1,1)

ops.recorder('Node','-file','groundD.out','-time','-node',1,'-dof',1,'disp')
ops.recorder('Node','-file','groundV.out','-time','-node',1,'-dof',1,'vel')

ops.timeSeries('Path',1,'-dt',0.02,'-filePath','tabasFN.txt','-factor',g)
ops.pattern('UniformExcitation',1,1,'-accel',1)

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

T = 50
dt = 0.01
Nsteps = int(T/dt)
ops.analyze(Nsteps)

What will be the displacement response of the node? Will the displacement response be zero because the node is not connected to the “ground”? Can the displacement even be computed when the node is not connected to an element? Will the displacement be infinity because the eigenvalues for this model are all zero?

It turns out the nodal displacement response will be the ground displacement, double integrated from the input ground acceleration record. In addition, the velocity response of the node will be the ground velocity.

Ground displacement and velocity

Nothing all that weird, really. We’re just using Newmark to integrate an acceleration record.

And yeah, this ground acceleration record was not baseline corrected–the final ground velocity is non-zero and the ground continues to displace indefinitely after the acceleration record stops.

This trick is still useful though. But to get the ground displacement, you may not want to run separate, single node analyses for every acceleration record in your suite of ground motions. You may prefer to get the ground displacement during your regular OpenSees analysis, e.g., when performing nonlinear response history analyses for hundreds of ground motions in parallel on cloud-based HPC resources.

Launch an OpenSees AMI with up to 384 GB RAM and 96 CPUs!

After you define your model, define an extra node, then run your analysis for uniform excitation.

import openseespy.opensees as ops

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

#
# Define your model
#

nodeTag = max(ops.getNodeTags()) + 1 # Unique tag
ops.node(nodeTag,0,0,0)
ops.mass(nodeTag,1,1,1,1,1,1)

dir = 1 # 1=X, 2=Y, 3=Z
ops.recorder('Node','-file','groundD.out','-time','-node',nodeTag,'-dof',dir,'disp')
ops.recorder('Node','-file','groundV.out','-time','-node',nodeTag,'-dof',dir,'vel')

#
# Define your uniform excitation
#

#
# Perform your analysis
#

Keep in mind that if you issue the eigen command on your model, the default eigenvalue solver will fail due to a singular stiffness matrix created by the extra node. You will have to use the dreaded fullGenLapack option instead, which will be a death sentence for your 3D frame analysis run times. In addition, the extra node will make the first NDF eigenvalues zero, which you can deal with.

Sign up for a free OpenSees Cloud account today!

If these issues are too much to handle, you can always find ground displacement and velocity separate from your model and analysis.

At any rate, post-process your recorder files and do whatever you wish with the ground velocity and displacement. I’ll keep making OpenSees more useful, one weird trick at a time.



I am often told I’m too subtle. So, if you didn’t realize it, I wrote this post in the style of an online chum article, with a clickbait “one weird trick” headline, several paragraphs of extraneous content before getting to the main point, and ads throughout.