Get the Accel Out

In OpenSees, a UniformExcitation pattern is functionally equivalent to a regular load pattern, fitting into the framework of a time-varying scalar load factor and constant reference load vector. The scalar load factor is the input ground acceleration, $\latex \ddot{u}_g(t)$, while the reference load vector is {\bf P}_{ref}=-{\bf m}{\boldsymbol \iota} where {\bf m} is the mass matrix and {\boldsymbol \iota} is the influence vector.

So, if we can get the load factor out of a regular load pattern using the getLoadFactor command, why can’t we get the ground acceleration out of a uniform excitation?

Although the ground acceleration history is a time series input, there are legitimate reasons to extract the ground acceleration from your OpenSees analysis:

  1. You want to make sure the ground acceleration was read correctly, e.g., you might miss a few leading or trailing values when reading records downloaded from ground motion databases;
  2. You want to make sure scale factors were applied correctly to the ground acceleration;
  3. You want to see the interpolated ground acceleration when your analysis time step is not equal to the digitization of the ground acceleration record; or
  4. Similar to 3., you want to see interpolated ground acceleration when your input excitation is an analytic function, e.g., using the Sine (Trigonometric) time series.

Prior to pull request #872, it was not possible to extract the ground acceleration used in a UniformExcitation pattern, at least not directly. Despite some gentle indirection between LoadPattern, GroundMotion, and TimeSeries objects, the implementation of UniformExcitation::getLoadFactor() was easy.

An SDF minimal working example demonstrates the use of getLoadFactor for a uniform excitation.

import openseespy.opensees as ops

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

m = 1.0
Tn = 0.5
wn = 2*3.14159/Tn
k = m*wn**2

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

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

g = 386.4 # in/sec^2

# Ground motion with 0.02 sec digitization
ops.timeSeries('Path',1,'-dt',0.02,'-filePath','tabasFN.txt','-factor',g,'-prependZero')
ops.pattern('UniformExcitation',23,1,'-accel',1,'-factor',1)

ops.analysis('Transient')

dt = 0.02 # Analysis time step
while ops.getTime() <= 1.0:
    ag = ops.getLoadFactor(23)
    u = ops.nodeDisp(2,1)
    ops.analyze(1,dt)

I showed the '-factor' option for both the time series and the uniform excitation as you can put the gravitational constant, g, in either command. When doing an incremental dynamic analysis, it makes sense to keep g on the time series and change the scale factor via the uniform excitation pattern. Both of the time series and pattern factors make their way into the output of the getLoadFactor command–play with the factors to see for yourself.

The first second of the ground acceleration and SDF displacement response is shown below with the analysis time step equal to the record digitization (0.02 sec).

Using a smaller analysis time step (0.01 sec) gives the following ground acceleration history and SDF displacement response.

Points are linearly interpolated from the input ground acceleration and the displacement response changes slightly, e.g., the maximum displacement over the brief 1 sec analysis changes from 0.09306 inch for the 0.02 sec time step to 0.09431 inch for 0.01 sec.

Now, figuring out how to get the ground acceleration, velocity, and displacement histories out of an OpenSees analysis for multiple support excitation will be more difficult.

3 thoughts on “Get the Accel Out

  1. Professor Scott, thank you for introducing this feature. It will be very helpful.

    Just a quick question, I assume the release of the ,exe (or the numbered version of OS release, like v.3.3 and v.3.4) so if we want to use it right now, we have to compile our OpenSees from source right?

    Thank you again!

    Like

    1. Sorry: little bit of correction

      I assume the release of the ,exe (or the numbered version of OS release, like v.3.3 and v.3.4) would still be in the far future, thus if we want to take advantage of the function right now..

      Like

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.