0% found this document useful (0 votes)
132 views22 pages

OpenSees Output and Recorder Commands

This document discusses output options in OpenSees, including recorders, print commands, and commands that return values. Recorders like Node, Element, and EnvelopeRecorders monitor parameters during analysis and store the data. The print command outputs node and element information. Commands like nodeDisp return displacement values, while analyzers and recorders provide output that can be stored in files or displayed.

Uploaded by

Julieta Rosas
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views22 pages

OpenSees Output and Recorder Commands

This document discusses output options in OpenSees, including recorders, print commands, and commands that return values. Recorders like Node, Element, and EnvelopeRecorders monitor parameters during analysis and store the data. The print command outputs node and element information. Commands like nodeDisp return displacement values, while analyzers and recorders provide output that can be stored in files or displayed.

Uploaded by

Julieta Rosas
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OpenSees & Output

Vesna Terzic
UC Berkeley

November 2011
Agenda
•  Introduction to Output options
•  OpenSees commands for creating the output:
recorder, print, recorder display, commands that
return values (e.g., nodeDisp) - demonstrated by
examples
•  Tcl “puts” commands for creating the output -
demonstrated by example
•  Summary
•  Q & A with web participants
Main Abstractions in OpenSees
Framework

Holds the state of the model


i
at time t and (t + dt)
(500 classes)

ModelBuilder Domain Analysis


Constructs the objects Moves the model
in the model and adds from state at time t to
them to the domain. state at time t + dt
(5 classes) Recorder (200 classes)

Monitors user defined


parameters in the
model during the
analysis
(20 classes)
Output Options
When you run OpenSees THERE IS NO OUTPUT PROVIDED
UNLESS YOU REQUEST IT

The commands for creating the output:

1. recorder command
recorder $type $arg1 $arg2 …
2. puts command
puts <$fileID> $string
3. print command
print <-file $fileName> <-node $nd1 $nd2 ..> <-ele $ele1 $ele2 …>
4. OpenSees commands that return values (e.g., nodeDisp)
5. recorder display command
Recorder Command
recorder $type $arg1 $arg2 $arg3 ….

[Link]

Recorder types:
Node:
•  Node
•  EnvelopeNode
•  Drift
Element/section/fiber:
•  Element
•  EnvelopeElement
Graphics:
•  plot
Node/EnvelopeNode Recorders
• To monitor what’s happening at the Nodes.
recorder Node <-file $fileName><-timeSeries $tsTag> <-time> <-node $tg1 $tg2 …> -dof $d1 $d2 .. disp
<-xml $fileName> <-nodeRange $tgS $tgE> vel
<-binary $fileName> <-region $rTag> accel
<-tcp $inetAddr> incrDisp
"eigen i"
reaction

Example:
recorder Node -file [Link] -node 2 -dof 1 2 3 disp

recorder Node -file [Link] -timeSeries 1 -node 2 -dof 1 accel

• The EnvelopeNode takes exactly same args as Node


recorder EnvelopeNode <-file $fileName> <-timeSeries $tsTag> <-time> <-node $tg1 $tg2 …> -dof $d1 $d2 .. disp
<-xml $fileName> <-nodeRange $tgS $tgE> vel
<-binary $fileName> <-region $rTag> accel
<-tcp $inetAddr> incrDisp
reaction
Element/EnvelopeElement Recorders
• To monitor what’s happening in the elements/sections/fiber:
recorder Element <-file $fileName> <-time> <-ele $tg1 $tg2 …> $arg1 $arg2 …
<-xml $fileName> <-eleRange $tgS $tgE>
<-binary $fileName> <-region $rTag>
<-tcp $inetAddr>

• The response you can ask vary from element to element. There are
arguments that are same for all elements, e.g. forces.
recorder Element -file [Link] -ele 1 2 forces

• The EnvelopeElement takes exactly same args


recorder EnvelopeElement <-file $fileName> <-time> <-ele $tg1 $tg2 …> $arg1 $arg2 …
<-xml $fileName> <-eleRange $tgS $tgE>
<-binary $fileName> <-region $rTag>
<-tcp $inetAddr>
The valid args for different elements
Elastic BCE: Force BCE and BWHE: Displacement BCE:

force force force


globalForce section $secTag $arg1 $arg2
localForce
basicForce
section $secTag $arg1 $arg2
basicDeformation
plasticDeformation
inflectionPoint
tangentDrift
integrationPoints
integrationWeights
The valid args for different elements
ZeroLength Element: ZeroLengthSection Element:
force force
deformation deformation
stiff stiff
material $matTag $arg1 $arg2 … section $arg1 $arg2…

Truss element:
axialForce
forces
localForce
deformations
section $arg1 $arg2…
material $arg1 $arg2 …
The valid args for different sections
Valid args to any section type are: force and deformation

Fiber Section:
forces
deformations
forceAndDeforamtion
fiber $fiberNum $matArg1 $matArg2 …
fiber $yLoc $zLoc $matTag $matArg1 $matArg2 …
The valid args for different materials
Valid args to any material are: strain, stress, and tangent

Fatigue Material:
stressStrain
damage
Examples
recorder Element <-file $fileName> <-time> <-ele $tg1 $tg2 …> $arg1 $arg2 …
<-xml $fileName> <-eleRange $tgS $tgE>
<-binary $fileName> <-region $rTag>
<-tcp $inetAddr>

Force-based beam-column element with fiber sections:


Element forces in global coordinate system: Force BCE:
force
recorder Element -file [Link] -ele 1 force globalForce
localForce
Sectional deformation (axial strain and curvature): basicForce
recorder Element -file [Link] -ele 1 sectionsection
Fiber Section: $secTag $arg1 $arg2
1 deformations
basicDeformation
forces
plasticDeformation
Stress in a fiber at a specific location:
deformations
inflectionPoint
forceAndDeforamtion Fiber Section:
recorder Element -file [Link] -ele 1 section 1 fiber 0. 0. 1 stress
tangentDrift
fiber $fiberNum $matArg1 $matArg2 … fiber $fiberNum $matArg1 $matArg2 …
integrationPoints
fiber $yLoc $zLoc $matTag $matArg1 fiber
$matArg2
$yLoc…$zLoc $matTag $matArg1 $matArg2 …
integrationWeights
“puts” command used to store data in the
output file
When there is no recorder for a quantity of interest you can
store the date into the file using puts command:
puts <$fileID> $string
Example (EigenAnal_twoStoreyFrame.tcl): storing periods into a file
[Link]

CALCULATE THE PERIODS CREATE THE OUTPUT FILE

# create model & analysis # open output file


… set Periods [open [Link] "w"]
# do eigen analysis
set numModes 2 # write the data
set lambda [eigen $numModes] foreach t $T {
puts $Periods " $t"
# calculate periods }
set T {}
set pi 3.141593 #close the file
foreach lam $lambda { close $Periods
lappend T [expr (2*$pi)/sqrt($lam)]
}
“puts” command used to print data to the
screen
In addition to storing periods into a file we can also print it to
the terminal using puts command:
puts “$string”
Example (EigenAnal_twoStoreyFrame.tcl): printing periods on terminal

# print periods to terminal


puts “periods of the frame are: $T”
Print command
[Link]
To print all objects of the domain:
print <-file $fileName>

To print node information:


print <-file $fileName> -node <$node1 $node2 ...>
To print element information :
print <-file $fileName> -ele <$ele1 $ele2 ...>

Example (EigenAnal_twoStoreyFrame.tcl):
print -node 3
Commands That Return Values
[Link]

• analyze command set ok [analyze numIter <Δt>]

• getTime command set currentTime [getTime]

• nodeDisp command set disp [nodeDisp $node <$dof>]

• nodeVel command set vel [nodeVel $node <$dof>]

• nodeAccel command set acc [nodeAccel $node <$dof>]

• nodeEigenvector set eig [nodeEigenvector $node


command $eigenvector <$dof>]

• eleResponse command set resp [eleResponse $eleTag $arg1 $arg2 …]


Example: eigenvectors for
translational DOFs
• nodeEigenvector set eig [nodeEigenvector $node $eigenvector <$dof>]
command
# get 2 eigenvectors for nodes 3 and 5
set f11 [nodeEigenvector 3 1 1]
set f21 [nodeEigenvector 5 1 1]
set f12 [nodeEigenvector 3 2 1]
set f22 [nodeEigenvector 5 2 1]
# print them on terminal in a normalized form
puts "eigenvector 1: [list [expr {$f11/$f21}] [expr {$f21/$f21}] ]"
puts "eigenvector 2: [list [expr {$f12/$f22}] [expr {$f22/$f22}] ]"
Display command
recorder display $windowTitle $xLoc $yLoc $xPixels $yPixels
prp $x $y $z
vup $xv $yv $zv
vpn $xn $yn $zn
viewWindow $xprp,n $xprp,p $yprp,n $yprp,p
display $arg1 $arg2 $arg3
VUP

[Link]
Display command: example
set h 120
recorder display “Mode Shape 1” 10 10 500 500VUP
prp $h $h 1
vup 0 1 0
vpn 0 0 1
viewWindow -200 200 -200 200
display -1 5 20
Procedures for graphical
visualization
•  For 2D and 3D frame structures the procedures for
graphical visualization can be downloaded from the
example manual
•  For 2D frames:
[Link]
OpenSees_Example_6._generic_2D_Frame,_N-story_N-
bay,_Reinforced-Concrete_Section_%26_Steel_W-Section
•  For 3D frames:
[Link]
OpenSees_Example_7._3D_Frame,_3-story_3-bayX_3-
bayZ,_Reinforced-Concrete_Section_%26_Steel_W-Section
•  The proc files are: [Link], [Link],
[Link]
Summary
•  Use RECORDER command to monitor response quantities
of interest during analysis
•  Use PUTS command to:
–  create output files of quantities that RECORDER does
not support
–  print data onto the screen
•  Use PRINT command to get information about all or some
objects of the domain
•  Use commands that return values (e.g. nodeDisp) to:
–  check your model
–  change parameters of the model or analysis in the
course of analysis
•  Use “recorder display” command or OpenSees procedures
for creating graphical images of OpenSees models
Questions?

You might also like