4.1.3. Elastic Frame Dynamic Example
4.1.3.1. Introduction
This example uses the same three story, three bay elastic frame as the Elastic Frame Pushover Example. Instead of applying static lateral loads, the frame, after the gravity loads have been applied, is subjected to a ground motion: the 1940 Imperial Valley (El Centro, 180 component) record, applied at the base with a uniform excitation pattern. An eigenvalue analysis is used to determine the periods of the structure and the coefficients for Rayleigh damping, and a transient analysis is then performed using the Newmark method.
The complete scripts are available here: ElasticFrameTransient.tcl (Tcl) and ElasticFrameTransient.py (Python). They need the ground motion record IELC180.AT2 and, for Tcl, the procedure ReadRecord.tcl, placed in the same folder as the script.
Note
All lines that begin with # are comments. They are ignored by the interpreter but are useful for documenting the code.
For brevity it is possible to put a comment after a command by using the ; to signify the end of the command (Tcl).
The whole script is shown below, in the order in which it appears in the file, split into sections. The model and the gravity analysis are taken from the Elastic Frame Pushover Example.
4.1.3.2. Parameters
Before we build the model we set some parameters using variables and expression evaluation: PI, the gravitational constant g, the floor loads, and from these the floor masses and the distributed beam loads. For the dynamic analysis we also set the name of the ground motion record, the damping ratio, and the two modes in which this damping ratio is specified (see Rayleigh Damping below). In Tcl we use the set and expr commands; in Python these are ordinary variable assignments, and the math module and the OpenSees module are imported first.
#
# set some parameters
#
set PI [expr 2.0 * asin(1.0)]
set g 386.4
set ft 12.0
set Load1 1185.0
set Load2 1185.0
set Load3 970.0
set record IELC180; # ElCentro Motion
set zeta 0.02; # 2% damping
set modeI 1; # first mode damping pinned to (mode 1)
set modeJ 3; # second mode damping pinned to (mode 3)
# set floor masses
set m1 [expr $Load1/(4*$g)]; # 4 nodes per floor
set m2 [expr $Load2/(4*$g)]
set m3 [expr $Load3/(4*$g)]
# set floor distributed loads
set w1 [expr $Load1/(90*$ft)]; # frame 90 ft long
set w2 [expr $Load2/(90*$ft)]
set w3 [expr $Load3/(90*$ft)]
import math
import openseespy.opensees as ops
#
# set some parameters
#
PI = 2.0 * math.asin(1.0)
g = 386.4
ft = 12.0
Load1 = 1185.0
Load2 = 1185.0
Load3 = 970.0
record = 'IELC180' # ElCentro Motion
zeta = 0.02 # 2% damping
modeI = 1 # first mode damping pinned to (mode 1)
modeJ = 3 # second mode damping pinned to (mode 3)
# set floor masses
m1 = Load1 / (4 * g) # 4 nodes per floor
m2 = Load2 / (4 * g)
m3 = Load3 / (4 * g)
# set floor distributed loads
w1 = Load1 / (90 * ft) # frame 90 ft long
w2 = Load2 / (90 * ft)
w3 = Load3 / (90 * ft)
4.1.3.3. Model and Gravity Analysis
The model, the gravity loads and the gravity analysis are taken from the previous example, the Elastic Frame Pushover Example, where they are explained in more detail. In summary:
The nodes are created, with the floor masses assigned to the nodes of each floor. The masses are needed for the eigenvalue and the dynamic analysis.
The nodes at the base are fixed.
The columns are elastic beam-column elements with a PDelta transformation, and the beams elastic beam-column elements with a Linear transformation.
A load pattern with the distributed gravity loads on the beams is created.
The gravity analysis is performed in one step, using a Newton algorithm (the PDelta transformation makes the response geometrically nonlinear).
The gravity loads are then held constant with loadConst, which also resets the time in the domain to 0.0, so that the ground motion starts at time 0.0 with the gravity loads in place.
Note
Because the model is planar and is comprised of beam-column elements, the spatial dimension of the mesh (ndm) is specified as 2 and the nodes are specified to have 3 degrees-of-freedom (two translations and a rotation).
# ------------------------------
# Start of model generation
# ------------------------------
# Remove existing model
wipe
# Create ModelBuilder (with two-dimensions and 3 DOF/node)
model BasicBuilder -ndm 2 -ndf 3
# Create nodes
# ------------
# Create nodes & add to Domain - command: node nodeId xCrd yCrd <-mass $massX $massY $massRz>
# NOTE: mass is optional
node 1 0.0 0.0
node 2 360.0 0.0
node 3 720.0 0.0
node 4 1080.0 0.0
node 5 0.0 162.0 -mass $m1 $m1 0.0
node 6 360.0 162.0 -mass $m1 $m1 0.0
node 7 720.0 162.0 -mass $m1 $m1 0.0
node 8 1080.0 162.0 -mass $m1 $m1 0.0
node 9 0.0 324.0 -mass $m2 $m2 0.0
node 10 360.0 324.0 -mass $m2 $m2 0.0
node 11 720.0 324.0 -mass $m2 $m2 0.0
node 12 1080.0 324.0 -mass $m2 $m2 0.0
node 13 0.0 486.0 -mass $m3 $m3 0.0
node 14 360.0 486.0 -mass $m3 $m3 0.0
node 15 720.0 486.0 -mass $m3 $m3 0.0
node 16 1080.0 486.0 -mass $m3 $m3 0.0
# Set the boundary conditions - command: fix nodeID xRestrnt? yRestrnt? rZRestrnt?
fix 1 1 1 1
fix 2 1 1 1
fix 3 1 1 1
fix 4 1 1 1
# Define geometric transformations for beam-column elements
geomTransf Linear 1; # beams
geomTransf PDelta 2; # columns
# Define elements
# Create elastic beam-column - command: element elasticBeamColumn eleID node1 node2 A E Iz geomTransfTag
# Define the Columns
element elasticBeamColumn 1 1 5 75.6 29000.0 3400.0 2; # W14X257
element elasticBeamColumn 2 5 9 75.6 29000.0 3400.0 2; # W14X257
element elasticBeamColumn 3 9 13 75.6 29000.0 3400.0 2; # W14X257
element elasticBeamColumn 4 2 6 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 5 6 10 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 6 10 14 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 7 3 7 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 8 7 11 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 9 11 15 91.4 29000.0 4330.0 2; # W14X311
element elasticBeamColumn 10 4 8 75.6 29000.0 3400.0 2; # W14X257
element elasticBeamColumn 11 8 12 75.6 29000.0 3400.0 2; # W14X257
element elasticBeamColumn 12 12 16 75.6 29000.0 3400.0 2; # W14X257
# Define the Beams
element elasticBeamColumn 13 5 6 34.7 29000.0 5900.0 1; # W33X118
element elasticBeamColumn 14 6 7 34.7 29000.0 5900.0 1; # W33X118
element elasticBeamColumn 15 7 8 34.7 29000.0 5900.0 1; # W33X118
element elasticBeamColumn 16 9 10 34.2 29000.0 4930.0 1; # W30X116
element elasticBeamColumn 17 10 11 34.2 29000.0 4930.0 1; # W30X116
element elasticBeamColumn 18 11 12 34.2 29000.0 4930.0 1; # W30X116
element elasticBeamColumn 19 13 14 20.1 29000.0 1830.0 1; # W24X68
element elasticBeamColumn 20 14 15 20.1 29000.0 1830.0 1; # W24X68
element elasticBeamColumn 21 15 16 20.1 29000.0 1830.0 1; # W24X68
# Define loads for Gravity Analysis
# ---------------------------------
# Create a Linear TimeSeries (load factor varies linearly with time): command timeSeries Linear $tag
timeSeries Linear 1
# Create a Plain load pattern with a linear TimeSeries:
# command pattern Plain $tag $timeSeriesTag { $loads }
pattern Plain 1 1 {
eleLoad -ele 13 14 15 -type -beamUniform -$w1
eleLoad -ele 16 17 18 -type -beamUniform -$w2
eleLoad -ele 19 20 21 -type -beamUniform -$w3
}
# ---------------------------------
# Create Analysis for Gravity Loads
# ---------------------------------
# Create the system of equation, a SPD using a band storage scheme
system BandSPD
# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer RCM
# Create the constraint handler, a Plain handler is used as homo constraints
constraints Plain
# Create the integration scheme, the LoadControl scheme using steps of 1.0
integrator LoadControl 1.0
# Create the convergence test and the solution algorithm, a Newton algorithm
test NormDispIncr 1.0e-10 6
algorithm Newton
# create the analysis object
analysis Static
# ---------------------------------
# Perform Gravity Analysis
# ---------------------------------
analyze 1
# ----------------------------------------------------
# set gravity loads constant and time in domain to 0.0
# ----------------------------------------------------
loadConst -time 0.0
# ------------------------------
# Start of model generation
# ------------------------------
# Remove existing model
ops.wipe()
# Create ModelBuilder (with two-dimensions and 3 DOF/node)
ops.model('BasicBuilder', '-ndm', 2, '-ndf', 3)
# Create nodes & add to Domain - command: node(nodeId, xCrd, yCrd, '-mass', massX, massY, massRz)
# NOTE: mass is optional
ops.node(1, 0.0, 0.0)
ops.node(2, 360.0, 0.0)
ops.node(3, 720.0, 0.0)
ops.node(4, 1080.0, 0.0)
ops.node(5, 0.0, 162.0, '-mass', m1, m1, 0.0)
ops.node(6, 360.0, 162.0, '-mass', m1, m1, 0.0)
ops.node(7, 720.0, 162.0, '-mass', m1, m1, 0.0)
ops.node(8, 1080.0, 162.0, '-mass', m1, m1, 0.0)
ops.node(9, 0.0, 324.0, '-mass', m2, m2, 0.0)
ops.node(10, 360.0, 324.0, '-mass', m2, m2, 0.0)
ops.node(11, 720.0, 324.0, '-mass', m2, m2, 0.0)
ops.node(12, 1080.0, 324.0, '-mass', m2, m2, 0.0)
ops.node(13, 0.0, 486.0, '-mass', m3, m3, 0.0)
ops.node(14, 360.0, 486.0, '-mass', m3, m3, 0.0)
ops.node(15, 720.0, 486.0, '-mass', m3, m3, 0.0)
ops.node(16, 1080.0, 486.0, '-mass', m3, m3, 0.0)
# Set the boundary conditions - command: fix(nodeID, xRestrnt, yRestrnt, rZRestrnt)
ops.fix(1, 1, 1, 1)
ops.fix(2, 1, 1, 1)
ops.fix(3, 1, 1, 1)
ops.fix(4, 1, 1, 1)
# Define geometric transformations for beam-column elements
ops.geomTransf('Linear', 1) # beams
ops.geomTransf('PDelta', 2) # columns
# Define elements
# Create elastic beam-column - command: element('elasticBeamColumn', eleID, node1, node2, A, E, Iz, geomTransfTag)
# Define the Columns
ops.element('elasticBeamColumn', 1, 1, 5, 75.6, 29000.0, 3400.0, 2) # W14X257
ops.element('elasticBeamColumn', 2, 5, 9, 75.6, 29000.0, 3400.0, 2) # W14X257
ops.element('elasticBeamColumn', 3, 9, 13, 75.6, 29000.0, 3400.0, 2) # W14X257
ops.element('elasticBeamColumn', 4, 2, 6, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 5, 6, 10, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 6, 10, 14, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 7, 3, 7, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 8, 7, 11, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 9, 11, 15, 91.4, 29000.0, 4330.0, 2) # W14X311
ops.element('elasticBeamColumn', 10, 4, 8, 75.6, 29000.0, 3400.0, 2) # W14X257
ops.element('elasticBeamColumn', 11, 8, 12, 75.6, 29000.0, 3400.0, 2) # W14X257
ops.element('elasticBeamColumn', 12, 12, 16, 75.6, 29000.0, 3400.0, 2) # W14X257
# Define the Beams
ops.element('elasticBeamColumn', 13, 5, 6, 34.7, 29000.0, 5900.0, 1) # W33X118
ops.element('elasticBeamColumn', 14, 6, 7, 34.7, 29000.0, 5900.0, 1) # W33X118
ops.element('elasticBeamColumn', 15, 7, 8, 34.7, 29000.0, 5900.0, 1) # W33X118
ops.element('elasticBeamColumn', 16, 9, 10, 34.2, 29000.0, 4930.0, 1) # W30X116
ops.element('elasticBeamColumn', 17, 10, 11, 34.2, 29000.0, 4930.0, 1) # W30X116
ops.element('elasticBeamColumn', 18, 11, 12, 34.2, 29000.0, 4930.0, 1) # W30X116
ops.element('elasticBeamColumn', 19, 13, 14, 20.1, 29000.0, 1830.0, 1) # W24X68
ops.element('elasticBeamColumn', 20, 14, 15, 20.1, 29000.0, 1830.0, 1) # W24X68
ops.element('elasticBeamColumn', 21, 15, 16, 20.1, 29000.0, 1830.0, 1) # W24X68
# Define loads for Gravity Analysis
# ---------------------------------
# Create a Linear TimeSeries (load factor varies linearly with time): command timeSeries('Linear', tag)
ops.timeSeries('Linear', 1)
# Create a Plain load pattern with a linear TimeSeries: command pattern('Plain', tag, timeSeriesTag)
ops.pattern('Plain', 1, 1)
ops.eleLoad('-ele', 13, 14, 15, '-type', '-beamUniform', -w1)
ops.eleLoad('-ele', 16, 17, 18, '-type', '-beamUniform', -w2)
ops.eleLoad('-ele', 19, 20, 21, '-type', '-beamUniform', -w3)
# ---------------------------------
# Create Analysis for Gravity Loads
# ---------------------------------
# Create the system of equation, a SPD using a band storage scheme
ops.system('BandSPD')
# Create the DOF numberer, the reverse Cuthill-McKee algorithm
ops.numberer('RCM')
# Create the constraint handler, a Plain handler is used as homo constraints
ops.constraints('Plain')
# Create the integration scheme, the LoadControl scheme using steps of 1.0
ops.integrator('LoadControl', 1.0)
# Create the convergence test and the solution algorithm, a Newton algorithm
ops.test('NormDispIncr', 1.0e-10, 6)
ops.algorithm('Newton')
# create the analysis object
ops.analysis('Static')
# ---------------------------------
# Perform Gravity Analysis
# ---------------------------------
ops.analyze(1)
# ----------------------------------------------------
# set gravity loads constant and time in domain to 0.0
# ----------------------------------------------------
ops.loadConst('-time', 0.0)
4.1.3.4. Rayleigh Damping
Damping is modeled with Rayleigh damping, in which the damping matrix is a combination of the mass and stiffness matrices, \(C = \alpha_M M + \beta_K K\). The two coefficients are chosen so that the damping ratio is \(\zeta\) in modes \(i\) and \(j\):
The circular frequencies \(\omega = \sqrt{\lambda}\) are obtained from the eigenvalues \(\lambda\) returned by the eigen command. The rayleigh command takes four coefficients, rayleigh $alphaM $betaK $betaKinit $betaKcomm; here the stiffness proportional part uses the last committed stiffness (the fourth argument). The periods \(T = 2 \pi / \omega\) are also printed.
# ----------------------------------
# Determine Rayleigh Damping Factors
# ----------------------------------
set eigenValues [eigen 5]
set lambdaI [lindex $eigenValues [expr {$modeI - 1}]]
set lambdaJ [lindex $eigenValues [expr {$modeJ - 1}]]
set wI [expr {sqrt($lambdaI)}]
set wJ [expr {sqrt($lambdaJ)}]
set denom [expr {$wI + $wJ}]
set alphaM [expr {$zeta * 2.0 * $wI * $wJ / $denom}]
set betaK [expr {$zeta * 2.0 / $denom}]
rayleigh $alphaM 0.0 0.0 $betaK
puts "\nEigenvalues:"
set eigenValue1 [lindex $eigenValues 0]
puts "T[expr 0+1] = [expr 2*$PI/sqrt($eigenValue1)]"
set eigenValue2 [lindex $eigenValues 1]
puts "T[expr 1+1] = [expr 2*$PI/sqrt($eigenValue2)]"
set eigenValue3 [lindex $eigenValues 2]
puts "T[expr 2+1] = [expr 2*$PI/sqrt($eigenValue3)]"
set eigenValue4 [lindex $eigenValues 3]
puts "T[expr 3+1] = [expr 2*$PI/sqrt($eigenValue4)]"
set eigenValue5 [lindex $eigenValues 4]
puts "T[expr 4+1] = [expr 2*$PI/sqrt($eigenValue5)]"
# ----------------------------------
# Determine Rayleigh Damping Factors
# ----------------------------------
eigenValues = ops.eigen(5)
wI = math.sqrt(eigenValues[modeI - 1])
wJ = math.sqrt(eigenValues[modeJ - 1])
alphaM = zeta * 2.0 * wI * wJ / (wI + wJ)
betaK = zeta * 2.0 / (wI + wJ)
ops.rayleigh(alphaM, 0.0, 0.0, betaK)
print('\nEigenvalues:')
for i, eigenValue in enumerate(eigenValues):
print(f'T{i+1} = {2*PI/math.sqrt(eigenValue)}')
4.1.3.5. Dynamic Loads - Uniform Excitation
The ground motion record is in the PEER strong motion database format: a few header lines, one of which gives the number of points and the time step, followed by the acceleration values in units of g. The procedure ReadRecord reads the header to obtain the time step dT and the number of points nPts, and writes the acceleration values alone to the file IELC180.acc. In Tcl the procedure is in the file ReadRecord.tcl, which is loaded with the source command; in Python an equivalent function, ReadRecord, is defined just before it is used.
A Path time series is then created from the values in the file. As the values are in units of g, the series is given a -factor of g so that the accelerations are in in/sec2. A UniformExcitation load pattern applies this acceleration to the base of the structure in the horizontal direction (direction 1).
#
# Define Dynamic Loads - Uniform Excitation
#
source ReadRecord.tcl
ReadRecord $record.AT2 $record.acc dT nPts
# the record is in units of g, so it is scaled by g to get in/sec^2
timeSeries Path 2 -filePath $record.acc -dt $dT -factor $g
pattern UniformExcitation 2 1 -accel 2
#
# Define Dynamic Loads - Uniform Excitation
#
def ReadRecord(inFilename, outFilename):
"""Read a PEER strong motion record (old SMD or new NGA format), write the
acceleration values to outFilename, and return (dt, nPts)."""
dt = 0.0
nPts = 0
with open(inFilename, 'r') as inFile, open(outFilename, 'w') as outFile:
inHeader = True
for line in inFile:
words = line.replace(',', ' ').split()
if len(words) == 0:
continue
if not inHeader:
outFile.write(line)
elif words[0] == 'NPTS=':
# old SMD format: NPTS= 4000, DT= .01000 SEC
nPts = int(words[1])
dt = float(words[words.index('DT=') + 1])
inHeader = False
elif words[-1] == 'DT' and len(words) >= 4:
# new NGA format: 3930 0.00500 NPTS, DT
nPts = int(words[0])
dt = float(words[1])
inHeader = False
return dt, nPts
dT, nPts = ReadRecord(record + '.AT2', record + '.acc')
# the record is in units of g, so it is scaled by g to get in/sec^2
ops.timeSeries('Path', 2, '-filePath', record + '.acc', '-dt', dT, '-factor', g)
ops.pattern('UniformExcitation', 2, 1, '-accel', 2)
Note
With a UniformExcitation pattern the equations of motion are written in terms of displacements, velocities and accelerations relative to the ground. The displacements and accelerations reported by the nodes are therefore relative values.
4.1.3.6. Output Specification
Three node recorders are created, at one node on each floor and at the base (nodes 13, 9, 5 and 1). The first records the displacements, the second the horizontal relative accelerations. In the third, the -timeSeries option adds the ground acceleration given by time series 2 to the relative accelerations, so that the total (absolute) accelerations are recorded. The -time option writes the time in the first column of each file.
#
# create a recorder
#
recorder Node -time -file disp.out -node 13 9 5 1 -dof 1 2 3 disp
recorder Node -time -file relAccel.out -node 13 9 5 1 -dof 1 accel
recorder Node -time -file totalAccel.out -timeSeries 2 -node 13 9 5 1 -dof 1 accel
#
# create a recorder
#
ops.recorder('Node', '-time', '-file', 'disp.out', '-node', 13, 9, 5, 1, '-dof', 1, 2, 3, 'disp')
ops.recorder('Node', '-time', '-file', 'relAccel.out', '-node', 13, 9, 5, 1, '-dof', 1, 'accel')
ops.recorder('Node', '-time', '-file', 'totalAccel.out', '-timeSeries', 2, '-node', 13, 9, 5, 1, '-dof', 1, 'accel')
4.1.3.7. Analysis - Transient
As we are moving from a static to a transient analysis, the analysis objects of the gravity analysis are first removed with wipeAnalysis. The new analysis uses a Newmark integrator with \(\gamma = 0.5\) and \(\beta = 0.25\) (the average acceleration method, which is unconditionally stable), a Newton algorithm with a NormUnbalance convergence test, and a general banded system of equations.
#
# Create the transient Analysis
#
# wipeAnalysis first as moving from static to transient
wipeAnalysis
system BandGeneral
constraints Plain
test NormUnbalance 1.0e-6 10
algorithm Newton
numberer RCM
integrator Newmark 0.5 0.25; # Newmark average acceleration
analysis Transient
#
# Create the transient Analysis
#
# wipeAnalysis first as moving from static to transient
ops.wipeAnalysis()
ops.system('BandGeneral')
ops.constraints('Plain')
ops.test('NormUnbalance', 1.0e-6, 10)
ops.algorithm('Newton')
ops.numberer('RCM')
ops.integrator('Newmark', 0.5, 0.25) # Newmark average acceleration
ops.analysis('Transient')
4.1.3.8. Perform the Transient Analysis
The analysis is performed one step at a time, with the time step of the record, for the number of points in the record. After each step the horizontal displacement of the roof (node 13) is obtained with nodeDisp and its peak value, and the time at which it occurs, are kept. If a step fails, the loop is stopped.
#
# Perform the Transient Analysis
#
# analyze one step at a time, keeping track of the peak roof displacement
set maxDisp 0.0
for {set i 0} {$i < $nPts} {incr i} {
if {[analyze 1 $dT] != 0} {
puts "analysis failed at time [getTime]"
break
}
set u [expr {abs([nodeDisp 13 1])}]
if {$u > $maxDisp} {
set maxDisp $u
set tMax [getTime]
}
}
puts "\nPeak roof displacement: $maxDisp at time $tMax"
#
# Perform the Transient Analysis
#
# analyze one step at a time, keeping track of the peak roof displacement
maxDisp = 0.0
tMax = 0.0
for i in range(nPts):
if ops.analyze(1, dT) != 0:
print(f'analysis failed at time {ops.getTime()}')
break
u = abs(ops.nodeDisp(13, 1))
if u > maxDisp:
maxDisp = u
tMax = ops.getTime()
print(f'\nPeak roof displacement: {maxDisp} at time {tMax}')
ops.wipe()
4.1.3.9. Results
When you run the script, you should see the following printed to the screen:
Eigenvalues:
T1 = 1.0401122027054261
T2 = 0.3526490332325196
T3 = 0.19304112147501282
T4 = 0.15628844064794659
T5 = 0.13080201959062954
Peak roof displacement: 8.346667239773774 at time 4.490000
Eigenvalues:
T1 = 1.0401122027054261
T2 = 0.3526490332325196
T3 = 0.19304112147501282
T4 = 0.15628844064794659
T5 = 0.13080201959062954
Peak roof displacement: 8.346667239773774 at time 4.489999999999949
The periods are computed after the gravity loads have been applied, so they include the effect of the column axial forces on the stiffness, through the PDelta transformation of the columns. The peak roof displacement of 8.35 in is a roof drift of 1.7% of the 486 in height. The time histories of the displacements and accelerations are in the files disp.out, relAccel.out and totalAccel.out.
The first column of disp.out is the time, and the next three columns are the displacements (dofs 1, 2 and 3) of the roof node 13. The horizontal roof displacement is therefore in the second column. It can be plotted, for example, in Python with:
import numpy as np
import matplotlib.pyplot as plt
data = np.loadtxt('disp.out')
plt.plot(data[:, 0], data[:, 1])
plt.xlabel('Time (sec)')
plt.ylabel('Roof displacement (in)')
plt.show()
Fig. 4.1.3.1 Horizontal displacement of the roof (node 13) during the El Centro ground motion.
The largest response occurs in the first few seconds of the record, during the strong shaking. The structure then continues to vibrate at about its first period (1.04 sec), with the amplitude decreasing slowly because of the 2% damping and the continuing, weaker, ground motion. The displacement does not start at zero, because the gravity loads alone already displace node 13 horizontally by 0.07 in: the beam end moments bend the exterior columns, so node 13, at the left end of the roof, moves slightly inward. The frame and the gravity loads are symmetric, and node 16, at the right end of the roof, moves by the same amount in the opposite direction, so this is not a sway of the frame.