You are on page 1of 25

Introduction to OpenSees

Input from:
Vesna Terzic
& Selim Gunay
UC Berkeley
Agenda

• What is OpenSees?
• OpenSees Resources (command manual,
getting started manual, examples manual,
message board)
• Example of how to create model and run a
transient analysis of a cantilever column
• Capabilities of OpenSees
What is OpenSees?

• A software framework (written primarily in C++)


for simulation applications in earthquake
engineering using finite element methods
• It is open-source software framework
• A communication mechanism for exchanging and
building upon research accomplishments
• OpenSees is fast, stable, efficient in solving large
nonlinear models with multiple runs
• To create a FEM in OpenSees you need to know
basics of Tcl programing language
More about OpenSees…

• OpenSees is primarily a research tool but is also used in


professional practice
• As with any nonlinear analysis, it requires careful
consideration of model and interpretation of results
• It is under continual development by students, faculty and
other researchers
• User interface development lags behind computational
technology
• It is not bullet-proof
• An investment of time and learning is required
Main Abstractions in OpenSees
Framework

Holds the state of the model


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

ModelBuilder Domain Analysis

Constructs the objects Moves the model from


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

Monitors user defined


parameters in the
model during the
analysis
(20 classes)
OpenSees Framework
How Do People Use the
OpenSees Framework?
• Provide their own main() function in C++ and link
them to framework.
• Use OpenSees interpreters (OpenSees.exe,
OpenSeesSP.exe, OpenSeesMP.exe). These are
extensions of the Tcl interpreters (tclsh, wish) that
are extended to commands for finite element
analysis:
1. Modeling – create nodes, elements, loads and constraints
2. Analysis – specify the analysis procedure
3. Output specification – specify what it is you want to monitor
during the analysis
Being interpreters means that the files you create and
submit to the OpenSees interpreters are not input files.
You are creating and submitting PROGRAMS.
What is Tcl?

Tcl is a dynamic programming language


• It is a string based command language
• Variables and variable substitution
• Expression evaluation
• Basic control structures (if , while, for, foreach)
• Procedures
• File manipulation
• Sourcing other files

Dynamic programming language: A class of high-level programming language that


execute at runtime many common behaviors that other languages might perform
during compilation. These behaviors could include extension of the program, by
adding new code, by extending objects and definitions, or by modifying the type of
system, all during program execution.
Command Syntax and Tutorial

• Command syntax:
command arg1 arg2 …

• Help:
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
Tcl examples (1)
•variables & variable substitution •lists
>set a 1 >set a {1 2 three}
1 1 2 three
>set b a >set la [llength $a]
a 3
>set b $a >set start [lindex $a 0]
1 1
>lappend a four
1 2 three four
•expression evaluation
>expr 2 + 3
5 •file manipulation
>set b [expr 2 + $b] >set fileId [open tmp w]
3 >puts $fileId “hello”
>close $fileID
>type tmp
•sourcing other files hello
>source Example1.tcl

Sourcing: Evaluate a file or resource as a Tcl script


Tcl examples (2)

•control structures •procedures


> for {set i 1} {$i < 10} {incr i 1} { >proc guess {value} {
puts “i equals $i” if {$value < $sum} {
} puts “too low”
… } else {
> set sum 0 if {$value > $sum} {
foreach value {1 2 3 4} { puts “too high”
set sum [expr $sum + $value] } else {
} puts “you got it!”
>puts $sum }
10 }
}
> guess 9
too low
Tcl examples (3)

• If you add, subtract, multiply and divide two


integer numbers the result is an integer.
> set a [expr 1/2]
0

• If you add, subtract, multiply and divide an integer


number and a floating-point number, then the
result is a floating-point number.
>set b [expr 1./2]
0.5

• Tcl does not work with ordinary decimal fractions,


but with binary fractions
>set c [expr 1.2/0.1]
11.999999999999998
Downloading OpenSees.exe and
Installing Tcl/Tk

• Download OpenSees.exe and tcl/tk from here:


http://opensees.berkeley.edu/OpenSees/user/download.php

• Tutorial on installing tcl/tk:


http://opensees.berkeley.edu/wiki/index.php/
Getting_Started_with_OpenSees_--_Download_OpenSees
Running OpenSees through
NEEShub
• In addition to being a platform that runs on a personal computer,
OpenSees can be used through the OpenSeesLaboratory tool of
NEEShub.
• By using this free tool, users can run analyses remotely on the
NEEShub machines that are extremely fast. This can be very
useful to advanced OpenSees users because it will drastically
decrease computational time for large models or analyses that need
to perform many runs.
• For new users, the OpenSeesLaboratory tool allows you to try
OpenSees without any initial set-up or installation.
• Here you can find tutorial on how to run OpenSees through
NEEShub http://opensees.berkeley.edu/wiki/index.php/
Discovering_OpenSees_--_OpenSees_on_NEEShub
OpenSees Resources

• Getting Started Manual:


http://opensees.berkeley.edu/wiki/index.php/Getting_Started
• Command Manual:
http://opensees.berkeley.edu/wiki/index.php/Command_Manual
• Examples Manuals:
http://opensees.berkeley.edu/wiki/index.php/Examples
• Message Board:
http://opensees.berkeley.edu/community/viewforum.php?f=2
• Discovering OpenSees web-based learning series:
http://opensees.berkeley.edu/wiki/index.php/Discovering_OpenSees
Example: Create model and run transient
analysis of a linear-elastic cantilever column

http://opensees.berkeley.edu/wiki/index.php/Time_History
_Analysis_of_a_2D_Elastic_Cantilever_Column
Capabilities and Benefits of OpenSees

Large Variety of Analysis Types


Dynamic
 Uniform ground motion
 Multi-support ground motion
 Force excitation
Static
 Gravity
 Cyclic
 Nonlinear Static: Pushover
Capabilities and Benefits of OpenSees

Large Variety of Transient Integrators


Central Difference
Explicit Newmark
Implicit Newmark
Explicit Alpha
Alpha-Operator Splitting
Hilber-Hughes-Taylor (HTT)
Generalized Alpha
TRBDF2
Capabilities and Benefits of OpenSees

Large Variety of Constitutive Models

Steel & Reinforcing-Steel Concrete


 Steel01  Concrete01 -- Zero Tensile Strength
 Steel02 -- Giuffré-Menegotto-Pinto  Concrete02 -- Linear Tension Softening
Model with Isotropic Strain Hardening  Concrete04 -- Popovics Concrete
 Hysteretic Material  Concrete06
 Concrete07 – Chang & Mander’s 1994
 Reinforcing Steel Material
 ConfinedConcrete01 Material
 Dodd Restrepo
…
 ….

And many others, for the full list:


http://opensees.berkeley.edu/wiki/index.php/UniaxialMaterial_Command
Capabilities and Benefits of OpenSees

Large Variety of Solution Algorithms


 Linear Algorithm
 Newton Algorithm
 Newton with Line Search Algorithm
 Modified Newton Algorithm
 Krylov-Newton Algorithm
 BFGS Algorithm
 Broyden Algorithm
Capabilities and Benefits of OpenSees

Freedom to change
the nonlinear
solution during the
analysis without a
requirement to
restart the analysis
Capabilities and Benefits of OpenSees

Convenient for Parametric Study Analyses


 Potential variables in analyses (Tomorrow PEER PBEE Formulation):
 Ground motion
 Mass
 Damping ratio
 Strength
 Modulus of elasticity
 Ultimate strain

Run analyses with changing values of the above parameters


using a single input “tcl” file
Capabilities and Benefits of OpenSees

Available Parallel Applications


OpenSees SP: Parallelizes the state determination
and equation solving (particularly useful for HS)
OpenSees MP: Useful to parallelize different
analyses of a model (very efficient for
parametric studies)

Only minor modifications


(font in red) is needed for
the parallel commands
Capabilities and Benefits of OpenSees

Open Source: Convenient for making modifications in


the code

Examples of Large Scale Contributions:


Sensitivity Analysis:
http://opensees.berkeley.edu/wiki/index.php/Sensitivity_Command_Manual

Thermal Analysis “Structures in Fire”:


https://www.wiki.ed.ac.uk/display/opensees/Command+Manual+for+OpenSees+Thermal
Questions?

You might also like