15
G S Getting Started with OpenSees OpenSees Vesna Terzic UC Berkeley September 2011

Getting Started OPENSEES.pdf

Embed Size (px)

Citation preview

Page 1: Getting Started OPENSEES.pdf

G SGetting Started with OpenSeesOpenSees

Vesna TerzicUC Berkeley

September 2011

Page 2: Getting Started OPENSEES.pdf

Agendag

I t d ti t O S• Introduction to OpenSees• Introduction to Tcl programming language• Demonstration of how to download OpenSees

interpreter and install Tcl/TkDi i f O S R ( d• Discussion of OpenSees Resources (command manual, getting started manual, examples manual, message board)message board)

• Example of how to create and run a small structurestructure

• Q&A with web participants

Page 3: Getting Started OPENSEES.pdf

What is OpenSees?p

• A software framework (written primarelly in C++) for simulation applications in earthquake engineering using finite element methodsengineering using finite element methods.

• It is open-source software frameworkA i ti h i f h i d• A communication mechanism for exchanging and building upon research accomplishments

• OpenSees is fast stable efficient in solving large• OpenSees is fast, stable, efficient in solving large nonlinear models with multiple runs

• To make FEM in OpenSees you need to know• To make FEM in OpenSees you need to know basics of Tcl programing language

Page 4: Getting Started OPENSEES.pdf

OpenSees Framework p

Page 5: Getting Started OPENSEES.pdf

How Do People Use the OpenSees Framework?OpenSees Framework?

• Provide their own main() function in C++ and link to framework.

• Use OpenSees interpreters (OpenSees.exe, O S SP O S MP ) ThOpenSeesSP.exe, OpenSeesMP.exe). These are extensions of the Tcl interpreters (tclsh, wish) which have been extended to commands for finite element analysis:

1. Modeling – create nodes, elements, loads and constraints2 Analysis – specify the analysis procedure2. 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 andBeing interpreters means that the files you create and submit to the OpenSees interpreters are not input files. You are creating and submitting PROGRAMS.

Page 6: Getting Started OPENSEES.pdf

What is Tcl?

• Tcl is a dynamic programming• Tcl is a dynamic programming language.

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

Page 7: Getting Started OPENSEES.pdf

Command Syntax and Tutorialy

• Command syntax:• Command syntax:command arg1 arg2 …

• Help:http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.htmlp

Page 8: Getting Started OPENSEES.pdf

Tcl examples (1)p ( )

•variables & variable substitution •lists

>set a 11>set b aa

>set a {1 2 three}1 2 three>set la [llength $a]3a

>set b $a1

>set start [lindex $a 0]1>lappend a four1 2 three four

•expression evaluation>expr 2 + 35>set b [expr 2 + $b] >set fileId [open tmp w]

•file manipulation>set b [expr 2 + $b]3

>set fileId [open tmp w]>puts $fileId “hello”>close $fileID>type tmphello•sourcing other files hello

>source Example1.tcl

g

Page 9: Getting Started OPENSEES.pdf

Tcl examples (2)p ( )

> for {set i 1} {$i < 10} {incr i 1} {puts “i equals $i”

}

•control structures>proc guess {value} {

if {$value < $sum} {t “t l ”

•procedures

}…> set sum 0foreach value {1 2 3 4} {

puts “too low”} else {

if {$value > $sum} {puts “too high”{ } {

set sum [expr $sum + $value]}>puts $sum10

p g} else { puts “you got it!”

}}10 }

}> guess 9too low

Page 10: Getting Started OPENSEES.pdf

Tcl examples (3)p ( )

• If you add, subtract, multiply and divide twoIf you add, subtract, multiply and divide two integer numbers the result is an integer.> set a [expr 1/2]00

• If you add, subtract, multiply and divide an integer number and a floating-point number, then the

>set b [expr 1./2]0 5

number and a floating point number, then the result is a floating-point number.

0.5

• Tcl does not work with ordinary decimal fractions, but with binary fractions>set c [expr 1.2/0.1]11.999999999999998

y

Page 11: Getting Started OPENSEES.pdf

Downloading OpenSees.exe and I t lli T l/TkInstalling Tcl/Tk

• Download OpenSees.exe and tcl/tk from here:Download OpenSees.exe and tcl/tk from here: http://opensees.berkeley.edu/OpenSees/user/download.phpp p

• Tutorial on installing tcl/tk:http://opensees berkeley edu/wiki/index php/Gettihttp://opensees.berkeley.edu/wiki/index.php/Getting_Started_with_OpenSees_--_Download_OpenSees

Page 12: Getting Started OPENSEES.pdf

Running OpenSees through NEESh bNEEShub

• 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

f l d d b i ill d i ll duseful 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 trial OpenSees without any initial set up or installationtrial 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_-

O S NEESh b-_OpenSees_on_NEEShub

Page 13: Getting Started OPENSEES.pdf

OpenSees Resourcesp

• Getting Started Man al:• Getting Started Manual:http://opensees.berkeley.edu/wiki/index.php/Getting_Started

• Command Manual: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

• Descovering OpenSees web-based learning series: http://opensees berkeley edu/wiki/index php/Discovering Openhttp://opensees.berkeley.edu/wiki/index.php/Discovering_OpenSees

Page 14: Getting Started OPENSEES.pdf

Example of how to create and ll t trun a small structure

http://opensees.berkeley.edu/wiki/index.php/Eigen_analysis_of_a_two-storey_one-bay_frame

Page 15: Getting Started OPENSEES.pdf

Questions?Questions?