Transcript file

&
powered by OpenSees
BuildingTcl &
BuildingTclViewer
Getting Started Guide
Release 1.8, October 2009
Silvia Mazzoni
University of California, Berkeley
BuildingTcl Installation
1. Download & Install Tcl (may have done so already):
http://opensees.berkeley.edu/OpenSees/user/download.php
2. Download & Extract file: BuildingTcl.zip
– The “C:/Program Files/BuildingTcl”
folder is recommended
3. The extracted BuildingTcl folder will contain:
Installation File
4. Double-click installation file
Documentation Files:
Demo & Documents
Do NOT touch
Working Files:
Copy into the working directory
Double-click to run
BuildingTclViewer
Copy these files into each and
every working directory
5. Make sure that the latest versions of OpenSees.exe and OpenSeesTk.exe are stored in
OpenSeesProgramFiles folder. The names must be exact.
6. Working Files, these files specify the path of the program set up specifically on YOUR
computer:
– MyBuildingTcl.tcl:
•
•
Copy this file into working directory -- where input files are located
Source this file from within OpenSees.exe or OpenSeesTk.exe
– MyBuildingTclViewer.tcl
•
•
Copy this file into working directory -- where input files are located
Source this file from within OpenSeesTk.exe, or
– MyBuildingTclViewer.bat
•
•
Double-click to start-up BuildingTclViewer directly
This batch file starts up OpenSeesTk, sources MyBuildingTclViewer.tcl and starts up
the BuildingTclViewer program. It can be copied into the working directory, or can be
executed directly in the program directory.
Introduction
• BuildingTcl is a library of Tcl procedures (commands) used to build a database for
numerical simulation of building frames. Structural model, loading and analysis data are
included in this database. Structural models can be Elevations, Plans, or 3DModels
which combine elevations and plans. Procedures are included to perform the numerical
simulation using OpenSees.
• BuildingTclViewer is a Tcl/Tk widget (program) that provides a graphical user
interface to view the BuildingTcl database, run the numerical simulations using
OpenSees interactively, and view the results interactively.
BuildingTcl Commands
# SET UP
source myBuildingTcl.tcl
<setDataDir Data>
<setUnits -Length $BasicLengthUnit -Force $BasicForceUnit -Time BasicTimeUnit>
BuildingTcl Script
# DEFINE INPUT DATA
addMaterialData …..
addMaterial
# Define Materials Library
addSectionData …..
addSection
# Define Sections Library
addElementModelData …..
addElementModel
# Define ElementModel Library
addAnalysisModelData …..
addAnalysisModel
# Define AnalysisModel Library
addModelData …..
addModel
# Define Structural-Models Library:
Elevations, Plans, 3DModels
addLoadData …..
addLoad
# Define Loads Library
addLoadCombinationData …..
addLoadCombination
# Define Load-Combinations Library
# BUILD AND ANALYZE
SelectModel …..
SelectLoadCombination …..
BuildAndAnalyze
This is done via a BuildingTcl script, or
interactively using BuidingTclViewer
Run BuildingTcl
•
myBuildingTcl.tcl – no graphics
– Incorporates BuildingTcl commands into the Tcl Interpreter
– The BuildingTcl commands are used within OpenSees.exe or OpenSeesTk.exe.
– Run:
1. Run OpenSees.exe or OpenSeesTk.exe
2. Source myBuildingTcl.tcl at OpenSees prompt
3. Source input and analysis files at OpenSees prompt
C:> cd BuildingTclGettingStartedFiles
C:> OpenSees
..
OpenSees > source myBuildingTcl.tcl
..
OpenSees > source GettingStartedDataFile.tcl
..
OpenSees > source GettingStartedRunFile.tcl
..
Run BuildingTclViewer
•
myBuildingTclviewer.tcl – BuildingTcl with graphical interface
– Incorporates BuildingTcl & BuildingTclviewer commands into the Tcl/Tk Interpreter
– This file needs to be sourced from the OpenSeesTk.exe prompt, or by doubleclicking on the BuildingTclViewer.bat file
1. Run from OpenSees Prompt:
1. Run OpenSeesTk.exe – a Tk window opens up (do not close it).
2. Source myBuildingTclviewer.tcl at the OpenSees prompt
-- the Tk window becomes the BuildingTclviewer
OpenSees > source myBuildingTclViewer.tcl
Or
2. Double-click on myBuildingTclviewer.bat
GettingStartedInputFile.tcl
– Setup & Materials
This file contains all the input data for the building model and simulation. It is used by both
BuildingTcl and the BuildingTclViewer.
• BuildingTcl:
OpenSees > source myBuildingTcl.tcl
OpenSees > source GettingStartedInputFile.tcl
To perform the analyses:
OpenSees > source GettingStartedBuildindAndAnalyze.tcl
• BuildingTclViewer:
OpenSees > source myBuildingTclViewer.tcl
BuildingTclViewer menu: File>Load> GettingStartedInputFile.tcl
To perform the analyses:
BuildingTclViewer menu: Models and Load Combinations
BuildingTclViewer menu: Analysis>Analyze
GettingStartedInputFile.tcl
– Element Section
GettingStartedInputFile.tcl
– Gravity Loads
Gravity-Load Labels are used for the values gravity-load cases in the definition of the models.
They are then used in the LoadCombinations as well.
GettingStartedInputFile.tcl
– Structural Models: Elevations
GettingStartedInputFile.tcl
– Structural Models: Plan & 3DFrame
GettingStartedInputFile.tcl
– Lateral Loads
GettingStartedInputFile.tcl
–Load Combinations
GettingStartedBuildAndAnalyze.tcl
This file is used by BuildingTcl without the interactive capabilities of BuildingTclViewer.
Because there are no graphics, these simulations will run faster. BuildingTcl does postprocess the analysis data. The results of these simulations can then be viewed using
BuildingTclViewer as a subsequent step.
BuildingTclViewer Overview
1a. BuildingTclViewer Window
Interactive Window:
1b. Companion OpenSees Window:
Non-interactive window: error warnings
and communication
2. Load Main Input File: GettingStartedInputFile.tcl
3. Select Models & LoadCombinations
4. Analyze
5a. View Results
5b. Click on individual element:
6. Play