Professional Documents
Culture Documents
GettingStarted OpenSees PDF
GettingStarted OpenSees PDF
G S with
OpenSees
Vesna Terzic
UC Berkeley
September 2011
Agenda
g
• IIntroduction
t d ti to t OpenSees
O S
• Introduction to Tcl programming language
• Demonstration of how to download OpenSees
interpreter and install Tcl/Tk
• Discussion
Di i off OpenSees
O S R
Resources ((command
d
manual, getting started manual, examples manual,
message board)
• Example of how to create and run a small
structure
• Q&A with web participants
What is OpenSees?
p
• Command syntax:
command arg1 arg2 …
• Help:
p
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
Tcl examples
p ((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
g other files hello
>source Example1.tcl
Tcl examples
p ((2))