Getting Started with OpenSees -- Lateral Loads -- Dynamic ground motion - OpenSeesWiki

Getting Started with OpenSees -- Lateral Loads -- Dynamic ground motion

From OpenSeesWiki

Jump to: navigation, search




The following commands assume that the example.tcl and the gravityloads.tcl files have been run. The wipe command should be used at the beginning of the input to clear any previous OpenSees-objects definition:

wipe
source example.tcl
source gravityloads.tcl

The dynamic ground-motion analysis is a transient, rather than static, type of analysis. Therefore, most of the analysis components should be redefined.

First of all, the load pattern needs to be defined. The load pattern here consists of defining an acceleration time-history applied at the support nodes. The time-history is defined in a file named BM68elc.th, taken from the PEER strong-motion database. The first lines of this file are:

PACIFIC ENGINEERING AND ANALYSIS STRONG-MOTION DATA
BORREGO MOUNTAIN 04/09/68 0230, EL CENTRO ARRAY #9, 270 
ACCELERATION TIME HISTORY IN UNITS OF G 
NPTS= 4000, DT= .01000 SEC
-.1368849E-02 -.1659410E-02 -.1466880E-02 -.6865326E-03 -.6491235E-03
-.6172128E-03 -.5942289E-03 -.5720329E-03 -.5517003E-03 -.5367939E-03
-.5300330E-03 -.5315104E-03 -.5389920E-03 -.5492582E-03 -.5592027E-03
-.5659958E-03 -.5672101E-03 -.5617805E-03 -.5502959E-03 -.5347288E-03
-.5176619E-03 -.5013709E-03 -.4873454E-03 -.4763228E-03 -.4683559E-03
-.4626830E-03 -.4579708E-03 -.4512405E-03 -.4376077E-03 -.4130071E-03
-.3772566E-03 -.3363394E-03 -.3030926E-03 -.2926074E-03 -.3144186E-03
-.3668375E-03 -.4373818E-03 -.5104884E-03 -.5745380E-03 -.6248976E-03


A number of tcl scripts are available to the user at the openSees web site which have been written for specific tasks. The file ReadSMDFile.tcl is a script procedure which parses a ground motion record from the PEER strong motion database by finding dt in the record header, then echoing data values to the output file. This file should be saved in the same directory as the OpenSees executable:

# --------------------------------------------------------------------
# READSMDFILE.tcl
# Written: MHS
# Date: July 2000
# A procedure which parses a ground motion record from the PEER strong motion database by finding dt in the record header, then
# echoing data values to the output file. Formal arguments
# inFilename -- file which contains PEER strong motion record
# outFilename -- file to be written in format G3 can read
# dt -- time step determined from file header
# Assumptions
# The header in the PEER record is, e.g., formatted as follows:
# PACIFIC ENGINEERING AND ANALYSIS STRONG-MOTION DATA
# IMPERIAL VALLEY 10/15/79 2319, EL CENTRO ARRAY 6, 230 
# ACCELERATION TIME HISTORY IN UNITS OF G 
# NPTS= 3930, DT= .00500 SEC
 
proc ReadSMDFile {inFilename outFilename dt} {
  # Pass dt by reference
  upvar $dt DT
 
  # Open the input file and catch the error if it can't be read
  if [catch {open $inFilename r} inFileID] {
    puts stderr "Cannot open $inFilename for reading"
  } else {
    # Open output file for writing
    set outFileID [open $outFilename w]
    # Flag indicating dt is found and that ground motion
    # values should be read -- ASSUMES dt is on last line
    # of header!!!
    set flag 0
    # Look at each line in the file
    foreach line [split [read $inFileID] \n] {
      if {[llength $line] == 0} {
        # Blank line --> do nothing
        continue
      } elseif {$flag == 1} {
        # Echo ground motion values to output file
        puts $outFileID $line
      } else {
        # Search header lines for dt
        foreach word [split $line] {
          # Read in the time step
          if {$flag == 1} {
            set DT $word
            break
          }
          # Find the desired token and set the flag
          if {[string match $word "DT="] == 1} {
            set flag 1
          }
        }
      }
    }
 
    # Close the output file
    close $outFileID
 
    # Close the input file
    close $inFileID
  }
}
# --------------------------------

Once this file has been created, it can be read-in by the input file and used in the analysis procedure, where an acceleration time-series is defined and used in a UniformExcitation load pattern:

Series -dt $dt -filePath $fileName <-factor $cFactor>
pattern UniformExcitation $patternTag $dir -accel (TimeSeriesType arguments) <-vel0 $ver0>
 
# create load pattern
source ReadSMDFile.tcl
ReadSMDFile BM68elc.th BM68elc.acc dt
set accelSeries "Series -dt $dt -filePath BM68elc.acc -factor 1";
pattern UniformExcitation 2 1 -accel $accelSeries

The stiffness and mass-proportional damping factors can then be defined using the rayleigh command:

rayleigh $alphaM $betaK $betaKinit $betaKcomm There are three different stiffnesses the user can use, the current value, the initial value, or the stiffness at the last committed state (which is what is used here):

# set damping factors
rayleigh 0. 0. 0. [expr 2*0.02/pow([eigen 1],0.5)]
The various analysis components are defined as follows:
 
# create the analysis
wipeAnalysis
constraints Plain
numberer RCM
system UmfPack
test NormDispIncr 1.0e-8 10
algorithm Newton
integrator Newmark 0.5 0.25 
analysis Transient

In a transient analysis, the analyze command also requires a time step. This time step does not have to be the same as the input ground motion. The number of time steps is equal to the total duration of the analysis (10 seconds) divided by the time step (0.02):

analyze [expr 10/0.02] 0.02





Return to Getting Started with OpenSees

Personal tools