OpenSees Cloud

OpenSees AMI

How to Apply Ground Motions in Multiple Directions

Original Post - 26 Nov 2023 - Michael H. Scott

Visit Structural Analysis Is Simple on Substack.


A common question is can I apply ground motions in more than one direction to a model in OpenSees?

The answer is Yes.

Let’s say you have files for three ground motion recordings: gm000.txt, gm090.txt, and gmUP.txt. Define a time series for each ground motion, then associate each time series with a uniform excitation load pattern and a global direction.

#
# Define your model, define g, don't forget mass
#

ops.timeSeries('Path',7,'-dt',0.02,'-filePath','gm000.txt','-factor',g)
ops.timeSeries('Path',8,'-dt',0.02,'-filePath','gm090.txt','-factor',g)
ops.timeSeries('Path',9,'-dt',0.02,'-filePath','gmUP.txt','-factor',g)

# direction = 1 (X), 2 (Y), 3 (Z)
ops.pattern('UniformExcitation',15,1,'-accel',7)
ops.pattern('UniformExcitation',16,3,'-accel',8)
ops.pattern('UniformExcitation',17,2,'-accel',9)

#
# Perform your analysis
#

While some specific element implementations assume Z is the global vertical axis, OpenSees itself does not make any such assumptions on the global axes of a model. I like to use the Y-axis as global vertical in my models, so that direction got the gmUP.txt time series. But you can use the Z-axis as global vertical if you want. Or don’t apply vertical ground motion at all, in which case you just remove the associated pattern.

After you have the patterns defined, you can perform the analysis as usual.